/* RAYA · ระยะ — product page for the RAYA app
   Colours: the five CI tones only (alpha variants of them for veils and hairlines).
   Type: Cormorant Garamond (Latin display) · Inter (Latin UI caps, per CI)
         Noto Serif Thai (Thai headings) · IBM Plex Sans Thai (Thai body). Thai is never letter-spaced. */

:root {
  --obsidian: #1C1C1C;
  --charcoal: #3D3D3D;
  --greige:   #A7A39C;
  --stone:    #D9D2C8;
  --bone:     #F7F5F1;

  --bone-a:   247 245 241;
  --stone-a:  217 210 200;
  --greige-a: 167 163 156;
  --obs-a:    28 28 28;

  --hair: rgb(var(--greige-a) / .5);
  --tint: linear-gradient(rgb(var(--stone-a) / .34), rgb(var(--stone-a) / .34)), var(--bone);

  --f-display: "Cormorant Garamond", "Noto Serif Thai", Georgia, "Times New Roman", serif;
  --f-th-serif: "Noto Serif Thai", "Cormorant Garamond", Georgia, serif;
  --f-ui: "Inter", "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-th: "IBM Plex Sans Thai", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.5rem, 4vw, 3.5rem);
  --header-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --screen-dur: 5.5s;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bone); }
body {
  margin: 0;
  background: var(--bone);
  color: var(--obsidian);
  font-family: var(--f-th);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: inherit; }
::selection { background: var(--stone); color: var(--obsidian); }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--header-h) + var(--safe-t)); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 1rem; top: calc(var(--safe-t) + .75rem); z-index: 100;
  padding: .75rem 1.1rem; background: var(--obsidian); color: var(--bone);
  font: 500 .95rem/1 var(--f-th);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap { width: min(100% - 2 * var(--gutter), 1328px); margin-inline: auto; }
.nw { white-space: nowrap; } /* keeps a Thai phrase whole; the line breaks only at the phrase space */

/* ---------- type ---------- */
/* Latin small caps (English only — never on Thai) */
.eyebrow, .tagline, .round-label, .tool-en, .stab-n, .menu-num, .menu-foot, .footer-mark {
  font-family: var(--f-ui);
  text-transform: uppercase;
  font-weight: 500;
}
.eyebrow { font-size: .6875rem; letter-spacing: .28em; line-height: 1.6; }
.eyebrow--muted { color: var(--charcoal); }
.eyebrow .sep { opacity: .55; margin-inline: .2em; letter-spacing: 0; }
.tagline { font-size: .75rem; letter-spacing: .42em; line-height: 1.6; }

.hero-title, .heading-th, .flow-title, .tool-title {
  font-family: var(--f-th-serif);
  font-weight: 300;
  letter-spacing: 0;
}
.hero-title { font-size: clamp(2.05rem, 8.9vw, 3.6rem); line-height: 1.3; }
.heading-th { font-size: clamp(1.75rem, 7.4vw, 3rem); line-height: 1.38; }

.display-caps {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.06;
  font-size: clamp(2.6rem, 1.7rem + 2.2vw, 3.3rem);
}
.display-caps--xl { font-size: clamp(2.5rem, 1.3rem + 3.1vw, 3.9rem); letter-spacing: .05em; }

.body-th {
  font-family: var(--f-th);
  font-weight: 400;
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.8;
  color: var(--charcoal);
  letter-spacing: 0;
}

/* ---------- shared bits ---------- */
.rule { display: inline-block; flex: none; width: 3.5rem; height: 1px; background: currentColor; opacity: .55; }

.arrow {
  position: relative; display: inline-block; flex: none;
  width: 3.75rem; height: 1px; background: currentColor;
  transition: width .6s var(--ease-out);
}
.arrow::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: translate(-1px, -50%) rotate(45deg);
}
.arrow--short { width: 1.75rem; }

