/* ==========================================================================
   AquaLog — landing page
   "Deep Water": the app's own design language, taken to the web.

   Palette and the in-phone app UI both come straight from the iOS app
   (src/lib/constants.ts + src/lib/theme.tsx), so the product on the page is
   the product in the store. Photographic surfaces (the deep bands) never
   invert — same rule the app uses for its tank artwork.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokens */

:root {
  color-scheme: light;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Page — a teal-tinted surface, never neutral grey */
  --bg: #E8F1F3;
  --bg-tint: #DEEBEE;
  --surface: #FFFFFF;
  --surface-2: #E3EFF1;
  --text: #062B31;
  --text-2: rgba(7, 51, 58, 0.74);
  --text-3: rgba(7, 51, 58, 0.66);
  --line: rgba(9, 74, 82, 0.14);
  --line-soft: rgba(9, 74, 82, 0.07);

  --accent: #0E7C86;
  --accent-deep: #0A5F68;
  --accent-ink: #08525B;
  --accent-fill: #0E7C86;
  --accent-on: #FFFFFF;
  --accent-soft: #CDE7EC;
  --accent-wash: rgba(14, 124, 134, 0.08);
  --glow: rgba(14, 124, 134, 0.20);

  --ok: #2E9E5B;
  --due: #C8871A;
  --danger: #D9483B;

  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 1px rgba(16, 24, 40, 0.03);
  --shadow-2: 0 24px 48px -32px rgba(4, 44, 50, 0.40), 0 3px 10px -6px rgba(4, 44, 50, 0.18);
  --shadow-3: 0 48px 90px -50px rgba(2, 30, 36, 0.60), 0 12px 30px -18px rgba(2, 30, 36, 0.30);

  /* Deep-water band: a photographic surface. Deliberately theme-independent. */
  --deep-bg: #041A20;
  --deep-bg-2: #083A42;
  --deep-text: #F0FAFB;
  --deep-text-2: rgba(190, 230, 236, 0.74);
  --deep-text-3: rgba(170, 214, 221, 0.62);
  --deep-line: rgba(150, 225, 235, 0.18);

  /* The app inside the phone — mirrors LIGHT_COLORS */
  --app-bg: #E7F0F2;
  --app-card: #FFFFFF;
  --app-label: #07333A;
  --app-label2: rgba(7, 51, 58, 0.62);
  --app-label3: rgba(7, 51, 58, 0.34);
  --app-sep: rgba(9, 74, 82, 0.18);
  --app-tint: #0E7C86;
  --app-tint-deep: #0A5F68;
  --app-tint-fill: #CDE7EC;
  --app-tint-sep: rgba(14, 124, 134, 0.22);
  --app-tint-text: #08525B;
  --app-tint-text-soft: rgba(10, 95, 104, 0.80);
  --app-accent-fill: #0E7C86;
  --app-fill: rgba(14, 124, 134, 0.12);

  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;
  --nav-h: 66px;
  --section-y: clamp(72px, 9vw, 132px);
  --gutter: clamp(20px, 5vw, 40px);
  --max: 1200px;
}

