/* ChargeBase landing — type.
   Archivo for everything read as language, IBM Plex Mono for everything read as
   an instrument: charge point ids, meter values, money, and the section labels.
   Both are self-hosted latin subsets, so the page makes no external request. */

@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/archivo-400-700.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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/plex-mono-400.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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/plex-mono-500.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;
}

/* ChargeBase landing — colour.
   The product is a whitelabel: on this very page a visitor types their own brand
   colour into the previewer and it takes over the phone. So the site's own palette
   stays instrument-grade and lets that be the only loud colour — technical paper,
   graphite equipment surfaces, and a duotone that says what the platform does:
   teal is energy, copper is money. */

:root {
  --base-100: oklch(98.4% 0.004 262);
  --base-150: oklch(97.2% 0.006 262);
  --base-200: oklch(95.6% 0.009 262);
  --base-300: oklch(89.5% 0.013 262);
  --content: oklch(22% 0.038 262);
  --muted: oklch(45% 0.030 260);
  --faint: oklch(60% 0.024 258);

  --primary: oklch(52% 0.215 262);
  --primary-hover: oklch(46% 0.205 262);
  --primary-content: oklch(99% 0.006 262);
  --primary-soft: oklch(52% 0.215 262 / 0.10);
  --secondary: oklch(42% 0.140 268);
  --accent: oklch(54% 0.170 238);
  --accent-soft: oklch(54% 0.170 238 / 0.13);
  --money: oklch(52% 0.115 55);
  --money-soft: oklch(52% 0.115 55 / 0.12);
  --warning: oklch(66% 0.150 70);
  --error: oklch(55% 0.190 25);

  --line: oklch(89% 0.013 262);
  --line-strong: oklch(80% 0.018 262);
  --shadow-sm: 0 1px 2px oklch(22% 0.045 262 / 0.07), 0 1px 1px oklch(22% 0.045 262 / 0.04);
  --shadow-md: 0 10px 30px -14px oklch(22% 0.045 262 / 0.26), 0 2px 6px -2px oklch(22% 0.045 262 / 0.07);
  --shadow-lg: 0 30px 70px -30px oklch(22% 0.045 262 / 0.40), 0 4px 12px -4px oklch(22% 0.045 262 / 0.09);

  --radius-field: 0.5rem;
  --radius-box: 0.85rem;
  --radius-lg: 1.25rem;

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --nav-h: 64px;
  --page: 1180px;
}

[data-theme="dark"] {
  --base-100: oklch(20.5% 0.026 263);
  --base-150: oklch(18.5% 0.028 263);
  --base-200: oklch(16.5% 0.030 263);
  --base-300: oklch(28% 0.030 263);
  --content: oklch(95% 0.008 262);
  --muted: oklch(73% 0.020 260);
  --faint: oklch(58% 0.022 260);

  --primary: oklch(70% 0.175 258);
  --primary-hover: oklch(78% 0.155 256);
  --primary-content: oklch(17% 0.045 265);
  --primary-soft: oklch(70% 0.175 258 / 0.18);
  --secondary: oklch(62% 0.150 268);
  --accent: oklch(80% 0.140 240);
  --accent-soft: oklch(80% 0.140 240 / 0.16);
  --money: oklch(76% 0.110 62);
  --money-soft: oklch(76% 0.110 62 / 0.16);
  --warning: oklch(78% 0.140 70);
  --error: oklch(68% 0.170 25);

  --line: oklch(29% 0.028 263);
  --line-strong: oklch(36% 0.030 263);
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.35);
  --shadow-md: 0 10px 30px -14px oklch(0% 0 0 / 0.6);
  --shadow-lg: 0 30px 70px -30px oklch(0% 0 0 / 0.8);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --base-100: oklch(20.5% 0.026 263);
    --base-150: oklch(18.5% 0.028 263);
    --base-200: oklch(16.5% 0.030 263);
    --base-300: oklch(28% 0.030 263);
    --content: oklch(95% 0.008 262);
    --muted: oklch(73% 0.020 260);
    --faint: oklch(58% 0.022 260);

    --primary: oklch(70% 0.175 258);
    --primary-hover: oklch(78% 0.155 256);
    --primary-content: oklch(17% 0.045 265);
    --primary-soft: oklch(70% 0.175 258 / 0.18);
    --secondary: oklch(62% 0.150 268);
    --accent: oklch(80% 0.140 240);
    --accent-soft: oklch(80% 0.140 240 / 0.16);
    --money: oklch(76% 0.110 62);
    --money-soft: oklch(76% 0.110 62 / 0.16);
    --warning: oklch(78% 0.140 70);
    --error: oklch(68% 0.170 25);

    --line: oklch(29% 0.028 263);
    --line-strong: oklch(36% 0.030 263);
    --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.35);
    --shadow-md: 0 10px 30px -14px oklch(0% 0 0 / 0.6);
    --shadow-lg: 0 30px 70px -30px oklch(0% 0 0 / 0.8);
  }
}

