@font-face {
  font-family: "Noto Serif Display";
  src: url("./assets/fonts/noto-serif-display-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --font-serif: "Noto Serif Display", Georgia, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --edge-offset: 32px;
  color-scheme: dark;
  background: #000000;
  color: #ffffff;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

::selection {
  color: #000000;
  background: #ffffff;
}

::-moz-selection {
  color: #000000;
  background: #ffffff;
}

html {
  min-width: 320px;
  background: #000000;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-y: none;
}

html,
body,
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: #000000;
  font-family: var(--font-sans);
  line-break: strict;
}

img {
  display: block;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 39.6px;
  height: 39.6px;
  border: 0.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 0;
  opacity: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(1px) saturate(102%);
  -webkit-backdrop-filter: blur(1px) saturate(102%);
  pointer-events: none;
  transform-origin: center;
  transition:
    opacity 140ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
  will-change: opacity, transform;
}

.custom-cursor.is-clickable {
  border-color: #ffffff;
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.18),
    0 0 6px rgba(255, 255, 255, 0.86),
    0 0 18px rgba(255, 255, 255, 0.48),
    0 0 34px rgba(255, 255, 255, 0.18);
}

html.has-custom-cursor,
html.has-custom-cursor *,
html.has-custom-cursor *::before,
html.has-custom-cursor *::after {
  cursor: none !important;
}

html.has-custom-cursor .custom-cursor.is-visible {
  opacity: 1;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000000;
  pointer-events: none;
}

.site-background::before,
.site-background::after {
  position: absolute;
  z-index: 2;
  content: "";
  opacity: 0.64;
  filter: blur(46px) saturate(118%);
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: opacity, transform;
}

.site-background::before {
  inset: -14% -10%;
  background:
    radial-gradient(ellipse 36% 18% at 14% 10%, rgba(117, 89, 255, 0.26), transparent 72%),
    radial-gradient(ellipse 30% 16% at 76% 8%, rgba(255, 75, 174, 0.2), transparent 72%),
    radial-gradient(ellipse 34% 18% at 28% 92%, rgba(67, 207, 255, 0.18), transparent 72%),
    radial-gradient(ellipse 30% 16% at 88% 90%, rgba(133, 87, 255, 0.22), transparent 72%);
  animation: ambient-glow-flow-x 24s ease-in-out infinite;
}

.site-background::after {
  inset: -10% -14%;
  background:
    radial-gradient(ellipse 16% 34% at 10% 25%, rgba(69, 193, 255, 0.18), transparent 72%),
    radial-gradient(ellipse 15% 30% at 9% 82%, rgba(150, 82, 255, 0.22), transparent 72%),
    radial-gradient(ellipse 16% 32% at 91% 18%, rgba(255, 80, 174, 0.2), transparent 72%),
    radial-gradient(ellipse 15% 34% at 90% 76%, rgba(93, 114, 255, 0.23), transparent 72%);
  animation: ambient-glow-flow-y 29s ease-in-out infinite;
}

.site-background flower-ascii-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transform: scale(1);
  transform-origin: center;
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter, transform;
}

.site-background.is-visible flower-ascii-background {
  opacity: 1;
}

html[data-page="1"] .site-background flower-ascii-background {
  filter: blur(10px);
  transform: scale(1.3);
}

@keyframes ambient-glow-flow-x {
  0%,
  100% {
    opacity: 0.54;
    transform: translate3d(-2.5%, 0, 0) scale(1.02);
  }

  50% {
    opacity: 0.72;
    transform: translate3d(2.5%, 1%, 0) scale(1.08);
  }
}

@keyframes ambient-glow-flow-y {
  0%,
  100% {
    opacity: 0.56;
    transform: translate3d(0, -2.5%, 0) scale(1.04);
  }

  50% {
    opacity: 0.7;
    transform: translate3d(-1%, 2.5%, 0) scale(1.09);
  }
}

.page-stack {
  position: relative;
  z-index: 1;
}

