/* DarkIOC — Shared site styles
 * Palette pulled from the LatentField OLED video:
 *   - body / header / footer: warm dark grey (#1F1B17 → #262320), no contrast strip
 *   - accents: OLED cyan #34D8D0 + #5DEFE6, mustardy yellow #DFD63E, pixel black
 * Sharp edges by default (0px), 2px reserved for tiny marks.
 * Inter for prose, Share Tech Mono for numbers, JetBrains Mono fallback.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  /* Warm-grey surface — header, body, footer share this base */
  --bg-0: #1A1815;        /* darkest — body shadow */
  --bg-1: #1F1B17;        /* default body */
  --bg-2: #262320;        /* cards on top of body */
  --bg-3: #2E2A26;        /* elevated cards / tier highlight */

  /* Lines — cyan-tinted, never neutral grey */
  --line:        rgba(52, 216, 208, 0.16);
  --line-soft:   rgba(52, 216, 208, 0.08);
  --line-strong: rgba(52, 216, 208, 0.34);
  --line-hover:  #34D8D0;

  /* Text — warm off-white, never pure */
  --text-0: #F2EFE9;
  --text-1: #C9C4BA;
  --text-2: #948D80;
  --text-3: #5F594F;

  /* OLED accents */
  --cyan:        #34D8D0;
  --cyan-bright: #5DEFE6;
  --cyan-deep:   #1FB5AD;
  --cyan-soft:   #7FE5DF;
  --yellow:      #DFD63E;
  --yellow-soft: #E8DC42;
  --pixel-black: #0A0A0A;
  --magenta:     #E07A4A;   /* warm coral, replaces the cool pink */
  --amber:       #F2A648;
  --red:         #E04A4A;
  --green:       #66C266;

  /* Glow */
  --glow-cyan: 0 0 0 1px rgba(52, 216, 208, 0.4), 0 0 18px rgba(52, 216, 208, 0.20);
  --shadow-card: 0 0 0 1px rgba(52, 216, 208, 0.14);

  /* Radii — sharp by default. 2px is the only sanctioned deviation. */
  --r-0: 0;
  --r-1: 2px;

  --container: 1200px;
  --container-narrow: 880px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Share Tech Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg-1);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Faint scanline + grid — nods to the OLED aesthetic without overdoing it */
  background-image:
    linear-gradient(rgba(52, 216, 208, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 216, 208, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* 2mm side-buffer on mobile — keep content off the screen edges.
 * Applied at the body level so every full-bleed child (nav, hero, sections,
 * footer, the hero video, mobile menu) inherits the gutter. */
@media (max-width: 768px) {
  body {
    padding-left: 2mm;
    padding-right: 2mm;
  }
}

a { color: var(--cyan-bright); text-decoration: none; transition: color .12s; }
a:hover { color: var(--yellow); }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
  color: var(--text-0);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5vw, 4.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.625rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.125rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
p.lead { font-size: 1.2rem; color: var(--text-1); }

code, pre, .mono { font-family: var(--font-mono); }
code {
  background: var(--bg-2);
  padding: .1em .4em;
  border: 1px solid var(--line);
  font-size: .9em;
  color: var(--cyan-bright);
  border-radius: var(--r-0);
}

hr { border: 0; border-top: 1px solid var(--line); margin: 4rem 0; }

::selection { background: var(--cyan); color: var(--bg-0); }

/* ───────────── Layout ───────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.5rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

section { padding: 4rem 0; }
@media (max-width: 640px) { section { padding: 2.75rem 0; } }

/* Alt-section is the same warm grey as the body. The separation is a TORN
 * paper edge top + bottom — rendered through the firmware distress algo. */
section.alt {
  background: var(--bg-1);
  position: relative;
  border: 0;
}
section.alt::before,
section.alt::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 9px;
  background: url('/assets/img/chrome/rule-section.png') repeat-x center;
  background-size: auto 18px;
  image-rendering: pixelated; image-rendering: -moz-crisp-edges;
  pointer-events: none;
  opacity: .85;
}
section.alt::before { top: -1px; transform: scaleY(-1); }
section.alt::after  { bottom: -1px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}
.eyebrow::before { content: '▸ '; opacity: .6; }

/* ───────────── Nav — same grey as body, only 1px hairline ───────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(31, 27, 23, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: .85rem 0; }
.nav-brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; color: var(--text-0); }

/* Brand mark — distressed pixel-art eye, stamped via firmware distress algo.
 * Transparent PNG, lives in /assets/img/chrome/. The .logo-mark is sized to
 * 32×32 so the underlying 256×256 PNG renders with crisp pixels. */
.nav-brand .logo-mark {
  width: 34px; height: 34px;
  background: url('/assets/img/chrome/logo-mark.png') center/contain no-repeat;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}
.nav-brand .brand-text { display: flex; flex-direction: column; line-height: 1; }
.nav-brand .brand-name { font-size: 1.05rem; color: var(--text-0); letter-spacing: .04em; font-family: var(--font-mono); }
.nav-brand .brand-sub { font-size: .62rem; color: var(--text-3); letter-spacing: .18em; text-transform: uppercase; margin-top: 3px; }

.nav-links { display: none; gap: 1.6rem; align-items: center; }
.nav-links > a { color: var(--text-1); font-size: .92rem; font-weight: 500; }
.nav-links > a:hover { color: var(--cyan-bright); }

/* Desktop nav dropdowns — Products / Solutions / About */
.nav-group { position: relative; }
.nav-group-trigger {
  background: none; border: 0; padding: 0;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .35rem;
  letter-spacing: 0;
}
.nav-group-trigger:hover,
.nav-group-trigger:focus-visible { color: var(--cyan-bright); outline: none; }
.nav-group-trigger .caret {
  font-size: .65em;
  opacity: .55;
  transition: transform .15s, opacity .15s;
}
.nav-group:hover .nav-group-trigger .caret,
.nav-group:focus-within .nav-group-trigger .caret { transform: rotate(180deg); opacity: 1; }
/* Active-page indicator on the parent group (uses :has — wide support 2023+) */
.nav-group:has(a[aria-current="page"]) .nav-group-trigger { color: var(--cyan-bright); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: -.85rem;
  min-width: 13rem;
  background: rgba(31, 27, 23, 0.96);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-0);
  padding: .4rem 0;
  display: none;
  z-index: 60;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}
