/* PaniBook public site. Wraplet palette: blue is water and the brand, orange only marks money moving. */
:root {
  --paper: #f8fafc;
  --paper-2: #eef2ff;
  --ink: #0f172a;
  --ink-2: #475569;
  --line: #dbe3ef;
  --blue: #2b4fff;
  --deep: #1731a5;
  --sky: #9fb4ff;
  --orange: #ff6538;
  --orange-ink: #c2410c; /* orange for text on light: 5.2:1 */
  --wa: #e7ffdb;

  --f-display: 'Bricolage Grotesque', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --f-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --f-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;

  --gut: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --r: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }
dl, dd, ol, ul, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; }
.defs { position: absolute; }

.wrap { width: min(var(--max), 100% - 2 * var(--gut)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.langs :focus-visible, .end :focus-visible { outline-color: #fff; }

.skip {
  position: fixed; left: var(--gut); top: 12px; z-index: 50;
  padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform 0.2s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- type ---------- */
.display {
  font-family: var(--f-display);
  font-size: clamp(3.4rem, 9.2vw, 8.75rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variation-settings: 'opsz' 96;
}
.h2 {
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 4.4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.032em;
  font-variation-settings: 'opsz' 72;
  text-wrap: balance;
}
.eyebrow {
  font: 500 0.78rem/1.2 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}
.eyebrow--light { color: var(--sky); }
.lede { font-size: clamp(1.08rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 36rem; text-wrap: pretty; }
.lede--light { color: rgb(255 255 255 / 0.82); }

/* ---------- buttons ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  background: var(--blue); color: #fff; border: 2px solid var(--blue);
  font-weight: 600; text-decoration: none; letter-spacing: -0.005em;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--sm { min-height: 42px; padding: 0 16px; border-radius: 11px; font-size: 0.95rem; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--light { background: #fff; color: var(--deep); border-color: #fff; }
.btn--line { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.55); }
@media (hover: hover) {
  .btn:hover { background: var(--deep); border-color: var(--deep); }
  .btn--ghost:hover { background: #fff; border-color: var(--ink); color: var(--ink); }
  .btn--light:hover { background: var(--paper-2); border-color: var(--paper-2); }
  .btn--line:hover { background: rgb(255 255 255 / 0.1); border-color: #fff; }
}

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; transition: background-color 0.25s, box-shadow 0.25s; }
.top[data-scrolled] { background: rgb(248 250 252 / 0.86); backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--line); }
.top__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; }
.brand__name { font: 700 1.3rem/1 var(--f-display); letter-spacing: -0.03em; }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 0.95rem; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
@media (hover: hover) { .nav a:hover { color: var(--ink); } }
@media (max-width: 760px) {
  .nav { display: none; }
  .top .btn { margin-left: auto; }
}

/* ---------- bottle drawing ---------- */
/* --to: how far a drop falls from the neck to the water surface (follows the fill level). */
.bottle { --fill: 0; --to: calc(40px + (1 - var(--fill)) * 280px); width: 100%; height: auto; overflow: visible; }
.b-cap { fill: var(--deep); transform-box: fill-box; transform-origin: 0% 100%; transition: transform 0.55s var(--ease); }
.bottle.is-open .b-cap { transform: translate(-12px, -4px) rotate(-40deg); }
.b-neck { fill: var(--sky); }
.b-glass { fill: rgb(159 180 255 / 0.16); }
.b-water { fill: var(--blue); transform: translateY(calc((1 - var(--fill)) * 280px)); }
.b-wave { animation: wave 3.2s linear infinite; }
.b-outline { fill: none; stroke: var(--deep); stroke-width: 3.5; stroke-linejoin: round; }
.b-ridge { stroke: rgb(23 49 165 / 0.28); stroke-width: 3; stroke-linecap: round; }
.drop { fill: var(--blue); opacity: 0; transform-box: fill-box; transform-origin: 50% 0; }
.ripple { fill: none; stroke: #fff; stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.bottle.is-pouring .drop { animation: fall var(--drip, 1.3s) cubic-bezier(0.55, 0, 1, 0.45) infinite; }
.bottle.is-pouring .ripple { animation: ripple var(--drip, 1.3s) ease-out infinite; }
.bottle.is-pouring .drop--2, .bottle.is-pouring .ripple--2 { animation-delay: calc(var(--drip, 1.3s) / 2); }
@keyframes wave { to { transform: translateX(100px); } }
@keyframes fall {
  0% { transform: translateY(0) scaleY(0.7); opacity: 0; }
  10% { opacity: 1; }
  68% { transform: translateY(var(--to)) scaleY(1.35); opacity: 1; }
  70%, 100% { transform: translateY(var(--to)) scaleY(1); opacity: 0; }
}
@keyframes ripple {
  0%, 66% { transform: scale(0.2); opacity: 0; }
  70% { opacity: 0.95; }
  100% { transform: scale(1.9, 1.5); opacity: 0; }
}

/* ---------- 1. hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center;
  min-height: calc(100svh - 68px); padding-block: 24px 56px;
}
.hero .lede { margin-top: 1.75rem; }
.credit { margin-top: 1.75rem; font-size: 0.92rem; color: var(--ink-2); }
.credit a { font-weight: 600; color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hero__art { position: relative; justify-self: center; width: min(100%, 340px); }
.bottle--hero { --fill: 0.95; transform: rotate(-4deg); filter: drop-shadow(0 30px 40px rgb(23 49 165 / 0.18)); }
.hero__cue { margin-top: 28px; text-align: center; font: 500 0.78rem/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.hero__cue::after { content: ''; display: block; width: 1px; height: 40px; margin: 12px auto 0; background: linear-gradient(var(--blue), transparent); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 32px; gap: 32px; }
  .hero__art { width: min(62%, 240px); }
}

/* ---------- 2. signature: khata ---------- */
.khata { position: relative; height: 420svh; background: linear-gradient(var(--paper), var(--paper-2) 30%, var(--paper-2) 80%, var(--paper)); }
.stage { position: sticky; top: 0; height: 100svh; padding-top: 68px; display: flex; align-items: center; overflow: hidden; }
.stage__in {
  --exit: 0;
  display: grid; gap: 28px 44px; align-items: center;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.35fr) minmax(0, 0.8fr);
  grid-template-areas: 'head head head' 'bottle book wa';
  transform: translateY(calc(var(--exit) * -48px)) scale(calc(1 - var(--exit) * 0.05));
  opacity: calc(1 - var(--exit) * 0.7);
}
.stage__head { grid-area: head; }
.stage__bottle { grid-area: bottle; display: flex; align-items: center; gap: 16px; }
.stage__bottle .bottle { width: min(100%, 170px); flex: none; }

.rail { display: grid; gap: 18px; font: 500 0.78rem/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: rgb(71 85 105 / 0.6); }
.rail li { display: flex; align-items: center; gap: 10px; transition: color 0.3s; }
.rail li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; transition: background-color 0.3s, border-color 0.3s; }
.rail li.is-on { color: var(--deep); }
.rail li.is-on::before { background: var(--blue); border-color: var(--blue); }

/* The khata book. --open/--l1/--l2 (0..1) turn the cover and two old pages; JS drives them from scroll.
   Without JS the book is simply open. Each leaf is rotated, then pushed off the page by --z, so the
   browser's own 3D depth puts the last-turned page on top on the left. */
.book { grid-area: book; --open: 1; --l1: 1; --l2: 1; --sheet: #fff; perspective: 1800px; }
html.js .book { --open: 0; --l1: 0; --l2: 0; }
.book__spread { position: relative; display: grid; grid-template-columns: 1fr 1fr; transform-style: preserve-3d; }
.page {
  grid-column: 2; position: relative; min-height: 370px; padding: 22px 22px 18px 28px;
  background: var(--sheet) linear-gradient(90deg, transparent 15px, rgb(43 79 255 / 0.22) 15px 16px, transparent 16px);
  border-radius: 3px 14px 14px 3px;
  box-shadow: inset 12px 0 16px -12px rgb(15 23 42 / 0.2), 0 30px 60px -30px rgb(23 49 165 / 0.4);
}
.page__cap { display: none; }
.leaf {
  --t: 0; --z: 1px;
  position: absolute; top: 0; bottom: 0; left: 50%; width: 50%;
  transform-origin: 0 50%; transform-style: preserve-3d;
  transform: rotateY(calc(var(--t) * -180deg)) translateZ(var(--z));
}
.cover { --t: var(--open); --z: 3px; }
.leaf--1 { --t: var(--l1); --z: 2px; }
.leaf--2 { --t: var(--l2); --z: 1px; }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--sheet); border-radius: 3px 14px 14px 3px;
  box-shadow: inset 12px 0 16px -12px rgb(15 23 42 / 0.16), 0 1px 0 var(--line);
}
.face--back { transform: rotateY(180deg); border-radius: 14px 3px 3px 14px; box-shadow: inset -12px 0 16px -12px rgb(15 23 42 / 0.16), 0 1px 0 var(--line); }
.face--old {
  background-image:
    linear-gradient(90deg, transparent 15px, rgb(43 79 255 / 0.18) 15px 16px, transparent 16px),
    repeating-linear-gradient(transparent 0 34px, rgb(159 180 255 / 0.45) 34px 35px);
  background-position: 0 0, 0 24px;
}
.cover__front {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--deep); color: #fff;
  box-shadow: inset 10px 0 0 rgb(0 0 0 / 0.22), 0 30px 60px -30px rgb(23 49 165 / 0.6);
}
.cover__front .mk { width: 54px; height: 54px; }
.cover__front p { font: 700 2rem/1 var(--f-display); letter-spacing: -0.03em; }
.cover__front span { font: 500 0.72rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky); }
.cover .face--back { background: #e8edfd; }
.title { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 28px 30px; }
.title .mk { width: 34px; height: 34px; margin-bottom: 14px; }
.title__k { font: 500 0.75rem/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.title__who { font: 700 2rem/1.05 var(--f-display); letter-spacing: -0.03em; margin-top: 6px; }
.title__where { color: var(--ink-2); }
.title__date { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-2); }

.ledger__rows { display: grid; gap: 2px; }
.row { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgb(159 180 255 / 0.45); }
.row dt { color: var(--ink-2); }
.row dd { font: 500 1rem/1 var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row--paid dd { color: var(--orange-ink); font-weight: 600; }
.row--total { margin-top: 8px; padding-top: 14px; border-bottom: 0; border-top: 1.5px dashed var(--line); }
.row--total dt { color: var(--ink); font-weight: 600; }
.row--total dd { font: 700 clamp(1.8rem, 2.8vw, 2.5rem)/1 var(--f-display); letter-spacing: -0.03em; color: var(--blue); }
.ledger__note { margin-top: 16px; font-size: 0.82rem; color: var(--ink-2); }
/* Each line writes itself: a strip of paper over it slides away left to right. */
.row::after { content: ''; position: absolute; inset: 1px -6px 1px -6px; background: var(--sheet); transform-origin: 100% 50%; transform: scaleX(0); transition: transform 0.75s var(--ease); pointer-events: none; }
html.js .khata .row:not(.is-on)::after { transform: scaleX(1); }

.wa {
  grid-area: wa; align-self: center; position: relative;
  background: var(--wa); border-radius: 16px 16px 16px 4px; padding: 16px 18px 14px;
  box-shadow: 0 24px 50px -24px rgb(15 23 42 / 0.4); transform: rotate(1.5deg);
}
.wa__cap { font: 500 0.72rem/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #3f6212; margin-bottom: 10px; }
.wa__msg { font-size: 0.9rem; line-height: 1.5; }
.wa__msg span { display: block; }
.wa__msg .l--gap { margin-bottom: 0.75em; }
.wa__msg .l--key { font-weight: 600; }
html.js .khata .wa { transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }
html.js .khata .wa:not(.is-on) { opacity: 0; transform: translateY(48px) rotate(7deg) scale(0.94); }

/* Laptop widths: no room for three columns. The rail goes, the book widens and the receipt lands on it. */
@media (min-width: 900px) and (max-width: 1199px) {
  .stage__in { grid-template-columns: minmax(0, 0.42fr) minmax(0, 1.58fr); grid-template-areas: "head head" "bottle book"; }
  .rail { display: none; }
  .stage__bottle .bottle { width: min(100%, 150px); }
  .wa { grid-area: book; justify-self: start; align-self: center; width: min(320px, 47%); margin-left: -20px; z-index: 5; transform: rotate(-1.5deg); }
  html.js .khata .wa:not(.is-on) { transform: translateY(48px) rotate(-7deg) scale(0.94); }
}
@media (max-width: 899px) {
  .khata { height: 380svh; }
  .stage__in {
    grid-template-columns: 84px minmax(0, 1fr); gap: 16px 14px;
    grid-template-areas: 'head head' 'bottle book' 'wa wa';
  }
  .stage__bottle .bottle { width: 84px; }
  .rail { display: none; }
  /* One page on a phone: the cover and old pages flip up from the top edge and away. */
  .book { perspective: 1400px; }
  .book__spread { grid-template-columns: 1fr; }
  .page { grid-column: 1; min-height: 0; padding: 12px 12px 10px 22px; }
  .leaf { left: 0; width: 100%; transform-origin: 50% 0; transform: rotateX(calc(var(--t) * 180deg)) translateZ(var(--z)); }
  .face--back { display: none; }
  .cover__front { gap: 6px; }
  .cover__front .mk { width: 40px; height: 40px; }
  .cover__front p { font-size: 1.5rem; }
  .page__cap { display: block; font: 500 0.64rem/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 8px; }
  .row { padding: 7px 0; font-size: 0.84rem; gap: 8px; }
  .row dd { font-size: 0.86rem; }
  .row--total dd { font-size: 1.55rem; }
  .ledger__note { display: none; }
  .wa { transform: none; padding: 12px 14px; }
  html.js .khata .wa:not(.is-on) { transform: translateY(40px) scale(0.96); }
  .wa__msg { font-size: 0.8rem; line-height: 1.42; }
}
@media (max-width: 899px) and (max-height: 760px) {
  .stage__head .eyebrow { display: none; }
  .wa__msg .l--opt { display: none; }
}

/* ---------- 3. offline ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: center; padding-block: clamp(96px, 14vw, 180px); }
.split__copy p:not(.eyebrow) { margin-top: 1.25rem; color: var(--ink-2); max-width: 34rem; }
.voice { margin-top: 2.25rem; padding-left: 20px; border-left: 3px solid var(--blue); }
.voice p { font: 600 clamp(1.3rem, 2vw, 1.6rem)/1.25 var(--f-display); letter-spacing: -0.02em; color: var(--ink) !important; margin: 0 !important; }
.voice footer { margin-top: 8px; font-size: 0.88rem; color: var(--ink-2); }

.phone { justify-self: center; width: min(100%, 320px); aspect-ratio: 320 / 640; padding: 12px; border-radius: 46px; background: var(--ink); box-shadow: 0 40px 80px -40px rgb(15 23 42 / 0.6); }
.phone__screen { height: 100%; border-radius: 36px; background: var(--paper); padding: 28px 16px 16px; overflow: hidden; }
.phone__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.pill { font: 500 0.68rem/1 var(--f-mono); padding: 6px 9px; border-radius: 99px; background: #e2e8f0; color: var(--ink-2); white-space: nowrap; transition: background-color 0.4s, color 0.4s; }
.pill.is-synced { background: var(--blue); color: #fff; }
.stops { display: grid; gap: 10px; margin-top: 18px; }
.stop { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 0.85rem; }
.stop b { font-weight: 600; }
.stop span { grid-column: 1; color: var(--ink-2); font-size: 0.78rem; }
.stop i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 500 0.78rem/1 var(--f-mono); font-style: normal; color: var(--ink-2); }
.stop--done { border-color: transparent; background: #eef2ff; }
.stop--done i { color: var(--deep); }
.stop:last-child { border: 2px solid var(--blue); }
.stop:last-child i { color: var(--blue); font-weight: 600; }

/* ---------- 4. bottles ---------- */
.bottles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: end; padding-bottom: clamp(96px, 14vw, 180px); }
.bottles__copy p:not(.eyebrow) { margin-top: 1.25rem; color: var(--ink-2); max-width: 34rem; }
.tally { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.tally div { padding: 22px 0 20px; border-bottom: 1px solid var(--line); }
.tally div:nth-child(odd) { padding-right: 20px; border-right: 1px solid var(--line); }
.tally div:nth-child(even) { padding-left: 24px; }
.tally dt { font-size: 0.88rem; color: var(--ink-2); }
.tally dd { margin-top: 6px; font: 700 clamp(2.2rem, 4vw, 3.4rem)/1 var(--f-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }

/* ---------- 5. languages ---------- */
.langs { background: var(--deep); color: #fff; padding-block: clamp(88px, 12vw, 160px); position: relative; overflow: hidden; }
.langs::before { content: ''; position: absolute; inset: -30% -20% auto auto; width: 70%; height: 120%; border-radius: 80px; background: var(--blue); opacity: 0.45; transform: rotate(-14deg); pointer-events: none; }
.langs .wrap { position: relative; z-index: 1; }
.tabs { display: inline-flex; gap: 6px; margin-top: 2.25rem; padding: 6px; border-radius: 16px; background: rgb(255 255 255 / 0.1); }
.tabs button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 11px; background: transparent; color: rgb(255 255 255 / 0.85); font-weight: 600; cursor: pointer; }
.tabs button[aria-selected='true'] { background: #fff; color: var(--deep); }
.tabs button[lang='ur'] { font-family: var(--f-urdu); font-size: 0.95rem; }
.said { margin-top: 2.5rem; min-height: 9.5em; }
.said p { font: 600 clamp(1.8rem, 4.2vw, 3.6rem)/1.12 var(--f-display); letter-spacing: -0.025em; max-width: 22ch; text-wrap: balance; }
.said p[lang='ur'] { font-family: var(--f-urdu); font-weight: 500; line-height: 2.1; letter-spacing: 0; max-width: 24ch; margin-left: auto; text-align: right; }
.langs__note { margin-top: 2rem; max-width: 38rem; color: rgb(255 255 255 / 0.8); }
.langs__note bdi { font-family: var(--f-urdu); }

/* ---------- 6. feature index ---------- */
.index { padding-block: clamp(96px, 14vw, 180px); }
.feats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; margin-top: 3rem; counter-reset: f; }
.feats li { display: grid; grid-template-columns: 56px 1fr; gap: 4px 12px; padding: 26px 0; border-top: 1px solid var(--line); }
.feats__n { grid-row: 1 / span 2; font: 500 0.85rem/1.9 var(--f-mono); color: var(--blue); }
.feats h3 { font: 700 clamp(1.3rem, 1.8vw, 1.6rem)/1.15 var(--f-display); letter-spacing: -0.02em; }
.feats p { color: var(--ink-2); font-size: 0.98rem; }

/* ---------- 7. end ---------- */
.end { position: relative; overflow: hidden; background: var(--blue); color: #fff; padding-block: clamp(96px, 13vw, 170px); }
.end::before { content: ''; position: absolute; left: -10%; bottom: -55%; width: 120%; height: 90%; background: var(--deep); transform: rotate(-6deg); pointer-events: none; }
.end::after { content: ''; position: absolute; right: 0; top: 0; width: clamp(90px, 14vw, 200px); aspect-ratio: 1; background: var(--orange); clip-path: polygon(30% 0, 100% 0, 100% 100%); pointer-events: none; }
.end__in { position: relative; z-index: 1; }
.display--end { font-size: clamp(2.8rem, 7.2vw, 6.5rem); max-width: 12ch; }
.end .lede { margin-top: 1.5rem; }

/* ---------- footer ---------- */
.foot { padding-block: 40px; font-size: 0.92rem; color: var(--ink-2); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot__in > p:first-of-type { flex: 1 1 260px; }
.foot__in p a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.foot__nav { display: flex; gap: 20px; }
.foot__nav a { text-decoration: none; }
@media (hover: hover) { .foot__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }
.foot__copy { width: 100%; font-size: 0.82rem; }

/* ---------- reveal (JS only) ---------- */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
/* Pairs in the feature index arrive one after the other. */
html.js .feats li:nth-child(even) { transition-delay: 0.12s; }

/* Headings rise out of a mask when their section arrives. */
.m { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.m > span { display: block; }
html.js .m > span { transform: translateY(108%); transition: transform 1s var(--ease); }
html.js .m.in > span { transform: none; }

/* ---------- load intro: things move into place, nothing waits behind a curtain ---------- */
.top { animation: intro-down 0.7s var(--ease) both; }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: block; animation: intro-rise 0.9s var(--ease) both; }
.line + .line > span { animation-delay: 0.09s; }
.hero__copy > :not(h1) { animation: intro-settle 1s 0.12s var(--ease) both; }
.hero__art { animation: intro-art 1.2s 0.05s var(--ease) both; }
@keyframes intro-down { from { transform: translateY(-100%); } }
@keyframes intro-rise { from { transform: translateY(104%); } }
@keyframes intro-settle { from { transform: translateY(18px); } }
@keyframes intro-art { from { transform: translateY(40px) rotate(4deg); } }
.bottle--hero { --drip: 0.95s; }
/* With JS and motion, the hero bottle starts low and main.js fills it; otherwise it is simply full. */
@media (prefers-reduced-motion: no-preference) { .js .bottle--hero { --fill: 0.18; } }

/* ---------- water edges where the page meets a blue section ---------- */
.edge { position: absolute; left: 0; top: -1px; width: 100%; height: 40px; pointer-events: none; z-index: 1; }
.edge path { fill: var(--paper); animation: edge 10s linear infinite; }
@keyframes edge { to { transform: translateX(-360px); } }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .split, .bottles { grid-template-columns: 1fr; gap: 48px; }
  .phone { width: min(100%, 280px); }
  .feats { grid-template-columns: 1fr; }
  .tabs { display: flex; width: 100%; }
  .tabs button { flex: 1; padding: 0 8px; }
}

/* ---------- reduced motion: same content, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .khata { height: auto; }
  .stage { position: static; height: auto; padding-block: 96px; }
  .stage__in { --exit: 0 !important; }
  .stage .bottle { --fill: 0.85; }
  .book { --open: 1 !important; --l1: 1 !important; --l2: 1 !important; }
  html.js .khata .row::after { transform: scaleX(0) !important; }
  html.js .khata .wa, html.js .reveal { opacity: 1 !important; transform: none !important; }
  html.js .khata .wa { transform: rotate(1.5deg) !important; }
  html.js .m > span { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 899px) {
  html.js .khata .wa { transform: none !important; }
  .wa__msg .l--opt { display: block; }
  .leaf { display: none; }
}

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 0; padding-block: 48px; }
.lost .brand { position: absolute; top: 24px; }
.lost .eyebrow { margin-top: 0; }
.lost__title { font-size: clamp(2.8rem, 8vw, 7rem); max-width: 13ch; }
.lost .lede { margin-top: 1.5rem; }