/* ── reset ─────────────────────────────────────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

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

::selection { background: var(--primary-soft); }

/* ── type ──────────────────────────────────────────────────────────────── */

h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.03em; font-weight: 620; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.9rem); letter-spacing: -0.042em; font-weight: 640; }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.9vw, 2.5rem); letter-spacing: -0.035em; font-weight: 640; }
h3 { font-size: 1.18rem; }
p { text-wrap: pretty; }

.lede { font-size: clamp(1.03rem, 0.98rem + 0.4vw, 1.22rem); color: var(--muted); max-width: 62ch; }
.eyebrow {
  font-family: var(--mono); font-weight: 500;
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); display: flex; align-items: center; gap: 0.55rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.5; }
.eyebrow.center { justify-content: center; }
.mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

/* ── layout ────────────────────────────────────────────────────────────── */

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section.tight { padding-block: clamp(2.2rem, 4vw, 3.2rem); }
.section.alt { background: var(--base-200); border-block: 1px solid var(--line); }
.section-head { max-width: 66ch; display: grid; gap: 0.8rem; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }

@media (max-width: 900px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .kpi { padding: 0.55rem 0.6rem; }
  .kpi .k { font-size: 0.62rem; letter-spacing: 0.02em; }
  .kpi .v { font-size: 0.98rem; }
  .feed-row { grid-template-columns: 1fr auto; row-gap: 0.3rem; }
  .feed-row .badge { grid-column: 2; }
}

/* ── nav ───────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in oklab, var(--base-100) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.stuck { border-bottom-color: var(--line); background: color-mix(in oklab, var(--base-100) 92%, transparent); }
.nav .wrap { display: flex; align-items: center; gap: 1rem; }

.brand { display: flex; align-items: center; }
/* The lockup is the wordmark — the name lives in the image, so the link carries
   its own aria-label and the two cuts below both keep alt text for image-off. */
.brand .logo { height: 34px; width: auto; flex: none; }
.brand-lockup .logo { height: 42px; }
@media (max-width: 560px) { .brand .logo { height: 26px; } }

/* Light and dark cuts both ship; CSS picks one, so the swap survives the
   before-paint theme write in each page's <head> without a flash. */
.brand .logo-dark { display: none; }
[data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}
.brand small { font-weight: 500; color: var(--faint); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; }
.nav-links a {
  padding: 0.45rem 0.75rem; border-radius: var(--radius-field);
  font-size: 0.92rem; color: var(--muted); font-weight: 520;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--content); background: var(--base-200); }
.nav-links a.active { color: var(--content); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.5rem; }

.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-field);
  background: var(--base-100); cursor: pointer; color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.icon-btn:hover { color: var(--content); border-color: var(--line-strong); background: var(--base-200); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    padding: 0.75rem clamp(1.1rem, 4vw, 2rem) 1.25rem;
    background: var(--base-100); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav-links[data-open="true"] { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 0.7rem 0.75rem; font-size: 1rem; }
  .nav-actions { margin-left: auto; }
  .nav-actions .btn { display: none; }
}

/* ── buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.62rem 1.1rem; border-radius: var(--radius-field);
  font-size: 0.93rem; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--primary); color: var(--primary-content); box-shadow: var(--shadow-sm); }
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md), 0 0 0 4px color-mix(in oklab, var(--primary) 18%, transparent);
}
.btn-ghost { background: var(--base-100); border-color: var(--line); color: var(--content); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--base-200); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--content); background: var(--base-200); }
.btn-lg { padding: 0.8rem 1.4rem; font-size: 1rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ── badges & pills ────────────────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid var(--line); background: var(--base-100); color: var(--muted);
}
.badge.accent { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 35%, transparent); background: var(--accent-soft); }
.badge.primary { color: var(--primary); border-color: color-mix(in oklab, var(--primary) 32%, transparent); background: var(--primary-soft); }
.dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex: none; }
.dot.live { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ── cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--base-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: clamp(1.15rem, 2vw, 1.5rem);
  display: grid; gap: 0.6rem; align-content: start;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card.hover:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card h3 { letter-spacing: -0.018em; }
.card p { color: var(--muted); font-size: 0.94rem; line-height: 1.55; }
.card h3 + p { margin-top: -0.15rem; }
.card .ico {
  /* a touch larger: the icon is the only colour in the card */
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 0.25rem;
}
.card .ico svg { width: 21px; height: 21px; }
.card.flat { background: var(--base-200); }

