:root {
  --ink: #0a1f1f;
  --ink-2: #0d2828;
  --deep: #0f3a39;
  --teal: #1a5d5c;
  --teal-mist: #5a8a86;
  --sage: #9fb3ad;
  --gold: #e8b730;
  --gold-2: #f7d778;
  --gold-deep: #a6751a;
  --paper: #f2ead7;
  --paper-2: #e5dcc4;
  --paper-dim: #c4b99b;
  --rose: #c0594a;
  --verdant: #3a8d6d;
  --gold-rgb: 232 183 48;
  --edge: rgb(var(--gold-rgb) / 22%);
  --edge-strong: rgb(var(--gold-rgb) / 55%);
  --display: "Fraunces", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --pad: clamp(96px, 12vw, 144px);
  --pad-lg: clamp(120px, 15vw, 176px);
  --pad-tight: clamp(40px, 5vw, 64px);
  --head-gap: clamp(48px, 6vw, 80px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.003em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, #174847 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 100% 110%, #113535 0%, transparent 60%),
    linear-gradient(180deg, #081a1a 0%, var(--ink) 40%, #081a1a 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background-image: url("/assets/background-hero.webp");
  background-size: 55%;
  background-position: center;
  background-repeat: repeat;
  opacity: 0.28;
  mix-blend-mode: screen;
  transform: rotate(-3deg);
  transform-origin: center;
  pointer-events: none;
  z-index: 0;
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

em {
  color: var(--gold-2);
}

a {
  color: var(--paper);
  text-decoration: none;
}

a:hover {
  color: var(--gold-2);
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (width <= 720px) {
  .wrap {
    padding: 0 22px;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgb(10 31 31 / 65%);
  border-bottom: 1px solid rgb(var(--gold-rgb) / 8%);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 4px 16px rgb(var(--gold-rgb) / 35%));
}

.brand .name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.brand .name em {
  font-weight: 420;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--sage);
}

.nav-right a {
  color: var(--sage);
  transition: color 0.2s;
}

.nav-right .pill {
  color: var(--gold);
  border: 1px solid var(--edge);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
}

@media (width <= 640px) {
  .nav-right .hide-sm {
    display: none;
  }
}

.hero {
  padding: var(--pad) 0;
  position: relative;
  overflow: clip;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 340;
  font-variation-settings:
    "opsz" 144,
    "SOFT" 50;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 28px 0 0;
  color: var(--paper);
}

.hero h1 em {
  font-weight: 360;
}

.hero h1 .frag {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
  gap: 64px;
  align-items: center;
}

.hero-main {
  min-width: 0;
}

@media (width <= 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 72px;
  }

  .hero-side {
    order: -1;
  }
}

.hero-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--paper-2);
  max-width: 46ch;
}

