:root {
  --void: #060806;
  --void-soft: #0a0e09;
  --ink: #f3f1e8;
  --muted: #a9aa9d;
  --acid: #cfff39;
  --acid-soft: #92bb2b;
  --gold: #e3bc68;
  --gold-bright: #ffd783;
  --line: rgba(227, 188, 104, 0.22);
  --line-strong: rgba(207, 255, 57, 0.4);
  --font-display: "Iowan Old Style", "Palatino Linotype", Baskerville, Georgia, serif;
  --font-ui: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --shell: min(1180px, calc(100vw - 48px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--void);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 12%, rgba(74, 110, 25, 0.12), transparent 30rem),
    radial-gradient(circle at 20% 55%, rgba(227, 188, 104, 0.055), transparent 28rem),
    var(--void);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--acid);
  color: var(--void);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--acid), var(--gold-bright));
  box-shadow: 0 0 16px rgba(207, 255, 57, 0.65);
}

.site-header {
  position: fixed;
  z-index: 90;
  top: 2px;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 82px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid transparent;
  transition:
    min-height 0.35s var(--ease),
    background 0.35s ease,
    border-color 0.35s ease,
    backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
  min-height: 66px;
  background: rgba(6, 8, 6, 0.78);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.brand img {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(207, 255, 57, 0.42);
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.05);
}

.site-nav {
  display: flex;
  gap: clamp(22px, 3vw, 42px);
}

.site-nav a {
  position: relative;
  color: rgba(243, 241, 232, 0.72);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--acid);
  transition: right 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  right: 0;
}

.header-cta {
  justify-self: end;
}

.menu-toggle {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 26px;
  border: 1px solid var(--acid);
  border-radius: 999px;
  background: var(--acid);
  color: #111409;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.3s var(--ease),
    color 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 12px 38px rgba(207, 255, 57, 0.16);
}

.button-small {
  min-height: 40px;
  padding: 0 20px;
  font-size: 0.62rem;
}

.button-ghost {
  border-color: rgba(243, 241, 232, 0.3);
  background: rgba(5, 8, 5, 0.5);
  color: var(--ink);
  backdrop-filter: blur(10px);
}

.button-ghost:hover,
.button-ghost:focus-visible,
.button-ghost.is-copied {
  border-color: var(--acid);
  background: rgba(207, 255, 57, 0.09);
  color: var(--acid);
}

.copy-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.text-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link span {
  color: var(--gold);
  transition: transform 0.25s var(--ease);
}

.text-link:hover span,
.text-link:focus-visible span {
  transform: translate(3px, -3px);
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100svh;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}

.hero-art,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-art {
  z-index: -3;
  background: #071007;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(4, 6, 4, 0.89) 0%, rgba(4, 6, 4, 0.52) 46%, rgba(4, 6, 4, 0.16) 78%),
    linear-gradient(0deg, rgba(4, 6, 4, 0.95) 0%, transparent 33%, rgba(4, 6, 4, 0.24) 100%);
}

.hero-content {
  position: relative;
  padding: 150px 0 125px;
}

.eyebrow,
.chapter-index {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 26px;
  color: var(--gold-bright);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.eyebrow::before,
.chapter-index::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  max-width: 790px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 6.2vw, 5.7rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.94;
  text-wrap: balance;
}

.hero h1 em,
.portal h2 em {
  color: var(--acid);
  font-weight: 400;
}

.hero-intro {
  max-width: 560px;
  margin: 28px 0 0;
  color: rgba(243, 241, 232, 0.72);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.75vw, 1.35rem);
  font-style: italic;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 38px;
}

.hero-foot {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(243, 241, 232, 0.38);
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-mark {
  position: relative;
  display: block;
  width: 1px;
  height: 38px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.scroll-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--acid);
  transform: translateY(-100%);
  animation: scrollMark 2.1s ease-in-out infinite;
}

.chapter {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(55px, 9vw, 126px);
  align-items: center;
  min-height: 100svh;
  padding-top: 130px;
  padding-bottom: 130px;
  border-bottom: 1px solid var(--line);
}

.chapter-memory,
.chapter-becoming {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
}

.chapter::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(227, 188, 104, 0.06);
  border-radius: 50%;
  filter: blur(0.2px);
}

