:root {
  --grey: #D8DFE3;
  --fog: #EEF1F3;
  --grey-deep: #C3CED5;
  --bottle: #0D3B2C;
  --moss: #6FA33A;
  --moss-light: #A5D04F;
  --poppy: #FF4B6E;
  --butter: #FFD64A;

  --display: 'Dela Gothic One', 'Arial Black', Impact, sans-serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --edge: max(var(--gutter), calc((100% - 1400px) / 2));
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--grey);
  color: var(--bottle);
  font: 400 18px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--poppy);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bottle);
  color: var(--grey);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--bottle);
  color: var(--grey);
  font: 700 17px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); background: var(--poppy); color: var(--bottle); }
.btn:active { transform: translateY(0); }
.btn--small { padding: 12px 20px; font-size: 15px; }
.btn--dark:hover { background: var(--bottle); color: var(--butter); }

.link {
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.link:hover { color: var(--poppy); }

/* Nav and progress stem */

.nav {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2 * var(--edge));
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 7px 7px 22px;
  background: rgba(238, 241, 243, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 2px solid var(--bottle);
  border-radius: 999px;
}

.nav__brand {
  font: 400 20px/1 var(--display);
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  margin-left: auto;
}
.nav__links a:not(.btn) {
  padding: 10px 2px;
  border-bottom: 2px solid transparent;
  font: 700 15px/1 var(--body);
  text-decoration: none;
  transition: border-color .2s;
}
.nav__links a:not(.btn):hover { border-color: var(--poppy); }
.nav__links a[aria-current="page"] { border-color: var(--bottle); }

.nav__toggle { display: none; }

.hud {
  position: fixed;
  z-index: 40;
  top: 22vh;
  right: 14px;
  width: 6px;
  height: 56vh;
  border-radius: 3px;
  background: rgba(127, 146, 140, .35);
}
.hud__fill {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: var(--moss);
  transform: scaleY(0);
  transform-origin: bottom;
}
.hud__bloom {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 16px; height: 16px;
  margin: 0 0 -8px -8px;
  border-radius: 50%;
  background: var(--poppy);
  box-shadow: 0 0 0 4px var(--butter);
  transform: scale(0);
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: clamp(104px, 15vh, 156px) var(--edge) 0;
  overflow: hidden;
  touch-action: pan-y;
}

.hero__copy {
  position: relative;
  z-index: 3;
  max-width: min(780px, 100%);
}

.hero__title {
  margin-bottom: 18px;
  font: 800 clamp(28px, 3.7vw, 56px)/1.05 var(--body);
  letter-spacing: -.028em;
}

.hero__sub {
  max-width: 46ch;
  margin-bottom: 28px;
  font-size: clamp(17px, 1.4vw, 20px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.hero__hint {
  position: relative;
  z-index: 3;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  justify-self: start;
  margin-bottom: clamp(10px, 2vw, 22px);
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(216, 223, 227, .86);
  font-size: 15px;
}

.counter b {
  display: inline-block;
  min-width: 1.4ch;
  font-variant-numeric: tabular-nums;
  transition: transform .3s var(--ease);
}
.counter.is-bumped b { transform: scale(1.5); }

.hero__mark {
  position: relative;
  z-index: 1;
  padding-bottom: .1em;
  font: 400 12vw/.92 var(--display);
  white-space: nowrap;
  user-select: none;
}
.mark__line { display: inline-block; }

.grow {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Story */

.story { background: var(--grey); }

.story__pin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "title art"
    "steps art";
  column-gap: clamp(24px, 5vw, 80px);
  height: 100svh;
  padding: clamp(96px, 13vh, 132px) var(--edge) clamp(24px, 4vh, 48px);
}

.story__title {
  grid-area: title;
  align-self: end;
  max-width: 11ch;
  margin-bottom: clamp(24px, 4vh, 48px);
  font: 400 clamp(36px, 5.4vw, 84px)/.98 var(--display);
}

.story__steps { grid-area: steps; align-self: start; }

.steps { display: grid; }

.step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .5s, transform .5s var(--ease);
}
.step.is-active { opacity: 1; transform: none; pointer-events: auto; }

.step h3 {
  margin-bottom: 10px;
  font: 400 clamp(26px, 2.8vw, 42px)/1.1 var(--display);
}
.step p {
  max-width: 34ch;
  font-size: clamp(17px, 1.5vw, 21px);
}

.rail { display: flex; gap: 8px; margin-top: 26px; }
.rail i {
  width: 44px; height: 8px;
  border-radius: 4px;
  background: rgba(13, 59, 44, .18);
  transition: background-color .4s;
}
.rail i.is-on { background: var(--poppy); }

.story__art {
  grid-area: art;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}

.plant { height: 100%; width: auto; max-width: 100%; overflow: visible; }
.plant .ground { fill: var(--bottle); }
.plant .seed ellipse { fill: var(--butter); }
.plant .seed .seed__shine { fill: #FFF6C8; }
.plant .p-stem { fill: none; stroke: var(--moss); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.plant .leaf { fill: var(--moss); }
.plant .trunk { fill: none; stroke: var(--bottle); stroke-width: 15; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.plant .branch { fill: none; stroke: var(--bottle); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.plant .crown .c1 { fill: var(--moss); }
.plant .crown .c2 { fill: var(--moss-light); }
.plant .crown .c3 { fill: #2E6B3F; }
.plant .flowers .petal { fill: var(--poppy); }
.plant .flowers .heart { fill: var(--butter); }

.plant .gw__frame { fill: var(--fog); stroke: var(--bottle); stroke-width: 4; }
.plant .gw__dot--a { fill: var(--poppy); }
.plant .gw__dot--b { fill: var(--butter); }
.plant .gw__dot--c { fill: var(--moss); }
.plant .gw__field { fill: var(--grey); }
.plant .gw__brick.b1 { fill: var(--poppy); }
.plant .gw__brick.b2 { fill: var(--butter); }
.plant .gw__brick.b3 { fill: var(--moss); }
.plant .gw__brick.b4 { fill: var(--bottle); }
.plant .gw__ball { fill: var(--butter); stroke: var(--bottle); stroke-width: 2.5; }
.plant .gw__paddle { fill: var(--bottle); }
.plant .gw__adbox { fill: var(--butter); stroke: var(--bottle); stroke-width: 3; }
.plant .gw__tag { fill: var(--bottle); font: 800 14px var(--body); }
.plant .gw__skel { fill: var(--bottle); opacity: .3; }
.plant .gw__progress { fill: var(--poppy); }
.plant .coin circle:first-child { fill: var(--butter); stroke: var(--bottle); stroke-width: 2.5; }
.plant .coin .coin__ring { fill: none; stroke: var(--bottle); stroke-width: 2; }

/* Planting standards */

.trees { padding: clamp(72px, 12vh, 150px) var(--edge); background: var(--grey); }

.trees__head { max-width: 760px; margin-bottom: clamp(32px, 6vh, 64px); }
.trees h2 { margin-bottom: 18px; font: 400 clamp(36px, 5.4vw, 84px)/.98 var(--display); }
.trees__head p { max-width: 50ch; font-size: clamp(17px, 1.5vw, 21px); }

.standards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.std {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 26px;
  border-radius: 32px;
  background: var(--tile-bg);
}
.std svg { width: 100%; height: auto; margin-bottom: 18px; }
.std h3 { margin-bottom: 8px; font: 800 clamp(20px, 1.7vw, 24px)/1.15 var(--body); letter-spacing: -.015em; }
.std p { font-size: 16.5px; line-height: 1.5; }

.limits {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 80px);
  margin-top: clamp(40px, 7vh, 84px);
  padding: clamp(28px, 4.5vw, 64px);
  border-radius: 40px;
  background: var(--bottle);
  color: var(--grey);
}
.limits h3 { font: 400 clamp(30px, 3.8vw, 56px)/1 var(--display); }
.limits ul { display: grid; gap: 18px; align-content: center; }
.limits li { position: relative; padding-left: 28px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; }
.limits li::before {
  content: "";
  position: absolute;
  top: .5em;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--poppy);
}

@media (max-width: 820px) {
  .limits { grid-template-columns: 1fr; }
}

/* Lineup */

.lineup {
  padding: clamp(72px, 12vh, 150px) 0;
  background: var(--fog);
}

.lineup__head { max-width: 920px; padding: 0 var(--edge); margin-bottom: clamp(28px, 5vh, 52px); box-sizing: content-box; }
.lineup h2 { margin-bottom: 16px; font: 400 clamp(36px, 5.4vw, 84px)/.98 var(--display); }
.lineup__head p { max-width: 48ch; font-size: clamp(17px, 1.5vw, 21px); }
.lineup__head .lineup__more { margin-top: 18px; }

.shelf {
  display: flex;
  gap: 20px;
  padding: 10px var(--edge) 30px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--edge);
  scrollbar-width: thin;
  scrollbar-color: var(--bottle) transparent;
}

.tile {
  flex: 0 0 min(78vw, 310px);
  display: flex;
  flex-direction: column;
  height: clamp(370px, 54vh, 440px);
  padding: 22px;
  border-radius: 32px;
  background: var(--tile-bg);
  color: var(--tile-ink);
  scroll-snap-align: start;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .35s var(--ease);
}
.tile.is-tilting { transition-duration: .08s; }
.tile svg { flex: 1; min-height: 0; width: 100%; }
.tile h3 { margin: 12px 0 6px; font: 400 32px/1 var(--display); }
.tile p { font-size: 17px; line-height: 1.35; }

/* Ledger */

.ledger {
  padding: clamp(72px, 13vh, 160px) var(--edge);
  background: var(--bottle);
  color: var(--grey);
}

.ledger__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 110px);
}

.ledger h2 { margin-bottom: 20px; font: 400 clamp(36px, 5vw, 76px)/.98 var(--display); }
.ledger__intro p { max-width: 38ch; font-size: clamp(17px, 1.5vw, 21px); }

.rows { align-self: center; }

.row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 2px solid rgba(216, 223, 227, .22);
}
.row:first-child { border-top: 2px solid rgba(216, 223, 227, .22); }

.row dt {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 16px;
  font: 700 clamp(19px, 2.2vw, 30px)/1.2 var(--body);
}
.row dt::after {
  content: "";
  flex: 1;
  border-bottom: 2px dotted rgba(216, 223, 227, .4);
  transform: translateY(-.25em);
}
.row dd {
  color: var(--butter);
  font: 400 clamp(16px, 1.8vw, 24px)/1.2 var(--display);
  text-align: right;
}

/* Join */

.join {
  display: flex;
  flex-direction: column;
  min-height: 92svh;
  background: var(--butter);
}

.join__inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: clamp(72px, 12vh, 140px) var(--edge);
}