.stat { display: grid; gap: 0.2rem; }
.stat .num { font-family: var(--mono); font-size: clamp(1.55rem, 1.1rem + 1.3vw, 2.1rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .label { font-size: 0.83rem; color: var(--muted); }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 5rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(65% 55% at 80% 0%, color-mix(in oklab, var(--primary) 14%, transparent), transparent 72%),
    radial-gradient(45% 40% at 12% 0%, color-mix(in oklab, var(--primary) 7%, transparent), transparent 72%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  opacity: 0.7;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-copy { display: grid; gap: 1.35rem; justify-items: start; }
.hero-copy h1 span { color: var(--primary); }
.trust { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; color: var(--faint); font-size: 0.82rem; }
.trust b { color: var(--muted); font-weight: 600; }

/* ── panel / device mocks ──────────────────────────────────────────────── */

.panel {
  background: var(--base-100); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.panel-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line); background: var(--base-200);
}
.panel-bar .lights { display: flex; gap: 0.35rem; }
.panel-bar .lights i { width: 9px; height: 9px; border-radius: 999px; background: var(--line-strong); display: block; }
.panel-bar .title { font-size: 0.78rem; color: var(--faint); font-family: var(--mono); margin-inline: auto; }
.panel-body { padding: clamp(0.9rem, 2vw, 1.2rem); display: grid; gap: 0.85rem; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.kpi { border: 1px solid var(--line); border-radius: 0.7rem; padding: 0.7rem 0.8rem; background: var(--base-150); display: grid; gap: 0.15rem; }
.kpi .k { font-size: 0.7rem; color: var(--faint); letter-spacing: 0.04em; text-transform: uppercase; }
.kpi .v { font-family: var(--mono); font-size: 1.1rem; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 0.62em; font-weight: 500; color: var(--muted); }

.feed { border: 1px solid var(--line); border-radius: 0.7rem; overflow: hidden; }
.feed-head {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line); background: var(--base-150);
  font-size: 0.74rem; color: var(--muted); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
}
.feed-rows { display: grid; }
.feed-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 0.75rem; align-items: center;
  padding: 0.55rem 0.75rem; border-top: 1px solid var(--line); font-size: 0.82rem;
  animation: rowIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.feed-row:first-child { border-top: 0; }
.feed-row .who { display: grid; gap: 0.1rem; min-width: 0; }
.feed-row .who b { font-weight: 600; font-size: 0.84rem; }
.feed-row .who span { color: var(--faint); font-size: 0.72rem; font-family: var(--mono); }
.feed-row .kwh { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .feed-row { animation: none; } }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 62px; }
.bars i { flex: 1; background: color-mix(in oklab, var(--primary) 28%, transparent); border-radius: 3px 3px 0 0; display: block; transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.bars i.hi { background: var(--primary); }

/* phone mock — used by the white-label previewer */
.phone {
  width: min(268px, 78vw); aspect-ratio: 9 / 18.6;
  border-radius: 2.1rem; padding: 9px;
  background: linear-gradient(160deg, var(--line-strong), var(--base-300));
  box-shadow: var(--shadow-lg); margin-inline: auto;
}
.phone-screen {
  height: 100%; border-radius: 1.6rem; overflow: hidden; position: relative;
  background: var(--wl-bg, var(--base-100)); color: var(--wl-fg, var(--content));
  display: grid; grid-template-rows: auto 1fr auto; transition: background 0.3s ease;
}
.phone-top { padding: 1.1rem 1rem 0.6rem; display: grid; gap: 0.75rem; }
.phone-status { display: flex; justify-content: space-between; font-size: 0.62rem; opacity: 0.55; font-family: var(--mono); }
.wl-brand { display: flex; align-items: center; gap: 0.5rem; }
.wl-logo {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--wl-brand, var(--primary)); color: #fff;
  font-weight: 700; font-size: 0.85rem; flex: none; transition: background 0.3s ease;
}
.wl-name { font-weight: 660; letter-spacing: -0.02em; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-mid { padding: 0.5rem 1rem; display: grid; gap: 0.55rem; align-content: start; }
.wl-card {
  border-radius: 0.85rem; padding: 0.75rem 0.8rem; display: grid; gap: 0.3rem;
  background: color-mix(in oklab, var(--wl-brand, var(--primary)) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--wl-brand, var(--primary)) 22%, transparent);
}
.wl-card .t { font-size: 0.66rem; opacity: 0.6; letter-spacing: 0.05em; text-transform: uppercase; }
.wl-card .v { font-size: 1.35rem; font-weight: 680; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wl-progress { height: 6px; border-radius: 999px; background: color-mix(in oklab, var(--wl-fg, var(--content)) 10%, transparent); overflow: hidden; }
.wl-progress i { display: block; height: 100%; width: 62%; border-radius: 999px; background: var(--wl-brand, var(--primary)); transition: background 0.3s ease, width 1.2s ease; }
.wl-list { display: grid; gap: 0.4rem; }
.wl-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.74rem; opacity: 0.85; }
.wl-item i { width: 7px; height: 7px; border-radius: 999px; background: var(--wl-brand, var(--primary)); flex: none; }
.phone-btm { padding: 0.7rem 1rem 1.1rem; display: grid; gap: 0.6rem; }
.wl-cta {
  border-radius: 0.7rem; padding: 0.6rem; text-align: center; font-size: 0.83rem; font-weight: 640;
  background: var(--wl-brand, var(--primary)); color: #fff; transition: background 0.3s ease;
}
.wl-tabs { display: flex; justify-content: space-between; opacity: 0.45; font-size: 0.6rem; }

/* ── forms ─────────────────────────────────────────────────────────────── */

.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.83rem; font-weight: 600; letter-spacing: -0.005em; }
.field .hint { font-size: 0.76rem; color: var(--faint); }
.field .err { font-size: 0.76rem; color: var(--error); display: none; }
.field.invalid .err { display: block; }

