/* Copyright 2026 Cocktails Inc. All rights reserved.
 * Device Fabrik Link - marketing site stylesheet.
 * Single file, no build step, no external dependency. Dark first, light theme supported through
 * prefers-color-scheme and an explicit data-theme attribute set by the header toggle.
 * ------------------------------------------------------------------------------------------- */

/* ---------------------------------------------------------------- design tokens */

:root {
  color-scheme: dark;

  --bg:          #070c15;
  --bg-2:        #0a1120;
  --surface:     #0e1727;
  --surface-2:   #131f33;
  --surface-3:   #18263d;
  --line:        #1f3050;
  --line-soft:   rgba(255, 255, 255, .07);
  --text:        #e9effb;
  --muted:       #9aabc6;
  --dim:         #6f83a3;

  --acc:         #2fd6b4;
  --acc-ink:     #04211c;
  --acc-soft:    rgba(47, 214, 180, .12);
  --acc-line:    rgba(47, 214, 180, .32);
  --acc-2:       #7b93ff;
  --acc-2-soft:  rgba(123, 147, 255, .14);

  --ok:          #35d18d;
  --warn:        #f2b544;
  --err:         #f4707f;
  --neutral:     #7f92b0;

  --grid-line:   rgba(120, 160, 220, .07);
  --glow-1:      rgba(47, 214, 180, .18);
  --glow-2:      rgba(107, 132, 255, .16);

  --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
  --shadow:      0 18px 40px -22px rgba(0, 0, 0, .85);
  --shadow-lg:   0 44px 90px -40px rgba(0, 0, 0, .9);

  --r-xs: 6px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 7rem;

  --wrap: 1200px;

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .68, .36, 1);
}

/* Light theme: applied when the OS asks for it and no explicit choice was made ... */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --bg:        #ffffff;
    --bg-2:      #f5f8fd;
    --surface:   #ffffff;
    --surface-2: #f3f7fd;
    --surface-3: #e9f0fa;
    --line:      #d9e3f2;
    --line-soft: rgba(11, 22, 44, .08);
    --text:      #0a1526;
    --muted:     #4d5f7a;
    --dim:       #6d7e99;

    --acc:       #0d9c85;
    --acc-ink:   #ffffff;
    --acc-soft:  rgba(13, 156, 133, .1);
    --acc-line:  rgba(13, 156, 133, .3);
    --acc-2:     #4257d8;
    --acc-2-soft: rgba(66, 87, 216, .1);

    --ok:        #128a5c;
    --warn:      #a46a00;
    --err:       #c8394c;
    --neutral:   #64748b;

    --grid-line: rgba(20, 60, 120, .06);
    --glow-1:    rgba(13, 156, 133, .13);
    --glow-2:    rgba(66, 87, 216, .1);

    --shadow-sm: 0 1px 2px rgba(16, 32, 64, .07);
    --shadow:    0 18px 40px -26px rgba(16, 32, 64, .35);
    --shadow-lg: 0 44px 80px -44px rgba(16, 32, 64, .38);
  }
}

/* ... and always applied when the visitor explicitly picked it. */
:root[data-theme="light"] {
  color-scheme: light;

  --bg:        #ffffff;
  --bg-2:      #f5f8fd;
  --surface:   #ffffff;
  --surface-2: #f3f7fd;
  --surface-3: #e9f0fa;
  --line:      #d9e3f2;
  --line-soft: rgba(11, 22, 44, .08);
  --text:      #0a1526;
  --muted:     #4d5f7a;
  --dim:       #6d7e99;

  --acc:       #0d9c85;
  --acc-ink:   #ffffff;
  --acc-soft:  rgba(13, 156, 133, .1);
  --acc-line:  rgba(13, 156, 133, .3);
  --acc-2:     #4257d8;
  --acc-2-soft: rgba(66, 87, 216, .1);

  --ok:        #128a5c;
  --warn:      #a46a00;
  --err:       #c8394c;
  --neutral:   #64748b;

  --grid-line: rgba(20, 60, 120, .06);
  --glow-1:    rgba(13, 156, 133, .13);
  --glow-2:    rgba(66, 87, 216, .1);

  --shadow-sm: 0 1px 2px rgba(16, 32, 64, .07);
  --shadow:    0 18px 40px -26px rgba(16, 32, 64, .35);
  --shadow-lg: 0 44px 80px -44px rgba(16, 32, 64, .38);
}

