/* =========================================================================
   Simple Modern Software — design system
   Calm, white-dominant, Apple-native. Light + dark. One accent per product.
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  color-scheme: light;

  /* Neutrals (light) */
  --bg:        #fbfcfd;
  --surface:   #ffffff;
  --surface-2: #f4f6f9;
  --elevated:  #ffffff;
  --text:      #0e1116;
  --text-2:    #515966;
  --text-3:    #6c7480;
  --hairline:  rgba(14, 17, 22, 0.10);
  --hairline-2:rgba(14, 17, 22, 0.06);

  /* Brand + semantic */
  --blue:       #1c7ff2;   /* primary / Espial (utility line) */
  --blue-ink:   #115fb8;   /* readable blue text on light */
  --blue-soft:  #e9f2fe;
  --coral:      #ea6843;   /* Allodola (consumer line) */
  --coral-ink:  #c0492a;
  --coral-soft: #fdede7;
  --indigo:     #5848d6;   /* future technical line */
  --indigo-ink: #4536bf;
  --indigo-soft:#ecebfb;
  --mint:       #2fa46f;
  --mint-soft:  #e4f5ed;
  --amber:      #b7791f;
  --rose:       #d6447a;

  /* Glass (navigation layer only) */
  --glass-bg:   rgba(251, 252, 253, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.6);

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(14, 17, 22, 0.05), 0 1px 1px rgba(14, 17, 22, 0.04);
  --shadow-2: 0 6px 18px rgba(14, 17, 22, 0.07), 0 2px 6px rgba(14, 17, 22, 0.05);
  --shadow-3: 0 22px 60px rgba(14, 17, 22, 0.12), 0 6px 18px rgba(14, 17, 22, 0.07);

  /* Shape + rhythm */
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --pill: 999px;
  --maxw: 1180px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Type */
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display",
          "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --accent: var(--blue);
  --accent-ink: var(--blue-ink);
  --accent-soft: var(--blue-soft);
}

/* Per-product accent scopes */
.accent-coral  { --accent: var(--coral);  --accent-ink: var(--coral-ink);  --accent-soft: var(--coral-soft); }
.accent-indigo { --accent: var(--indigo); --accent-ink: var(--indigo-ink); --accent-soft: var(--indigo-soft); }
.caption { margin-top: 12px; font-size: 0.8rem; color: var(--text-3); text-align: center; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #0c0e12;
  --surface:   #14171d;
  --surface-2: #1b1f27;
  --elevated:  #1c212a;
  --text:      #e9ecf1;
  --text-2:    #aab2bf;
  --text-3:    #8b93a1;
  --hairline:  rgba(255, 255, 255, 0.12);
  --hairline-2:rgba(255, 255, 255, 0.07);

  --blue:       #4f9df5;
  --blue-ink:   #8fc0fb;
  --blue-soft:  rgba(79, 157, 245, 0.16);
  --coral:      #f1825f;
  --coral-ink:  #f6a486;
  --coral-soft: rgba(241, 130, 95, 0.16);
  --indigo:     #8b7ef0;
  --indigo-ink: #ada3f5;
  --indigo-soft:rgba(139, 126, 240, 0.18);
  --mint:       #57c596;
  --mint-soft:  rgba(87, 197, 150, 0.16);
  --amber:      #e0b257;
  --rose:       #ed7aa6;

  --glass-bg:   rgba(16, 18, 23, 0.66);
  --glass-edge: rgba(255, 255, 255, 0.08);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 26px 64px rgba(0, 0, 0, 0.6);
}