.input, .select, .textarea {
  width: 100%; padding: 0.6rem 0.75rem;
  background: var(--base-100); border: 1px solid var(--line-strong);
  border-radius: var(--radius-field); font-size: 0.94rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--error); }
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem;
}
.input[type="color"] { padding: 0.2rem; height: 42px; cursor: pointer; }

.choices { display: grid; gap: 0.55rem; }
.choices.cols { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.choice {
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: 0.75rem 0.85rem; border: 1px solid var(--line-strong); border-radius: var(--radius-field);
  cursor: pointer; background: var(--base-100);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.choice:hover { border-color: var(--primary); }
.choice input { margin-top: 0.22rem; accent-color: var(--primary); flex: none; }
.choice .c-title { display: block; font-weight: 600; font-size: 0.9rem; }
.choice .c-sub { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }

.swatches { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.swatch {
  width: 30px; height: 30px; border-radius: 999px; cursor: pointer; border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--line-strong); transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--base-100), 0 0 0 4px var(--content); }

/* ── wizard ────────────────────────────────────────────────────────────── */

.wizard { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 940px) { .wizard { grid-template-columns: minmax(0, 1fr); } }

.steps { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; }
.step-pip { flex: 1; display: grid; gap: 0.45rem; }
.step-pip .bar { height: 3px; border-radius: 999px; background: var(--base-300); overflow: hidden; }
.step-pip .bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 999px; transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.step-pip[data-state="done"] .bar i, .step-pip[data-state="current"] .bar i { width: 100%; }
.step-pip[data-state="current"] .bar i { background: var(--primary); }
.step-pip .name { font-size: 0.75rem; color: var(--faint); font-weight: 600; }
.step-pip[data-state="current"] .name, .step-pip[data-state="done"] .name { color: var(--content); }
@media (max-width: 620px) { .step-pip .name { display: none; } }

.step { display: none; gap: 1.1rem; }
.step[data-active="true"] { display: grid; animation: stepIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes stepIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step[data-active="true"] { animation: none; } }
.step-head { display: grid; gap: 0.3rem; }
.step-head h2 { font-size: 1.5rem; }
.step-head p { color: var(--muted); font-size: 0.92rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.wizard-nav { display: flex; gap: 0.7rem; align-items: center; padding-top: 0.4rem; border-top: 1px solid var(--line); margin-top: 0.3rem; padding-block-start: 1.1rem; }
.wizard-nav .spacer { margin-left: auto; }

.review { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-box); overflow: hidden; }
.review-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; padding: 0.6rem 0.9rem; border-top: 1px solid var(--line); font-size: 0.88rem; }
.review-row:first-child { border-top: 0; }
.review-row dt { color: var(--muted); }
.review-row dd { font-weight: 560; word-break: break-word; }
@media (max-width: 520px) { .review-row { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; } }

.done { display: grid; gap: 1rem; justify-items: center; text-align: center; padding: clamp(2rem, 6vw, 4rem) 1rem; }
.done .tick { width: 64px; height: 64px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.done .tick svg { width: 30px; height: 30px; }

/* ── tabs ──────────────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; padding: 0.3rem; background: var(--base-200); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
.tab {
  padding: 0.45rem 0.95rem; border-radius: 999px; border: 0; background: transparent;
  font-size: 0.88rem; font-weight: 580; color: var(--muted); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover { color: var(--content); }
.tab[aria-selected="true"] { background: var(--base-100); color: var(--content); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel[data-active="true"] { display: grid; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── accordion ─────────────────────────────────────────────────────────── */

.acc { border: 1px solid var(--line); border-radius: var(--radius-box); overflow: hidden; background: var(--base-100); }
.acc-item { border-top: 1px solid var(--line); }
.acc-item:first-child { border-top: 0; }
.acc-btn {
  width: 100%; display: flex; align-items: center; gap: 1rem; text-align: left;
  padding: 1rem 1.1rem; background: transparent; border: 0; cursor: pointer;
  font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em;
  transition: background 0.15s ease;
}
.acc-btn:hover { background: var(--base-200); }
.acc-btn .chev { margin-left: auto; width: 16px; height: 16px; color: var(--faint); transition: transform 0.25s ease; flex: none; }
.acc-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.acc-body > div { overflow: hidden; }
.acc-item[data-open="true"] .acc-body { grid-template-rows: 1fr; }
.acc-body p { padding: 0 1.1rem 1.1rem; color: var(--muted); font-size: 0.93rem; max-width: 70ch; }

/* ── steps / timeline ──────────────────────────────────────────────────── */

.flow { display: grid; gap: 0; counter-reset: flow; }
.flow-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 1rem; padding-bottom: 1.6rem; position: relative; }
.flow-item::before {
  counter-increment: flow; content: counter(flow);
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-size: 0.82rem; font-weight: 700;
  border: 1px solid color-mix(in oklab, var(--primary) 25%, transparent);
}
.flow-item::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 1px; background: var(--line); }
.flow-item:last-child { padding-bottom: 0; }
.flow-item:last-child::after { display: none; }
.flow-item h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.flow-item p { color: var(--muted); font-size: 0.92rem; }

