/* ==========================================================================
   RUŌOD Lab — one stylesheet, one design system.

   Tokens first, then primitives, then page sections. Nothing here loads from
   a third party: the type stacks are the ones already on the device, which is
   what keeps the site at zero external requests, zero font-swap layout shift
   and nothing to disclose in the privacy policy.

   The palette is the product's own. Gold (#D9A441) is the RUŌOD mark — the
   gilded O with a macron, on black, that the application's launcher icon,
   splash screen and exported PDFs all carry. Emerald (#10B981 / #059669) is
   the application's own functional accent, used here for the same job it does
   in the app: data, figures and confirmation.
   ========================================================================== */

:root {
  /* Surfaces — the application's own black, lifted in three steps. */
  --bg:            #0B0B0C;
  --surface:       #131315;
  --surface-2:     #1A1A1D;
  --surface-3:     #212125;
  --line:          #2A2A2E;
  --line-strong:   #3A3A40;   /* dividers and card edges (decorative) */
  --line-control:  #63636D;   /* a control's own boundary: 3.31:1 on --bg */

  /* Ink */
  --text:          #F4F4F2;
  --text-muted:    #A5A5A0;
  --text-dim:      #888884;   /* >=4.88:1 on every surface; small print */

  /* Brand */
  --gold:          #D9A441;
  --gold-bright:   #F0C877;
  --gold-wash:     rgba(217, 164, 65, 0.10);

  /* Functional accent — the app's own tab accent */
  --accent:        #10B981;
  --accent-wash:   rgba(16, 185, 129, 0.10);

  /* Type — device stacks only, so there is no font request and no swap. */
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
               "Liberation Mono", Menlo, monospace;

  /* Rhythm */
  --gutter: 20px;
  --max-w: 1180px;
  --max-prose: 72ch;
  --radius: 14px;
  --radius-sm: 9px;
  --section-y: 84px;
}

@media (min-width: 720px)  { :root { --gutter: 32px; --section-y: 108px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; --section-y: 128px; } }

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchored sections must clear the sticky header. */
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-bright); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: 0.45em; }

code, kbd { font-family: var(--font-mono); font-size: 0.88em; }

/* Focus — visible on every interactive element, never removed. */
:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--prose { max-width: calc(var(--max-prose) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.62); }
.section + .section { padding-top: 0; }
.section--ruled { border-top: 1px solid var(--line); padding-top: var(--section-y); }

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--gold);
  color: #12100B;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; color: #12100B; }

/* --------------------------------------------------------------------------
   Eyebrow / section heading
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.section-title { font-size: clamp(28px, 4.4vw, 42px); margin-bottom: 16px; }
.section-lede {
  color: var(--text-muted);
  font-size: clamp(16.5px, 1.9vw, 18.5px);
  max-width: 62ch;
  margin-bottom: 0;
}
.section-head { margin-bottom: 52px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  min-height: 46px;
}

.btn--primary {
  background: linear-gradient(175deg, var(--gold-bright), var(--gold));
  color: #1A1407;
  border-color: var(--gold);
}
.btn--primary:hover { background: var(--gold-bright); color: #1A1407; }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-control);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); background: var(--gold-wash); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 12, 0.90);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  /* The 34px mark alone is under the tap minimum; the padding lifts the whole
     link over it without moving the mark. */
  padding: 5px 0;
  min-height: 44px;
}
.brand__mark { width: 34px; height: 34px; border-radius: 9px; }
.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
}
.brand__name em { font-style: normal; color: var(--gold); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line-control);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle__bars { display: block; width: 18px; height: 12px; position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 5.25px; }
.nav-toggle__bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5.25px) rotate(-45deg); }

.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--gold); }
/* `.site-nav a` outranks `.btn--primary`, so the button's ink is restated here:
   #1A1407 on the gold is >=8:1. On hover `.site-nav a:hover` puts the pill on
   --surface-2, where the gold-bright text is 11:1. */
