/* ============================================================
   B-ORGANIC ASIA — Paper, Ink & Highlighter Design System
   Light-mode-first, high-contrast Flexoki paper (#fffcf0) & ink (#100f0f).
   ============================================================ */
:root {
  color-scheme: light;

  /* Flexoki paper and ink */
  --paper: #fffcf0;
  --paper-2: #f2f0e5;
  --paper-3: #e6e4d9;
  --ink: #100f0f;
  --ink-2: #6f6e69;
  --ink-3: #b7b5ac;
  --rule: #dad8ce;
  --graphite: #2b2926;
  --pencil: hsl(4, 58%, 44%);
  --print: #205ea6;

  /* Highlighter tray */
  --hl-red: hsl(6, 82%, 79%);
  --hl-orange: hsl(27, 98%, 84%);
  --hl-yellow: hsl(46, 83%, 80%);
  --hl-green: hsl(66, 45%, 79%);
  --hl-cyan: hsl(158, 47%, 83%);
  --hl-blue: hsl(199, 42%, 84%);
  --hl-purple: hsl(274, 27%, 88%);
  --hl-magenta: hsl(345, 88%, 90%);

  --serif: "Source Serif 4", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --hand: "Caveat", cursive;

  /* Fluid scale */
  --step--1: clamp(0.85rem, 0.82rem + 0.16vw, 0.94rem);
  --step-0: clamp(1rem, 0.96rem + 0.22vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.42rem);
  --step-2: clamp(1.44rem, 1.32rem + 0.58vw, 1.8rem);
  --step-4: clamp(2.07rem, 1.76rem + 1.55vw, 3.05rem);
  --step-6: clamp(2.99rem, 2.3rem + 3.44vw, 5.15rem);

  /* Inline SVG paper grain */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --grain-page: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
}