/* ── code / diagram ────────────────────────────────────────────────────── */

.code {
  background: var(--base-200); border: 1px solid var(--line); border-radius: var(--radius-box);
  padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--mono); font-size: 0.82rem;
  line-height: 1.7; color: var(--muted); white-space: pre;
}
.code b { color: var(--primary); font-weight: 600; }
.code em { color: var(--accent); font-style: normal; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-box); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); }
thead th { background: var(--base-200); border-top: 0; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 660; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
tr.total td { font-weight: 680; background: var(--base-150); }
tr.total td.num { color: var(--money); }

/* ── calculator ────────────────────────────────────────────────────────── */

/* The native slider is a two-pixel target on a laptop trackpad, so the thumb is
   drawn by hand at a size a thumb can actually catch. The filled part of the track
   is a gradient stop the script moves, since a custom track loses accent-color. */
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; background: transparent; cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--primary) var(--fill, 0%), var(--base-300) var(--fill, 0%));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -8px; border-radius: 999px;
  background: var(--primary); border: 3px solid var(--base-100); box-shadow: var(--shadow-md);
  transition: transform 0.12s ease;
}
.range:active::-webkit-slider-thumb { transform: scale(1.08); }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--primary); outline-offset: 3px; }
.range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--base-300); }
.range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--primary); }
.range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--primary); border: 3px solid var(--base-100); box-shadow: var(--shadow-md);
}
.range-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.85rem; }
.range-row b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.95rem; }

/* ── footer ────────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); background: var(--base-200); padding-block: 3rem 2rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 660; margin-bottom: 0.75rem; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.footer a { font-size: 0.9rem; color: var(--muted); transition: color 0.15s ease; }
.footer a:hover { color: var(--content); }
.footer-btm { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; font-size: 0.83rem; color: var(--faint); }

/* ── cta band ──────────────────────────────────────────────────────────── */

.cta-band {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 5vw, 3.2rem); text-align: center;
  display: grid; gap: 1.1rem; justify-items: center; position: relative; overflow: hidden;
  background:
    radial-gradient(80% 120% at 50% 0%, color-mix(in oklab, var(--primary) 12%, transparent), transparent 70%),
    var(--base-150);
}

/* ── reveal ────────────────────────────────────────────────────────────── */

/* Opacity and transform only: a filter here would promote every section to its
   own compositing layer for the sake of a blur nobody asked for. */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

.page { display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; }

.skip {
  position: absolute; left: 1rem; top: -60px; z-index: 100;
  background: var(--primary); color: var(--primary-content);
  padding: 0.55rem 0.9rem; border-radius: var(--radius-field); font-size: 0.9rem; font-weight: 600;
  transition: top 0.2s ease;
}
.skip:focus { top: 1rem; }

/* ── pricing tiers ──────────────────────────────────────────────────────── */

.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 1060px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiers { grid-template-columns: minmax(0, 1fr); } }

.tier {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--base-100);
  padding: clamp(1.25rem, 2vw, 1.65rem); display: grid; gap: 0.9rem; align-content: start;
  position: relative; transition: border-color 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.tier:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tier[data-featured] { border-color: color-mix(in oklab, var(--primary) 40%, transparent); box-shadow: var(--shadow-md); }
.tier[data-featured]::before {
  content: attr(data-featured); position: absolute; top: -0.7rem; left: clamp(1.1rem, 2vw, 1.5rem);
  background: var(--primary); color: var(--primary-content); font-size: 0.68rem; font-weight: 680;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 0.22rem 0.55rem; border-radius: 999px;
}
.tier h3 { font-size: 1.15rem; letter-spacing: -0.02em; }
.tier .tier-sub { color: var(--muted); font-size: 0.86rem; }
/* Four abreast, the prices should line up across the cards whatever the blurb
   above them ran to. Below that the cards stack and the reserve is just a gap. */