/* Follow the OS when the user hasn't explicitly chosen a theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:#0c0e12; --surface:#14171d; --surface-2:#1b1f27; --elevated:#1c212a;
    --text:#e9ecf1; --text-2:#aab2bf; --text-3:#8b93a1;
    --hairline:rgba(255,255,255,0.12); --hairline-2:rgba(255,255,255,0.07);
    --blue:#4f9df5; --blue-ink:#8fc0fb; --blue-soft:rgba(79,157,245,0.16);
    --coral:#f1825f; --coral-ink:#f6a486; --coral-soft:rgba(241,130,95,0.16);
    --indigo:#8b7ef0; --indigo-ink:#ada3f5; --indigo-soft:rgba(139,126,240,0.18);
    --mint:#57c596; --mint-soft:rgba(87,197,150,0.16); --amber:#e0b257; --rose:#ed7aa6;
    --glass-bg:rgba(16,18,23,0.66); --glass-edge:rgba(255,255,255,0.08);
    --shadow-1:0 1px 2px rgba(0,0,0,0.4); --shadow-2:0 8px 24px rgba(0,0,0,0.45); --shadow-3:0 26px 64px rgba(0,0,0,0.6);
  }
}

/* ---- Reset / base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }
ul { margin: 0; }
button { font: inherit; cursor: pointer; }

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

.skip-link {
  position: fixed;
  top: 10px; left: 50%;
  transform: translate(-50%, -150%);
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 14px;
  transition: transform 180ms ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

.container { width: min(var(--maxw), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Keep in-page anchors (e.g. #features, #notify) clear of the sticky header. */
[id] { scroll-margin-top: 84px; }

/* ---- Typography ------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0; font-weight: 680; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 4.6rem); max-width: 16ch; }
h2 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.1rem); max-width: 20ch; }
h3 { font-size: clamp(1.35rem, 1.05rem + 1vw, 1.85rem); }
h4 { font-size: 1.06rem; line-height: 1.25; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.06rem, 0.98rem + 0.5vw, 1.3rem); color: var(--text-2); max-width: 60ch; text-wrap: pretty; }
.eyebrow {
  margin: 0 0 16px; font-size: 0.78rem; font-weight: 750;
  letter-spacing: 0.10em; text-transform: uppercase; color: var(--accent-ink);
}

/* ---- Buttons + store badges ------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--pill);
  border: 1px solid transparent; font-size: 0.97rem; font-weight: 650;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 26px -6px color-mix(in srgb, var(--accent) 65%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--hairline); box-shadow: var(--shadow-1); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-text { min-height: auto; padding: 0; color: var(--accent-ink); font-weight: 650; }
.btn-text::after { content: " →"; transition: transform 160ms ease; }
.btn-text:hover::after { transform: translateX(3px); }

.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 54px; padding: 0 20px 0 18px; border-radius: 14px;
  background: #000; color: #fff; border: 1px solid rgba(255,255,255,0.12);
}
:root[data-theme="dark"] .store-badge { background: #fff; color: #000; border-color: rgba(0,0,0,0.1); }
.store-badge svg { width: 26px; height: 26px; }
.store-badge .sb-top { font-size: 0.62rem; opacity: 0.85; line-height: 1; margin-bottom: 3px; letter-spacing: 0.02em; }
.store-badge .sb-main { font-size: 1.12rem; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.store-badge[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 30px; }

/* ---- Header / glass nav ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--glass-bg);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hairline-2);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; color: var(--text); }
.brand .mark { width: 30px; height: 30px; flex: none; color: var(--text); }
.brand .mark .ac { fill: var(--accent); }
.brand .word { font-weight: 680; letter-spacing: -0.02em; font-size: 1.02rem; white-space: nowrap; }
.brand .word .dot { color: var(--accent); }
.nav-spacer { flex: 1; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px;
  border-radius: var(--pill); color: var(--text-2); font-size: 0.92rem; font-weight: 600;
  transition: color 140ms ease, background 140ms ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--accent-ink); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--pill); border: 1px solid var(--hairline); background: var(--surface);
  color: var(--text); box-shadow: var(--shadow-1);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.menu-btn { display: none; }
.menu-btn .bar { position: relative; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-btn .bar::before, .menu-btn .bar::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-btn .bar::before { top: -6px; } .menu-btn .bar::after { top: 6px; }

/* ---- Sections --------------------------------------------------------- */
main { display: block; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section.tight { padding: clamp(44px, 6vw, 80px) 0; }
.band { background: var(--surface); border-block: 1px solid var(--hairline-2); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-top: 18px; }

/* ---- Hero ------------------------------------------------------------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { margin-top: 22px; }
.hero .lead { margin-top: 24px; }
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

/* ---- Tags / pills ----------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px;
  border-radius: var(--pill); background: var(--surface-2); color: var(--text-2);
  font-size: 0.78rem; font-weight: 650; border: 1px solid var(--hairline-2);
}
.tag.blue   { color: var(--blue-ink);   background: var(--blue-soft);   border-color: transparent; }
.tag.coral  { color: var(--coral-ink);  background: var(--coral-soft);  border-color: transparent; }
.tag.indigo { color: var(--indigo-ink); background: var(--indigo-soft); border-color: transparent; }
.tag.mint   { color: var(--mint);       background: var(--mint-soft);   border-color: transparent; }
.tag .live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---- Cards ------------------------------------------------------------ */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--hairline-2); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-1);
  padding: clamp(22px, 3vw, 30px); min-width: 0;
}
.feature-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border-radius: 12px; color: var(--accent-ink); background: var(--accent-soft);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-icon.coral  { color: var(--coral-ink);  background: var(--coral-soft); }
.feature-icon.indigo { color: var(--indigo-ink); background: var(--indigo-soft); }
.card h4 + p { margin-top: 10px; color: var(--text-2); font-size: 0.96rem; }
.card .num { font-size: 0.82rem; font-weight: 800; color: var(--text-3); letter-spacing: 0.04em; }