.join__title { max-width: 9ch; margin-bottom: clamp(28px, 4vw, 48px); font: 400 clamp(48px, 10vw, 156px)/.92 var(--display); }
.join__sub { margin-bottom: clamp(28px, 5vh, 48px); font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; }

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 640px;
}

.signup input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 16px 24px;
  border: 3px solid var(--bottle);
  border-radius: 999px;
  background: #FFF3B8;
  color: var(--bottle);
  font: 500 18px/1.2 var(--body);
}
.signup input::placeholder { color: rgba(13, 59, 44, .6); }
.signup input:focus-visible { outline-color: var(--bottle); }

.signup .btn { padding: 19px 28px; }
.signup .btn[disabled] { opacity: .6; cursor: progress; }

.signup__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.signup__msg { flex-basis: 100%; min-height: 1.6em; font-weight: 700; }
.signup__msg.is-error { color: #8A1030; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 32px;
  padding: 22px var(--edge);
  border-top: 2px solid rgba(13, 59, 44, .2);
  font-size: 15px;
}

/* Smaller screens */

@media (max-width: 820px) {
  .story__pin {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "title"
      "art"
      "steps";
    padding-top: 84px;
    padding-bottom: 20px;
  }
  .story__title { align-self: start; max-width: none; margin-bottom: 8px; font-size: clamp(30px, 8vw, 44px); }
  .story__steps { align-self: end; }
  .step p { max-width: none; }
  .ledger__inner { grid-template-columns: 1fr; }
  .hud { display: none; }
}