@media (min-width: 1061px) { .tier .tier-sub { min-height: 6.4em; } }
.tier .tier-price { display: grid; gap: 0.15rem; padding-block: 0.35rem; }
.tier .tier-price .amount { font-family: var(--mono); font-size: clamp(1.4rem, 1.15rem + 0.8vw, 1.75rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tier .tier-price .per { font-size: 0.8rem; color: var(--faint); }
.tier .tier-meta { display: grid; gap: 0.3rem; padding: 0.6rem 0.7rem; border-radius: var(--radius-field); background: var(--base-200); font-size: 0.8rem; }
.tier .tier-meta .row { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.tier .tier-meta .row b { font-variant-numeric: tabular-nums; }
.tier ul, .ticks { list-style: none; padding: 0; display: grid; gap: 0.45rem; font-size: 0.86rem; color: var(--muted); }
.tier ul li, .ticks li { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 0.5rem; align-items: start; }
.tier ul li::before, .ticks li::before {
  content: ""; margin-top: 0.34em; width: 11px; height: 6px; border: 1.8px solid var(--accent);
  border-top: 0; border-right: 0; transform: rotate(-45deg);
}
.tier ul li.no { opacity: 0.55; }
.tier ul li.no::before { border: 0; width: 11px; height: 1.6px; background: var(--faint); transform: none; margin-top: 0.62em; }
.tier .btn { justify-content: center; }

.price-switch { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }
.price-switch .select { width: auto; min-width: 190px; padding-block: 0.4rem; font-size: 0.85rem; }

/* ── plan picker (wizard) ──────────────────────────────────────────────── */

.plan-choices { display: grid; gap: 0.6rem; }
.plan-choice {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 0.75rem; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius-box); padding: 0.85rem 0.95rem;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-choice:hover { border-color: var(--primary); }
.plan-choice input { margin-top: 0.28rem; accent-color: var(--primary); }
.plan-choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.plan-choice .p-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; justify-content: space-between; }
.plan-choice .p-name { font-weight: 640; font-size: 0.98rem; letter-spacing: -0.015em; }
.plan-choice .p-price { font-size: 0.88rem; font-weight: 620; font-variant-numeric: tabular-nums; }
.plan-choice .p-sub { display: block; font-size: 0.83rem; color: var(--muted); margin-top: 0.2rem; }
.plan-choice .p-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.plan-choice .p-tags span { font-size: 0.72rem; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.45rem; }

.order { display: grid; gap: 0.5rem; border: 1px solid var(--line); border-radius: var(--radius-box); padding: 0.9rem 1rem; background: var(--base-150); }
.order .row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; font-size: 0.88rem; }
.order .row b { font-variant-numeric: tabular-nums; }
.order .row.due { padding-top: 0.55rem; border-top: 1px solid var(--line); font-weight: 660; }
.order .row.due b { font-size: 1.25rem; color: var(--money); font-family: var(--mono); font-weight: 500; }
.order .note { font-size: 0.78rem; color: var(--faint); }

/* ── flow diagram ──────────────────────────────────────────────────────── */

/* Boxes and connectors in plain CSS rather than an ASCII drawing: the text
   stays selectable and sized in rem, and the whole thing turns vertical on a
   phone instead of shrinking into unreadability. */

.diagram { display: grid; grid-template-columns: minmax(0, 1fr) 124px minmax(0, 1fr) 124px minmax(0, 1fr); align-items: center; gap: 0.5rem; }
.dg-node {
  border: 1px solid var(--line); border-radius: var(--radius-box); background: var(--base-100);
  padding: 0.8rem 0.9rem; display: grid; gap: 0.2rem; min-width: 0;
}
.dg-node .dg-k { font-weight: 640; font-size: 0.92rem; letter-spacing: -0.015em; }
.dg-node .dg-v { font-size: 0.79rem; color: var(--muted); }
.dg-node.hub { background: var(--primary-soft); border-color: color-mix(in oklab, var(--primary) 35%, transparent); }
.dg-node.hub .dg-k { color: var(--primary); }
.dg-outs { display: grid; gap: 0.5rem; min-width: 0; }

.dg-link { position: relative; height: 1px; background: var(--line-strong); }
.dg-link::after {
  content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  border: 5px solid transparent; border-left-color: var(--line-strong); border-right: 0;
}
.dg-link span {
  position: absolute; left: 50%; bottom: 0.45rem; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.64rem; color: var(--faint); white-space: nowrap;
}

@media (max-width: 860px) {
  .diagram { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dg-link { width: 1px; height: 42px; margin-inline: auto; background: var(--line-strong); }
  .dg-link::after { right: auto; left: 50%; top: auto; bottom: -1px; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: var(--line-strong); border-bottom: 0; }
  .dg-link span { left: calc(50% + 0.7rem); bottom: 50%; transform: translateY(50%); }
}

/* ── media slots ───────────────────────────────────────────────────────── */

/* Frames for real screenshots, photos and video. Each one takes an <img>, a
   <video> or an <iframe> as its only child; until an asset is dropped in, the
   .media-ph placeholder holds the frame open at the right aspect ratio so the
   page never reflows when the real thing arrives. */

.media {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  background: var(--base-200); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.media.wide { aspect-ratio: 2 / 1; }
.media.square { aspect-ratio: 1 / 1; }
.media.tall { aspect-ratio: 3 / 4; }
.media.free { aspect-ratio: auto; }
.media > img, .media > video, .media > iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }

.media-ph {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 0.45rem; text-align: center; padding: 1.2rem; color: var(--faint);
  background:
    radial-gradient(90% 80% at 50% 0%, var(--primary-soft), transparent 70%),
    linear-gradient(to bottom, var(--base-150), var(--base-200));
  box-shadow: inset 0 0 0 1px var(--line);
}
.media-ph svg { width: 26px; height: 26px; opacity: 0.55; margin-bottom: 0.15rem; }
.media-ph b { font-weight: 620; font-size: 0.92rem; color: var(--muted); letter-spacing: -0.015em; }
.media-ph span { font-size: 0.78rem; max-width: 34ch; }

.media .play {
  position: absolute; left: 1rem; bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem; border-radius: 999px; font-size: 0.83rem; font-weight: 620;
  color: var(--content); background: color-mix(in oklab, var(--base-100) 86%, transparent);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); backdrop-filter: blur(8px);
}
.media .play i {
  width: 26px; height: 26px; border-radius: 999px; background: var(--primary);
  display: grid; place-items: center; flex: none;
}
.media .play i::before {
  content: ""; border: 6px solid transparent; border-left-color: var(--primary-content);
  border-right: 0; margin-left: 3px;
}

.media-cap { margin-top: 0.7rem; font-size: 0.86rem; color: var(--muted); }
.media-cap b { display: block; color: var(--content); font-weight: 620; letter-spacing: -0.015em; }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 860px) { .shots { grid-template-columns: minmax(0, 1fr); } }

