/* ============================================================================
   PourPilot — Product website
   Design system: "Noir & Gold" — timeless luxury (shared with the app)
   Dark Mode (OLED) · Inter / Playfair Display / JetBrains Mono
   charcoal #121212 · brushed gold #D4AF37 · emerald ring = hardware signature
   ========================================================================== */

/* Self-hosted variable fonts (latin subset) — CSP-safe, offline-friendly.
   Copied from app/fonts/. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/playfair-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/playfair-display-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Reset & tokens ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;
  --bg:            #121212;
  --bg-2:          #0b0b0b;
  --surface:       #1b1b1b;
  --surface2:      #262626;
  --muted:         #333333;
  --border:        rgba(212, 175, 55, 0.15);
  --border-strong: rgba(212, 175, 55, 0.32);

  --text:          #F5F1E6;
  --text-dim:      #B3AC9A;
  --text-faint:    #7C7563;

  --gold:          #D4AF37;
  --gold-dim:      #B8912B;
  --gold-soft:     rgba(212, 175, 55, 0.13);

  /* The coaster's LED ring glows emerald — the hardware's signature colour. */
  --emerald:       #34d399;
  --emerald-soft:  rgba(52, 211, 153, 0.14);

  --red:           #ef4444;
  --red-soft:      rgba(239, 68, 68, 0.14);

  --shadow:        0 18px 40px -16px rgba(0, 0, 0, 0.8);
  --radius:        16px;
  --radius-sm:     10px;
  --mono:          'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display:  'Playfair Display', 'Georgia', 'Times New Roman', serif;

  --container:     1120px;
  --nav-height:    64px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 12px); }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ambient gold glow, shared with the app */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(620px 420px at 82% -10%, rgba(212, 175, 55, 0.10), transparent 70%),
    radial-gradient(680px 460px at 8% 2%, rgba(212, 175, 55, 0.05), transparent 70%);
}

main, nav, footer { position: relative; z-index: 1; }