/* Hover-bridge — keeps the dropdown open while crossing the gap with the mouse */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -8px; left: 0; right: 0; height: 8px;
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  display: block;
}
.nav-dropdown a {
  display: block;
  padding: .6rem 1rem;
  color: var(--text-1);
  font-size: .9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
  letter-spacing: 0;
}
.nav-dropdown a:last-child { border-bottom: 0; }
.nav-dropdown a:hover {
  color: var(--cyan-bright);
  background: rgba(52, 216, 208, .06);
}
.nav-dropdown a[aria-current="page"] {
  color: var(--cyan-bright);
  background: rgba(52, 216, 208, .06);
}
.nav-links a.cta {
  padding: .5rem 1rem;
  background: transparent;
  color: var(--cyan-bright);
  border: 1px solid var(--cyan);
  border-radius: var(--r-0);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-links a.cta:hover { background: var(--cyan); color: var(--bg-0); }

.nav-toggle {
  display: block; background: none; border: 1px solid var(--line);
  color: var(--text-0); font-size: 1.1rem; cursor: pointer; padding: .35rem .65rem;
  border-radius: var(--r-0);
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}
.nav-mobile { display: none; padding: 1rem 0; border-top: 1px solid var(--line); }
.nav-mobile.open { display: block; }
.nav-mobile a { display: block; padding: .65rem 0; color: var(--text-1); border-bottom: 1px solid var(--line-soft); }
.nav-mobile a:last-child { border-bottom: 0; }

/* ───────────── Hero ───────────── */
.hero {
  position: relative;
  padding: 5.5rem 0 4rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 60% at top right, rgba(52, 216, 208, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 50% at bottom left, rgba(223, 214, 62, 0.05), transparent 70%);
}
.hero-inner { position: relative; z-index: 2; }

/* Background OLED video — full-bleed behind the hero text */
.hero-video {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.hero-video video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: saturate(1.05) contrast(1.02);
}
.hero-video::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(31,27,23,0.55) 0%, rgba(31,27,23,0.78) 60%, var(--bg-1) 100%),
    linear-gradient(90deg, rgba(31,27,23,0.55), transparent 30%, transparent 70%, rgba(31,27,23,0.55));
}