/* Dark — same shape as DARK_COLORS in src/lib/theme.tsx */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #061E22;
    --bg-tint: #07242A;
    --surface: #0C2A30;
    --surface-2: #10333A;
    --text: #EAF6F7;
    --text-2: rgba(214, 235, 238, 0.70);
    --text-3: rgba(214, 235, 238, 0.56);
    --line: rgba(140, 190, 196, 0.20);
    --line-soft: rgba(140, 190, 196, 0.10);

    --accent: #3FB3BF;
    --accent-deep: #2E97A3;
    --accent-ink: #BFE8EC;
    --accent-fill: #12767F;
    --accent-on: #FFFFFF;
    --accent-soft: #0F3A40;
    --accent-wash: rgba(63, 179, 191, 0.10);
    --glow: rgba(63, 179, 191, 0.22);

    --ok: #32D74B;
    --due: #FFB340;
    --danger: #FF453A;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow-2: 0 24px 48px -32px rgba(0, 0, 0, 0.70), 0 3px 10px -6px rgba(0, 0, 0, 0.40);
    --shadow-3: 0 48px 90px -50px rgba(0, 0, 0, 0.80), 0 12px 30px -18px rgba(0, 0, 0, 0.50);

    --deep-bg: #03171C;
    --deep-bg-2: #062A31;
    --deep-line: rgba(150, 225, 235, 0.14);

    --app-bg: #061E22;
    --app-card: #0C2A30;
    --app-label: #EAF6F7;
    --app-label2: rgba(214, 235, 238, 0.62);
    --app-label3: rgba(214, 235, 238, 0.34);
    --app-sep: rgba(140, 190, 196, 0.20);
    --app-tint: #3FB3BF;
    --app-tint-deep: #2E97A3;
    --app-tint-fill: #0F3A40;
    --app-tint-sep: rgba(63, 179, 191, 0.26);
    --app-tint-text: #BFE8EC;
    --app-tint-text-soft: rgba(191, 232, 236, 0.80);
    --app-accent-fill: #12767F;
    --app-fill: rgba(120, 190, 196, 0.16);
  }
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #061E22;
  --bg-tint: #07242A;
  --surface: #0C2A30;
  --surface-2: #10333A;
  --text: #EAF6F7;
  --text-2: rgba(214, 235, 238, 0.70);
  --text-3: rgba(214, 235, 238, 0.56);
  --line: rgba(140, 190, 196, 0.20);
  --line-soft: rgba(140, 190, 196, 0.10);

  --accent: #3FB3BF;
  --accent-deep: #2E97A3;
  --accent-ink: #BFE8EC;
  --accent-fill: #12767F;
  --accent-on: #FFFFFF;
  --accent-soft: #0F3A40;
  --accent-wash: rgba(63, 179, 191, 0.10);
  --glow: rgba(63, 179, 191, 0.22);

  --ok: #32D74B;
  --due: #FFB340;
  --danger: #FF453A;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-2: 0 24px 48px -32px rgba(0, 0, 0, 0.70), 0 3px 10px -6px rgba(0, 0, 0, 0.40);
  --shadow-3: 0 48px 90px -50px rgba(0, 0, 0, 0.80), 0 12px 30px -18px rgba(0, 0, 0, 0.50);

  --deep-bg: #03171C;
  --deep-bg-2: #062A31;
  --deep-line: rgba(150, 225, 235, 0.14);

  --app-bg: #061E22;
  --app-card: #0C2A30;
  --app-label: #EAF6F7;
  --app-label2: rgba(214, 235, 238, 0.62);
  --app-label3: rgba(214, 235, 238, 0.34);
  --app-sep: rgba(140, 190, 196, 0.20);
  --app-tint: #3FB3BF;
  --app-tint-deep: #2E97A3;
  --app-tint-fill: #0F3A40;
  --app-tint-sep: rgba(63, 179, 191, 0.26);
  --app-tint-text: #BFE8EC;
  --app-tint-text-soft: rgba(191, 232, 236, 0.80);
  --app-accent-fill: #12767F;
  --app-fill: rgba(120, 190, 196, 0.16);
}

/* ------------------------------------------------------ 2. Base + layout */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

/* Icons: a thin, monochrome stroke set (the app's lucide glyphs). Colour comes
   from the parent, so one sprite serves every surface and both themes. */
.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.wrap--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

.skip-link {
  position: absolute;
  top: 0;
  left: var(--gutter);
  z-index: 200;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
  background: var(--surface);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 0 0 10px 10px;
  box-shadow: var(--shadow-2);
  font-weight: 600;
}
.skip-link:focus { transform: none; }

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