body {
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  background-image: var(--grain-page);
  background-blend-mode: multiply;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

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

.wrap {
  width: min(74ch, 100% - 3rem);
  margin: 0 auto;
}

.wide {
  width: min(1100px, 100% - 3rem);
  margin: 0 auto;
}

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

.label {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ============================================================
   THE HIGHLIGHTER
   ============================================================ */
mark {
  --color: var(--hl-yellow);
  position: relative;
  display: inline-block;
  background-color: unset;
  color: inherit;
  isolation: isolate;
}

mark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  width: calc(100% + 1ch);
  left: -0.25ch;
  height: 112%;
  top: -6%;
  border-bottom-right-radius: 20px 30px;
  background-color: var(--color);
  background-image: var(--grain);
  opacity: 0.75;
  box-shadow:
    inset -2px 0 1px hsl(from var(--color) h s calc(l - 20)),
    inset -4px 0 5px hsl(from var(--color) h s calc(l - 20));
  filter: url(#rough);
}

mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  height: 1ch;
  width: 0.5ch;
  top: 2px;
  right: -0.25em;
  background: radial-gradient(hsl(from var(--color) h s calc(l - 30)), hsl(from var(--color) h s l));
  opacity: 0.4;
  border-radius: 10px 0 50px / 200px 0;
  rotate: 15deg;
  filter: url(#rough);
}

mark[data-split] {
  display: inline;
}

mark.w {
  margin-right: 0.24ch;
}

mark.w:not(.last)::after {
  content: none;
}

mark[data-split]:has(> mark.w)::before,
mark[data-split]:has(> mark.w)::after {
  content: none;
}

.hl-anim mark::before {
  clip-path: inset(-40% 100% -40% -30%);
  transition: clip-path var(--dur, 480ms) cubic-bezier(0.55, 0.06, 0.3, 1);
}

.hl-anim mark.is-drawn::before {
  clip-path: inset(-40% -30% -40% -30%);
}

.hl-anim mark::after {
  opacity: 0;
  scale: 0.3;
  transition: opacity 260ms ease, scale 420ms cubic-bezier(0.3, 1.7, 0.5, 1);
  transition-delay: calc(var(--dur, 480ms) - 80ms);
}

.hl-anim mark.is-drawn::after {
  opacity: 0.4;
  scale: 1;
}

.hl-red { --color: var(--hl-red); }
.hl-orange { --color: var(--hl-orange); }
.hl-green { --color: var(--hl-green); }
.hl-cyan { --color: var(--hl-cyan); }
.hl-blue { --color: var(--hl-blue); }
.hl-purple { --color: var(--hl-purple); }
.hl-magenta { --color: var(--hl-magenta); }

/* ============================================================
   CHROME
   ============================================================ */
header.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.top .wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: var(--step--1);
  text-decoration: none;
  min-height: 44px;
}

.brand__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand sup {
  color: var(--ink-2);
  margin-left: 2px;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover {
  color: var(--ink);
}

.nav a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn--sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
}

.btn--fill {
  background: var(--ink);
  color: var(--paper);
}

.btn--fill:hover {
  background: #2a2827;
}

.btn--line:hover {
  background: var(--paper-2);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ============================================================
   PAPER & MARGIN SCRAWLS
   ============================================================ */
.paper {
  position: relative;
  isolation: isolate;
  background-color: #fffdf6;
}

.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  filter: url(#paper);
  mix-blend-mode: multiply;
  opacity: 0.6;
  border-radius: inherit;
  pointer-events: none;
  clip-path: inset(0 round var(--paper-r, 0px));
}

.scrawl {
  display: inline-block;
  font-family: var(--hand);
  font-size: 1.4em;
  line-height: 1;
  color: var(--pencil);
  filter: url(#crayon);
  white-space: nowrap;
  rotate: -2deg;
}

/* ============================================================
   HERO + PARALLAX RIDGELINE
   ============================================================ */
.hero {
  padding: 0;
  overflow-x: clip;
}

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

.hero-sheet.paper {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  background-color: var(--paper);
  background-image: var(--grain-page);
  background-blend-mode: multiply;
}

.hero-sheet::before {
  opacity: 0.75;
  --fade: linear-gradient(to bottom,
    #000 0%, rgb(0 0 0 / 0.92) 15%, rgb(0 0 0 / 0.75) 32%, rgb(0 0 0 / 0.52) 50%,
    rgb(0 0 0 / 0.3) 66%, rgb(0 0 0 / 0.13) 80%, rgb(0 0 0 / 0.03) 90%, transparent 97%);
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
}

.hero-kicker {
  margin-bottom: 0.5rem;
}

.hero-kicker a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-sun {
  position: absolute;
  z-index: -1;
  top: -9.5rem;
  right: -9rem;
  width: clamp(240px, 34vw, 480px);
  aspect-ratio: 1;
  pointer-events: none;
}

.hero-sun i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--d);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--c);
  will-change: transform;
}

.hero-sun i:nth-child(1) { --d: 100%; --c: hsl(345 88% 94%); }
.hero-sun i:nth-child(2) { --d: 82%;  --c: hsl(10 88% 89%); }
.hero-sun i:nth-child(3) { --d: 65%;  --c: hsl(27 98% 85%); }
.hero-sun i:nth-child(4) { --d: 50%;  --c: hsl(38 96% 80%); }
.hero-sun i:nth-child(5) { --d: 36%;  --c: hsl(46 92% 72%); }

.hero h1 {
  font-size: var(--step-6);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0.9rem 0 1.4rem;
}

.hero .lede {
  font-size: var(--step-1);
  max-width: 48ch;
  color: #2c2a28;
}

.hero .cta {
  display: flex;
  gap: 0.75rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}

.ridge-track {
  --scene: clamp(320px, 54vh, 600px);
  --cover: clamp(160px, 26vh, 280px);
  --runway: 140svh;
  height: calc(var(--scene) + var(--cover) + var(--runway));
}

.parallax {
  position: sticky;
  top: max(4.5rem, calc(100svh - var(--scene) - var(--cover)));
  height: calc(var(--scene) + var(--cover));
  overflow: hidden;
  isolation: isolate;
}

.parallax::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(58% 42% at 50% 96%, hsl(27 98% 88% / 0.85) 0%, transparent 70%),
    linear-gradient(180deg, hsl(48 100% 97% / 0) 0%, hsl(46 83% 93%) 58%, hsl(27 98% 90%) 100%);
}