/* ---------------------------------------------------------------- base */

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

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }

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

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

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

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; font-weight: 650; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

::selection { background: var(--acc); color: var(--acc-ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--acc); color: var(--acc-ink);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip:focus { left: 0; }

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

.ic { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- typography helpers */

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--acc);
  margin-bottom: var(--sp-3);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: currentColor; opacity: .55;
}

h1, .h1 { font-size: clamp(2.1rem, 1.35rem + 2.5vw, 3.4rem); line-height: 1.08; }
h2, .h2 { font-size: clamp(1.65rem, 1.15rem + 1.75vw, 2.5rem); }
h3, .h3 { font-size: clamp(1.12rem, 1rem + .45vw, 1.35rem); }

.lede { font-size: clamp(1.02rem, .97rem + .35vw, 1.2rem); color: var(--muted); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.accent {
  background: linear-gradient(100deg, var(--acc) 10%, var(--acc-2) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.35rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .ic { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(100deg, var(--acc), #35c9d8);
  color: var(--acc-ink);
  box-shadow: 0 10px 30px -12px var(--glow-1), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-primary:hover { box-shadow: 0 16px 38px -12px var(--glow-1), inset 0 1px 0 rgba(255, 255, 255, .35); }

.btn-ghost {
  background: var(--surface-2); color: var(--text); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--acc-line); background: var(--surface-3); }

.btn-quiet { background: transparent; color: var(--text); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--acc-line); color: var(--acc); }

.btn-sm { padding: .6rem 1rem; font-size: .875rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 600;
}
.link-arrow .ic { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.link-arrow:hover .ic { transform: translateX(3px); }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }

.header-inner { display: flex; align-items: center; gap: var(--sp-5); min-height: 72px; min-width: 0; }
.header-inner > * { min-width: 0; }

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); font-weight: 700; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.02rem; }
.brand-name b { font-weight: 700; }
.brand-note {
  display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim); font-weight: 500; margin-top: 1px;
}