/* --------------------------------------------------------- 3. Typography */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.35rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.16rem, 2vw, 1.42rem); letter-spacing: -0.014em; line-height: 1.24; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.06rem, 1.6vw, 1.24rem);
  line-height: 1.56;
  color: var(--text-2);
  max-width: 58ch;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.688rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.deep .eyebrow { color: #86DDE5; }

.section-head { margin-bottom: clamp(34px, 4.5vw, 58px); }
.section-head--center { text-align: center; }
.section-head--center .lede { margin-inline: auto; }
.section-head h2 { margin-bottom: 14px; }

.mono { font-family: var(--font-mono); font-variant-ligatures: none; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ 4. Buttons */

.btn {
  --btn-bg: var(--accent-fill);
  --btn-fg: var(--accent-on);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.24s ease, background-color 0.24s ease;
  box-shadow: 0 3px 10px -2px var(--glow);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0) scale(0.99); }
.btn .icon { width: 19px; height: 19px; }

.btn--lg { padding: 16px 30px; font-size: 1.05rem; }

.btn--ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover { background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent); }

.deep .btn--ghost { color: var(--deep-text); box-shadow: inset 0 0 0 1px var(--deep-line); }
.deep .btn--ghost:hover { background: rgba(134, 221, 229, 0.10); box-shadow: inset 0 0 0 1px rgba(134, 221, 229, 0.5); }