/* ── cinematic hero ────────────────────────────────────────────────────── */

/* Full-bleed picture or video with the copy sitting on it. The scrim is a
   fixed dark gradient rather than a themed colour, because the text over it
   has to stay legible whatever the asset behind it turns out to be — so the
   hero reads the same in light and dark mode. */

.hero-cinema {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: center;
  border-bottom: 1px solid var(--line);
}
.hero-cinema .hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-cinema .hero-bg > img, .hero-cinema .hero-bg > video, .hero-cinema .hero-bg > iframe {
  width: 100%; height: 100%; object-fit: cover; border: 0;
}
/* Until a real asset is dropped in, the hero paints itself: brand gradient,
   faint grid, and a dashed note in the corner saying what belongs here. */
.hero-bg.empty {
  background:
    radial-gradient(75% 100% at 82% 8%, oklch(58% 0.200 255), transparent 60%),
    radial-gradient(60% 85% at 6% 96%, oklch(48% 0.190 265 / 0.55), transparent 62%),
    linear-gradient(168deg, oklch(26% 0.070 264), oklch(14% 0.045 265));
}
.hero-bg.empty::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background:
    repeating-linear-gradient(to right, oklch(100% 0 0 / 0.05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, oklch(100% 0 0 / 0.05) 0 1px, transparent 1px 64px);
}
.hero-cinema::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, oklch(12% 0.040 264 / 0.92) 0%, oklch(12% 0.040 264 / 0.6) 45%, oklch(12% 0.040 264 / 0.12) 100%),
    linear-gradient(to right, oklch(12% 0.040 264 / 0.72) 0%, transparent 62%);
}

.hero-cinema .wrap {
  padding-block: clamp(2.8rem, 6vw, 4.5rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 3.5rem); align-items: center;
}
@media (max-width: 980px) { .hero-cinema .wrap { grid-template-columns: minmax(0, 1fr); } }
.hero-cinema h1 { font-size: clamp(2.2rem, 1.5rem + 2.2vw, 3.3rem); }
.hero-cinema .hero-copy { color: oklch(98% 0.004 265); max-width: 34ch; gap: 1.15rem; }
.hero-cinema .hero-copy .lede { color: oklch(90% 0.01 265); max-width: 34ch; font-size: 1.05rem; }

/* The product does the selling: a real panel, lifted off the picture behind it. */
.hero-visual { position: relative; }
.hero-visual .panel {
  box-shadow: 0 40px 90px -40px oklch(0% 0 0 / 0.75), 0 8px 24px -12px oklch(0% 0 0 / 0.5);
  border-color: oklch(100% 0 0 / 0.16);
}
@media (max-width: 980px) { .hero-visual { display: none; } }
.hero-cinema .hero-copy h1 span { color: oklch(84% 0.135 245); }
.hero-cinema .badge { color: oklch(96% 0.01 265); border-color: oklch(100% 0 0 / 0.28); background: oklch(100% 0 0 / 0.12); backdrop-filter: blur(6px); }

/* A ghost button on a photograph needs its own treatment: the page one would
   disappear into whatever is behind it. */
.btn-glass {
  background: oklch(100% 0 0 / 0.14); color: oklch(98% 0.004 265);
  border-color: oklch(100% 0 0 / 0.34); backdrop-filter: blur(8px);
}
.btn-glass:hover { background: oklch(100% 0 0 / 0.24); border-color: oklch(100% 0 0 / 0.5); }

.hero-note {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 1;
  display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.7rem;
  border: 1px dashed oklch(100% 0 0 / 0.4); border-radius: 999px;
  color: oklch(100% 0 0 / 0.72); font-size: 0.72rem; font-family: var(--mono);
}
.hero-note svg { width: 14px; height: 14px; }

/* The proof strip directly under the hero. */
.hero-strip { background: var(--base-200); border-bottom: 1px solid var(--line); }
.hero-strip .wrap {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.5rem 0; padding-block: 1rem; font-size: 0.87rem; color: var(--muted);
}
.hero-strip .wrap > span { padding-inline: clamp(1rem, 3vw, 2.2rem); }
.hero-strip .wrap > span + span { border-left: 1px solid var(--line); }
@media (max-width: 640px) { .hero-strip .wrap > span + span { border-left: 0; } }
.hero-strip b { color: var(--content); font-weight: 620; }