.chapter-self::before,
.chapter-now::before {
  left: -22rem;
}

.chapter-memory::before,
.chapter-becoming::before {
  right: -22rem;
}

.chapter-copy h2 {
  max-width: 570px;
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.5vw, 4.35rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

.chapter-copy > p:not(.chapter-index) {
  max-width: 530px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.3vw, 1.08rem);
}

blockquote {
  max-width: 490px;
  margin: 42px 0 0;
  padding: 3px 0 3px 23px;
  border-left: 1px solid var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  font-style: italic;
  line-height: 1.4;
}

.chapter-image {
  --parallax-y: 0px;
  position: relative;
  margin: 0;
  transform: translateY(var(--parallax-y));
  transition: transform 0.1s linear;
}

.chapter-image::before,
.chapter-image::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.chapter-image::before {
  inset: 0;
  border: 1px solid rgba(227, 188, 104, 0.28);
  box-shadow: inset 0 0 70px rgba(4, 6, 4, 0.7);
}

.chapter-image::after {
  width: 22%;
  height: 1px;
  right: -6%;
  top: 9%;
  background: var(--acid);
  box-shadow: 0 0 18px rgba(207, 255, 57, 0.35);
}

.chapter-image img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
  filter: saturate(0.79) contrast(1.05) brightness(0.86);
  transition:
    filter 0.7s ease,
    transform 1.2s var(--ease);
}

.chapter-image:hover img {
  filter: saturate(1) contrast(1.06) brightness(0.96);
  transform: scale(1.012);
}

.portrait-image img {
  aspect-ratio: 0.95 / 1;
}

.square-image img {
  aspect-ratio: 1 / 1;
}

.chapter-image figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  color: rgba(243, 241, 232, 0.4);
  font-size: 0.59rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.chapter-image figcaption span {
  flex: 0 0 auto;
  color: var(--acid-soft);
}

.coordinates {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 38px;
}

.coordinates span {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(243, 241, 232, 0.62);
  font-size: 0.61rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.question-sequence {
  display: grid;
  grid-template-columns: auto minmax(22px, 1fr) auto minmax(22px, 1fr) auto;
  align-items: center;
  max-width: 470px;
  gap: 12px;
  margin-top: 40px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-style: italic;
}

.question-sequence i {
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--line));
}

.portal {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 110svh;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}

.portal-art,
.portal-overlay {
  position: absolute;
  inset: 0;
}

.portal-art {
  z-index: -3;
}

.portal-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: portalDrift 20s ease-in-out infinite alternate;
}

.portal-overlay {
  z-index: -2;
  background:
    linear-gradient(0deg, rgba(5, 7, 5, 0.92) 0%, rgba(5, 7, 5, 0.32) 45%, rgba(5, 7, 5, 0.8) 100%),
    radial-gradient(circle at center, rgba(7, 10, 6, 0.17), rgba(5, 7, 5, 0.58));
}

.portal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 140px 0;
}

.portal .eyebrow::before {
  display: none;
}