/* App Store button — a badge-shaped, honest link to the listing */
.btn--store {
  gap: 12px;
  padding: 11px 22px 11px 18px;
  border-radius: 14px;
  background: #04090B;
  color: #fff;
  box-shadow: 0 4px 16px -6px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.btn--store:hover { background: #0A1418; }
.btn--store .icon { width: 26px; height: 26px; }
.btn--store .btn__lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn--store .btn__small {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}
.btn--store .btn__big { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }

/* --------------------------------------------------------------- 5. Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 8px -3px rgba(4, 44, 50, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  align-self: center;
  margin-top: 3px;
}

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  color: var(--text-2);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 9px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav__links a:hover { color: var(--text); background: var(--accent-wash); text-decoration: none; }

/* Theme control — Light / Dark / Auto */
.theme {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.theme__btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.theme__btn .icon { width: 16px; height: 16px; }
.theme__btn:hover { color: var(--text); }
.theme__btn[aria-checked="true"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-1);
}

.nav__cta { display: inline-flex; }

.nav__burger {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav__burger .icon { width: 22px; height: 22px; }

/* --------------------------------------------------------- 6. Deep band */

.deep {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(150% 100% at 78% -12%, var(--deep-bg-2) 0%, transparent 58%),
    linear-gradient(178deg, var(--deep-bg) 0%, #04191E 60%, var(--deep-bg) 100%);
  color: var(--deep-text);
  overflow: hidden;
}
.deep h1, .deep h2, .deep h3 { color: var(--deep-text); }
.deep p { color: var(--deep-text-2); }
.deep .lede { color: var(--deep-text-2); }
.deep a { color: #86DDE5; }

/* Light shafts — the one decorative motif. Photo surfaces don't invert. */
.shafts {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.shafts::before,
.shafts::after {
  content: "";
  position: absolute;
  inset: -35% -15% -10% -25%;
}
.shafts::before {
  background: repeating-linear-gradient(
    74deg,
    rgba(150, 235, 243, 0.085) 0 3px,
    transparent 3px 92px
  );
  -webkit-mask-image: radial-gradient(120% 78% at 26% -14%, #000 0%, rgba(0, 0, 0, 0.42) 46%, transparent 76%);
  mask-image: radial-gradient(120% 78% at 26% -14%, #000 0%, rgba(0, 0, 0, 0.42) 46%, transparent 76%);
  animation: drift 28s ease-in-out infinite alternate;
}
.shafts::after {
  background: repeating-linear-gradient(
    96deg,
    rgba(150, 235, 243, 0.055) 0 2px,
    transparent 2px 138px
  );
  -webkit-mask-image: radial-gradient(90% 60% at 74% 4%, #000 0%, transparent 70%);
  mask-image: radial-gradient(90% 60% at 74% 4%, #000 0%, transparent 70%);
  animation: drift 38s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(-3%, 0, 0); }
  to { transform: translate3d(4%, 0, 0); }
}

.deep__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.5;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
}

/* Surface divider: the waterline where the deep band meets the page */
.waterline {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 76px);
  margin-top: -1px;
  color: var(--bg);
  position: relative;
  z-index: 2;
}
.waterline svg { width: 100%; height: 100%; }

/* ------------------------------------------------------------ 7. Hero */

.hero { padding-top: clamp(52px, 7vw, 92px); padding-bottom: clamp(64px, 8vw, 110px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__copy { max-width: 620px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 em {
  font-style: italic;
  color: #9EE6EC;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 30px 0 20px;
}
.hero__note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--deep-text-3);
}

.promise-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--deep-line);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(134, 221, 229, 0.08);
  box-shadow: inset 0 0 0 1px var(--deep-line);
  color: var(--deep-text);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}
.chip .icon { width: 15px; height: 15px; color: #86DDE5; }

/* The readout strip: mono, the product's native voice */
.readout {
  --readout-line: var(--deep-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: clamp(34px, 4vw, 52px);
  border-radius: 14px;
  background: rgba(3, 18, 22, 0.5);
  box-shadow: inset 0 0 0 1px var(--deep-line);
  overflow: hidden;
}
.readout__cell {
  flex: 1 1 auto;
  min-width: 104px;
  padding: 13px 16px;
  border-left: 1px solid var(--readout-line);
}
.readout__cell:first-child { border-left: 0; }

/* The same readout on a light surface */
.readout--surface {
  --readout-line: var(--line-soft);
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-soft);
}
.readout--surface .readout__label,
.readout--surface .readout__unit { color: var(--text-3); }
.readout--surface .readout__value { color: var(--text); }
.readout__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deep-text-3);
  margin-bottom: 4px;
}
.readout__value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--deep-text);
  font-variant-numeric: tabular-nums;
}
.readout__unit { font-size: 0.688rem; color: var(--deep-text-3); }
.readout__cell .dot { margin-right: 6px; }

/* --------------------------------------------------------- 8. Devices */

.devices { justify-self: center; position: relative; }

.device {
  position: relative;
  width: calc(409px * var(--s, 1));
  height: calc(869px * var(--s, 1));
}
.device__scale {
  position: absolute;
  top: 0;
  left: 0;
  width: 409px;
  height: 869px;
  transform: scale(var(--s, 1));
  transform-origin: top left;
}

.phone {
  position: relative;
  width: 409px;
  height: 869px;
  padding: 8px;
  border-radius: 62px;
  background: linear-gradient(158deg, #33454B 0%, #0D1B1F 34%, #1D2C31 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10),
    0 60px 90px -50px rgba(0, 12, 16, 0.85),
    0 18px 40px -24px rgba(0, 12, 16, 0.6);
}
.phone__screen {
  position: relative;
  width: 393px;
  height: 852px;
  border-radius: 54px;
  overflow: hidden;
  background: var(--app-bg);
  color: var(--app-label);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.phone__island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 36px;
  border-radius: 20px;
  background: #000;
  z-index: 6;
}

/* Screens stack; the switcher fades between them */
.ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.995);
  transition: opacity 0.42s ease, transform 0.42s ease, visibility 0.42s;
}
.ui.is-active { opacity: 1; visibility: visible; transform: none; }

.ui__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 30px 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--app-label);
  flex: 0 0 auto;
}
.ui__status-icons { display: flex; align-items: center; gap: 6px; color: var(--app-label); }
.ui__status-icons .icon { width: 17px; height: 12px; }
.ui__status-icons .icon--sm { width: 15px; height: 12px; }

.ui__navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 16px 0;
  height: 44px;
  flex: 0 0 auto;
}
.ui__navbar--cover { color: #fff; }
.ui__circle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--app-fill);
  color: var(--app-tint);
}
.ui__circle .icon { width: 21px; height: 21px; }
.ui__circle--glass {
  background: rgba(12, 22, 26, 0.42);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.ui__navrow { display: flex; gap: 8px; }

.ui__largetitle {
  padding: 2px 16px 10px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.7px;
  line-height: 41px;
  flex: 0 0 auto;
}
.ui__scroll {
  flex: 1 1 auto;
  overflow: hidden;
  padding-bottom: 112px;
}

/* App cards (HIG inset grouped) */
.ui-card {
  margin: 0 16px 12px;
  border-radius: 14px;
  background: var(--app-card);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 0 0 1px var(--app-sep);
  overflow: hidden;
}
.ui-card--tinted {
  background: var(--app-tint-fill);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.ui-row {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 11px 16px;
  position: relative;
}
.ui-row + .ui-row::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--app-sep);
}
.ui-row--care { min-height: 48px; padding: 10px 16px; }
.ui-row--care + .ui-row--care::before { background: var(--app-tint-sep); }