.parallax__layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--scene);
  z-index: 2;
  will-change: transform;
}

.parallax__layer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.parallax__layer__0 { --fill: hsl(46 83% 86%); }
.parallax__layer__1 { --fill: var(--hl-orange); }
.parallax__layer__2 { --fill: var(--hl-red); }
.parallax__layer__3 { --fill: var(--hl-magenta); }
.parallax__layer__4 { --fill: var(--hl-purple); }
.parallax__layer__5 { --fill: hsl(199 34% 62%); }
.parallax__layer__6 { --fill: #2f2b33; }

.parallax__layer svg:not(.fir) path,
.parallax__layer use {
  fill: var(--fill);
}

.parallax__layer .fir {
  inset: auto;
  left: 73%;
  bottom: 13.5%;
  height: 84%;
  width: auto;
  aspect-ratio: 420 / 1000;
  translate: -50% 0;
}

.parallax__layer .fir__rim {
  fill: hsl(27 78% 66%);
}

/* Tropical Thai Flora: Coconut Palm & Broadleaf Banana Tree */
.parallax__layer .thai-flora {
  inset: auto;
  left: 74%;
  bottom: 10%;
  height: 92%;
  width: auto;
  aspect-ratio: 500 / 600;
  translate: -50% 0;
  overflow: visible;
}

.parallax__layer .thai-flora .palm__rim,
.parallax__layer .thai-flora .banana__rim,
.parallax__layer .thai-flora .pagoda__rim {
  fill: hsl(27 78% 66%);
}

.parallax__layer .thai-flora .palm__trunk {
  fill: #242028;
}

.parallax__layer .thai-flora .palm__frond {
  fill: #2f2b33;
}

.parallax__layer .thai-flora .pagoda__body {
  fill: #2f2b33;
}

.parallax__cover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: calc(var(--scene) - 1px);
  z-index: 3;
  background: #2f2b33;
}

.parallax::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background-image: var(--grain-page);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 30%);
}

.term {
  position: absolute;
  z-index: 3;
  left: clamp(1rem, 6vw, 5rem);
  bottom: calc(var(--cover) + clamp(1.25rem, 5vh, 3.25rem));
  width: min(31rem, 54%);
  background: #2f2b33;
  color: #e6e4d9;
  border-radius: 8px;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.65), 0 0 0 1px hsl(270 6% 26%);
  font-family: var(--mono);
  font-size: clamp(0.68rem, 0.6rem + 0.32vw, 0.86rem);
  line-height: 1.8;
  overflow: hidden;
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid hsl(270 6% 26%);
  color: #a6a2ac;
  font-size: 0.92em;
  letter-spacing: 0.04em;
}

.term__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #55505c;
}

.term__bar span {
  margin-left: 0.6rem;
}

.term__body {
  padding: 0.7rem 1rem 0.85rem;
}

.term .ln {
  display: block;
  white-space: pre;
  overflow: hidden;
}

.term .ok { color: var(--hl-green); }
.term .pa { color: var(--hl-cyan); }
.term .st { color: var(--hl-orange); }
.term .no { color: var(--hl-red); }
.term .dim { color: #a6a2ac; }
.term .pr { color: var(--hl-yellow); }

.is-live .term {
  opacity: 0;
  translate: 0 14px;
  transition: opacity 0.3s ease, translate 0.3s ease;
}

.is-live .term.is-open {
  opacity: 1;
  translate: 0 0;
}

.is-live .term .ln {
  max-height: 0;
  clip-path: inset(0 100% 0 0);
  transition: max-height 0.16s ease, clip-path 0.42s steps(26, end) 0.1s;
}

.is-live .term .ln.on {
  max-height: 1.9em;
  clip-path: inset(0 0 0 0);
}

.term .ln.cur::after {
  content: "▍";
  color: var(--hl-yellow);
  animation: term-blink 1s steps(1) infinite;
}

@keyframes term-blink {
  50% { opacity: 0; }
}

/* ============================================================
   SECTIONS, TRAY, DOSSIER SHEET
   ============================================================ */
.sec {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--rule);
}