.hero-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .35; }
.hero h1 { text-wrap: balance; }
.hero h1 .accent { color: var(--cyan-bright); }
.hero h1 .accent-yellow { color: var(--yellow); }
.hero .tagline {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--text-1);
  max-width: 720px;
  margin: 1.25rem 0 2rem;
  line-height: 1.45;
}
.hero .sub {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text-2);
  letter-spacing: .08em;
  margin-bottom: 2rem;
}

/* ───────────── Buttons (square, technical) ───────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.25rem;
  border-radius: var(--r-0);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--cyan);
  cursor: pointer;
  transition: background .12s, color .12s, box-shadow .12s;
}
.btn-primary { background: var(--cyan); color: var(--pixel-black); }
.btn-primary:hover { background: var(--cyan-bright); color: var(--pixel-black); box-shadow: var(--glow-cyan); }
.btn-ghost { background: transparent; color: var(--cyan-bright); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text-0); border-color: var(--cyan-bright); }
.btn-yellow { background: var(--yellow); color: var(--pixel-black); border-color: var(--yellow); }
.btn-yellow:hover { background: var(--yellow-soft); color: var(--pixel-black); border-color: var(--yellow-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ───────────── Cards ───────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-0);
  padding: 1.5rem;
  transition: border-color .15s, background .15s;
  display: flex; flex-direction: column;
  height: 100%;
  position: relative;
}
.card::before {
  /* corner bracket — distressed pixel-art L (firmware algo, transparent PNG) */
  content: '';
  position: absolute;
  top: -3px; left: -3px;
  width: 18px; height: 18px;
  background: url('/assets/img/chrome/corner-tl-deep.png') center/contain no-repeat;
  image-rendering: pixelated; image-rendering: -moz-crisp-edges;
  opacity: .75;
  transition: opacity .15s, filter .15s;
  pointer-events: none;
}
.card:hover { border-color: var(--line-strong); background: var(--bg-3); }
.card:hover::before { opacity: 1; filter: drop-shadow(0 0 6px rgba(52, 216, 208, .4)); }
.card h3 { color: var(--text-0); }
.card p { color: var(--text-1); }
.card .card-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--cyan-bright);
  margin-bottom: 1rem;
  font-size: 1.15rem;
  font-family: var(--font-mono);
  background: var(--bg-1);
}
/* OLED frame thumbnail sitting on top of a card, in place of card-icon */
.card .card-oled {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin: -1.5rem -1.5rem 1rem;
  width: calc(100% + 3rem);
  border-bottom: 1px solid var(--line);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}
.card .card-tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--cyan);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.card-link { color: inherit; text-decoration: none; }
.card-link:hover { color: inherit; }
.card-cta {
  margin-top: auto; padding-top: 1rem;
  color: var(--cyan-bright); font-weight: 500;
  font-family: var(--font-mono); font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase;
}
.card-cta::after { content: ' →'; transition: margin-left .12s; }
.card-link:hover .card-cta::after { margin-left: 4px; }

.card-feature {
  background: linear-gradient(135deg, rgba(52, 216, 208, 0.06), rgba(223, 214, 62, 0.04));
  border-color: var(--line-strong);
}