.ui-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}
.ui-stack { flex: 1; min-width: 0; margin-left: 12px; }
.ui-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--app-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui-sub {
  font-size: 13px;
  color: var(--app-label2);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui-chevron { width: 15px; height: 15px; color: var(--app-label3); flex: 0 0 auto; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.dot--ok { background: var(--ok); }
.dot--due { background: var(--due); }
.dot--danger { background: var(--danger); }
.dot--tint { background: var(--app-tint, var(--accent)); }

.ui-carehead {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px 8px;
}
.ui-carehead .icon { width: 17px; height: 17px; color: var(--app-tint-deep); }
.ui-caretitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--app-tint-deep);
  letter-spacing: -0.1px;
}
.ui-carecount {
  margin-left: auto;
  font-size: 13px;
  color: var(--app-tint-text-soft);
}
.ui-task {
  font-size: 15px;
  font-weight: 600;
  color: var(--app-tint-text);
  flex: 1;
  margin-left: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui-task span { font-size: 13px; font-weight: 400; color: var(--app-tint-text-soft); }
.ui-when {
  font-size: 13px;
  font-weight: 500;
  color: var(--app-tint-text-soft);
  margin-left: 10px;
  white-space: nowrap;
}
.ui-task .ui-chevron { color: var(--app-tint-text-soft); margin-left: 8px; display: inline-block; }

.ui-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 12px 16px;
}
.ui-foot::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--app-tint-sep);
}
.ui-foot span:first-child { font-size: 13px; font-weight: 500; color: var(--app-tint-deep); }
.ui-foot span:last-child { font-size: 13px; color: var(--app-tint-text-soft); }

.ui-add {
  display: grid;
  place-items: center;
  padding: 12px;
  font-size: 15px;
  color: var(--app-tint);
  position: relative;
}
.ui-add::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--app-sep);
}

/* Tab bar */
.ui__tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  display: flex;
  padding: 9px 8px 0;
  background: color-mix(in srgb, var(--app-card) 84%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: inset 0 1px 0 var(--app-sep);
}
.ui-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--app-label3);
  font-size: 10px;
  letter-spacing: 0;
}
.ui-tab .icon { width: 24px; height: 24px; }
.ui-tab.is-active { color: var(--app-tint); }
.ui__homebar {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 5px;
  border-radius: 3px;
  background: var(--app-label);
  opacity: 0.28;
}

/* Tank detail: cover header */
.ui-cover {
  position: relative;
  height: 208px;
  flex: 0 0 auto;
  overflow: hidden;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
}
.ui-cover img { width: 100%; height: 100%; object-fit: cover; }
.ui-cover__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 14, 18, 0.55) 0%, transparent 34%),
    linear-gradient(0deg, rgba(4, 14, 18, 0.82) 0%, rgba(4, 14, 18, 0.18) 44%, transparent 72%);
}
.ui-cover__body {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 15px;
  color: #fff;
}
.ui-cover__name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #fff;
}
.ui-cover__meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 2px;
}
.ui-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 22, 26, 0.44);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}
.ui-pill .dot { width: 7px; height: 7px; }
.ui-cover__nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 0;
  height: 44px;
  z-index: 3;
}
.ui-back { color: #fff; display: flex; align-items: center; gap: 5px; font-size: 17px; }
.ui-back .icon { width: 22px; height: 22px; }

/* Latest reading card */
.ui-cardhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px 11px;
  box-shadow: inset 0 -1px 0 var(--app-sep);
}
.ui-cardhead__title { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; color: var(--app-label); }
.ui-cardhead__meta { font-size: 13px; color: var(--app-label2); white-space: nowrap; }