.sec-head {
  max-width: 58ch;
  margin-bottom: 2.75rem;
}

.sec-head h2 {
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 0.85rem;
  text-wrap: balance;
}

.sec-head p {
  color: #46443f;
  max-width: 54ch;
}

.tray {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.swatch h3 {
  font-size: var(--step-1);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.swatch p {
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--ink-2);
  font-family: var(--mono);
}

.sheet {
  position: relative;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--rule);
  rotate: -0.25deg;
  box-shadow: 0 1px 0 var(--paper-3), 0 18px 40px -28px rgba(16, 15, 15, 0.45);
}

.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.sheet-body p {
  font-size: var(--step-1);
  line-height: 1.75;
  max-width: 58ch;
}

.sheet-body p + p {
  margin-top: 1.1rem;
}

.claim {
  font: inherit;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.claim mark {
  pointer-events: none;
}

.claim:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.note {
  margin-top: 1.75rem;
  padding: 1.15rem 1.35rem;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
  font-size: var(--step--1);
  line-height: 1.65;
}

.note .who {
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: block;
  margin-bottom: 0.35rem;
}

.note q {
  font-style: italic;
}

.note cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-style: normal;
  color: var(--ink-2);
}

/* ============================================================
   NUMBERS & STEPS
   ============================================================ */
.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.fig b {
  display: block;
  font-size: var(--step-4);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fig span {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--ink-2);
  line-height: 1.5;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  counter-reset: s;
}

.step {
  counter-increment: s;
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: 0 1px 0 var(--paper-3), 0 14px 28px -22px rgba(16, 15, 15, 0.5);
  rotate: var(--r, 0deg);
}

.step h3::before {
  content: counter(s, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  color: var(--ink-2);
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: var(--step-1);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.step p {
  font-size: var(--step--1);
  line-height: 1.65;
  color: #4a4843;
}

/* ============================================================
   SERVICE PROPOSAL CARDS (TAPED PAPER)
   ============================================================ */
.drops {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.75rem;
  padding-top: 0.75rem;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.85rem 1.4rem 1.4rem;
  box-shadow: 0 1px 0 var(--paper-3), 0 14px 28px -22px rgba(16, 15, 15, 0.5);
  rotate: var(--r, 0deg);
}

.card::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px;
  height: 24px;
  translate: -50% 0;
  rotate: var(--tr, -3deg);
  background: hsl(46 55% 86% / 0.72);
  box-shadow: 0 1px 2px #0002;
}

.card .scrawl {
  font-size: 1.45rem;
}

.card h3 {
  font-size: var(--step-1);
  font-weight: 600;
  margin: 0.3rem 0 0.5rem;
}

.card p {
  font-size: var(--step--1);
  line-height: 1.6;
  color: #4a4843;
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 1.15rem;
}

.tags span {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--ink-3);
}

.price {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

/* ============================================================
   PAYLOAD / DOSSIER
   ============================================================ */
.payload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.payload .sec-head {
  margin-bottom: 0;
}

.payload .sec-head p + p {
  margin-top: 1rem;
}

.payload code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.listing {
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 1px 0 var(--paper-3), 0 18px 40px -28px rgba(16, 15, 15, 0.45);
  rotate: 0.6deg;
}

.listing-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px dashed var(--ink-3);
  flex-wrap: wrap;
}

.listing pre {
  font-family: var(--mono);
  font-size: var(--step--1);
  line-height: 1.9;
  overflow-x: auto;
  color: #2c2a28;
  padding-bottom: 0.25rem;
}

.listing pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.listing .k {
  color: var(--ink-2);
}

.listing pre .scrawl {
  margin-left: 1.25ch;
  font-size: 1.5em;
  vertical-align: -0.12em;
}

/* ============================================================
   MARGIN NOTES / FAQ
   ============================================================ */
.faq {
  --gut: clamp(2.75rem, 6vw, 4rem);
  display: grid;
  gap: 1.1rem;
}

.faq details {
  padding: 0 clamp(1.1rem, 3vw, 1.75rem) 0 var(--gut);
  box-shadow: 0 1px 0 var(--paper-3), 0 14px 28px -22px rgba(16, 15, 15, 0.5);
  rotate: var(--r, 0deg);
}