.line-link {
  display: inline-flex; align-items: center; gap: 1rem;
  min-height: 44px; font-family: var(--f-th); font-size: 1rem; font-weight: 500; letter-spacing: 0;
}
.line-link:hover .arrow, .line-link:focus-visible .arrow { width: 2.75rem; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding-inline: 1.6rem;
  border: 1px solid currentColor; border-radius: 999px;
  font-family: var(--f-th); font-size: .95rem; font-weight: 500; letter-spacing: 0; line-height: 1;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.pill:hover, .pill:focus-visible { background: var(--obsidian); color: var(--bone); border-color: var(--obsidian); }
.pill--dark { background: var(--obsidian); color: var(--bone); border-color: var(--obsidian); }
.pill--dark:hover, .pill--dark:focus-visible { background: var(--charcoal); border-color: var(--charcoal); }
.pill--lg { min-height: 52px; padding-inline: 2.2rem; font-size: 1.02rem; }

/* ---------- logo (masks — the CI files, tinted, never retyped) ---------- */
.lockup, .wordmark {
  display: block;
  background-color: currentColor;
  -webkit-mask-image: url("assets/brand/raya-lockup-mask.png");
          mask-image: url("assets/brand/raya-lockup-mask.png");
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
.lockup {
  width: clamp(128px, 60px + 10vw, 196px);
  aspect-ratio: 560 / 863;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-position: center; mask-position: center;
}
/* The "R A Y A" row of the same lockup file (source px: x 2–558, y 696–782 of 560×863). */
.wordmark {
  --w: 92px;
  width: var(--w);
  height: calc(var(--w) * 86 / 556);
  -webkit-mask-size: calc(var(--w) * 560 / 556) auto;
          mask-size: calc(var(--w) * 560 / 556) auto;
  -webkit-mask-position: calc(var(--w) * -2 / 556) calc(var(--w) * -696 / 556);
          mask-position: calc(var(--w) * -2 / 556) calc(var(--w) * -696 / 556);
}

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: var(--safe-t);
  background: rgb(var(--bone-a) / .92);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
          backdrop-filter: blur(16px) saturate(1.05);
  border-bottom: 1px solid transparent;
  transition: border-color .5s var(--ease), background-color .5s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: rgb(var(--greige-a) / .35); }
.bar {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--obsidian); }
.nav, .pill--bar { display: none; }
.burger {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgb(var(--obs-a) / .8);
  margin-right: -4px;
}
.burger-lines { position: relative; display: block; width: 16px; height: 7px; }
.burger-lines i {
  position: absolute; left: 0; right: 0; height: 1px; background: currentColor;
  transition: transform .45s var(--ease-out), top .45s var(--ease-out);
}
.burger-lines i:first-child { top: 0; }
.burger-lines i:last-child { top: 6px; }
.burger[aria-expanded="true"] .burger-lines i:first-child { top: 3px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger-lines i:last-child { top: 3px; transform: rotate(-45deg); }

/* mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + var(--safe-t) + 2.5rem) var(--gutter) calc(2rem + var(--safe-b));
  background: var(--bone);
  opacity: 0; transition: opacity .45s var(--ease);
  overflow-y: auto;
}
.menu.is-open { opacity: 1; }
.menu-list { border-top: 1px solid var(--hair); margin-bottom: 2.5rem; }
.menu-list a {
  display: flex; align-items: baseline; gap: 1.25rem;
  padding-block: 1rem; border-bottom: 1px solid var(--hair);
  font-family: var(--f-th-serif); font-weight: 300; font-size: 2rem; line-height: 1.3; letter-spacing: 0;
}
.menu-num { font-size: .625rem; letter-spacing: .2em; color: var(--charcoal); transform: translateY(-.6em); }
.menu-foot { font-size: .625rem; line-height: 1.6; letter-spacing: .3em; color: var(--charcoal); }
html.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + var(--safe-t) + clamp(2.25rem, 6vw, 4.5rem));
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.hero-grid {
  display: grid; row-gap: 2.25rem;
  grid-template-areas: "copy" "visual" "tabs";
}
.hero-copy { grid-area: copy; }
.hero-copy .eyebrow { color: var(--charcoal); margin-bottom: 1.4rem; }
.hero-lede { margin-top: 1.4rem; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin-top: 2rem; }
.hero-note { margin-top: 1rem; font-size: .9rem; color: var(--charcoal); }

.hero-visual { grid-area: visual; position: relative; }
.hero-render {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 2px;
  background: var(--stone);
}
.hero-render img { width: 100%; height: 100%; object-fit: cover; }

/* phone */
.phone {
  --pw: min(46vw, 210px);
  position: relative; z-index: 2;
  width: var(--pw); margin: calc(var(--pw) * -.5) 5% 0 auto; /* phones: sits on the render's lower right */
  padding: calc(var(--pw) * .028);
  border-radius: calc(var(--pw) * .16);
  background: var(--obsidian);
  box-shadow: 0 34px 60px -30px rgb(var(--obs-a) / .55), 0 12px 24px -16px rgb(var(--obs-a) / .35);
  touch-action: pan-y;
}
.phone-screen {
  position: relative; aspect-ratio: 390 / 844; overflow: hidden;
  border-radius: calc(var(--pw) * .135);
  background: var(--bone);
}
.screen { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0s linear .9s, visibility 0s linear .9s; }
.screen.is-active { z-index: 2; opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* screen tabs = the carousel control and its timer */
.screen-tabs { grid-area: tabs; display: flex; justify-content: flex-start; align-items: stretch; gap: .25rem; margin-left: -.6rem; }
.stab {
  position: relative; display: grid; justify-items: start; align-content: center; gap: .1rem;
  min-width: 72px; min-height: 52px; padding: .35rem .6rem .7rem;
  font-family: var(--f-th); font-size: .98rem; font-weight: 500; letter-spacing: 0; line-height: 1.2;
  color: var(--charcoal); transition: color .4s var(--ease);
}
.stab-n { font-size: .625rem; letter-spacing: .18em; color: var(--greige); font-weight: 500; }
.stab[aria-current="true"] { color: var(--obsidian); }
.stab[aria-current="true"] .stab-n { color: var(--charcoal); }
.stab-bar { position: absolute; left: .6rem; right: .6rem; bottom: .35rem; height: 1px; background: rgb(var(--greige-a) / .6); }
.stab-bar i { position: absolute; inset: -.5px 0; height: 2px; background: var(--obsidian); transform: scaleX(0); transform-origin: left center; }
.stab[aria-current="true"] .stab-bar i { transform: scaleX(1); }
.hero.is-running .stab[aria-current="true"] .stab-bar i { transform: scaleX(0); animation: fill var(--screen-dur) linear forwards; }
.hero.is-paused .stab-bar i, .hero.is-held .stab-bar i { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.pause { display: grid; place-items: center; width: 44px; height: 52px; color: var(--charcoal); }
.pause svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.pause .i-play { display: none; }
.hero.is-paused .pause .i-pause { display: none; }
.hero.is-paused .pause .i-play { display: block; }

/* ---------- clay → render ---------- */
.compare { background: var(--tint); padding-block: clamp(4rem, 8vw, 6.5rem); }
.compare-grid { display: grid; gap: 2.25rem; }
.compare-copy .eyebrow { margin-bottom: 1.1rem; }
.compare-copy .body-th { margin-top: 1.2rem; max-width: 30rem; }
.compare-caption { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--hair); font-size: .9rem; line-height: 1.7; color: var(--charcoal); max-width: 30rem; }

.ba {
  --pos: 50%;
  position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 2px;
  background: var(--stone); user-select: none; -webkit-user-select: none;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: var(--bone); transform: translateX(-.5px); pointer-events: none; }
.ba-knob {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--bone); color: var(--obsidian);
  box-shadow: 0 6px 18px -6px rgb(var(--obs-a) / .45);
}
.ba-knob svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ba:has(.ba-range:focus-visible) .ba-knob { outline: 2px solid var(--obsidian); outline-offset: 3px; }
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; touch-action: pan-y;
  -webkit-appearance: none; appearance: none;
}
.ba-tag {
  position: absolute; top: .75rem; padding: .3rem .7rem; border-radius: 999px;
  background: rgb(var(--bone-a) / .88); color: var(--obsidian);
  font-family: var(--f-th); font-size: .82rem; font-weight: 500; line-height: 1.3; letter-spacing: 0;
  pointer-events: none;
}
.ba-tag--l { left: .75rem; }
.ba-tag--r { right: .75rem; }