.ui-gridrow { display: flex; box-shadow: inset 0 1px 0 var(--app-sep); }
.ui-gridrow:first-of-type { box-shadow: none; }
.ui-cell {
  flex: 1;
  padding: 11px 4px;
  text-align: center;
  box-shadow: inset -1px 0 0 var(--app-sep);
}
.ui-cell:last-child { box-shadow: none; }
.ui-cell__value {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--app-label);
  font-variant-numeric: tabular-nums;
}
.ui-cell__value i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--app-label2); margin-left: 2px; }
.ui-cell__label { font-size: 11px; color: var(--app-label2); margin-top: 3px; }

.ui-insight {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 13px;
  color: var(--app-label2);
  box-shadow: inset 0 1px 0 var(--app-sep);
}
.ui-cta {
  display: grid;
  place-items: center;
  padding: 13px;
  font-size: 17px;
  font-weight: 600;
  color: var(--app-tint);
  box-shadow: inset 0 1px 0 var(--app-sep);
}

/* Insights chart */
.ui-chart { padding: 10px 12px 12px; }
.ui-chart svg { width: 100%; height: 168px; }
.ui-stats { display: flex; box-shadow: inset 0 1px 0 var(--app-sep); }
.ui-stat { flex: 1; padding: 10px 12px; text-align: left; }
.ui-stat__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-label2);
}
.ui-stat__value {
  font-size: 17px;
  font-weight: 600;
  color: var(--app-label);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Switcher under the hero phone */
.screens-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 26px;
}
.screens-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: rgba(134, 221, 229, 0.07);
  box-shadow: inset 0 0 0 1px var(--deep-line);
  color: var(--deep-text-2);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
}
.screens-switch button .icon { width: 15px; height: 15px; }
.screens-switch button:hover { color: var(--deep-text); }
.screens-switch button[aria-selected="true"] {
  background: rgba(134, 221, 229, 0.16);
  color: var(--deep-text);
  box-shadow: inset 0 0 0 1px rgba(134, 221, 229, 0.45);
}

/* Floating card beside the hero phone.
   Anchored to the device column (not the section) so it can never run off the
   page edge; it lifts a live trend out of the app rather than repeating the
   reading the phone already shows. */
.float-card {
  position: absolute;
  z-index: 4;
  right: -42px;
  bottom: 146px;
  width: 222px;
  padding: 14px 15px 13px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line);
  color: var(--text);
}
.float-card__chart { margin: 6px 0 8px; }
.float-card__chart svg { width: 100%; height: 60px; }
.float-card__axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-3);
  margin-top: 3px;
}
.float-card__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 9px;
}
.float-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.float-card__k { color: var(--text-2); }
.float-card__v { color: var(--text); font-weight: 500; }
.float-card__v small { color: var(--text-3); font-weight: 400; }
.float-card__flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-2);
  margin-top: 9px;
}

/* ------------------------------------------------------- 9. Promise grid */

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  padding: 24px 24px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 0.96rem; line-height: 1.58; }

.card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--accent);
  margin-bottom: 16px;
}
.card__icon .icon { width: 22px; height: 22px; }