.faq details::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--gut) * 0.68);
  width: 1px;
  background: hsl(4 70% 72%);
  pointer-events: none;
}

.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  padding: 1.1rem 0;
  font-size: var(--step-1);
  font-weight: 600;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "?";
  position: absolute;
  left: calc(var(--gut) * -0.78);
  top: 50%;
  translate: 0 -50%;
  font-family: var(--hand);
  font-size: 1.6em;
  font-weight: 400;
  color: var(--pencil);
  filter: url(#crayon);
  rotate: -8deg;
}

.faq summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.faq .tick {
  font-family: var(--hand);
  font-size: 1.8em;
  font-weight: 400;
  line-height: 1;
  color: var(--pencil);
  transition: rotate 0.2s ease;
}

.faq details[open] .tick {
  rotate: 45deg;
}

.faq details p {
  padding: 0 0 1.25rem;
  max-width: 62ch;
  color: #46443f;
}

/* ============================================================
   THE CLOSE — SEA, MOON, LIGHTHOUSE & PROPOSAL FORM
   ============================================================ */
.close {
  --sea: 44%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(720px, 100svh, 980px);
  padding: clamp(4.5rem, 11vh, 7.5rem) 0 clamp(14rem, 32vh, 22rem);
  text-align: center;
}

.sea {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.sea__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(44% 24% at 80% 56%, hsl(274 40% 86% / 0.55), transparent 72%),
    radial-gradient(80% 20% at 45% 58%, hsl(345 88% 90% / 0.5), transparent 72%),
    linear-gradient(180deg, hsl(48 100% 97% / 0) 0%, hsl(48 100% 97% / 0) 14%, hsl(46 83% 93%) 40%, hsl(27 98% 90%) 54%, hsl(15 90% 88%) 58%, hsl(199 42% 84%) 62%);
}

.moon {
  position: absolute;
  right: 13%;
  top: 33%;
  width: clamp(150px, 19vw, 270px);
  aspect-ratio: 1;
  will-change: transform;
}

.moon i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--d);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--c);
}

.moon i:nth-child(1) { --d: 100%; --c: hsl(274 40% 90% / 0.45); }
.moon i:nth-child(2) { --d: 78%;  --c: hsl(250 40% 88% / 0.55); }
.moon i:nth-child(3) { --d: 58%;  --c: hsl(220 42% 88% / 0.75); }
.moon i:nth-child(4) { --d: 43%;  --c: hsl(210 34% 92%); }
.moon i:nth-child(5) { --d: 33%;  --c: #fffcf0; }

.sea__layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--sea) * var(--h));
  will-change: transform;
}

.sea__layer svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 200%;
  height: 100%;
  animation: swell var(--t) linear infinite;
}

@keyframes swell {
  to { transform: translateX(-50%); }
}

.sea__layer .crest {
  fill: none;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.w0 path { fill: hsl(199 42% 84%); }
.w0 .crest { stroke: hsl(48 100% 98% / 0.85); }
.w1 path { fill: hsl(199 38% 75%); }
.w1 .crest { stroke: hsl(48 100% 98% / 0.7); }
.w2 path { fill: hsl(203 32% 63%); }
.w2 .crest { stroke: hsl(48 100% 98% / 0.55); }
.w3 path { fill: hsl(218 20% 43%); }
.w3 .crest { stroke: hsl(48 100% 98% / 0.3); }
.w4 path { fill: #2f2b33; }
.w4 .crest { stroke: hsl(27 78% 66% / 0.35); }

.glint {
  position: absolute;
  bottom: 0;
  right: calc(13% + clamp(150px, 19vw, 270px) / 2);
  translate: 50% 0;
  width: clamp(110px, 13vw, 200px);
  height: calc(var(--sea) * 0.98);
  fill: #fffcf0;
  opacity: 0.75;
}

.glint rect {
  animation: glint 4.2s ease-in-out infinite;
}

.glint .g1 { animation-delay: -1.4s; }
.glint .g2 { animation-delay: -2.8s; }

@keyframes glint {
  50% { opacity: 0.3; }
}

.head {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(46vw, 640px);
  height: calc(var(--sea) * 0.5);
  will-change: transform;
}

.head__rock {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: #2f2b33;
}

.head__rock .rim {
  fill: hsl(27 78% 66%);
}

.banana-grove {
  position: absolute;
  left: 28%;
  bottom: 50%;
  width: clamp(280px, 42vw, 480px);
  height: clamp(190px, 34vh, 320px);
  translate: -25% 0;
  overflow: visible;
  z-index: 3;
}

.banana-grove .b-leaf--orange {
  fill: #c85614;
}

.banana-grove .b-leaf--orange-dark {
  fill: #a23f08;
}

.banana-grove .b-leaf--yellow {
  fill: #d4950e;
}

.banana-grove .b-leaf--yellow-dark {
  fill: #aa7205;
}

.banana-grove .banana__rim--orange {
  fill: hsl(32 95% 65%);
}

.banana-grove .banana__rim--yellow {
  fill: hsl(48 95% 70%);
}

.sea::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain-page);
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 14%, #000 40%);
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 14%, #000 40%);
}