/* ---------- how it works ---------- */
.how { padding-block: clamp(4.5rem, 8vw, 7rem); }
.how .eyebrow { margin-bottom: 1.1rem; }
.flow { position: relative; display: grid; gap: 2rem; margin-top: 2.75rem; --num-w: 3rem; }
.flow::before {
  content: ""; position: absolute; top: .35rem; bottom: .35rem;
  left: calc(var(--num-w) + 1rem); width: 1px; background: var(--hair);
}
.flow-step { display: grid; grid-template-columns: var(--num-w) 1fr; column-gap: 2rem; align-items: start; align-content: start; }
.flow-num {
  grid-row: span 2;
  font-family: var(--f-display); font-weight: 300; font-variant-numeric: lining-nums;
  font-size: clamp(2.1rem, 1.7rem + 1.1vw, 2.75rem); line-height: .9; color: var(--greige); text-align: right;
}
.flow-title { font-size: clamp(1.35rem, 1.2rem + .5vw, 1.6rem); line-height: 1.35; }
.flow-desc { margin-top: .35rem; font-size: .98rem; line-height: 1.7; color: var(--charcoal); }

/* ---------- tools ---------- */
.tools { background: var(--tint); padding-block: clamp(4.5rem, 8vw, 7rem); }
.tools .eyebrow { margin-bottom: 1.1rem; }
.tool-grid { display: grid; gap: 3.75rem; margin-top: 2.75rem; }
.tool { display: grid; gap: 1.6rem; justify-items: center; }
.shot {
  position: relative; width: min(74vw, 290px); aspect-ratio: 390 / 640; overflow: hidden;
  border-radius: 22px; background: var(--bone);
  box-shadow: 0 0 0 1px rgb(var(--greige-a) / .55), 0 28px 48px -30px rgb(var(--obs-a) / .45);
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tool-copy { justify-self: stretch; }
.tool-en { font-size: .625rem; letter-spacing: .26em; color: var(--charcoal); }
.tool-title { margin-top: .35rem; font-size: clamp(1.5rem, 1.3rem + .6vw, 1.85rem); line-height: 1.35; }
.tool-desc { margin-top: .5rem; font-size: 1rem; line-height: 1.75; color: var(--charcoal); max-width: 30rem; }

/* ---------- documents (dark) ---------- */
.docs { background: var(--obsidian); color: var(--bone); padding-block: clamp(4.5rem, 8vw, 7rem); overflow: hidden; }
.docs-grid { display: grid; gap: 3rem; }
.wordmark--dark { --w: 96px; color: var(--bone); margin-bottom: 2.5rem; }
.docs-copy .eyebrow { color: var(--stone); margin-bottom: 1.25rem; }
.docs-lede { margin-top: 1.5rem; font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem); line-height: 1.75; color: var(--stone); max-width: 30rem; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .25rem; margin-top: 2rem; }
.chain li {
  position: relative; padding: .45rem .8rem;
  border: 1px solid rgb(var(--bone-a) / .28);
  font-size: .95rem; line-height: 1.3; letter-spacing: 0;
}
.chain li:not(:last-child) { margin-right: 1.1rem; }
.chain li:not(:last-child)::after { /* drawn arrow between steps — no text for screen readers to read out */
  content: ""; position: absolute; top: 50%; right: -1.05rem; width: .8rem; height: 1px; background: var(--greige);
}
.docs-note { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgb(var(--bone-a) / .2); font-size: .95rem; line-height: 1.7; color: var(--stone); max-width: 30rem; }