.hero-lede em {
  font-weight: 440;
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.gem-anchor {
  position: relative;
  width: 256px;
  height: 256px;
  margin: 12px auto 0;
}

.gem-tile {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background-image: url("/assets/background.webp");
  background-size: cover;
  background-position: center;
  box-shadow:
    0 40px 80px -20px rgb(0 0 0 / 60%),
    0 20px 40px -20px rgb(0 0 0 / 45%);
  outline: 1px solid rgb(0 0 0 / 40%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gem-float 7s ease-in-out infinite;
}

.gem-tile img {
  width: 72%;
  height: auto;
  filter: drop-shadow(0 0 30px rgb(var(--gold-rgb) / 28%))
    drop-shadow(0 20px 40px rgb(0 0 0 / 60%));
}

.gem-ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgb(241 232 211 / 22%);
  pointer-events: none;
}

.gem-ring--outer {
  inset: -64px;
  animation: gem-pulse 3.4s ease-in-out infinite;
}

.gem-ring--inner {
  inset: -40px;
  border-color: rgb(241 232 211 / 14%);
}

.gem-tick {
  position: absolute;
  background: var(--gold);
  opacity: 0.85;
  pointer-events: none;
}

.gem-tick--t,
.gem-tick--b {
  left: 50%;
  width: 1px;
  height: 16px;
  transform: translateX(-50%);
}

.gem-tick--t {
  top: -18px;
}

.gem-tick--b {
  bottom: -18px;
}

.gem-tick--l,
.gem-tick--r {
  top: 50%;
  width: 16px;
  height: 1px;
  transform: translateY(-50%);
}

.gem-tick--l {
  left: -18px;
}

.gem-tick--r {
  right: -18px;
}

@keyframes gem-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes gem-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@media (width <= 900px) {
  .gem-anchor {
    width: 184px;
    height: 184px;
  }
  .gem-ring--outer {
    inset: -44px;
  }
  .gem-ring--inner {
    inset: -26px;
  }
  .hero-side {
    padding-bottom: 44px;
  }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero .cta-row {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.005em;
  border-radius: 2px;
  border: 1px solid transparent;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  cursor: pointer;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  box-shadow:
    0 8px 24px -10px rgb(var(--gold-rgb) / 80%),
    inset 0 1px 0 rgb(255 255 255 / 30%);
}

.btn-gold:hover {
  background: var(--gold-2);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--edge-strong);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-2);
  transform: translateY(-1px);
}

.btn .arrow {
  transition: transform 0.2s;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--edge-strong),
    transparent
  );
  margin: 0;
  border: 0;
}

.manifesto {
  padding: var(--pad) 0 var(--pad-tight);
  position: relative;
}

.manifesto-grid,
.chapters-head,
.loop-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
}

.manifesto-grid,
.loop-head {
  align-items: start;
}

.chapters-head,
.loop-head {
  margin-bottom: var(--head-gap);
}

@media (width <= 800px) {
  .manifesto-grid,
  .chapters-head,
  .loop-head {
    grid-template-columns: 1fr;
  }
  .manifesto-grid {
    gap: 30px;
  }
  .chapters-head,
  .loop-head {
    gap: 24px;
  }
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
}

.section-label .num {
  display: block;
  font-family: var(--display);
  font-size: 44px;
  font-weight: 360;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-top: 6px;
  line-height: 1;
}

.manifesto h2,
.chapters-head h2,
.loop-head h2 {
  font-family: var(--display);
  font-weight: 340;
  font-size: clamp(32px, 4.8vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.manifesto h2 {
  font-variation-settings:
    "opsz" 144,
    "SOFT" 30;
  margin: 0 0 26px;
}

.manifesto h2 em {
  font-weight: 360;
}

.manifesto p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--paper-2);
  max-width: 60ch;
  margin: 0 0 20px;
}

.manifesto p.drop-cap::first-letter {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 5.2em;
  line-height: 0.82;
  float: left;
  color: var(--gold-2);
  padding: 0.4rem 0.5rem 0 0;
  font-variation-settings:
    "opsz" 144,
    "SOFT" 100;
}

.manifesto p.pullquote {
  font-family: var(--display);
  font-style: italic;
  font-size: 24px;
  line-height: 1.35;
  color: var(--gold-2);
  border-left: 2px solid var(--gold);
  padding-left: 22px;
  margin-top: 34px;
  max-width: 50ch;
}

.showcase {
  padding: var(--pad-tight) 0 var(--pad);
  position: relative;
}

.fig {
  position: relative;
  margin: 0 auto;
  max-width: 1040px;
}

.fig-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  padding: 14px 6px;
  border-top: 1px solid var(--edge);
}

.fig-caption .num {
  color: var(--gold);
}

.fig-frame {
  position: relative;
  padding: 18px 18px 0;
  background: linear-gradient(180deg, #123c3b 0%, #0b2727 100%);
  border: 1px solid var(--edge);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgb(var(--gold-rgb) / 8%) inset,
    0 30px 90px -40px rgb(0 0 0 / 90%),
    0 4px 30px -8px rgb(var(--gold-rgb) / 12%);
}

.fig-frame::before,
.fig-frame::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
}