@media (max-width: 700px) {
  .mark__line { display: block; width: max-content; }
  .hero__mark { line-height: .9; }
  .hero__hint-text { flex-basis: 100%; }
}

/* Reduced motion and no-motion fallback: finished state, no pinning */

.rm .hero__hint { display: none; }
.rm .story__pin { height: auto; min-height: 100svh; padding-bottom: 56px; }
.rm .steps { display: block; }
.rm .step { opacity: 1; transform: none; pointer-events: auto; margin-bottom: 26px; transition: none; }
.rm .rail { display: none; }
.rm .sprout, .rm .seed, .rm .gamewin, .rm .coins { display: none; }
.rm .story__art { height: 60svh; }
.rm .hud { display: none; }
html.rm { scroll-behavior: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tile, .step { transition: none; }
}

/* Footer navigation and text pages */

.foot__nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot__nav a { text-underline-offset: 4px; }

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(104px, 15vh, 150px) var(--gutter) clamp(64px, 10vh, 120px);
}
.doc h1 { margin-bottom: 24px; font: 400 clamp(44px, 8vw, 104px)/.95 var(--display); }
.doc__lead { max-width: 42ch; margin-bottom: 36px; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.45; }
.doc h2 { margin: 46px 0 12px; font: 800 clamp(24px, 2.4vw, 32px)/1.15 var(--body); letter-spacing: -.02em; }
.doc p, .doc li { max-width: 68ch; }
.doc p + p { margin-top: 14px; }
.doc ul { margin: 12px 0; padding-left: 1.25em; list-style: disc; }
.doc li + li { margin-top: 8px; }
.doc a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.doc a:hover { color: var(--poppy); }
.doc__meta { font-size: 15px; opacity: .8; }
.doc details { padding: 16px 0; border-top: 2px solid rgba(13, 59, 44, .2); }
.doc details:last-of-type { border-bottom: 2px solid rgba(13, 59, 44, .2); }
.doc summary { font-size: 19px; font-weight: 700; cursor: pointer; }
.doc details p { margin-top: 10px; }