.docs-visual { position: relative; display: grid; }
.paper { position: relative; background: var(--bone); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); }
.paper img { width: 100%; height: auto; mix-blend-mode: multiply; }
.paper--plan { width: 100%; }
.paper--elev { width: 86%; justify-self: end; margin-top: -9%; }
.shot--docs { width: min(52vw, 220px); margin-top: -16%; margin-left: 4%; border-radius: 18px; }

/* ---------- start ---------- */
.start { padding-block: clamp(4.5rem, 8vw, 7rem); }
.start-grid { display: grid; gap: 3rem; }
.start-copy .body-th { margin-top: .8rem; }
.start-copy .pill { margin-top: 1.75rem; }
.start-for .eyebrow { margin-bottom: 1rem; }
.for-list { border-top: 1px solid var(--hair); }
.for-list li {
  padding-block: .85rem; border-bottom: 1px solid var(--hair);
  font-family: var(--f-th-serif); font-weight: 300; font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); letter-spacing: 0;
}

/* ---------- footer ---------- */
.site-footer { padding-block: clamp(4rem, 7vw, 6rem) calc(1.75rem + var(--safe-b)); background: var(--bone); border-top: 1px solid var(--hair); }
.footer-sign { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.6rem; }
.lockup--footer { width: clamp(92px, 60px + 4vw, 118px); color: var(--obsidian); }
.footer-sign .tagline { font-size: .625rem; padding-left: .42em; color: var(--charcoal); }
.footer-row {
  margin-top: clamp(3rem, 5vw, 4.5rem); padding-top: 1rem;
  border-top: 1px solid var(--hair);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
}
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; font-size: .95rem; letter-spacing: 0; color: var(--charcoal); }
.footer-nav a:hover { color: var(--obsidian); }
.footer-mark { font-size: .625rem; letter-spacing: .28em; color: var(--charcoal); line-height: 44px; }