/* ───────────── Stats / numbers ───────────── */
.stats { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat { padding: 1rem 1.25rem; border-left: 2px solid var(--cyan); }
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--text-0);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat-label { display: block; margin-top: .5rem; font-size: .8rem; color: var(--text-2); font-family: var(--font-mono); letter-spacing: .05em; }

.big-numbers { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.big-number {
  padding: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-0);
  position: relative;
}
.big-number::before {
  /* same distressed bracket — flipped to point top-right */
  content: '';
  position: absolute;
  top: -3px; right: -3px;
  width: 18px; height: 18px;
  background: url('/assets/img/chrome/corner-tl-deep.png') center/contain no-repeat;
  transform: scaleX(-1);
  image-rendering: pixelated; image-rendering: -moz-crisp-edges;
  opacity: .75;
  pointer-events: none;
}
.big-number .n {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--cyan-bright);
  font-weight: 400;
  line-height: 1;
}
.big-number .l { display: block; margin-top: .5rem; font-size: .95rem; color: var(--text-1); }
.big-number .c { display: block; margin-top: .25rem; font-size: .78rem; color: var(--text-3); font-family: var(--font-mono); }

/* ───────────── Tables ───────────── */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
table th, table td {
  text-align: left;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table tr:last-child td { border-bottom: 0; }
table th {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 400;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
table tr:hover td { background: rgba(52, 216, 208, 0.025); }

/* ───────────── Lists ───────────── */
ul.clean, ol.clean { list-style: none; padding: 0; margin: 0; }
ul.checked, ul.bullet { list-style: none; padding-left: 0; margin: 0 0 1em; }
ul.checked li { position: relative; padding-left: 1.65rem; margin-bottom: .55rem; color: var(--text-1); }
ul.checked li::before {
  content: '▣';
  position: absolute; left: 0; top: 0;
  color: var(--cyan);
  font-family: var(--font-mono);
}
ul.bullet li { position: relative; padding-left: 1.4rem; margin-bottom: .45rem; }
ul.bullet li::before { content: '▸'; position: absolute; left: 0; color: var(--cyan); font-family: var(--font-mono); }

/* ───────────── Quotes ───────────── */
blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.4rem;
  border-left: 2px solid var(--cyan);
  background: var(--bg-2);
  border-radius: var(--r-0);
  color: var(--text-1);
  font-style: italic;
  font-size: 1.02rem;
}
blockquote.large { font-size: 1.3rem; line-height: 1.5; padding: 1.5rem 1.75rem; }
blockquote cite { display: block; margin-top: .75rem; font-style: normal; font-size: .85rem; color: var(--text-3); }

/* ───────────── Arc / timeline ───────────── */
.arc { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 2rem 0; }
.arc-step {
  padding: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-0);
  text-align: center;
  position: relative;
}
.arc-step .n { display: block; font-family: var(--font-mono); font-size: .7rem; color: var(--cyan); letter-spacing: .18em; }
.arc-step .l { display: block; margin-top: .35rem; color: var(--text-0); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .88rem; font-family: var(--font-mono); }

.timeline { border-left: 1px solid var(--line-strong); padding-left: 1.5rem; }
.timeline li { position: relative; list-style: none; margin-bottom: 1.5rem; }
.timeline li::before {
  content: ''; position: absolute;
  left: -1.6rem; top: .55rem;
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: var(--r-0);
  box-shadow: 0 0 0 3px var(--bg-1);
}
.timeline .t-year { font-family: var(--font-mono); font-size: .78rem; color: var(--cyan); letter-spacing: .05em; }
.timeline .t-title { color: var(--text-0); font-weight: 600; margin-top: .15rem; }
.timeline .t-meta { color: var(--text-2); font-size: .9rem; margin-top: .15rem; }