.site-nav .btn { margin-left: 10px; padding: 10px 18px; min-height: 42px; font-size: 14.5px; color: #1A1407; }
.site-nav .btn:hover { color: var(--gold-bright); }

/* Mobile navigation. Collapsed by default; the script flips aria-expanded.
   The links stay in the document either way, so they are crawlable, and the
   no-script rule below opens the menu permanently when JS never runs. */
@media (max-width: 899px) {
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter) 22px;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 13px 12px; font-size: 16px; }
  .site-nav .btn { margin: 12px 0 0; width: 100%; }
  /* Without script there is no toggle to press, so the menu is simply open. */
  .no-js .site-nav { display: block; position: static; border: none; padding: 6px 0 14px; }
  .no-js .nav-toggle { display: none; }
  .no-js .site-header__inner { flex-wrap: wrap; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(52px, 8vw, 96px) clamp(52px, 7vw, 88px);
  overflow: hidden;
}

/* A single soft gold bloom, painted with a gradient rather than an image — no
   request, and nothing that can shift the layout. */
.hero::before {
  content: "";
  position: absolute;
  top: -180px; left: 50%;
  width: min(1100px, 150vw); height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
              rgba(217, 164, 65, 0.13) 0%,
              rgba(217, 164, 65, 0.04) 42%,
              transparent 68%);
  pointer-events: none;
}

/* Three areas rather than two columns: on a phone the device sits between the
   headline and the body copy, so the application is on screen before the
   reader has scrolled; from 1000px it takes the right-hand column, with the
   text centred against it by the two flexible rows. */
.hero__inner {
  position: relative;
  display: grid;
  gap: 34px;
  grid-template-areas: "head" "stage" "body";
}
.hero__head  { grid-area: head; }
.hero__stage { grid-area: stage; margin: 0; }
.hero__body  { grid-area: body; }
.hero__head h1 { margin-bottom: 0; }

@media (min-width: 1000px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: ". stage" "head stage" "body stage" ". stage";
    column-gap: clamp(40px, 5vw, 72px);
    row-gap: 0;
  }
  .hero__head h1 { margin-bottom: 22px; }
}

/* The phones overlap by sharing one grid cell, so the composition scales
   with its column and never needs absolute offsets that could leave it. */
.hero__devices {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 540px);
  margin-inline: auto;
}
.hero__devices > .device { grid-area: 1 / 1; }
.hero__devices::before {
  content: "";
  position: absolute;
  inset: 10% 0 6%;
  background:
    radial-gradient(closest-side at 38% 42%, rgba(16, 185, 129, 0.16), transparent),
    radial-gradient(closest-side at 70% 64%, rgba(217, 164, 65, 0.14), transparent);
  pointer-events: none;
}
.hero__device--front { width: min(300px, 74vw); z-index: 2; }
.hero__device--back  { display: none; }

@media (min-width: 560px) {
  .hero__devices { justify-items: start; }
  .hero__device--front { width: 56%; margin-left: 5%; }
  .hero__device--back {
    display: block;
    width: 45%;
    justify-self: end;
    margin: 17% 1% 0 0;
    rotate: 4deg;
  }
}

.hero h1 {
  font-size: clamp(33px, 5.8vw, 56px);
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--gold); }

.hero__lede {
  font-size: clamp(17px, 2.2vw, 19.5px);
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 30px;
}

.hero__note {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--text-dim);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 54ch;
}
.hero__note svg { flex-shrink: 0; margin-top: 3px; color: var(--gold); }

.hero__marks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.pill::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.pill--gold::before { background: var(--gold); }

/* --------------------------------------------------------------------------
   Devices — real application screens in frames built from CSS

   The screenshot is the only image; the bezel, status bar, camera, gesture
   handle and glare are drawn here, so there is no mockup asset to request and
   nothing that could come from a third party. Everything inside is sized in
   `cqw` — a percentage of the device's own width — so one set of rules draws
   the frame correctly at 180px and at 600px.

   The screenshots are captured without a status bar, as the application draws
   below Android's. The strip above each is therefore decorative and
   aria-hidden, and its colour is the app's own background (#121212), or its
   raised header surface (#1C1C1E) where a screen starts with one.
   -------------------------------------------------------------------------- */

.device {
  container-type: inline-size;
  position: relative;
  --screen-top: #121212;
}
/* Full width unless a composition says otherwise. Zero specificity, so any
   placement rule wins wherever it sits in this file. (A container with
   inline-size containment cannot shrink to fit, so it always needs a width.) */