.card__tag {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.card__tag--pro { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* Promise card: mono verdict + plain-language promise */
.promise { display: flex; flex-direction: column; gap: 9px; }
.promise__verdict {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.promise__title { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; letter-spacing: -0.018em; }
.promise__body { color: var(--text-2); font-size: 0.95rem; line-height: 1.58; }
.promise__meta {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.688rem;
  color: var(--text-3);
  border-top: 1px solid var(--line-soft);
}

/* ------------------------------------------------------ 10. Water panel */

.water { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(30px, 5vw, 68px); align-items: center; }

.reading {
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-soft);
  overflow: hidden;
  position: relative;
}
.reading__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 15px;
  border-bottom: 1px solid var(--line-soft);
}
.reading__title { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; letter-spacing: -0.02em; }
.reading__meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }
.reading__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.reading__cell {
  padding: 17px 8px;
  text-align: center;
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.reading__cell:nth-child(-n + 4) { border-top: 0; }
.reading__cell:nth-child(4n + 1) { border-left: 0; }
.reading__value {
  font-family: var(--font-mono);
  font-size: 1.34rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.reading__value i { font-style: normal; font-size: 0.72rem; color: var(--text-3); margin-left: 3px; }
.reading__label {
  font-family: var(--font-mono);
  font-size: 0.688rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-top: 5px;
}
.reading__cell--flag .reading__value { color: var(--due); }
.reading__foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.88rem;
  color: var(--text-2);
  background: var(--accent-wash);
}
.reading__foot .icon { width: 17px; height: 17px; color: var(--accent); flex: 0 0 auto; }
.reading__cta {
  display: grid;
  place-items: center;
  padding: 16px;
  border-top: 1px solid var(--line-soft);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.98rem;
}

.checklist { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 13px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 0.98rem; line-height: 1.52; }
.checklist .icon { width: 19px; height: 19px; color: var(--accent); flex: 0 0 auto; margin-top: 3px; }
.checklist strong { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------ 11. Steps */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-soft);
}
.step__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}
.step h3 { margin-bottom: 9px; }
.step p { color: var(--text-2); font-size: 0.96rem; }
.step__demo {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-wash);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-ink);
  line-height: 1.5;
}

/* ---------------------------------------------------------- 12. Panels */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.showcase--flip .showcase__media { order: -1; }

.notes { display: grid; gap: 0; margin-top: 26px; }
.note {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.note:last-child { border-bottom: 1px solid var(--line); }
.note .icon { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.note h4 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.note p { color: var(--text-2); font-size: 0.94rem; margin: 0; }

.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stat {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-soft);
  min-width: 108px;
}
.stat__value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 0.688rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 5px;
}

/* ---------------------------------------------------------- 13. Privacy */

.privacy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 64px); align-items: start; }
.privacy-points { display: grid; gap: 0; }
.point { padding: 20px 0; border-top: 1px solid var(--deep-line); }
.point:last-child { border-bottom: 1px solid var(--deep-line); }
.point__k {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #86DDE5;
  margin-bottom: 8px;
}
.point__k .icon { width: 16px; height: 16px; }
.point__v { color: var(--deep-text); font-size: 1.02rem; line-height: 1.5; }
.point__v span { color: var(--deep-text-3); }

.privacy-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ----------------------------------------------------------- 14. Pricing */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.plan {
  position: relative;
  padding: 30px 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-soft);
}
.plan--pro {
  box-shadow: var(--shadow-2), inset 0 0 0 1.5px var(--accent);
  background: linear-gradient(180deg, var(--accent-wash) 0%, transparent 42%), var(--surface);
}
.plan__badge {
  position: absolute;
  top: -11px;
  left: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--accent-on);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.plan__name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.plan__price { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 6px; }
.plan__amount {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.plan__period { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); }
.plan__note { font-size: 0.86rem; color: var(--text-2); }
.plan__list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 11px; }
.plan__list li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.95rem; color: var(--text-2); line-height: 1.5; }
.plan__list .icon { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; color: var(--accent); }
.plan__list li.is-muted { color: var(--text-3); }
.plan__list li.is-muted .icon { color: var(--text-3); }
.plan__cta { margin-top: 26px; }
.plan__cta .btn { width: 100%; }

/* --------------------------------------------------------------- 15. FAQ */

.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.06rem, 1.7vw, 1.24rem);
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--text);
  transition: color 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary .icon {
  width: 20px;
  height: 20px;
  margin-left: auto;
  flex: 0 0 auto;
  align-self: center;
  color: var(--accent);
  transition: transform 0.3s ease;
}
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq__panel { display: grid; grid-template-rows: 1fr; }
.js-anim .faq__panel { grid-template-rows: 0fr; transition: grid-template-rows 0.34s cubic-bezier(0.32, 0.72, 0, 1); }
.js-anim .faq details[open] .faq__panel { grid-template-rows: 1fr; }
.faq__panel > div { overflow: hidden; }
.faq__panel p {
  padding: 0 4px 24px;
  color: var(--text-2);
  max-width: 78ch;
  font-size: 1rem;
  line-height: 1.62;
}