/* ───────────── Configuration cards ───────────── */
.tiers { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tier {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-0);
  padding: 1.5rem;
  display: flex; flex-direction: column;
  position: relative;
}
.tier::before {
  content: '';
  position: absolute;
  top: -4px; left: -4px;
  width: 22px; height: 22px;
  background: url('/assets/img/chrome/corner-tl-deep.png') center/contain no-repeat;
  image-rendering: pixelated; image-rendering: -moz-crisp-edges;
  opacity: .75;
  pointer-events: none;
}
.tier.featured { border-color: var(--cyan); }
.tier.featured::before { background-image: url('/assets/img/chrome/corner-tl-cyan.png'); opacity: 1; }
.tier .tier-tag {
  font-family: var(--font-mono); font-size: .68rem;
  color: var(--cyan); letter-spacing: .2em; text-transform: uppercase;
}
.tier .tier-name { font-size: 1.4rem; color: var(--text-0); margin: .25rem 0 .5rem; }
.tier .tier-scope {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--cyan-bright);
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}
.tier .tier-for { color: var(--text-2); font-size: .92rem; margin-top: .5rem; }
.tier ul.checked { margin: 1.25rem 0; }
.tier .tier-cta { margin-top: auto; }

/* ───────────── Footer — same grey as body, no contrast strip ───────────── */
.footer {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  font-size: .9rem;
  color: var(--text-2);
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer h5 {
  color: var(--text-0); font-size: .78rem;
  letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: .85rem;
  font-family: var(--font-mono);
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .4rem; }
.footer a { color: var(--text-1); }
.footer a:hover { color: var(--cyan-bright); }
.footer .footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  color: var(--text-3); font-size: .82rem;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.footer .ecosystem-link { display: inline-flex; align-items: center; gap: .4rem; }
.footer .ecosystem-link .dot {
  width: 6px; height: 6px; background: var(--cyan);
  border-radius: var(--r-0);
}

/* ───────────── OLED gallery — the actual on-device frames ───────────── */
.oled-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.oled-frame {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.oled-frame::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  z-index: 2;
}
.oled-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}
.oled-frame figcaption {
  padding: .85rem 1rem;
  background: var(--bg-1);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .04em;
}
.oled-frame .field {
  display: block;
  color: var(--cyan-bright);
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}
.oled-frame .label { color: var(--text-1); }

/* Full-width board / bench photo with a distressed corner bracket */
.board-shot {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}
.board-shot::before {
  content: '';
  position: absolute;
  top: -3px; left: -3px;
  width: 20px; height: 20px;
  background: url('/assets/img/chrome/corner-tl-cyan.png') center/contain no-repeat;
  image-rendering: pixelated; image-rendering: -moz-crisp-edges;
  z-index: 2;
}
.board-shot img { display: block; width: 100%; height: auto; }
.board-shot figcaption {
  padding: .75rem 1rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-2);
  letter-spacing: .03em;
  background: var(--bg-1);
}

/* ───────────── Contact form ───────────── */
.contact-form { margin-top: 2rem; }
.contact-form .field { margin-bottom: 1.1rem; }
.contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: .35rem;
}
.contact-form label .opt {
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
  font-size: .85rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-0);
  padding: .7rem .85rem;
  font: inherit;
  font-size: .98rem;
  color: var(--text-0);
  font-family: var(--font-sans);
  transition: border-color .12s, background .12s;
}
.contact-form textarea { resize: vertical; min-height: 9rem; font-family: var(--font-mono); font-size: .92rem; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  background: var(--bg-1);
}
.contact-form .actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.contact-form .form-note {
  margin-top: 1rem;
  color: var(--text-3);
  font-size: .85rem;
  line-height: 1.5;
}
.contact-fallback {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .88rem;
}
.contact-fallback summary {
  cursor: pointer;
  color: var(--cyan-bright);
  letter-spacing: .04em;
}
.contact-fallback pre {
  margin: .75rem 0 0;
  padding: .9rem;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  color: var(--text-1);
  white-space: pre-wrap;
  overflow-x: auto;
  font-size: .85rem;
}