.portal h2 {
  max-width: 790px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.portal-who {
  margin: 44px 0 18px;
  color: var(--acid);
  font-family: var(--font-ui);
  font-size: clamp(3.2rem, 8vw, 7.2rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  line-height: 1;
  text-indent: 0.25em;
  text-shadow: 0 0 35px rgba(207, 255, 57, 0.28);
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.contract {
  display: grid;
  gap: 5px;
  max-width: min(620px, 100%);
  margin-top: 30px;
  padding: 13px 18px;
  border: 1px solid rgba(227, 188, 104, 0.2);
  background: rgba(6, 8, 6, 0.58);
  backdrop-filter: blur(12px);
}

.contract span {
  color: rgba(243, 241, 232, 0.4);
  font-size: 0.55rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contract code {
  overflow: hidden;
  color: rgba(243, 241, 232, 0.8);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px 50px;
  align-items: end;
  padding-top: 80px;
  padding-bottom: 34px;
}

.footer-mark {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 20px;
  color: var(--acid);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-style: italic;
  line-height: 1;
}

.footer-mark i {
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--line));
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: rgba(243, 241, 232, 0.55);
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--acid);
}

.site-footer small {
  grid-column: 1 / -1;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: rgba(243, 241, 232, 0.28);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.copy-toast {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  padding: 12px 16px;
  border: 1px solid rgba(207, 255, 57, 0.55);
  background: rgba(8, 11, 7, 0.92);
  color: var(--acid);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease);
  pointer-events: none;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

.reveal-delay-1 {
  transition-delay: 0.12s;
}

.reveal-delay-2 {
  transition-delay: 0.23s;
}

.reveal-delay-3 {
  transition-delay: 0.34s;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroDrift {
  from { transform: scale(1.015) translate3d(0, 0, 0); }
  to { transform: scale(1.065) translate3d(-0.7%, -0.8%, 0); }
}

@keyframes portalDrift {
  from { transform: scale(1.02); }
  to { transform: scale(1.075); }
}

@keyframes scrollMark {
  0% { transform: translateY(-100%); }
  48%, 100% { transform: translateY(100%); }
}

@media (max-width: 900px) {
  :root {
    --shell: min(100% - 36px, 720px);
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 68px;
    padding-inline: 18px;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 3;
    display: grid;
    width: 42px;
    height: 42px;
    place-content: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(6, 8, 6, 0.48);
    color: var(--ink);
  }

  .menu-toggle > span:not(.sr-only) {
    display: block;
    width: 17px;
    height: 1px;
    background: currentColor;
    transition: transform 0.3s var(--ease);
  }

  .menu-toggle[aria-expanded="true"] > span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    background: rgba(5, 8, 5, 0.97);
    opacity: 0;
    transform: translateY(-12px);
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease,
      transform 0.3s var(--ease);
    visibility: hidden;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .site-nav a {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
  }

  .hero-content {
    padding-bottom: 120px;
  }

  .chapter,
  .chapter-memory,
  .chapter-becoming {
    grid-template-columns: 1fr;
    gap: 54px;
    min-height: auto;
    padding-top: 110px;
    padding-bottom: 110px;
  }

  .chapter::before {
    display: none;
  }

  .chapter-image::after {
    right: 0;
    width: 18%;
  }

  .chapter-memory .chapter-image,
  .chapter-becoming .chapter-image {
    order: 2;
  }

  .chapter-memory .chapter-copy,
  .chapter-becoming .chapter-copy {
    order: 1;
  }

  .portrait-image img,
  .square-image img,
  .chapter-image img {
    aspect-ratio: 16 / 11;
  }

  .portal {
    min-height: 100svh;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  :root {
    --shell: calc(100% - 28px);
  }

  body {
    font-size: 15px;
  }

  .brand img {
    width: 31px;
    height: 31px;
  }

  .hero-art img {
    object-position: 62% center;
  }

  .hero-art img,
  .portal-art img {
    animation: none;
    transform: none;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(4, 6, 4, 0.97) 0%, rgba(4, 6, 4, 0.53) 66%, rgba(4, 6, 4, 0.42) 100%),
      linear-gradient(90deg, rgba(4, 6, 4, 0.65), transparent);
  }

  .hero-content {
    padding-top: 130px;
    padding-bottom: 116px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.85rem);
    line-height: 0.98;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 23px;
    margin-top: 31px;
  }

  .hero-foot {
    bottom: 24px;
  }

  .hero-coordinate {
    display: none;
  }

  .chapter {
    gap: 40px;
    padding-top: 88px;
    padding-bottom: 88px;
  }

  .chapter-copy h2 {
    margin-bottom: 20px;
  }

  .chapter-image img,
  .portrait-image img,
  .square-image img {
    aspect-ratio: 4 / 3;
  }

  .chapter-image figcaption {
    display: grid;
  }

  .portal-art img {
    object-position: center;
  }

  .portal-content {
    padding: 115px 0 90px;
  }

  .portal h2 {
    font-size: clamp(2.15rem, 10vw, 3.25rem);
  }

  .portal-who {
    margin-top: 36px;
    font-size: clamp(3rem, 17vw, 4.7rem);
  }

  .portal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .portal-actions .button {
    min-width: 0;
    padding-inline: 14px;
  }

  .contract {
    width: 100%;
  }

  .footer-mark {
    gap: 11px;
  }

  .footer-links {
    display: grid;
    gap: 13px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