img, video { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: #E6C866; }
.tnum { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* Visible to screen readers only — used to read "Was"/"Now" around the two
   figures in a sale price, which sighted users get from the strikethrough. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
code {
  font: 600 0.85em var(--mono);
  color: #E6D08A;
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ── Nav ───────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: radial-gradient(circle at 30% 30%, #E6C866, #B8912B);
  display: grid; place-items: center;
  flex: 0 0 auto;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
  color: #1A1400;
}
.brand-mark svg { width: 18px; height: 18px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 0.95rem var(--sans);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, #E6C866, var(--gold) 55%, var(--gold-dim));
  color: #1A1400;
  box-shadow: 0 6px 24px -6px rgba(212, 175, 55, 0.45);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -6px rgba(212, 175, 55, 0.55); color: #1A1400; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--text); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 11, 11, 0.92) 0%, rgba(11, 11, 11, 0.72) 42%, rgba(11, 11, 11, 0.25) 75%, rgba(11, 11, 11, 0.45) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
.hero-inner { padding: 96px 0; max-width: 620px; }
.kicker {
  font: 600 0.76rem var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.6vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero p.lede {
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 22px; font-size: 0.8rem; color: var(--text-faint); }

/* ── Value bar ─────────────────────────────────────────────── */
.value-bar { border-block: 1px solid var(--border); background: rgba(27, 27, 27, 0.5); }
.value-bar .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-block: 26px;
}
.value-item { text-align: center; }
.value-item strong {
  display: block;
  font: 700 1.05rem var(--mono);
  color: var(--gold);
  letter-spacing: 0.01em;
}
.value-item span { font-size: 0.82rem; color: var(--text-dim); }

/* ── Launch countdown ──────────────────────────────────────── */
.countdown-band {
  text-align: center;
  padding: 60px 0;
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(212, 175, 55, 0.10) 0%, transparent 60%),
    var(--bg-2);
  border-block: 1px solid var(--border);
}
.countdown-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin-bottom: 30px;
}
.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 96px;
  padding: 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.cd-num {
  font: 700 clamp(2rem, 5vw, 3.1rem) var(--mono);
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.cd-label {
  margin-top: 10px;
  font: 600 0.64rem var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.cd-sep {
  font: 700 clamp(2rem, 5vw, 3.1rem) var(--mono);
  color: var(--text-faint);
  line-height: 1;
  padding-top: 16px;
}
.countdown-note { margin-top: 30px; font-size: 0.9rem; color: var(--text-dim); }
/* Launch waitlist form in the countdown band — reuses the restock-form
   input/message styles, just centred and width-capped for the band. */
.launch-waitlist { max-width: 440px; margin: 22px auto 0; }
.launch-waitlist .restock-row button { flex-shrink: 0; }

/* ── Flash sale band ───────────────────────────────────────────
   Same shell as the launch countdown (.countdown-band, .cd-unit, .cd-num), so
   the sale inherits every layout and responsive rule already written for it.
   Only the headline pairing and the save pill are new. */
.sale-band .countdown-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.sale-was {
  font: 500 clamp(1.1rem, 2.2vw, 1.5rem) var(--mono);
  color: var(--text-faint);
  text-decoration-thickness: 2px;
}
.sale-now {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.sale-band .countdown-note [data-sale-save] {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--emerald);
}
.sale-cta { margin-top: 24px; }
.countdown-live { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.countdown-live-msg {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--gold);
}

@media (max-width: 600px) {
  .countdown { gap: 6px; }
  .cd-unit { min-width: 0; flex: 1; padding: 14px 4px; }
  .cd-sep { display: none; }
  .cd-label { font-size: 0.56rem; letter-spacing: 0.12em; }
}

/* ── Sections ──────────────────────────────────────────────── */
section.block { padding: 96px 0; }
section.block.tint { background: rgba(11, 11, 11, 0.55); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  margin: 10px 0 14px;
}
.section-head p { color: var(--text-dim); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split.rev > .split-media { order: 2; }

.split-media img, .split-media video {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ── How it works ──────────────────────────────────────────── */
.steps { display: grid; gap: 8px; counter-reset: step; }
.step {
  display: flex;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius-sm);
}
.step:hover { background: var(--gold-soft); }
.step-num {
  counter-increment: step;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  font: 700 0.95rem var(--mono);
  color: var(--gold);
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 4px; }
.step p { font-size: 0.92rem; color: var(--text-dim); }

/* The pour demo is landscape 16:9. The 360px cap here was for the old portrait
   clip — a landscape source inside it (and inside the 9/16 ratio below) got
   cropped to a narrow vertical slice by object-fit: cover. It now fills its
   grid column, and collapses to full width when .split goes single-column. */
.pour-video {
  position: relative;
  margin-inline: auto;
}
.pour-video video { aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }

/* ── Inside the coaster ────────────────────────────────────── */
.components { display: grid; gap: 14px; margin-top: 8px; }
.component {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.component:last-child { border-bottom: none; }
.component code {
  font: 600 0.78rem var(--mono);
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.component span { font-size: 0.92rem; color: var(--text-dim); }

/* ── App section ───────────────────────────────────────────── */
.phones {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.phones img {
  width: min(46%, 240px);
  /* height:auto + the width/height attributes in the HTML reserve the space
     before the lazy image loads — without it these collapse to 0px and anchor
     jumps (e.g. /#buy) land a full viewport short. */
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.phones img:last-child { transform: translateY(28px); }

/* ── Gallery ───────────────────────────────────────────────── */
/* Sits directly under the value bar at the top of the page. The selector needs
   the `section.block` prefix — a bare `.gallery-block` loses the specificity
   contest against `section.block { padding: 96px 0 }` and is silently ignored. */
section.block.gallery-block { padding: 72px 0 0; }
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: clamp(240px, 32vw, 420px);
  gap: 20px;
  align-items: stretch;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (max-width: 900px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery img { max-height: 420px; }
}

/* ── Pricing / Buy ─────────────────────────────────────────── */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
  justify-content: center;
  gap: 24px;
}
.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.product-card.featured { border-color: var(--gold); box-shadow: 0 0 40px -12px rgba(212, 175, 55, 0.35); }
.product-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  font: 600 0.7rem var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1A1400;
  background: linear-gradient(135deg, #E6C866, var(--gold));
  padding: 5px 12px;
  border-radius: 999px;
}
.product-photo {
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.product-tagline { font-size: 0.9rem; color: var(--text-dim); flex: 1; }
.product-price {
  font: 700 1.6rem var(--mono);
  color: var(--gold);
  margin-top: 10px;
}
/* Sale variant: the struck pre-sale figure sits beside the live one, with the
   saving as a pill so the discount reads at a glance without shouting. */
.product-price.is-sale {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.price-was {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-faint);
}
.price-was s { text-decoration-thickness: 2px; }
.price-save {
  font: 600 0.68rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
  background: var(--emerald-soft);
  border-radius: 999px;
  padding: 4px 10px;
  align-self: center;
}
.product-card .btn { margin: 0 24px 24px; }
.product-soldout {
  margin: 0 24px 24px;
  text-align: center;
  font: 600 0.85rem var(--mono);
  color: var(--text-faint);
  padding: 13px;
  border: 1px dashed var(--muted);
  border-radius: 999px;
}
/* Back-in-stock waitlist (shown under the Sold out chip) */
.restock-form { margin: -8px 24px 24px; }
/* Pre-launch block on the product cards: mini countdown + waitlist form
   (replaces the Buy button until launch). */
.card-launch { padding: 0 0 8px; }
.card-launch-note { text-align: center; font-size: 0.9rem; color: var(--text-dim); margin: 0 24px 12px; }
.card-launch .card-cd { font-family: var(--mono); font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.card-launch .restock-form { margin: 0 24px 16px; }
.restock-lede { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 10px; }
.restock-row { display: flex; gap: 8px; }
.restock-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.88rem;
}
.restock-row input:focus { outline: none; border-color: var(--gold); }
.restock-msg { font-size: 0.82rem; color: var(--gold); margin-top: 10px; }
.products-note { text-align: center; margin-top: 26px; font-size: 0.82rem; color: var(--text-faint); }
.buy-app-note { margin-top: 10px; font-size: 0.88rem; color: var(--text-dim); }
.buy-app-note a { color: var(--gold); }

/* ── Consent banner (Meta pixel, POPIA) ────────────────────── */
#pp-consent {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
#pp-consent p { font-size: 0.85rem; color: var(--text-dim); margin: 0; flex: 1 1 32ch; }
#pp-consent a { color: var(--gold); }
.consent-actions { display: flex; gap: 10px; }
.patent-note { margin-top: 18px; font-size: 0.82rem; color: var(--text-faint); }

/* ── Accepted payment methods ──────────────────────────────── */
.pay-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.pay-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.pay-mark svg { height: 20px; width: auto; flex: none; }
/* Visa is a wordmark, not a glyph — set it rather than trace it. */
.pay-visa {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  color: #F5F1E6;
}
.pay-eft svg, .pay-secure svg { color: var(--gold); height: 17px; }
.pay-row-note {
  margin-top: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ── Buying with confidence (trust band) ───────────────────── */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.trust-card {
  display: block;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
/* Only the App Store card is a link; give it affordance without turning the
   static cards into fake buttons. */
a.trust-card:hover, a.trust-card:focus-visible {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.trust-icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 11px;
  background: var(--gold-soft);
  color: var(--gold);
}
.trust-icon svg { width: 21px; height: 21px; }
.trust-card h3 {
  font-size: 1.02rem;
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--text);
}
.trust-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.62;
}
.trust-card code {
  font: 600 0.82rem var(--mono);
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.trust-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}

/* The honest-version panel: the risk reversal that stands in for reviews. */
.trust-guarantee {
  margin-top: 34px;
  padding: 34px 32px;
  text-align: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 160% at 50% 0%, rgba(212, 175, 55, 0.09) 0%, transparent 62%),
    var(--bg-2);
}
.tg-lede {
  font: 600 0.74rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.tg-body {
  max-width: 62ch;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.tg-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-guarantee { padding: 28px 20px; }
  .tg-actions .btn { width: 100%; justify-content: center; }
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq { max-width: 720px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 20px;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 600;
  font-size: 0.98rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font: 400 1.3rem var(--mono);
  color: var(--gold);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 18px; font-size: 0.92rem; color: var(--text-dim); }

/* ── Footer ────────────────────────────────────────────────── */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
  background: var(--bg-2);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.site-footer p { font-size: 0.82rem; color: var(--text-faint); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.82rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.footer-social a:hover { color: var(--gold); border-color: var(--border-strong); }
.footer-social svg { display: block; }

/* ── Modal (checkout) ──────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: min(440px, 100%);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.modal h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 4px; }
.modal .modal-sub { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 20px; }
.modal form { display: grid; gap: 14px; }
.modal-section {
  font: 600 0.72rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 6px 0 -2px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.field-row { display: grid; grid-template-columns: 1fr 8rem; gap: 14px; }
.field label .opt { text-transform: none; letter-spacing: 0; color: var(--text-faint); font-weight: 400; }
@media (max-width: 380px) { .field-row { grid-template-columns: 1fr; } }
.field label,
.field .field-label {
  display: block;
  font: 600 0.72rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--muted);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 500 0.95rem var(--sans);
  padding: 11px 14px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); }
/* Delivery line above the total: same columns, quieter than the total itself. */
.modal-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.modal-note { font-size: 0.75rem; color: var(--text-faint); margin: 4px 0 0; }
.modal-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-weight: 600;
}
.modal-total .tnum { color: var(--gold); font-size: 1.2rem; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.form-error { color: var(--red); font-size: 0.85rem; }
.pay-methods { font-size: 0.75rem; color: var(--text-faint); text-align: center; margin-top: 4px; }

/* ── Order page ────────────────────────────────────────────── */
.order-page {
  min-height: calc(100svh - var(--nav-height));
  display: grid;
  place-items: center;
  padding: 60px 24px;
}
.order-card {
  width: min(480px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
}
.order-card h1 { font-family: var(--font-display); font-size: 1.7rem; margin-bottom: 10px; }
.order-card p { color: var(--text-dim); font-size: 0.95rem; }
.order-status-icon {
  width: 72px; height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid; place-items: center;
}
.order-status-icon.pending { background: var(--gold-soft); color: var(--gold); }
.order-status-icon.paid { background: var(--emerald-soft); color: var(--emerald); }
.order-status-icon.cancelled { background: var(--red-soft); color: var(--red); }
.order-status-icon svg { width: 34px; height: 34px; }
.order-meta {
  margin: 22px 0;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  font: 500 0.85rem var(--mono);
  color: var(--text-dim);
  text-align: left;
  display: grid;
  gap: 6px;
}
.order-meta strong { color: var(--text); float: right; }
.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--gold-soft);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Legal pages ───────────────────────────────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: 72px 24px 96px; }
.legal h1 { font-family: var(--font-display); font-size: 2.2rem; margin-bottom: 8px; }
.legal .updated { font: 500 0.8rem var(--mono); color: var(--text-faint); margin-bottom: 40px; }
.legal h2 { font-size: 1.2rem; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 16px 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); color: var(--text-dim); }
.legal th { color: var(--text); background: var(--surface); }

/* ── Admin ─────────────────────────────────────────────────── */
.admin-wrap { max-width: 920px; margin: 0 auto; padding: 48px 24px 96px; }
.admin-wrap h1 { font-family: var(--font-display); font-size: 1.9rem; margin-bottom: 6px; }
.admin-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 32px; }
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}
.admin-card h2 { font-size: 1.1rem; margin-bottom: 16px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.admin-tab {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font: 600 0.85rem var(--sans);
  cursor: pointer;
}
.admin-tab.active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.admin-row:last-child { border-bottom: none; }
.admin-row .thumb {
  width: 56px; height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-2);
  border: 1px solid var(--muted);
  flex: 0 0 auto;
}
.admin-row .grow { flex: 1; min-width: 0; }
.admin-row .grow .name { font-weight: 600; font-size: 0.95rem; }
.admin-row .grow .meta { font: 500 0.75rem var(--mono); color: var(--text-faint); }
.chip {
  font: 600 0.68rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  white-space: nowrap;
}
.chip.active { color: var(--emerald); border-color: var(--emerald); }
.chip.hidden-chip { color: var(--text-faint); }
.chip.sold_out { color: var(--red); border-color: var(--red); }
.chip.paid { color: var(--emerald); border-color: var(--emerald); }
.chip.pending { color: var(--gold); border-color: var(--gold); }
.chip.shipped { color: var(--text); border-color: var(--text-dim); }
.chip.cancelled, .chip.failed { color: var(--red); border-color: var(--red); }
.chip-btn { cursor: pointer; background: transparent; }
.chip-btn:hover { border-color: var(--gold); color: var(--gold); }
.admin-form { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.admin-form .full { grid-column: 1 / -1; }
.admin-form textarea {
  width: 100%;
  min-height: 90px;
  background: var(--bg-2);
  border: 1px solid var(--muted);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 500 0.95rem var(--sans);
  padding: 11px 14px;
  resize: vertical;
}
.admin-form textarea:focus { outline: none; border-color: var(--gold); }
.photo-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-strip .shot { position: relative; }
.photo-strip img {
  width: 96px; height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--muted);
}
.photo-strip .rm {
  position: absolute;
  top: -7px; right: -7px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  font: 700 0.8rem var(--sans);
  cursor: pointer;
  line-height: 1;
}
.notice {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--gold-soft);
  font-size: 0.9rem;
  color: var(--text);
}
.notice.err { border-color: var(--red); background: var(--red-soft); }

/* ── Recipe admin: step-row editor ─────────────────────────── */
.re-step {
  display: grid;
  grid-template-columns: 1fr 1fr 5rem auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.re-step .ra-label { grid-column: 1 / 3; }
.re-step .ra-note { grid-column: 1 / -1; }
.ra-input {
  background: var(--bg-2, #1b1b1b);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 11px;
  font-size: 0.9rem;
  width: 100%;
}
.ra-input:focus { outline: none; border-color: var(--gold); }
.ra-weigh { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-faint); white-space: nowrap; }
.ra-weigh input { width: 18px; height: 18px; accent-color: var(--gold); }
.re-step .ra-del { justify-self: end; }
@media (max-width: 480px) {
  .re-step { grid-template-columns: 1fr 1fr auto; }
  .re-step .ra-vol { grid-column: 1 / 2; }
}

/* ── Splash load screen (from Pourpilotlogo.html) ──────────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: grid;
  place-items: center;
  animation: splash-hide 0.35s ease 1.1s forwards;
}
.splash-inner { text-align: center; }
.splash-logo {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  /* Starts hidden at the bottom, reveals upwards */
  clip-path: inset(100% 0 0 0);
  animation: splash-build 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.splash-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.splash-base { stroke: var(--text); z-index: 2; animation: splash-togold 0.45s ease-in-out 0.6s forwards; }
.splash-gold { z-index: 1; }
.splash-word {
  margin-top: 16px;
  font: 800 1.05rem var(--sans);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--gold);
  opacity: 0;
  animation: splash-fadein 0.4s ease 0.5s forwards;
}
.splash-tag {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  opacity: 0;
  animation: splash-fadein 0.4s ease 0.65s forwards;
}
@keyframes splash-build { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes splash-togold { to { opacity: 0; } }
@keyframes splash-fadein { to { opacity: 1; } }
@keyframes splash-hide { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { #splash { display: none; } }

/* PourPilot mark in the nav */
.brand-logo { width: 28px; height: 32px; color: var(--gold); flex: 0 0 auto; filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.35)); }

/* ── Scroll reveal (ui.js adds .reveal-in) ─────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.reveal-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .trust-card, .product-card { transition: none; }
  .spinner { animation-duration: 2s; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  section.block { padding: 68px 0; }
  section.block.gallery-block { padding: 52px 0 0; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.rev > .split-media { order: 0; }
  .admin-form { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav-links a:not(.btn) { display: none; }
  .hero-inner { padding: 64px 0; }
  .value-bar .container { grid-template-columns: 1fr; gap: 18px; }
  .phones img:last-child { transform: none; }
}

/* ── Get the app (badges + APK download) ───────────────────── */
.app-get { margin-top: 26px; }
.app-get-apk { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; }
.app-get-apk svg { width: 18px; height: 18px; }
.store-badges { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text);
}
a.store-badge { text-decoration: none; transition: border-color 0.2s ease, background 0.2s ease; }
a.store-badge:hover { border-color: var(--gold); background: var(--gold-soft); }
.store-badge svg { width: 16px; height: 16px; }
.store-badge small {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.store-badge.is-soon { opacity: 0.55; }
.app-get-note { color: var(--text-dim); font-size: 0.8rem; margin-top: 12px; max-width: 46ch; }

/* ── /android download page ────────────────────────────────── */
.dl-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 26px 24px 22px;
  margin: 28px 0 8px;
}
.dl-btn { display: inline-flex; align-items: center; gap: 9px; }
.dl-btn svg { width: 18px; height: 18px; }
.dl-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font: 600 0.72rem var(--mono);
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 16px 0 0;
}
.dl-card .app-get-note { max-width: 56ch; }
.legal ol { padding-left: 22px; }
.legal ol li { margin-bottom: 12px; }
.legal code {
  font-family: var(--mono); font-size: 0.85em;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 5px;
}

/* ── LED ring demo (How it works) ──────────────────────────── */
/* Gold arc fills dot by dot (each dot lights amber, settles gold), the whole
   ring flashes green ("stop now"), then drains — mirroring firmware patterns. */
.ledring-demo { text-align: center; margin: 8px 0 44px; }
.ledring { width: 190px; height: 190px; }
.lr-base { fill: none; stroke: rgba(212, 175, 55, 0.12); stroke-width: 1; }
.lr-dots circle {
  fill: rgba(212, 175, 55, 0.10);
  animation: lr-dot 6.4s linear infinite;
  animation-delay: calc(var(--i) * 0.21s);
}
@keyframes lr-dot {
  0%       { fill: rgba(212, 175, 55, 0.10); }
  2%       { fill: #ff5c00; }   /* amber head as the fill reaches this dot */
  7%, 55%  { fill: #d4af37; }   /* settles gold and holds */
  68%,100% { fill: rgba(212, 175, 55, 0.10); }  /* drains for the next loop */
}
.lr-stopflash {
  fill: none; stroke: var(--emerald); stroke-width: 15; stroke-linecap: round;
  opacity: 0;
  animation: lr-stopflash 6.4s linear infinite;
}
@keyframes lr-stopflash {
  0%, 56%   { opacity: 0; }
  58%       { opacity: 0.95; }
  60%       { opacity: 0; }
  62%       { opacity: 0.95; }
  64%       { opacity: 0; }
  66%, 74%  { opacity: 0.85; }  /* hold green: stop now */
  80%, 100% { opacity: 0; }
}
.ledring-caption { color: var(--text-dim); font-size: 0.85rem; margin-top: 10px; }
.lc-gold  { color: var(--gold);    font-weight: 700; }
.lc-amber { color: #ff8a3d;        font-weight: 700; }
.lc-green { color: var(--emerald); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .lr-dots circle { animation: none; fill: #d4af37; }  /* static filled ring */
  .lr-stopflash   { animation: none; opacity: 0; }
}

/* ── Annotated exploded view (Inside) ──────────────────────── */
.annotated { position: relative; margin: 0; }
/* height:auto — see .phones img: keeps the lazy image's space reserved. */
.annotated img { display: block; width: 100%; height: auto; }
.anno {
  position: absolute;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(11, 11, 11, 0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 9px;
  white-space: nowrap;
}
/* Leader line toward the centreline of the render */
.anno::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 1px;
  background: rgba(212, 175, 55, 0.55);
}
.anno-r { right: 4%; }
.anno-r::after { right: 100%; }
.anno-l { left: 4%; }
.anno-l::after { left: 100%; }
@media (max-width: 600px) {
  .anno { display: none; }  /* labels crowd the render on small screens */
}

/* ── What's in the box (Buy) ───────────────────────────────── */
.in-the-box {
  display: flex; align-items: center; gap: 26px;
  margin-top: 42px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.in-the-box img {
  width: 180px; height: 130px; object-fit: cover;
  border-radius: 10px; flex: 0 0 auto;
}
.box-list { list-style: none; padding: 0; margin: 8px 0 0; }
.box-list li {
  padding: 4px 0 4px 22px;
  position: relative;
  color: var(--text);
  font-size: 0.92rem;
}
.box-list li::before {
  content: "";
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
}
@media (max-width: 600px) {
  .in-the-box { flex-direction: column; align-items: flex-start; }
  .in-the-box img { width: 100%; height: 150px; }
}

/* ── Admin: ops alerts + order diagnostics ─────────────────── */
/* Unresolved ops_alerts rows, shown above the admin tabs. Styled to be hard to
   scroll past: the whole point is that a silent failure became a loud one. */
.admin-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold);
  background: var(--gold-soft);
}
.admin-alert.critical { border-color: var(--red); background: var(--red-soft); }
.admin-alert .grow { flex: 1; min-width: 0; }
.admin-alert .name { font-weight: 600; font-size: 0.9rem; }
.admin-alert .meta {
  font: 500 0.72rem var(--mono);
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
/* An order-row line that reports something costing money or a lost sale. */
.admin-row .grow .meta.warn { color: var(--red); }
.chip.expired { color: var(--text-faint); border-color: var(--text-faint); }