/* Asymmetric "polaroid" placement — one OLED dropped into a paragraph,
 * offset off-axis with a slight tilt. Used to break the page rhythm without
 * lining up multiple frames in a tidy row. Float so prose wraps around it. */
.oled-snap {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 8px 8px 10px;
  position: relative;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-2);
  letter-spacing: .04em;
  max-width: 360px;
  margin: 1.25rem 0;
}
.oled-snap img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  border: 1px solid var(--line-soft);
}
.oled-snap figcaption { margin-top: 6px; }

/* Off-axis variants */
.oled-snap.right { float: right; margin: .25rem 0 1rem 1.5rem; transform: rotate(.6deg); }
.oled-snap.left  { float: left;  margin: .25rem 1.5rem 1rem 0; transform: rotate(-.8deg); }
.oled-snap.small { max-width: 240px; }
.oled-snap.wide  { max-width: 520px; }
@media (max-width: 700px) {
  .oled-snap.right, .oled-snap.left { float: none; margin: 1rem 0; transform: none; max-width: 100%; }
}

/* Horizontal video block on product pages */
.oled-video-block {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.oled-video-block::before, .oled-video-block::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
}
.oled-video-block::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan);
}
.oled-video-block::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan);
}
.oled-video-block video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
}
.oled-video-block .caption {
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-2);
  letter-spacing: .06em;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.oled-video-block .caption .live {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--cyan-bright);
}
.oled-video-block .caption .live::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--cyan);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ───────────── Tags & misc ───────────── */
.tag {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: var(--r-0);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--cyan-bright);
}
.tag.yellow { border-color: rgba(223, 214, 62, .5); color: var(--yellow); }
.tag.alert  { border-color: rgba(242, 166, 72, .5); color: var(--amber); }
.tag.green  { border-color: rgba(102, 194, 102, .5); color: var(--green); }

.fade-in { opacity: 0; transform: translateY(12px); transition: opacity .5s, transform .5s; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--cyan); color: var(--pixel-black);
  padding: .5rem 1rem;
  font-family: var(--font-mono); font-weight: 500;
  border-radius: var(--r-0);
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; }

.split { display: grid; gap: 2rem; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.diagram {
  padding: 2rem 1.25rem 1.25rem;       /* extra top padding seats the label inside */
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-0);
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--text-1);
  white-space: pre-wrap;
  overflow-x: auto;
  position: relative;
}
.diagram::before {
  /* INSIDE the box, not floating above it — overflow-x: auto was clipping the label. */
  content: 'DIAGRAM';
  position: absolute;
  top: 8px; left: 12px;
  padding: 1px 7px;
  font-size: .62rem; color: var(--cyan);
  letter-spacing: .25em;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
}

.heading-anchor { color: var(--text-3); margin-left: .5rem; opacity: 0; transition: opacity .12s; font-size: .8em; font-family: var(--font-mono); }
h2:hover .heading-anchor, h3:hover .heading-anchor { opacity: 1; }

.ecosystem-banner {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-0);
  padding: 1.1rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center;
  font-size: .9rem;
}
.ecosystem-banner strong { color: var(--text-0); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
.ecosystem-banner a { color: var(--cyan-bright); display: inline-flex; align-items: center; gap: .4rem; }
.ecosystem-banner a::before { content: '▸'; color: var(--cyan-deep); font-family: var(--font-mono); }

.research-note {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem .75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-0);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  background: rgba(52, 216, 208, 0.06);
}
.research-note::before { content: '◇'; color: var(--cyan); }

/* ───────────────────────── Reality Twin demo modal + CTAs ─────────────────────────
   One injected modal (assets/js/site.js). Triggers: [data-demo-modal-trigger].
   Square/technical to match the site; warm-accent CTAs used one-per-viewport. */