:where(.device) { width: 100%; }
.device--raised { --screen-top: #1C1C1E; }

.device__frame {
  position: relative;
  padding: 2.6cqw;
  border-radius: 13cqw;
  background: linear-gradient(145deg, #3A3A40 0%, #17171A 20%, #0C0C0E 55%, #222226 100%);
  box-shadow:
    inset 0 0 0 0.3cqw rgba(255, 255, 255, 0.16),
    inset 0 0 0 1.25cqw #060607,
    0 2cqw 5cqw -1cqw rgba(0, 0, 0, 0.55),
    0 16cqw 28cqw -8cqw rgba(0, 0, 0, 0.9);
}

/* The power key, standing just proud of the right edge. */
.device__frame::before {
  content: "";
  position: absolute;
  right: -0.6cqw;
  top: 21%;
  width: 0.7cqw;
  height: 12%;
  border-radius: 0 0.5cqw 0.5cqw 0;
  background: linear-gradient(90deg, #1B1B1F, #3A3A40);
}

/* A controlled highlight across the glass. Low enough that it never costs the
   screenshot any legibility. */
.device__frame::after {
  content: "";
  position: absolute;
  inset: 2.6cqw;
  border-radius: 10.6cqw;
  background: linear-gradient(115deg,
              rgba(255, 255, 255, 0.075) 0%,
              rgba(255, 255, 255, 0.02) 26%,
              transparent 40%);
  pointer-events: none;
  z-index: 3;
}

.device__screen {
  position: relative;
  overflow: hidden;
  border-radius: 10.6cqw;
  background: var(--screen-top);
  isolation: isolate;
}
.device__screen img { display: block; width: 100%; height: auto; }

/* Android's gesture handle, drawn over the app as the system draws it. */
.device__screen::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1.2cqw;
  width: 28cqw;
  height: 1cqw;
  margin-left: -14cqw;
  border-radius: 1cqw;
  background: rgba(255, 255, 255, 0.55);
  z-index: 2;
}

.device__status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6.6cqw;
  padding: 0.9cqw 7.5cqw 0;
  background: var(--screen-top);
  color: #ECECEC;
  font-family: var(--font-body);
  font-size: 3.1cqw;
  font-weight: 600;
  line-height: 1;
}
/* The punch-hole camera. */
.device__status::after {
  content: "";
  position: absolute;
  top: 1.6cqw;
  left: 50%;
  width: 3.4cqw;
  height: 3.4cqw;
  margin-left: -1.7cqw;
  border-radius: 50%;
  background: #030303;
  box-shadow: 0 0 0 0.35cqw #19191C;
}
.device__icons { display: flex; align-items: center; gap: 1.5cqw; }
.device__icons::before {
  content: "";
  width: 2.9cqw;
  height: 2.9cqw;
  background: #ECECEC;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.device__icons::after {
  content: "";
  width: 1.9cqw;
  height: 3.3cqw;
  border-radius: 0.5cqw;
  background: linear-gradient(to top, #ECECEC 76%, rgba(236, 236, 236, 0.35) 76%);
}

/* Tablet: a slimmer bezel relative to its width, the camera in the bezel
   rather than the glass, and a status bar scaled to an 800dp-wide screen. */
.device--tablet .device__frame { padding: 3cqw; border-radius: 5cqw; }
.device--tablet .device__frame::after { inset: 3cqw; border-radius: 2.2cqw; }
.device--tablet .device__frame::before {
  right: auto;
  left: 50%;
  top: 1.05cqw;
  width: 1cqw;
  height: 1cqw;
  margin-left: -0.5cqw;
  border-radius: 50%;
  background: #030303;
  box-shadow: 0 0 0 0.2cqw #202024;
}
.device--tablet .device__screen { border-radius: 2.2cqw; }
.device--tablet .device__screen::after { width: 14cqw; height: 0.55cqw; margin-left: -7cqw; bottom: 0.7cqw; }
.device--tablet .device__status { height: 3.4cqw; padding: 0.3cqw 3.2cqw 0; font-size: 1.6cqw; }
.device--tablet .device__status::after { display: none; }
.device--tablet .device__icons { gap: 0.8cqw; }
.device--tablet .device__icons::before { width: 1.5cqw; height: 1.5cqw; }
.device--tablet .device__icons::after { width: 1cqw; height: 1.7cqw; border-radius: 0.3cqw; }

/* A caption under a device composition. */
.stage-caption {
  margin: 26px auto 0;
  max-width: 44ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  text-align: center;
}

/* Depth for the back device of a pair. `translate` is its own property, so
   the script's parallax never fights a rotation set here. */
.parallax { translate: 0 var(--shift, 0px); }

/* Scroll reveal. The script adds `.reveal-pending` only to elements below the
   fold, only when motion is allowed, and removes it on intersection — so with
   no script, or with reduced motion, everything is simply visible. */
.reveal { transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal-pending { opacity: 0; transform: translateY(32px); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card__title { font-size: 20px; margin-bottom: 10px; }
.card__body { color: var(--text-muted); font-size: 15.5px; margin: 0; }

.grid { display: grid; gap: 18px; }
.grid--2, .grid--3 { grid-template-columns: 1fr; }

@media (min-width: 680px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.icon-badge {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: var(--gold-wash);
  border: 1px solid rgba(217, 164, 65, 0.24);
  color: var(--gold);
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Workflow chain
   -------------------------------------------------------------------------- */

.chain { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 760px)  { .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .chain { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.chain__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.chain__item::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 14px;
}
.chain__item h3 { font-size: 17.5px; margin-bottom: 8px; }
.chain__item p { font-size: 14.5px; color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------------------------
   Showcase — "See RUŌOD Lab in action"

   Below 900px the five phones are a sideways scroller: each stays large
   enough to read and nothing is squeezed side by side. From 900px they become
   one overlapping composition, highest in the middle.
   -------------------------------------------------------------------------- */

.section-head--center { text-align: center; max-width: 780px; margin-inline: auto; }
.section-head--center .section-lede { margin-inline: auto; }

.wrap--bleed { padding-inline: 0; }

.tour__track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 8px var(--gutter) 26px;
  -webkit-overflow-scrolling: touch;
}
.tour__track:focus-visible,
.gallery__phones:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: -2px; }

.tour__item {
  flex: 0 0 min(66vw, 280px);
  margin: 0;
  scroll-snap-align: center;
}
.tour__item:nth-child(2) { transition-delay: 70ms; }
.tour__item:nth-child(3) { transition-delay: 140ms; }
.tour__item:nth-child(4) { transition-delay: 210ms; }
.tour__item:nth-child(5) { transition-delay: 280ms; }

.tour__item figcaption,
.gallery__item figcaption {
  margin-top: 20px;
  padding-inline: 6%;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-dim);
}
.tour__item figcaption strong,
.gallery__item figcaption strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
}

@media (min-width: 900px) {
  .wrap--bleed { padding-inline: var(--gutter); }
  .tour__track {
    overflow: visible;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 12px 0 0;
  }
  .tour__item { flex: none; position: relative; }
  .tour__item--outer  { width: 18%; margin-top: 76px; z-index: 1; }
  .tour__item--inner  { width: 21.5%; margin: 36px -1.6% 0; z-index: 2; }
  .tour__item--center { width: 25%; z-index: 3; }
}

/* --------------------------------------------------------------------------
   Feature split — copy on one side, the application on the other
   -------------------------------------------------------------------------- */

/* The width a feature's main phone is drawn at. On a desktop it is also
   bounded by the viewport height, so a sticky device always fits. */
.feature { --phone-w: min(300px, 74vw); display: grid; gap: 56px; }
.feature__media { margin: 0; display: grid; justify-items: center; align-content: start; }
.feature__phone { width: var(--phone-w); }

@media (min-width: 760px) {
  .feature .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Single column: the device goes straight after the section heading rather
   than after every card, so the screen is seen before the detail is read.
   `display: contents` lets the heading and the cards be ordered around the
   figure without changing the markup. */
@media (max-width: 959px) {
  .feature__copy { display: contents; }
  .feature__copy > .section-head { order: 1; margin-bottom: 0; }
  .feature__media { order: 2; }
  .feature__copy > :not(.section-head) { order: 3; }
}

@media (min-width: 960px) {
  .feature {
    --phone-w: min(300px, calc((100svh - 210px) * 0.41));
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    column-gap: clamp(48px, 6vw, 88px);
    align-items: start;
  }
  .feature--flip { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .feature--flip .feature__media { order: -1; }
  .feature__media { position: sticky; top: 104px; }
}

/* Two phones in one grid cell: the front one carries the section, the back
   one adds context. A phone-width screen shows only the front one. */
.duo { display: grid; width: var(--phone-w); justify-items: start; }
.duo > .device { grid-area: 1 / 1; }
.duo__front { z-index: 2; }
.duo__back  { display: none; }

@media (min-width: 560px) {
  .duo { width: min(100%, calc(var(--phone-w) * 1.5)); }
  .duo__front { width: 66.6%; }
  .duo__back {
    display: block;
    width: 53%;
    justify-self: end;
    margin-top: 15%;
    rotate: 3.5deg;
  }
  .feature--flip .duo { justify-items: end; }
  .feature--flip .duo__back { justify-self: start; rotate: -3.5deg; }
}

/* A magnified crop of a real screenshot, laid over the phone beside it. The
   crop is one image and `object-position`, not a second, edited asset. */
.zoom-stage { display: grid; width: var(--phone-w); justify-items: center; }
.zoom-stage > * { grid-area: 1 / 1; }
.zoom-stage__phone { width: 100%; }
.zoom {
  grid-area: 2 / 1;
  width: 112%;
  margin-top: -34%;
  z-index: 3;
  aspect-ratio: 824 / 610;
  border-radius: 16px;
  overflow: hidden;
  background: #121212;
  border: 1px solid var(--line-control);
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.85), 0 0 0 6px rgba(11, 11, 12, 0.7);
}
.zoom__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48.4%;
}

@media (min-width: 560px) {
  .zoom-stage { width: min(100%, calc(var(--phone-w) * 1.45)); justify-items: end; }
  .zoom-stage__phone { width: 69%; }
  .zoom {
    grid-area: 1 / 1;
    justify-self: start;
    align-self: end;
    width: 84%;
    margin: 0 0 12%;
  }
}

/* --------------------------------------------------------------------------
   Tablet showcase
   -------------------------------------------------------------------------- */

.tablet-show__stage {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 780px);
  margin: 0 auto;
}
.tablet-show__stage::before {
  content: "";
  position: absolute;
  inset: 8% 4% 14%;
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.13), transparent);
  pointer-events: none;
}
.tablet-show__tablet { grid-area: 1 / 1; width: min(100%, 560px); }
.tablet-show__phone  { display: none; }
.tablet-show__stage figcaption { grid-area: 2 / 1; }

@media (min-width: 600px) {
  .tablet-show__tablet { width: 74%; justify-self: start; margin-left: 3%; }
  .tablet-show__phone {
    display: block;
    grid-area: 1 / 1;
    width: 27%;
    justify-self: end;
    align-self: end;
    margin: 0 2% 7% 0;
    z-index: 2;
  }
}

.tablet-show__points { margin: 56px auto 0; max-width: 900px; }
.point {
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}
.point h3 { font-size: 19px; margin-bottom: 8px; }
.point p { font-size: 15px; color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */

.gallery__grid { display: grid; gap: 44px; justify-items: center; }
.gallery__item { margin: 0; }
.gallery__item--feature { width: min(100%, 460px); }

/* On a phone the smaller screens scroll sideways, bled to the screen edges. */
.gallery__phones {
  justify-self: stretch;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
  padding: 8px var(--gutter) 26px;
  -webkit-overflow-scrolling: touch;
}
.gallery__phones .gallery__item { flex: 0 0 min(62vw, 260px); scroll-snap-align: center; }

.gallery__item .device { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) {
  .gallery__item:hover .device { transform: translateY(-8px); }
}

@media (min-width: 900px) {
  .gallery__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 3fr);
    align-items: center;
    gap: clamp(28px, 3vw, 44px);
  }
  .gallery__item--feature { width: 100%; }
  .gallery__phones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 28px);
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}