/* Product cards (home) */
.product-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px; align-items: start; }
.product-card .app-icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: var(--shadow-2); }
.product-card h3 { margin-bottom: 8px; }
.product-card p { color: var(--text-2); font-size: 0.98rem; }

/* ---- Showcase (alternating copy/visual) ------------------------------ */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.showcase.flip .showcase-copy { order: 2; }
.showcase-copy .lead { margin-top: 16px; }
.checklist { display: grid; gap: 14px; margin-top: 26px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; list-style: none; color: var(--text-2); }
.checklist svg { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.checklist b { color: var(--text); font-weight: 650; }

/* ---- Device mockups (designed placeholders) -------------------------- */
.mock-pair { position: relative; }
.window {
  border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-3);
}
.window-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--hairline-2); background: var(--surface-2); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--text-3); opacity: 0.5; }
.window-bar i:nth-child(1) { background: #ff5f57; opacity: 1; }
.window-bar i:nth-child(2) { background: #febc2e; opacity: 1; }
.window-bar i:nth-child(3) { background: #28c840; opacity: 1; }
.window-bar .title { margin-left: 10px; font-size: 0.74rem; color: var(--text-3); font-weight: 600; }

.app-ui { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 320px; }
.rail { padding: 18px 12px; border-right: 1px solid var(--hairline-2); background: var(--surface-2); }
.rail-head { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; font-weight: 680; font-size: 0.86rem; }
.rail-head img { width: 26px; height: 26px; border-radius: 7px; }
.rail-item { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0 11px; margin: 3px 0; border-radius: 9px; color: var(--text-2); font-size: 0.78rem; font-weight: 600; }
.rail-item.active { color: var(--text); background: var(--accent-soft); }
.rail-item.active.coral { background: var(--coral-soft); color: var(--coral-ink); }
.rail-item .count { color: var(--text-3); }

.ui-body { padding: 16px; display: grid; gap: 10px; align-content: start; }
.row {
  padding: 12px 13px; border-radius: 12px; border: 1px solid var(--hairline-2); background: var(--surface);
}
.row.active { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.row.active.coral { border-color: color-mix(in srgb, var(--coral) 35%, transparent); background: var(--coral-soft); }
.row .row-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.82rem; font-weight: 650; color: var(--text); }
.row .row-sub { margin-top: 4px; font-size: 0.76rem; color: var(--text-2); }
.chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent-ink); font-size: 0.68rem; font-weight: 750; }
.chip.coral { background: var(--coral-soft); color: var(--coral-ink); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
.stat {
  padding: 14px; border-radius: 14px; border: 1px solid var(--hairline-2);
  background: var(--surface); box-shadow: var(--shadow-1);
}
.stat .k { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
.stat .v { margin-top: 10px; font-size: 1.7rem; font-weight: 680; letter-spacing: -0.02em; }
.meter { height: 7px; margin-top: 12px; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meter.mint span { background: var(--mint); }
.spark { width: 100%; height: 40px; margin-top: 10px; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Phone mock */
.phone {
  width: min(40%, 230px); border-radius: 30px; padding: 9px; background: var(--text);
  box-shadow: var(--shadow-3); position: absolute; right: -6px; bottom: -28px;
}
:root[data-theme="dark"] .phone { background: #2a2f3a; }
.phone .screen { border-radius: 22px; overflow: hidden; background: var(--surface); }
.phone .ui-body { min-height: 300px; }

/* ---- Capability matrix ----------------------------------------------- */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--hairline-2); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.matrix { width: 100%; border-collapse: collapse; min-width: 540px; }
.matrix th, .matrix td { padding: 15px 18px; text-align: left; font-size: 0.92rem; border-bottom: 1px solid var(--hairline-2); }
.matrix thead th { background: var(--surface-2); color: var(--text); font-weight: 700; }
.matrix tbody td:first-child { color: var(--text); font-weight: 600; }
.matrix td { color: var(--text-2); }
.matrix tr:last-child td { border-bottom: 0; }
.yn { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.yn.yes { color: var(--mint); } .yn.limited { color: var(--amber); } .yn.no { color: var(--text-3); }
.yn svg { width: 16px; height: 16px; }

/* ---- FAQ -------------------------------------------------------------- */
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details { border: 1px solid var(--hairline-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 650; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--text-3); transition: transform 200ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 20px 20px; color: var(--text-2); }

/* ---- Notify / forms --------------------------------------------------- */
.notify { display: flex; gap: 10px; flex-wrap: wrap; max-width: 480px; margin-top: 26px; }
.notify input[type="email"] {
  flex: 1 1 220px; min-height: 50px; padding: 0 16px; border-radius: var(--pill);
  border: 1px solid var(--hairline); background: var(--surface); color: var(--text); font-size: 1rem;
}
.notify input::placeholder { color: var(--text-3); }
.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-note { margin-top: 12px; font-size: 0.82rem; color: var(--text-3); }
.form-ok { margin-top: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--mint-soft); color: var(--mint); font-weight: 600; }

/* ---- CTA band --------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band .inner {
  border-radius: var(--r-xl); padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
  border: 1px solid var(--hairline-2); box-shadow: var(--shadow-2);
}
.cta-band h2 { margin-inline: auto; }
.cta-band .lead { margin: 16px auto 0; }
.cta-band .cta-row { justify-content: center; }

/* ---- Footer ----------------------------------------------------------- */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--hairline-2); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer .brand { margin-bottom: 14px; }
.footer p { color: var(--text-2); font-size: 0.9rem; max-width: 34ch; }
.footer h5 { margin: 0 0 14px; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 750; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.footer ul a { color: var(--text-2); font-size: 0.92rem; }
.footer ul a:hover { color: var(--text); }
.footer-base { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--hairline-2); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; color: var(--text-3); font-size: 0.84rem; }

/* ---- Legal / support shared ------------------------------------------ */
.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.legal-nav { position: sticky; top: 86px; display: grid; gap: 4px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--hairline-2); background: var(--surface); box-shadow: var(--shadow-1); }
.legal-nav a { padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-size: 0.86rem; font-weight: 600; }
.legal-nav a:hover { color: var(--text); background: var(--surface-2); }
.legal-content { display: grid; gap: 16px; }
.legal-card { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--hairline-2); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.legal-card h2 { margin-bottom: 16px; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
.legal-card h3 { margin-top: 22px; font-size: 1.15rem; }
.legal-card p, .legal-card li { color: var(--text-2); font-size: 1rem; line-height: 1.7; }
.legal-card p + p, .legal-card ul + p, .legal-card p + ul { margin-top: 14px; }
.legal-card ul { margin-top: 12px; padding-left: 22px; }
.legal-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 14px; border-radius: var(--pill); background: var(--surface-2); color: var(--text-2); font-size: 0.86rem; }

/* ---- Support form ----------------------------------------------------- */
.support-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.84rem; font-weight: 650; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--hairline); background: var(--surface); color: var(--text); font-size: 0.96rem;
}
.field textarea { min-height: 130px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-2); margin: 6px 0 16px; }
.check-row input { margin-top: 3px; }
.hp-field { position: absolute; left: -9999px; }
.link-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.link-grid a { padding: 9px 14px; border-radius: var(--pill); border: 1px solid var(--hairline); background: var(--surface); font-size: 0.86rem; font-weight: 600; color: var(--text-2); }
.link-grid a:hover { color: var(--text); }
.flash { padding: 12px 15px; border-radius: var(--r-sm); font-weight: 600; margin-bottom: 14px; }
.flash.danger { background: color-mix(in srgb, var(--rose) 16%, var(--surface)); color: var(--rose); }
.flash.green { background: var(--mint-soft); color: var(--mint); }