.demo-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 2.5vh 2vw;
}
.demo-modal-overlay[hidden] { display: none; }
.demo-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 9, 7, 0.78);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.demo-modal {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: 100%; max-width: 1440px; height: 92vh;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), var(--glow-cyan);
  overflow: hidden;
}
.demo-modal-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.demo-modal-titles { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.demo-modal-title {
  font-family: var(--font-mono); font-size: 0.95rem; color: var(--text-0); letter-spacing: 0.03em;
}
.demo-modal-sub { font-size: 0.72rem; color: var(--text-2); letter-spacing: 0.02em; }
.demo-modal-close {
  flex: 0 0 auto; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--cyan-bright);
  border: 1px solid var(--line-strong); border-radius: var(--r-1);
  font-size: 1rem; line-height: 1; cursor: pointer; transition: background 0.12s, color 0.12s;
}
.demo-modal-close:hover { background: var(--bg-3); color: var(--text-0); border-color: var(--cyan-bright); }
.demo-modal-body { flex: 1 1 auto; min-height: 0; }
.demo-modal-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--bg-0); }
@media (max-width: 640px) {
  .demo-modal-overlay { padding: 0; }
  .demo-modal { max-width: none; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
}

/* CTA vocabulary — all carry [data-demo-modal-trigger]. */
.demo-cta-inline {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--yellow); font-weight: 600; cursor: pointer;
  border-bottom: 1px dashed rgba(223, 214, 62, 0.5);
}
.demo-cta-inline::before { content: '▸'; color: var(--amber); }
.demo-cta-inline:hover { color: var(--yellow-soft); border-bottom-color: var(--yellow-soft); }

.demo-cta-stripe {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  width: 100%; padding: 0.85rem 1rem; cursor: pointer;
  background: linear-gradient(90deg, rgba(242, 166, 72, 0.10), rgba(52, 216, 208, 0.08));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--text-0); font-weight: 600; letter-spacing: 0.02em;
}
.demo-cta-stripe::after { content: '↗'; color: var(--amber); }
.demo-cta-stripe:hover { background: linear-gradient(90deg, rgba(242, 166, 72, 0.16), rgba(52, 216, 208, 0.12)); }

/* small attached edge tab for a card/media block (parent should be position:relative) */
.demo-cta-tab {
  position: absolute; top: 0; right: 1rem; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.7rem; cursor: pointer;
  background: var(--yellow); color: var(--pixel-black);
  border: 1px solid var(--yellow); border-radius: var(--r-1);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.demo-cta-tab::before { content: '▶'; font-size: 0.6rem; }
.demo-cta-tab:hover { background: var(--yellow-soft); border-color: var(--yellow-soft); }

/* small angled sticker/ribbon for ONE card only (parent position:relative, overflow visible) */
.demo-cta-ribbon, .demo-cta-smudge {
  position: absolute; top: 0.8rem; right: -0.4rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.28rem 0.7rem; cursor: pointer; transform: rotate(3deg);
  background: var(--amber); color: var(--pixel-black);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.03em; font-weight: 700;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}
.demo-cta-ribbon::before, .demo-cta-smudge::before { content: '◆'; font-size: 0.55rem; }
.demo-cta-ribbon:hover, .demo-cta-smudge:hover { background: var(--magenta); color: var(--text-0); }

/* small geometric marker with adjacent (always-readable) label */
.demo-cta-shape {
  display: inline-flex; align-items: center; gap: 0.55rem; cursor: pointer;
  color: var(--text-0); font-weight: 600; font-size: 0.92rem;
}
.demo-cta-shape::before {
  content: ''; flex: 0 0 auto; width: 18px; height: 18px; display: inline-block;
  background: var(--cyan); box-shadow: 0 0 0 4px rgba(52, 216, 208, 0.16);
}
.demo-cta-shape.circle::before { border-radius: 50%; }
.demo-cta-shape.triangle::before {
  width: 0; height: 0; background: transparent; box-shadow: none;
  border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 16px solid var(--amber);
  filter: drop-shadow(0 0 5px rgba(242, 166, 72, 0.4));
}
.demo-cta-shape:hover { color: var(--cyan-bright); }
.demo-cta-shape.circle:hover::before { background: var(--cyan-bright); }