/* ── numbered steps ────────────────────────────────────────────────────── */

/* Four abreast, one sentence each: the whole of "how it works" in a band you
   can read without scrolling twice. */

.step-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.8rem, 1.6vw, 1.1rem); }
@media (max-width: 900px) { .step-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .step-cards { grid-template-columns: minmax(0, 1fr); } }

.step-card {
  border: 1px solid var(--line); border-radius: var(--radius-box); background: var(--base-100);
  padding: clamp(1.1rem, 1.8vw, 1.35rem); display: flex; flex-direction: column; gap: 0.5rem;
  transition: border-color 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.step-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.step-card .n {
  width: 30px; height: 30px; border-radius: 0.6rem; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500; font-variant-numeric: tabular-nums;
}
.step-card h3 { font-size: 1rem; }
.step-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.5; flex: 1; }
.step-card .foot {
  margin-top: 0.35rem; padding-top: 0.6rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.7rem; color: var(--faint);
}

/* ── motion ────────────────────────────────────────────────────────────── */

/* The charge line: a hairline across the top of the window that fills as the
   page is read, and settles to the accent when it is full. Decoration, but
   decoration the subject earns — it is the only literal thing on the site.
   Added by script, so it never exists for a reduced-motion visitor. */
.charge-line {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90;
  background: color-mix(in oklab, var(--line) 70%, transparent); pointer-events: none;
}
.charge-line i {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(to right, var(--primary), color-mix(in oklab, var(--primary) 60%, var(--accent)));
  box-shadow: 0 0 10px color-mix(in oklab, var(--primary) 55%, transparent);
  transition: background 0.4s ease;
}
.charge-line[data-full="true"] i { background: var(--accent); box-shadow: 0 0 12px color-mix(in oklab, var(--accent) 60%, transparent); }

/* Parallax is applied to these two by script; declaring the property here keeps
   the compositor from promoting them until it has to. */
.hero-cinema .hero-bg { will-change: auto; }
.hero-cinema .hero-visual { transition: none; }

/* Hover: cards pick up a hairline of current rather than just a shadow. */
.card.hover:hover, .step-card:hover {
  border-color: color-mix(in oklab, var(--primary) 45%, var(--line));
  box-shadow: var(--shadow-md), 0 0 0 1px color-mix(in oklab, var(--primary) 22%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .charge-line { display: none; }
}

/* ── the hero card: two faces, one object ──────────────────────────────── */

/* The operator's dashboard and the driver's app are the same product seen from
   two sides, so they are two faces of one card rather than two pictures. */

.hero-visual { perspective: 1600px; }
.hero-visual .tilt {
  transform-style: preserve-3d;
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  will-change: transform;
}
.hero-visual .flip {
  position: relative; transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
  min-height: 430px;
}
.hero-visual .flip[data-face="back"] { transform: rotateY(180deg); }
.flip-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-face.front { position: relative; }
.flip-face.back {
  position: absolute; inset: 0; transform: rotateY(180deg);
  display: grid; place-items: center;
}
.flip-face.back .phone { width: 232px; transform: scale(0.94); }
.flip-face.back .wl-logo { background: var(--primary); }
.flip-face.back .wl-cta { background: var(--primary); color: var(--primary-content); }
.flip-face.back .wl-item i, .flip-face.back .wl-progress i { background: var(--primary); }

.flip-toggle {
  display: flex; gap: 0.25rem; margin-top: 1rem; justify-content: center;
  padding: 0.25rem; border-radius: 999px; width: fit-content; margin-inline: auto;
  background: oklch(100% 0 0 / 0.08); border: 1px solid oklch(100% 0 0 / 0.16);
  backdrop-filter: blur(8px);
}
.flip-toggle button {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  padding: 0.4rem 0.85rem; font-size: 0.78rem; font-weight: 600;
  color: oklch(100% 0 0 / 0.62); transition: background 0.25s ease, color 0.25s ease;
}
.flip-toggle button:hover { color: oklch(100% 0 0 / 0.9); }
.flip-toggle button[aria-pressed="true"] { background: oklch(100% 0 0 / 0.16); color: oklch(99% 0.004 265); }

/* The network under the hero: a canvas of nodes that energise around the
   pointer. Sized to the device pixel ratio, and the loop only runs while the
   hero is on screen and something is still moving. */
.hero-field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-visual .tilt { transform: none; }
  .hero-visual .flip { transition: none; }
}
@media (max-width: 980px) { .flip-toggle { display: none; } }

/* A charge point is a place first and an identifier second, so tables name the
   site and keep the OCPP id underneath it — the same pairing the live feed uses,
   and it comes from the same SITES list in site.js. */
.id-cell { display: grid; gap: 0.05rem; }
.id-cell b { font-weight: 600; }
.id-cell > span { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