.nav { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.nav a.nav-link {
  color: var(--muted); font-size: .93rem; font-weight: 500;
  padding: .5rem .7rem; border-radius: var(--r-sm);
}
.nav a.nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.nav-link.is-active { color: var(--acc); }

.header-tools { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  width: 38px; height: 38px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  cursor: pointer; transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.icon-btn:hover { color: var(--acc); border-color: var(--acc-line); background: var(--acc-soft); }

.lang-btn { width: auto; padding-inline: .8rem; font-size: .85rem; font-weight: 600; letter-spacing: .02em; }
.lang-btn:hover { text-decoration: none; }

.theme-btn .ic-moon { display: none; }
:root[data-theme="light"] .theme-btn .ic-moon { display: block; }
:root[data-theme="light"] .theme-btn .ic-sun { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .ic-moon { display: block; }
  :root:not([data-theme="dark"]) .theme-btn .ic-sun { display: none; }
}

/* Mobile navigation: native <details>, so it works with JavaScript disabled. */
.mobile-nav { display: none; position: relative; }
.mobile-nav > summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
}
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav > summary .ic-close { display: none; }
.mobile-nav[open] > summary .ic-close { display: block; }
.mobile-nav[open] > summary .ic-menu { display: none; }
.mobile-panel {
  position: absolute; right: 0; top: calc(100% + 12px); width: min(84vw, 300px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: var(--sp-3); display: grid; gap: 2px;
}
.mobile-panel a {
  color: var(--text); padding: .7rem .85rem; border-radius: var(--r-sm); font-weight: 500;
}
.mobile-panel a:hover { background: var(--surface-2); text-decoration: none; }
.mobile-panel .btn { margin-top: var(--sp-2); }

@media (max-width: 960px) {
  .nav .nav-link { display: none; }
  .mobile-nav { display: block; }
}
/* Below this width the header CTA would push the row past the viewport; the call to action
   lives in the drawer instead. */
@media (max-width: 720px) {
  .header-tools > .btn { display: none; }
  .header-inner { gap: var(--sp-3); }
}
@media (max-width: 420px) {
  .brand-note { display: none; }
  .brand-name { font-size: .95rem; }
  .brand-mark { width: 30px; height: 30px; }
}

/* ---------------------------------------------------------------- layout primitives */

.section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); position: relative; }
.section--tint { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 1rem + 3vw, 3.4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p { margin-top: var(--sp-4); }

.grid { display: grid; gap: clamp(1rem, .6rem + 1.2vw, 1.6rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.3rem, 1rem + 1vw, 1.8rem);
  position: relative;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { border-color: var(--acc-line); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: var(--sp-3); }
.card p { color: var(--muted); font-size: .95rem; }

.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: var(--sp-4);
  background: var(--acc-soft); border: 1px solid var(--acc-line); color: var(--acc);
}
.icon-tile .ic { width: 21px; height: 21px; }

.ticks { display: grid; gap: .5rem; margin-top: var(--sp-4); }
.ticks li {
  display: grid; grid-template-columns: 18px 1fr; gap: .6rem; align-items: start;
  font-size: .9rem; color: var(--muted);
}
.ticks .ic { width: 15px; height: 15px; color: var(--acc); margin-top: 4px; }

/* ---------------------------------------------------------------- hero */

.hero { position: relative; padding-top: clamp(3rem, 1.5rem + 5vw, 5.5rem); padding-bottom: clamp(3rem, 2rem + 5vw, 6rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 780px; pointer-events: none;
  background:
    radial-gradient(58% 46% at 22% 28%, var(--glow-1), transparent 68%),
    radial-gradient(52% 44% at 82% 12%, var(--glow-2), transparent 66%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 60% at 50% 26%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 26%, #000 30%, transparent 78%);
}
.hero > * { position: relative; z-index: 1; }

.hero-grid { display: grid; gap: clamp(2.2rem, 1rem + 4vw, 3.6rem); align-items: center; }
@media (min-width: 1060px) { .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr); } }

.badge {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .38rem .85rem .38rem .5rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .8rem; color: var(--muted); margin-bottom: var(--sp-5);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }

.hero h1 { margin-bottom: var(--sp-5); font-size: clamp(1.95rem, 1.35rem + 2vw, 2.9rem); }
.hero .lede { max-width: 56ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--sp-6); }

.hero-bullets { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: var(--sp-5); }
.hero-bullets li { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--muted); }
.hero-bullets .ic { width: 15px; height: 15px; color: var(--acc); }