/* ---------- reveal on scroll ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1.2s var(--ease-out); }
html.js .reveal.is-in { opacity: 1; transform: none; }
.flow > li:nth-child(2), .tool-grid > :nth-child(2) { transition-delay: .1s; }
.flow > li:nth-child(3) { transition-delay: .2s; }
.flow > li:nth-child(4) { transition-delay: .3s; }
.flow > li:nth-child(5) { transition-delay: .4s; }

/* =========================================================
   ≥ 720px — tablet
   ========================================================= */
@media (min-width: 720px) {
  .phone { --pw: min(34vw, 250px); margin: calc(var(--pw) * -.8) 0 0 6%; }
  .screen-tabs { margin-left: calc(6% - .6rem); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem 3rem; }
  .shot { width: min(100%, 280px); }
  .start-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; }
  .paper--elev { width: 72%; margin-top: -14%; }
  .shot--docs { width: 30%; margin-top: -30%; }
}

/* =========================================================
   ≥ 1024px — desktop
   ========================================================= */
@media (min-width: 1024px) {
  :root { --header-h: 84px; }

  .site-header { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; }
  .bar {
    display: grid; grid-template-columns: 1fr auto 1fr;
    margin-inline: var(--gutter);
    padding-inline: clamp(1.25rem, 2vw, 2rem);
    background: rgb(var(--bone-a) / .92);
    -webkit-backdrop-filter: blur(16px) saturate(1.05);
            backdrop-filter: blur(16px) saturate(1.05);
    border-bottom: 1px solid transparent;
    transition: border-color .5s var(--ease);
  }
  .site-header.is-scrolled .bar { border-bottom-color: rgb(var(--greige-a) / .35); }
  .wordmark { --w: 100px; }
  .nav { display: block; }
  .nav ul { display: flex; gap: clamp(2rem, 4vw, 3.75rem); }
  .nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-family: var(--f-th); font-size: .98rem; font-weight: 500; letter-spacing: 0; }
  .nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
  }
  .nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
  .pill--bar { display: inline-flex; justify-self: end; min-height: 46px; padding-inline: 2rem; }
  .burger, .menu { display: none !important; }

  /* hero: copy left, render + phone right */
  .hero { padding-top: calc(var(--header-h) + clamp(3.5rem, 7vw, 6rem)); }
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: 1fr auto;
    grid-template-areas: "copy visual" "copy tabs";
    column-gap: clamp(2.5rem, 5vw, 5rem); row-gap: 1.25rem;
    align-items: center;
  }
  /* render top-right, phone bottom-left, sharing one grid cell so the phone's height is laid out */
  .hero-visual { display: grid; }
  .hero-render { grid-area: 1 / 1; width: 86%; justify-self: end; align-self: start; }
  .phone { --pw: clamp(200px, 17vw, 250px); grid-area: 1 / 1; justify-self: start; align-self: end; margin: 4.5rem 0 0; }
  .screen-tabs { margin-left: -.6rem; align-self: start; }

  /* compare: copy left, slider right */
  .compare-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }

  /* flow: five across on one hairline */
  .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2.5rem; margin-top: 3.5rem; }
  .flow::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; }
  .flow-step { grid-template-columns: 1fr; padding-top: 2rem; position: relative; }
  .flow-step::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--obsidian); }
  .flow-num { grid-row: auto; text-align: left; margin-bottom: 1.1rem; }

  /* tools: 2 × 2, screen beside its copy */
  .tool { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); justify-items: stretch; align-items: center; gap: 2.25rem; }
  .shot { width: 100%; }

  /* docs: copy left, paper collage right */
  .docs-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(3rem, 6vw, 6rem); align-items: center; }
  .docs-visual { display: block; min-height: 620px; }
  .paper--plan { position: absolute; right: 0; top: 0; width: 70%; }
  .paper--elev { position: absolute; left: 4%; bottom: 4%; width: 62%; margin: 0; }
  .shot--docs { position: absolute; right: 4%; bottom: 0; width: 25%; margin: 0; }

  .start-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(3rem, 6vw, 6rem); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .screen, .screen.is-active { transition-duration: .01s; transition-delay: 0s; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .arrow, .nav a::after { transition: none; }
}