.close__copy {
  position: relative;
}

.close h2 {
  font-size: clamp(2.4rem, 1.5rem + 3.6vw, 4.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
  max-width: 16ch;
  margin: 0 auto 1rem;
  color: var(--ink);
}

.close__copy > p {
  font-size: var(--step-1);
  max-width: 40ch;
  margin: 0 auto 2rem;
  color: #46443f;
}

.stash-form {
  max-width: 540px;
  margin: 0 auto;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--paper-3), 0 18px 40px -28px rgba(16, 15, 15, 0.45);
  text-align: left;
  display: grid;
  gap: 0.75rem;
}

.stash-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stash-form input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink-3);
  border-radius: 3px;
}

.stash-form input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}

.btn--glow {
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  padding: 0.9rem 1.5rem;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  box-shadow: 0 14px 34px -14px rgba(16, 15, 15, 0.55), 0 0 0 4px hsl(46 83% 80% / 0.45);
}

.btn--glow span {
  display: inline-block;
  transition: translate 0.2s ease;
}

.btn--glow:hover {
  background: #2a2827;
  box-shadow: 0 16px 40px -14px rgba(16, 15, 15, 0.6), 0 0 0 5px hsl(46 83% 76% / 0.6);
}

.btn--glow:hover span {
  translate: 4px 0;
}

.stash-confirm {
  margin-top: 0.25rem;
  padding: 0.75rem 0.9rem;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #2f2b33;
  padding: 2.25rem 0 3rem;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: var(--step--1);
  line-height: 1.8;
  color: hsl(40 10% 78%);
}

.foot a {
  color: #fffcf0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   RESPONSIVE & REDUCED MOTION
   ============================================================ */
@media (max-width: 900px) {
  .tray,
  .figures,
  .drops {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps,
  .payload {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }
  .nav {
    display: none;
  }
}

@media (max-width: 720px) {
  .hero-sun {
    right: -3rem;
    top: -6rem;
    width: clamp(170px, 52vw, 260px);
  }
  .parallax__layer .fir {
    left: 81%;
  }
  .term {
    top: 1rem;
    bottom: auto;
    width: min(17.5rem, 64%);
    left: 0.85rem;
  }
  .close {
    --sea: 34%;
    min-height: clamp(760px, 100svh, 960px);
  }
  .moon {
    right: 7%;
    top: 54%;
    width: 120px;
  }
  .glint {
    right: calc(7% + 60px);
  }
  .head {
    width: 74vw;
  }
  .banana-grove {
    width: clamp(220px, 60vw, 360px);
    height: clamp(150px, 26vh, 220px);
    left: 20%;
    bottom: 45%;
  }
}

@media (max-width: 520px) {
  .tray,
  .figures,
  .drops,
  .stash-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-sun i,
  .parallax__layer {
    transform: none !important;
  }
  .ridge-track {
    height: auto;
  }
  .parallax {
    position: relative;
    top: auto;
  }
  .sea__layer svg,
  .glint rect,
  .beam {
    animation: none;
  }
}