@media (max-width: 860px) {
  .nav { padding: 7px 7px 7px 22px; }
  .nav__toggle {
    position: relative;
    display: block;
    flex: none;
    width: 46px;
    height: 46px;
    margin-left: auto;
    border: 0;
    border-radius: 50%;
    background: var(--bottle);
    cursor: pointer;
  }
  .nav__toggle i {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: var(--grey);
    transition: transform .25s var(--ease), top .25s var(--ease);
  }
  .nav__toggle i:nth-of-type(1) { top: 18px; }
  .nav__toggle i:nth-of-type(2) { top: 26px; }
  .nav.is-open .nav__toggle i:nth-of-type(1) { top: 22px; transform: rotate(45deg); }
  .nav.is-open .nav__toggle i:nth-of-type(2) { top: 22px; transform: rotate(-45deg); }

  .nav__links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-left: 0;
    padding: 12px;
    border: 2px solid var(--bottle);
    border-radius: 28px;
    background: rgba(238, 241, 243, .98);
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a:not(.btn) { padding: 14px 12px; border-bottom: 0; border-radius: 14px; font-size: 18px; }
  .nav__links a:not(.btn):hover { background: rgba(13, 59, 44, .08); }
  .nav__links a[aria-current="page"] { background: rgba(13, 59, 44, .1); }
  .nav__links .btn { margin-top: 6px; padding: 16px 20px; font-size: 17px; }
}