.fig-frame::before {
  top: -5px;
  left: -5px;
  border-right: 0;
  border-bottom: 0;
}

.fig-frame::after {
  bottom: -5px;
  right: -5px;
  border-left: 0;
  border-top: 0;
}

.fig-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.chapters {
  padding: var(--pad) 0;
}

.chapters-head h2 {
  margin: 0;
  max-width: 22ch;
}

.chapter {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  padding: 44px 0;
  border-top: 1px solid var(--edge);
  position: relative;
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.chapter:last-child {
  border-bottom: 1px solid var(--edge);
}

@media (width <= 800px) {
  .chapter {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 34px 0;
  }
}

.chapter-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 54px;
  font-weight: 350;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.chapter-num small {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--sage);
  text-transform: uppercase;
  margin-top: 10px;
  font-style: normal;
}

.chapter h3 {
  font-family: var(--display);
  font-weight: 370;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--paper);
}

.chapter h3 em {
  font-weight: 380;
}

.chapter p {
  color: var(--paper-2);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 58ch;
}

.chapter code,
.loop-head p code {
  font-family: var(--mono);
  padding: 2px 7px;
  background: rgb(var(--gold-rgb) / 8%);
  color: var(--gold-2);
  border-radius: 2px;
}

.chapter code {
  font-size: 13px;
  border: 1px solid rgb(var(--gold-rgb) / 15%);
}

#loop {
  padding: var(--pad) 0;
  background: linear-gradient(
    180deg,
    transparent,
    rgb(15 58 57 / 25%) 20%,
    rgb(15 58 57 / 25%) 80%,
    transparent
  );
}

.loop-head h2 {
  font-size: clamp(32px, 4.8vw, 56px);
  margin: 0 0 18px;
  max-width: 22ch;
}

.loop-head p {
  font-size: 18px;
  color: var(--paper-2);
  line-height: 1.6;
  margin: 0;
  max-width: 58ch;
}

.loop-head p code {
  font-size: 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
}

@media (width <= 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  position: relative;
  padding: 26px 22px 28px;
  border: 1px solid var(--edge);
  background: rgb(10 31 31 / 40%);
  border-radius: 2px;
  min-height: 200px;
}

.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 30px;
  height: 1px;
  background: var(--gold);
}

.step::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 1px;
  height: 30px;
  background: var(--gold);
}

.step .n {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.step h4 {
  font-family: var(--display);
  font-weight: 380;
  font-size: 22px;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--paper);
  letter-spacing: -0.015em;
}

.step p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--paper-2);
  margin: 0;
}

.step p code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gold-2);
}

.closing {
  padding: var(--pad) 0;
  text-align: center;
  position: relative;
}

.closing-gem {
  width: 70px;
  margin: 0 auto 28px;
  display: block;
  filter: drop-shadow(0 20px 44px rgb(var(--gold-rgb) / 50%));
  animation: gem-float 8s ease-in-out infinite alternate;
}

.closing h2 {
  font-family: var(--display);
  font-weight: 340;
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  color: var(--paper);
}

.closing p {
  color: var(--paper-2);
  font-size: 18px;
  max-width: 50ch;
  margin: 0 auto 36px;
  line-height: 1.55;
}

.closing .cta-row {
  justify-content: center;
}

footer.site {
  margin-top: var(--pad);
  border-top: 1px solid var(--edge);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-mist);
}

footer.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  min-height: 62px;
}

footer.site a {
  color: var(--teal-mist);
}

footer.site a:hover {
  color: var(--gold);
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

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

.js .chapter {
  opacity: 0;
  transform: translateY(18px);
}

.js .chapter.in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rise {
  animation: rise 0.9s both;
}

.rise.d1 {
  animation-delay: 0.05s;
}

.rise.d2 {
  animation-delay: 0.2s;
}

.rise.d3 {
  animation-delay: 0.35s;
}

.rise.d4 {
  animation-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal,
  .chapter {
    opacity: 1;
    transform: none;
  }
}