/* status board (public bugs) */
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.status-card { padding: 22px; border: 1px solid var(--hairline-2); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.status-card .row-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.status-card h3 { font-size: 1.1rem; }
.status-card p { color: var(--text-2); font-size: 0.94rem; margin-top: 8px; }

/* ---- Motion ----------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
}
@media (prefers-contrast: more) {
  :root { --hairline: rgba(14,17,22,0.3); --text-2:#3a414c; --text-3:#4a5563; }
  .site-header { background: var(--surface); }
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid, .showcase, .showcase.flip, .support-grid, .legal-layout { grid-template-columns: 1fr; }
  .showcase.flip .showcase-copy { order: 0; }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal-nav { position: static; grid-template-columns: repeat(2, 1fr); }
  .phone { position: relative; right: auto; bottom: auto; width: min(60%, 240px); margin: 18px auto 0; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-grid; }
  .nav-links {
    position: fixed; inset: 66px 14px auto 14px; z-index: 39; display: none;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px;
    border-radius: var(--r-lg); border: 1px solid var(--hairline-2);
    background: var(--surface); box-shadow: var(--shadow-3);
  }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { min-height: 44px; padding: 0 14px; }
  .grid.cols-2, .grid.cols-3, .status-grid, .row-2 { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- Device frames + real screenshots -------------------------------- */
/* Frames enforce true device aspect ratios so ANY screenshot — the authored
   mockups or a real upload of any dimensions — is presented at the correct
   device shape (cover-cropped from the top) instead of distorting the frame. */
.device-stage { position: relative; padding-bottom: 26px; }
.shot { border-radius: 16px; overflow: hidden; border: 1px solid var(--hairline); box-shadow: var(--shadow-3); background: var(--surface); aspect-ratio: 16 / 10; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.iphone-frame { position: relative; width: 188px; padding: 9px; border-radius: 38px; background: #0d0e11; box-shadow: var(--shadow-3); border: 1px solid rgba(255,255,255,0.07); }
:root[data-theme="dark"] .iphone-frame { background: #2a2d34; }
/* display:block + isolate so Safari actually applies the rounded overflow clip
   (an inline <span> doesn't clip, leaving square screenshot corners). */
.iphone-frame .screen { display: block; position: relative; isolation: isolate; border-radius: 30px; overflow: hidden; background: #000; line-height: 0; aspect-ratio: 9 / 19.5; -webkit-mask-image: -webkit-radial-gradient(white, black); }
.iphone-frame .screen img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: top center; }
.iphone-frame .island { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 58px; height: 18px; border-radius: 10px; background: #0d0e11; z-index: 2; }
/* Phone stands in front of the Mac's lower-right, vertically centred so it never
   towers over or clips above the laptop screen. */
.device-stage .iphone-frame { position: absolute; right: -10px; top: 50%; transform: translateY(-46%); }
.shots-section .container { display: grid; grid-template-columns: minmax(0,1fr) 188px; gap: clamp(24px,5vw,48px); align-items: center; }
.shots-section.flip .container > .shot { order: 2; }
@media (max-width: 960px) {
  .device-stage { padding-bottom: 0; }
  .device-stage .iphone-frame { position: relative; right: auto; top: auto; transform: none; margin: -30px auto 0; }
  .shots-section .container { grid-template-columns: 1fr; justify-items: center; }
  .shots-section.flip .container > .shot { order: 0; }
}

/* Theme-aware screenshots: show light or dark variant with the active theme.
   The .iphone-frame selectors must be listed so they out-specify the
   `.iphone-frame .screen img { display:block }` sizing rule (0,2,1); without
   them both variants would render stacked. */
img.img-dark,
.iphone-frame .screen img.img-dark { display: none; }
:root[data-theme="dark"] img.img-light,
:root[data-theme="dark"] .iphone-frame .screen img.img-light { display: none; }
:root[data-theme="dark"] img.img-dark,
:root[data-theme="dark"] .iphone-frame .screen img.img-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.img-light,
  :root:not([data-theme="light"]) .iphone-frame .screen img.img-light { display: none; }
  :root:not([data-theme="light"]) img.img-dark,
  :root:not([data-theme="light"]) .iphone-frame .screen img.img-dark { display: block; }
}

/* Screenshot gallery / carousel */
.gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 0 22px; scroll-padding-inline: 2px;
  scrollbar-width: thin; scrollbar-color: var(--hairline) transparent;
}
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 99px; }
.gallery > figure { scroll-snap-align: start; flex: 0 0 min(86%, 720px); margin: 0; }
.gallery .shot { margin-bottom: 14px; }
.gallery figcaption { font-size: 0.95rem; font-weight: 650; color: var(--text); padding-left: 2px; }
.gallery figcaption span { display: block; margin-top: 3px; font-weight: 500; color: var(--text-2); }
.gallery:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 6px; border-radius: 8px; }
.gallery-hint { margin-top: 4px; font-size: 0.84rem; color: var(--text-3); }

/* Privacy notice — cookieless analytics transparency (not a consent wall) */
.privacy-banner {
  position: fixed; left: 50%; bottom: 18px; z-index: 200;
  transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  max-width: min(680px, calc(100vw - 28px));
  padding: 13px 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--hairline); border-radius: var(--r);
  box-shadow: var(--shadow-3);
  opacity: 0; transition: transform .28s cubic-bezier(.2,.7,.3,1), opacity .28s ease;
}
.privacy-banner.show { transform: translate(-50%, 0); opacity: 1; }
.privacy-banner p { margin: 0; flex: 1 1 280px; font-size: 0.86rem; line-height: 1.5; color: var(--text-2); }
.privacy-banner strong { color: var(--text); font-weight: 650; }
.privacy-banner a { color: var(--blue-ink); font-weight: 600; }
.privacy-actions { display: flex; gap: 8px; margin-left: auto; }
.pb-btn { cursor: pointer; border-radius: 999px; padding: 8px 16px; font-size: 0.84rem; font-weight: 600;
  border: 1px solid var(--hairline); background: var(--surface-2); color: var(--text); transition: background .12s ease, border-color .12s ease; }
.pb-btn:hover { background: var(--surface); border-color: var(--text-3); }
.pb-ok { background: var(--blue); border-color: var(--blue); color: #fff; }
.pb-ok:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
@media (prefers-reduced-motion: reduce) { .privacy-banner { transition: opacity .2s ease; transform: translate(-50%, 0); } }
@media (max-width: 540px) { .privacy-banner { left: 14px; right: 14px; transform: translateY(140%); } .privacy-banner.show { transform: translateY(0); } .privacy-actions { width: 100%; } .pb-btn { flex: 1; } }