/* --------------------------------------------------------------------------
   Figures — diagrams of the calculation. Screenshots of the application live
   in device frames (see Devices) and never in a .figure, so a diagram can
   never be mistaken for one.
   -------------------------------------------------------------------------- */

.figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 20px;
  margin: 0;
}
.figure figcaption {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}
.figure__title {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}

/* A labelled breakdown of one formula row — the quantities the engine derives
   from a weight and a dilution. Built from elements, not an image. */
.breakdown { display: grid; gap: 11px; }

.breakdown__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.breakdown__label { font-size: 13.5px; color: var(--text-dim); min-width: 0; }
.breakdown__label strong { color: var(--text); font-weight: 600; display: block; font-size: 15px; }
.breakdown__value {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
}
.breakdown__value--accent { color: var(--accent); }
.breakdown__value--gold { color: var(--gold); }

.breakdown__split {
  display: flex;
  height: 32px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.breakdown__part { min-width: 0; }

.breakdown__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0 2px;
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
}
.breakdown__legend span { display: inline-flex; align-items: center; gap: 7px; }
.breakdown__legend span::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
}
.breakdown__legend .is-active::before { background: var(--accent); border-color: var(--accent); }
.breakdown__part--active { background: var(--accent); color: #07281D; }
.breakdown__part--solvent { background: var(--surface-3); color: var(--text-muted); }

.breakdown__note {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 0;
  padding: 0 2px;
}

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data-table caption { text-align: left; color: var(--text-dim); font-size: 13px; padding-bottom: 14px; }
.data-table th, .data-table td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table thead th {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom-color: var(--line-strong);
}
.data-table tbody th { font-weight: 600; color: var(--text); white-space: nowrap; }
.data-table td { color: var(--text-muted); }
.data-table code {
  color: var(--accent);
  background: var(--accent-wash);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: none; }

/* A table is the one block whose content cannot be made narrower without
   losing it, so on a narrow screen the BOX scrolls rather than the page. The
   focusable wrapper is what lets a keyboard user reach the overflow at all. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.table-scroll table { min-width: 34rem; }

/* --------------------------------------------------------------------------
   Feature index
   -------------------------------------------------------------------------- */

.feature-index { display: grid; gap: 16px; }
@media (min-width: 700px)  { .feature-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .feature-index { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.feature-index__group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
}
/* h2 as well as h3: the 404 page's list is the first heading under its own
   <h1>, so using h3 there would skip a level. Same treatment either way. */
.feature-index__group h2,
.feature-index__group h3 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.feature-index__group ul { list-style: none; margin: 0; padding: 0; }
.feature-index__group li {
  display: flex;
  gap: 9px;
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 9px;
  line-height: 1.5;
}
.feature-index__group li::before {
  content: "";
  flex-shrink: 0;
  width: 4px; height: 4px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.feature-index__group li:last-child { margin-bottom: 0; }
.feature-index__group li a {
  display: inline-block;
  padding: 5px 0;
  color: var(--text-muted);
  text-decoration: none;
}
.feature-index__group li a:hover { color: var(--gold-bright); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Audience
   -------------------------------------------------------------------------- */

.audience { display: grid; gap: 16px; }
@media (min-width: 760px) { .audience { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.audience__item {
  display: flex;
  gap: 15px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.audience__item svg { flex-shrink: 0; color: var(--gold); margin-top: 3px; }
.audience__item h3 { font-size: 16.5px; margin-bottom: 5px; }
.audience__item p { font-size: 14.5px; color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------------------------
   Callout
   -------------------------------------------------------------------------- */

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  color: var(--text-muted);
  font-size: 15px;
}
.callout strong { color: var(--text); }
.callout--accent { border-left-color: var(--accent); }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq__item summary:hover { color: var(--gold-bright); }

.faq__answer { padding: 0 4px 24px; color: var(--text-muted); font-size: 15.5px; max-width: 74ch; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 56px);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(217, 164, 65, 0.10), transparent 62%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(26px, 3.8vw, 38px); margin-bottom: 14px; }
.cta p { color: var(--text-muted); max-width: 54ch; margin-inline: auto; margin-bottom: 28px; }
.cta .btn-row { justify-content: center; }
.cta__small { margin-top: 26px; font-size: 13.5px; color: var(--text-dim); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--section-y);
  padding-block: 56px 36px;
  background: var(--surface);
}

.site-footer__grid { display: grid; gap: 38px; }
@media (min-width: 780px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
    gap: 40px;
  }
}

.site-footer__about { max-width: 42ch; }
.site-footer__about p { font-size: 14.5px; color: var(--text-muted); margin-top: 16px; }

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 2px; }
/* inline-block with vertical padding, so the tap target clears the 24px
   WCAG 2.2 minimum without the links drifting apart visually. */
.site-footer li a {
  display: inline-block;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 14.5px;
  text-decoration: none;
}
.site-footer li a:hover { color: var(--gold-bright); text-decoration: underline; }

.site-footer__base {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Long-form / legal pages
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(40px, 6vw, 68px) clamp(32px, 5vw, 52px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 16px; }
.page-head p { color: var(--text-muted); max-width: 62ch; margin: 0; }
.page-head .meta {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.breadcrumbs { font-size: 13px; color: var(--text-dim); margin-bottom: 22px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; display: flex; gap: 8px; align-items: center; }
.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); }
/* Padded to clear the 24px WCAG 2.2 target minimum; the negative margin keeps
   the crumb sitting where it looks right despite the taller hit area. */
.breadcrumbs a {
  display: inline-block;
  padding: 4px 0;
  margin: -4px 0;
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--gold-bright); text-decoration: underline; }

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 44px;
}
.toc h2 {
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.toc ol { margin: 0; padding-left: 1.4em; color: var(--text-dim); font-size: 14.5px; }
.toc li { margin-bottom: 7px; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--gold-bright); text-decoration: underline; }

.legal { max-width: var(--max-prose); }
.legal h2 {
  font-size: clamp(21px, 3vw, 26px);
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.legal > h2:first-of-type { margin-top: 36px; }
.legal h3 { font-size: 18px; margin-top: 32px; color: var(--text); }
.legal p, .legal li { color: var(--text-muted); }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { padding-left: 1.25em; }
.legal .callout { margin: 24px 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 22px 0; }
.legal th, .legal td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.legal thead th {
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
  border-bottom-color: var(--line-strong);
}
.legal td { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.contact-card h2 { font-size: 20px; margin-bottom: 10px; }
.contact-card p { color: var(--text-muted); font-size: 15px; flex-grow: 1; }
.contact-card .email {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--gold-bright);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-card .email:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

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

.stack-lg > * + * { margin-top: 44px; }
.stack-md > * + * { margin-top: 24px; }
.grid--align-start { align-items: start; }

/* --------------------------------------------------------------------------
   Small placement utilities

   These exist so no page carries a `style=` attribute. That is not only a
   tidiness rule: the deployed Content-Security-Policy is `style-src 'self'`
   with no 'unsafe-inline', so an inline style attribute would simply be
   dropped by the browser and the layout would be subtly wrong in production
   while looking right locally.
   -------------------------------------------------------------------------- */

.mt-sm  { margin-top: 20px; }
.mt-md  { margin-top: 26px; }
.mt-lg  { margin-top: 34px; }
.mt-xl  { margin-top: 52px; }
.mb-md  { margin-bottom: 28px; }
.nowrap { white-space: nowrap; }

/* The two parts of the hero's proportion bar. Their ratio is the illustration
   — a material at 10% dilution — so the numbers belong with the other figures
   in that figure, not scattered in the markup. */
.breakdown__part--active  { flex: 10; }
.breakdown__part--solvent { flex: 90; }

/* A subheading inside a section, below .section-title but above a card title. */
.subsection-title { font-size: clamp(22px, 3vw, 28px); }

/* The 404 page's one-off lead paragraph. */
.page-lede { color: var(--text-muted); font-size: 18px; max-width: 54ch; }

/* The 404 footer has no columns above it, so it needs no dividing rule. */
.site-footer__base--bare { margin-top: 0; padding-top: 0; border-top: none; }

/* The 404 page has no .page-head band, so its h1 carries the size directly. */
.page-head-title { font-size: clamp(30px, 5vw, 46px); margin-bottom: 18px; }