.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: var(--sp-7); max-width: 34rem; }
@media (max-width: 420px) { .chips { grid-template-columns: 1fr; } }
.chip {
  border: 1px solid var(--line); border-radius: var(--r); padding: .75rem .9rem;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.chip b { display: block; font-family: var(--mono); font-size: .95rem; color: var(--acc); letter-spacing: -.01em; }
.chip span { display: block; font-size: .78rem; color: var(--dim); margin-top: 2px; line-height: 1.35; }

/* ---------------------------------------------------------------- product mockups */

.mock {
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.mock-chrome {
  display: flex; align-items: center; gap: .55rem; padding: .7rem .95rem;
  border-bottom: 1px solid var(--line-soft); background: color-mix(in srgb, var(--surface-3) 60%, transparent);
}
.mock-dots { display: flex; gap: 5px; }
.mock-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.mock-url {
  margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--dim);
  border: 1px solid var(--line-soft); border-radius: 999px; padding: .18rem .7rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%;
}
.mock-body { padding: clamp(.9rem, .6rem + .8vw, 1.35rem); display: grid; gap: 1rem; }

.mock-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.mock-title { font-weight: 650; font-size: .98rem; }
.mock-pill {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .04em;
  border: 1px solid var(--line); border-radius: 999px; padding: .2rem .6rem; color: var(--muted);
}
.mock-pill.is-acc { color: var(--acc); border-color: var(--acc-line); background: var(--acc-soft); }
.mock-topbar .mock-pill:last-child { margin-left: auto; }

.mock-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
@media (max-width: 620px) { .mock-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mock-tile {
  border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: .6rem .7rem;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.mock-tile b { display: block; font-size: 1.12rem; font-family: var(--mono); letter-spacing: -.02em; }
.mock-tile span { display: block; font-size: .68rem; color: var(--dim); line-height: 1.3; margin-top: 2px; }

.mock-chart { border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: .75rem .8rem .55rem; background: color-mix(in srgb, var(--surface) 45%, transparent); }
.mock-chart svg { width: 100%; height: auto; }
.bar-ok   { fill: var(--ok); }
.bar-warn { fill: var(--warn); }
.bar-err  { fill: var(--err); }
.line-dash { fill: none; stroke: var(--acc-2); stroke-width: 1.8; stroke-dasharray: 4 3; }
/* Halo drawn under the dashed series so it stays readable on top of the bars. */
.line-halo { fill: none; stroke: var(--surface); stroke-width: 4.5; opacity: .85; }
.grid-line { stroke: var(--line-soft); stroke-width: 1; }

.mock-legend { display: flex; flex-wrap: wrap; gap: .35rem .95rem; margin-top: .5rem; }
.mock-legend li { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; color: var(--dim); }
.mock-legend i { width: 9px; height: 9px; border-radius: 2px; display: block; }
.sw-ok { background: var(--ok); } .sw-warn { background: var(--warn); }
.sw-err { background: var(--err); } .sw-dash { background: var(--acc-2); }

.mock-strip {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: .6rem .7rem;
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}
.mock-strip .asn { font-family: var(--mono); font-size: .72rem; color: var(--acc); }
.step-chip {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .03em;
  border: 1px solid var(--line); border-radius: 999px; padding: .15rem .5rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: .25rem;
}
.step-chip.pass { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.step-chip.fail { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.step-chip .ic { width: 11px; height: 11px; }
.mock-foot { font-size: .68rem; color: var(--dim); font-family: var(--mono); letter-spacing: .04em; }

/* comparative table mockup */
.mock-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.mock-table th, .mock-table td { padding: .5rem .55rem; text-align: right; border-bottom: 1px solid var(--line-soft); }
.mock-table th:first-child, .mock-table td:first-child { text-align: left; }
.mock-table thead th { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; }
.mock-table thead th:last-child { color: var(--acc); }
.mock-table td b { font-family: var(--mono); font-weight: 600; }
.mock-table tbody tr:last-child td { border-bottom: 0; }

.delta {
  display: inline-flex; align-items: center; gap: .15rem; font-family: var(--mono);
  font-size: .62rem; padding: .06rem .38rem; border-radius: 999px; margin-left: .3rem;
  border: 1px solid transparent;
}
.delta.ok   { color: var(--ok);   background: color-mix(in srgb, var(--ok) 14%, transparent);   border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.delta.err  { color: var(--err);  background: color-mix(in srgb, var(--err) 14%, transparent);  border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.delta.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.delta.neutral { color: var(--neutral); background: color-mix(in srgb, var(--neutral) 12%, transparent); border-color: var(--line); }

.spark { width: 62px; height: 20px; display: inline-block; vertical-align: middle; }
.spark path { fill: none; stroke: var(--acc); stroke-width: 1.6; }

.insight {
  display: flex; align-items: flex-start; gap: .5rem; font-size: .74rem; color: var(--muted);
  border: 1px solid var(--line-soft); border-left: 2px solid var(--warn);
  border-radius: var(--r-xs); padding: .5rem .65rem; background: color-mix(in srgb, var(--warn) 7%, transparent);
}
.insight .ic { width: 15px; height: 15px; color: var(--warn); margin-top: 2px; }

/* pool mockup */
.pool-row { display: grid; gap: .45rem; }
.pool-head { display: flex; align-items: baseline; justify-content: space-between; font-size: .76rem; }
.pool-head b { font-family: var(--mono); }
.pool-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pool-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.pool-bar.is-low i { background: linear-gradient(90deg, var(--warn), var(--err)); }

.id-list { display: grid; gap: .35rem; }
.id-list li {
  display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .72rem;
  border: 1px solid var(--line-soft); border-radius: var(--r-xs); padding: .38rem .55rem;
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}
.id-list .tag { font-size: .6rem; letter-spacing: .06em; color: var(--dim); text-transform: uppercase; }
.id-list .val { color: var(--text); }
.id-list .state { margin-left: auto; font-size: .62rem; color: var(--ok); }

/* eco lifecycle mockup */
.eco-flow { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.eco-node {
  flex: 1 1 90px; text-align: center; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .55rem .4rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .05em;
  color: var(--dim); background: color-mix(in srgb, var(--surface) 50%, transparent);
}
.eco-node.is-active { color: var(--acc); border-color: var(--acc-line); background: var(--acc-soft); box-shadow: 0 0 0 3px var(--acc-soft); }
.eco-node.is-done { color: var(--muted); }
.eco-arrow { color: var(--dim); }
.eco-arrow .ic { width: 16px; height: 16px; }

.kv { display: grid; gap: .35rem; }
.kv li { display: flex; justify-content: space-between; gap: .8rem; font-size: .75rem; border-bottom: 1px dashed var(--line-soft); padding-bottom: .35rem; }
.kv li:last-child { border-bottom: 0; }
.kv .k { color: var(--dim); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.kv .v { font-family: var(--mono); color: var(--text); }

.gate {
  display: flex; align-items: center; gap: .5rem; font-size: .74rem; color: var(--acc);
  border: 1px dashed var(--acc-line); border-radius: var(--r-xs); padding: .45rem .6rem;
  background: var(--acc-soft);
}
.gate .ic { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- problem cards */

.problem-card { border-left: 2px solid var(--err); }
.problem-card .icon-tile {
  background: color-mix(in srgb, var(--err) 12%, transparent);
  border-color: color-mix(in srgb, var(--err) 30%, transparent);
  color: var(--err);
}
.pivot {
  margin-top: clamp(1.6rem, 1rem + 2vw, 2.6rem); text-align: center;
  font-size: clamp(1.05rem, 1rem + .5vw, 1.35rem); font-weight: 600; max-width: 62ch;
  margin-inline: auto;
}

/* ---------------------------------------------------------------- steps */

.steps { display: grid; gap: clamp(1rem, .6rem + 1.2vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.step { position: relative; padding-top: var(--sp-5); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: .8rem; color: var(--acc);
  border: 1px solid var(--acc-line); background: var(--acc-soft);
  border-radius: 999px; padding: .15rem .55rem; position: absolute; top: 0; left: 0;
}
.step::after {
  content: ""; position: absolute; top: 14px; left: 3.4rem; right: -1rem; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.step:last-child::after { display: none; }
.step h3 { margin: var(--sp-4) 0 var(--sp-2); }
.step p { color: var(--muted); font-size: .93rem; }
.step .caption {
  display: inline-block; margin-top: var(--sp-3); font-family: var(--mono); font-size: .72rem;
  color: var(--acc); background: var(--acc-soft); border: 1px solid var(--acc-line);
  border-radius: var(--r-xs); padding: .2rem .5rem;
}

/* ---------------------------------------------------------------- deep dives */

.dive { display: grid; gap: clamp(1.8rem, 1rem + 3vw, 3.4rem); align-items: center; }
@media (min-width: 1000px) {
  .dive { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .dive.reverse .dive-text { order: 2; }
}
.dive + .dive { margin-top: clamp(3rem, 2rem + 4vw, 5.5rem); }
.dive-text p + p { margin-top: var(--sp-4); }
.dive-text h2 { margin-bottom: var(--sp-4); }
.dive-text > p { color: var(--muted); }

/* ---------------------------------------------------------------- videos */

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

.video-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.video-thumb {
  position: relative; aspect-ratio: 16 / 9; width: 100%; border: 0; padding: 0; cursor: pointer;
  display: block; background: var(--surface-2); overflow: hidden; color: inherit;
}
.video-thumb .poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-thumb .play {
  position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--acc) 92%, transparent); color: var(--acc-ink);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .7);
  transition: transform .22s var(--ease);
}
.video-thumb .play .ic { width: 22px; height: 22px; margin-left: 3px; }
.video-thumb:hover .play { transform: scale(1.08); }
.video-thumb .dur {
  position: absolute; right: .55rem; bottom: .55rem; font-family: var(--mono); font-size: .68rem;
  background: rgba(4, 8, 16, .72); color: #fff; padding: .12rem .45rem; border-radius: var(--r-xs);
}
.video-thumb.is-soon { cursor: default; }
.video-thumb.is-soon .play { background: var(--surface-3); color: var(--muted); box-shadow: none; }
.video-thumb.is-soon:hover .play { transform: none; }
.video-meta { padding: 1.05rem 1.15rem 1.25rem; }
.video-meta h3 { font-size: 1.02rem; margin-bottom: .4rem; }
.video-meta p { font-size: .88rem; color: var(--muted); }
.video-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-note { margin-top: clamp(1.6rem, 1rem + 2vw, 2.4rem); text-align: center; color: var(--muted); font-size: .95rem; }

/* ---------------------------------------------------------------- code block */

.code-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.code-tabs { display: flex; gap: .25rem; padding: .55rem .6rem; border-bottom: 1px solid var(--line-soft); background: color-mix(in srgb, var(--surface-3) 55%, transparent); }
.code-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.code-tabs label {
  font-family: var(--mono); font-size: .74rem; padding: .34rem .8rem; border-radius: 999px;
  color: var(--muted); cursor: pointer; border: 1px solid transparent;
}
.code-tabs label:hover { color: var(--text); }
.code-card pre {
  margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; font-family: var(--mono);
  font-size: .8rem; line-height: 1.72; color: var(--text); tab-size: 2;
}
/* Radio driven tabs: no JavaScript needed to switch panes. The panes live in their own
 * container so :nth-child() counts panes and nothing else. */
.code-panes > .code-pane { display: none; }
.code-panes > .code-pane:first-child { display: block; }
.code-card:has(#tab-1:checked) .code-panes > .code-pane:first-child,
.code-card:has(#tab-2:checked) .code-panes > .code-pane:first-child { display: none; }
.code-card:has(#tab-1:checked) .code-panes > .code-pane:nth-child(2),
.code-card:has(#tab-2:checked) .code-panes > .code-pane:nth-child(3) { display: block; }
.code-tabs input:checked + label { color: var(--acc); background: var(--acc-soft); border-color: var(--acc-line); }
.code-tabs input:focus-visible + label { outline: 2px solid var(--acc); outline-offset: 2px; }
.code-caption { padding: .7rem 1.2rem; border-top: 1px solid var(--line-soft); font-size: .78rem; color: var(--dim); font-family: var(--mono); }

.tok-str { color: var(--acc); }
.tok-key { color: var(--acc-2); }
.tok-num { color: var(--warn); }
.tok-com { color: var(--dim); font-style: italic; }

/* ---------------------------------------------------------------- security & roles */

.sec-item { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; align-items: start; }
.sec-item .icon-tile { margin-bottom: 0; width: 40px; height: 40px; }
.sec-item h3 { font-size: 1rem; margin-bottom: .25rem; }
.sec-item p { font-size: .9rem; color: var(--muted); }

.role-card { display: flex; flex-direction: column; }
.role-card .role { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); }
.role-card h3 { margin: .5rem 0 0; font-size: 1.05rem; }

/* ---------------------------------------------------------------- demo form */

.demo-grid { display: grid; gap: clamp(1.5rem, 1rem + 2.5vw, 3rem); align-items: start; }
@media (min-width: 1000px) { .demo-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .78fr); } }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.3rem, 1rem + 1.5vw, 2.2rem); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field .req { color: var(--acc); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .93rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .7rem .85rem; transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 104px; }
.field select { appearance: none; background-image: none; cursor: pointer; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--acc-line); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--acc); background: var(--surface-3); box-shadow: 0 0 0 3px var(--acc-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--err); }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.consent { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; align-items: start; margin-top: 1rem; font-size: .84rem; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--acc); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.form-note { font-size: .78rem; color: var(--dim); flex: 1 1 200px; }

.form-msg { display: none; margin-top: 1.1rem; border-radius: var(--r-sm); padding: .85rem 1rem; font-size: .9rem; border: 1px solid; }
.form-msg b { display: block; margin-bottom: .15rem; }
.form-msg.show { display: block; }
.form-msg.ok  { color: var(--ok);  border-color: color-mix(in srgb, var(--ok) 35%, transparent);  background: color-mix(in srgb, var(--ok) 10%, transparent); }
.form-msg.err { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); background: color-mix(in srgb, var(--err) 10%, transparent); }

.demo-aside { display: grid; gap: 1.2rem; }
.aside-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; background: color-mix(in srgb, var(--surface) 65%, transparent); }
.aside-card h3 { font-size: 1rem; margin-bottom: .9rem; }

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

.faq-list { display: grid; gap: .6rem; max-width: 60rem; margin-inline: auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; transition: border-color .2s var(--ease); }
.faq-item[open] { border-color: var(--acc-line); }
.faq-item > summary {
  list-style: none; cursor: pointer; padding: 1.05rem 1.2rem; font-weight: 600; font-size: 1rem;
  display: grid; grid-template-columns: 1fr 22px; gap: 1rem; align-items: center;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: ""; width: 11px; height: 11px; justify-self: center;
  border-right: 2px solid var(--acc); border-bottom: 2px solid var(--acc);
  transform: rotate(45deg) translateY(-2px); transition: transform .22s var(--ease);
}
.faq-item[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-item > summary:hover { background: var(--surface-2); }
.faq-answer { padding: 0 1.2rem 1.15rem; color: var(--muted); font-size: .95rem; max-width: 76ch; }

/* ---------------------------------------------------------------- closing CTA */

.cta-band {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--acc-line); border-radius: var(--r-xl);
  padding: clamp(2.2rem, 1.5rem + 4vw, 4.2rem) clamp(1.2rem, 1rem + 2vw, 3rem);
  background:
    radial-gradient(70% 120% at 50% 0%, var(--acc-soft), transparent 70%),
    var(--surface);
}
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band p { margin-top: var(--sp-4); color: var(--muted); max-width: 56ch; margin-inline: auto; }
.cta-band .cta-row { justify-content: center; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: clamp(2.5rem, 2rem + 3vw, 4rem) 2rem; }
.footer-top { display: grid; gap: 2.2rem; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(150px, 1fr)); }
.footer-brand { max-width: 34ch; }
.footer-brand p { margin-top: var(--sp-4); color: var(--muted); font-size: .9rem; }
.footer-col h4 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: .8rem; font-family: var(--mono); font-weight: 600; }
.footer-col ul { display: grid; gap: .5rem; }
.footer-col a { color: var(--muted); font-size: .9rem; }
.footer-col a:hover { color: var(--acc); }
.footer-bottom {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center;
  font-size: .8rem; color: var(--dim);
}
.footer-bottom a { color: var(--dim); }
.footer-bottom a:hover { color: var(--acc); }
.footer-bottom .spacer { margin-left: auto; }

/* ---------------------------------------------------------------- motion */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

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

/* Fallback for browsers without :has() - always show the first code pane only. */
@supports not selector(:has(*)) {
  .code-tabs { display: none; }
  .code-panes > .code-pane { display: none; }
  .code-panes > .code-pane:first-child { display: block; }
}