/* --------------------------------------------------------- 16. Final CTA */

.final { text-align: center; }
.final h2 { max-width: 22ch; margin: 0 auto 16px; }
.final .lede { margin-inline: auto; }
.final__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }

/* ------------------------------------------------------------ 17. Footer */

.footer { padding-block: clamp(48px, 6vw, 76px) 34px; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 0.85fr));
  gap: 34px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--deep-line);
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.688rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep-text-3);
  margin: 0 0 14px;
  font-weight: 500;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer li a { color: var(--deep-text-2); font-size: 0.94rem; }
.footer li a:hover { color: var(--deep-text); text-decoration: none; }
.footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer__brand .brand__mark { width: 40px; height: 40px; border-radius: 11px; }
.footer__wordmark { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--deep-text); }
.footer__blurb { color: var(--deep-text-2); font-size: 0.94rem; max-width: 34ch; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--deep-text-3);
}
.footer__langs { display: flex; gap: 10px; }
.footer__note { max-width: 62ch; }

/* ------------------------------------------------- 18. Reveal animation */

.js-anim .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.32, 0.72, 0, 1), transform 0.6s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: opacity, transform;
}
.js-anim .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------- 19. Legal pages */

.legal { padding-block: clamp(40px, 5vw, 64px) clamp(60px, 7vw, 96px); }
.legal__head { max-width: 46ch; margin-bottom: clamp(28px, 4vw, 44px); }
.legal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
}
.legal__body {
  max-width: 72ch;
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-soft);
}
.legal__body h2 {
  font-size: 1.16rem;
  letter-spacing: -0.014em;
  margin: 30px 0 8px;
  font-family: var(--font-sans);
  font-weight: 600;
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body p { color: var(--text-2); font-size: 0.98rem; line-height: 1.66; margin-bottom: 14px; }
.legal__body p:last-child { margin-bottom: 0; }
.legal__body a { word-break: break-word; }
.legal__credit {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 22px;
}
.legal__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* --------------------------------------------------------- 20. Responsive */

@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 54px; }
  .hero__copy { max-width: 100%; }
  .devices { justify-self: center; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .showcase, .water, .privacy-grid { grid-template-columns: 1fr; gap: 40px; }
  .showcase--flip .showcase__media { order: 0; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  /* The nav has to fit a brand, a three-way theme control and a menu button in
     390px — the wordmark's sub-label and the store button (which the hero
     repeats at full size) step out of the way. */
  .nav__inner { gap: 10px; }
  .brand { font-size: 1.14rem; }
  .brand__sub { display: none; }
  .nav__cta { display: none; }
  .grid--3, .grid--2, .grid--4, .steps, .plans { grid-template-columns: 1fr; }
  .device { --s: 0.72 !important; }
  .float-card { display: none; }
  .reading__grid { grid-template-columns: repeat(2, 1fr); }
  .reading__cell:nth-child(-n + 2) { border-top: 0; }
  .reading__cell:nth-child(4n + 1) { border-left: 1px solid var(--line-soft); }
  .reading__cell:nth-child(2n + 1) { border-left: 0; }
  .readout { flex-direction: column; }
  .readout__cell { border-left: 0; border-top: 1px solid var(--readout-line); }
  .readout__cell:first-child { border-top: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Mobile nav sheet */
.nav__sheet {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  z-index: 99;
  padding: 12px var(--gutter) 22px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, transform 0.26s ease, visibility 0.26s;
}
.nav__sheet.is-open { opacity: 1; visibility: visible; transform: none; }
.nav__sheet a {
  padding: 13px 6px;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line-soft);
}
.nav__sheet a:last-child { border-bottom: 0; }

@media (min-width: 1081px) { .nav__sheet { display: none; } }

/* -------------------------------------------------------- 21. A11y prefs */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-anim .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .shafts, .screens-switch, .float-card { display: none !important; }
  .deep { background: #fff; color: #000; }
  body { background: #fff; }
}