.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: transparent;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.home-slogan {
  position: absolute;
  bottom: 160px;
  left: 50%;
  width: calc(100% - 64px);
  margin: 0;
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: clamp(42px, 3.75vw, 72px);
  font-weight: 300;
  font-variation-settings: "CTGR" 0, "wdth" 100;
  line-height: 1.2222;
  opacity: 0;
  text-align: center;
  transform: translate3d(calc(-50% + var(--parallax-x, 0px)), var(--parallax-y, 0px), 0);
  will-change: opacity, transform;
}

html.is-slogan-visible .home-slogan {
  opacity: 1;
}

.home-slogan__line {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.2222em;
  white-space: nowrap;
}

.slogan-word {
  display: inline-block;
  color: inherit;
  background-color: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transform: skewX(-10deg);
  transform-origin: center bottom;
  transition:
    color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.slogan-word:hover {
  color: #000000;
  background-color: #ffffff;
}

.typewriter-cursor {
  display: inline-block;
  position: relative;
  flex: 0 0 0;
  width: 0;
  height: 0;
  vertical-align: baseline;
}

.typewriter-cursor::before {
  position: absolute;
  top: -0.6em;
  left: 0.16em;
  width: 0.68em;
  height: 0.68em;
  background: #ffffff;
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.46),
    0 0 18px rgba(255, 255, 255, 0.18);
  content: "";
  opacity: 0;
  transform: scale(0);
  transform-origin: center;
}

.typewriter-character {
  animation: typewriter-character-reveal 360ms cubic-bezier(0.22, 0.74, 0.3, 1) both;
}

@keyframes typewriter-character-reveal {
  0%,
  14% {
    color: #ffffff;
    text-shadow:
      0 0 6px rgba(255, 255, 255, 0.5),
      0 0 14px rgba(255, 255, 255, 0.18);
  }

  18% {
    text-shadow: none;
  }

  38% {
    color: rgba(255, 255, 255, 0.5);
    text-shadow: none;
  }

  100% {
    color: #ffffff;
    text-shadow: none;
  }
}

.home-slogan .typewriter-cursor::before {
  top: calc(-0.34em + 2px);
}

.typewriter-cursor.is-visible::before {
  animation: typewriter-cursor-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes typewriter-cursor-enter {
  from {
    opacity: 0;
    transform: scale(0);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.typewriter-cursor.is-complete::before {
  animation: typewriter-cursor-exit 520ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes typewriter-cursor-exit {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0);
  }
}

.chapter-grid {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(32px, 6.25vw, 80px);
  width: min(1000px, calc(100vw - 160px));
  min-height: 176px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 200;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
  transform: translate3d(calc(-50% + var(--parallax-x, 0px)), calc(-50% + var(--parallax-y, 0px)), 0);
  will-change: transform;
}

.chapter-column {
  min-width: 0;
}

.chapter-sentence,
.chapter-content__link {
  color: inherit;
  background-color: transparent;
  transition:
    color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 200ms cubic-bezier(0.22, 1, 0.36, 1);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.punctuation-lock {
  white-space: nowrap;
}

.chapter-content__link {
  margin: 0;
  padding: 0;
}

.chapter-sentence:hover,
.chapter-content__link:hover {
  color: #000000;
  background-color: #ffffff;
}

.chapter-emphasis {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 700;
  transform: skewX(-10deg);
  transform-origin: center bottom;
}

.chapter-column p {
  margin: 0;
}

.chapter-content__marker {
  min-height: 1.2em;
}

.chapter-content__link-line {
  min-height: 1.2em;
  margin-top: 1.2em !important;
}

.chapter-content__link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.chapter-content__link:hover {
  opacity: 1;
}

.chapter-content__link:focus-visible {
  color: #000000;
  background-color: #ffffff;
  border-radius: 2px;
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.page-anchor {
  position: fixed;
  top: 50%;
  right: 80px;
  z-index: 12;
  display: grid;
  width: 60px;
  gap: 24px;
  justify-items: end;
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-50% + 20px));
  will-change: opacity, transform;
}

html.is-chrome-visible .page-anchor {
  pointer-events: auto;
  animation: page-anchor-enter 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes page-anchor-enter {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 20px));
  }

  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

.page-anchor__item {
  position: relative;
  width: 60px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.page-anchor__item::before {
  position: absolute;
  inset: -10px 0;
  content: "";
}

.page-anchor__item::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  content: "";
  transform: scaleX(0.6);
  transform-origin: right center;
  transition:
    transform 180ms linear,
    background-color 180ms linear,
    opacity 180ms linear;
}

.page-anchor__item:hover::after {
  background: rgba(255, 255, 255, 0.78);
}

.page-anchor__item.is-active::after {
  background: #ffffff;
  transform: scaleX(1);
}

.page-anchor__item:focus-visible::before {
  border-radius: 2px;
  outline: 1px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

.floating-logo,
.floating-footer,
.home-scroll-cue {
  position: fixed;
  left: 50%;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  will-change: opacity, transform;
}

html.is-chrome-visible .floating-logo,
html.is-chrome-visible .floating-footer,
html.is-chrome-visible[data-page="0"] .home-scroll-cue {
  pointer-events: auto;
  animation: floating-chrome-enter 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-scroll-cue {
  bottom: 96px;
  width: 120px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.home-scroll-cue img {
  width: 100%;
  height: 100%;
}

.home-scroll-cue:focus-visible {
  border-radius: 2px;
  outline: 1px solid rgba(255, 255, 255, 0.8);
  outline-offset: 6px;
}

.floating-logo {
  top: var(--edge-offset);
  width: 192px;
  height: 24px;
}

.logo-home-link {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-home-link:hover {
  transform: scale(1.1);
}

.floating-logo img {
  width: 100%;
  height: 100%;
}

.floating-footer {
  bottom: var(--edge-offset);
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  height: 25px;
  white-space: nowrap;
}

.floating-footer p {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: normal;
  text-align: center;
}

@keyframes floating-chrome-enter {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.x-link {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  color: inherit;
  transform-origin: center;
  transition:
    opacity 160ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.x-link img {
  width: 19.5px;
  height: 19.5px;
}

.x-link:hover {
  opacity: 0.68;
  transform: scale(1.8);
}

.x-link:focus-visible {
  border-radius: 2px;
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 480px) {
  .floating-footer {
    gap: 18px;
  }

  .floating-footer p {
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .home-slogan {
    width: calc(100% - 48px);
    font-size: clamp(30px, 8vw, 52px);
  }

  .home-slogan__line {
    white-space: normal;
  }

  .chapter-grid {
    top: 120px;
    right: 24px;
    bottom: 120px;
    left: 24px;
    grid-template-columns: 1fr;
    gap: 32px;
    width: auto;
    min-height: 0;
    overflow-y: auto;
    transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0);
  }

  .page-anchor {
    right: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-background::before,
  .site-background::after {
    animation: none;
  }

  .x-link,
  .logo-home-link,
  .home-scroll-cue {
    transition: none;
  }

  .floating-logo,
  .floating-footer,
  .home-scroll-cue,
  .page-anchor {
    animation: none;
  }

  html.is-chrome-visible .floating-logo,
  html.is-chrome-visible .floating-footer,
  html.is-chrome-visible[data-page="0"] .home-scroll-cue {
    opacity: 1;
    transform: translateX(-50%);
  }

  html.is-chrome-visible .page-anchor {
    opacity: 1;
    transform: translateY(-50%);
  }

  .page-anchor__item::after {
    transition: none;
  }

  .typewriter-cursor::before,
  .typewriter-cursor.is-visible::before {
    opacity: 1;
    animation: none;
    transform: scale(1);
  }

  .typewriter-cursor.is-complete::before {
    opacity: 0;
  }

  .typewriter-character {
    color: #ffffff;
    animation: none;
  }

  .site-background flower-ascii-background {
    transition: none;
  }

  .slogan-word {
    transition: none;
  }

  .chapter-sentence,
  .chapter-content__link {
    transition: none;
  }

  .custom-cursor {
    transition: none;
  }
}

@media (hover: none), (pointer: coarse) {
  .custom-cursor {
    display: none;
  }
}
