/* ============================================================
   Elyon Semiconductor — shared styles for all pages
   Brand: forest green / cream / gold (same tokens as ChipStar app)
   Lumicron: electric blue / white
   Type: Source Serif 4 (open-license serif, self-hosted in fonts/)

   THEMES: light is the default. Dark mode is applied by setting
   data-theme="dark" on <html> (a tiny script in each page's <head>
   picks the saved choice or the visitor's system setting; the ◐
   button in the nav toggles it). Every color that changes between
   modes lives in the two token blocks below — nothing else needs
   editing to adjust a theme.
   ============================================================ */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-Italic-Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ----- brand constants (identical in both themes) ----- */
  --forest-400: #4f7d63;
  --forest-600: #1f4d38;
  --forest-700: #173b2b;
  --forest-800: #102a1f;
  --forest-900: #0b1d16;
  --cream-50: #fbf8f1;
  --cream-100: #f5efe1;
  --cream-200: #ece3d0;
  --gold-300: #e3cd8a;
  --gold-400: #d9b65a;
  --gold-500: #c7a23f;
  --bronze: #8a6a15;             /* gold dark enough to read as text on cream */
  --ink-900: #1a1a17;
  --ink-500: #6b6b60;
  --electric-600: #004aad;       /* sampled from the Lumicron wordmark asset */
  --electric-500: #1a7dff;

  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* ----- LIGHT theme tokens ----- */
  color-scheme: light;
  --bg: var(--cream-50);
  --ink: var(--ink-900);
  --muted: var(--ink-500);
  --hairline: rgba(23, 59, 43, 0.16);
  --hairline-soft: rgba(23, 59, 43, 0.10);
  --focus: var(--forest-600);

  --nav-bg: rgba(251, 248, 241, 0.82);
  --nav-ink: var(--forest-800);
  --nav-cta-hover-line: rgba(23, 59, 43, 0.4);
  --nav-cta-hover-bg: rgba(23, 59, 43, 0.06);

  --about-head: var(--forest-800);

  /* Lumicron surfaces (white room in light mode, deep navy in dark) */
  --lumi-surface: #ffffff;
  --lumi-head: #10233f;
  --lumi-body: #5a6472;
  --lumi-accent: var(--electric-600);   /* text-safe accent on the surface */
  --lumi-marker: var(--electric-600);
  --lumi-line: rgba(16, 35, 63, 0.13);
  --lumi-tint: rgba(26, 125, 255, 0.05);
  --lumi-badge-line: rgba(0, 74, 173, 0.4);
  --lumi-ghost: #10233f;
  --lumi-ghost-line: rgba(16, 35, 63, 0.28);
  --lumi-ghost-hover-line: rgba(16, 35, 63, 0.5);
  --lumi-ghost-hover-bg: rgba(16, 35, 63, 0.04);
  --wg-guide: rgba(0, 74, 173, 0.24);
  --wg-faint: rgba(0, 74, 173, 0.11);
  --wg-ring: rgba(0, 74, 173, 0.26);
  --wg-pad: rgba(0, 74, 173, 0.6);
  --lumi-grid: rgba(16, 35, 63, 0.06);
  --lumi-wafer: rgba(16, 35, 63, 0.08);
  --code-bg: #0e1a2e;
  --code-border: rgba(16, 35, 63, 0.25);
  --ipad-frame: rgba(16, 35, 63, 0.4);

  /* Maple surfaces (autumn: warm paper in light mode, ember dark in dark) */
  --maple-surface: #fbf2e3;
  --maple-head: #4a2413;
  --maple-body: #7c6553;
  --maple-accent: #b5451d;
  --maple-ember: #e07a2e;
  --maple-line: rgba(122, 62, 28, 0.18);
  --maple-tint: rgba(224, 122, 46, 0.08);

  /* ChipStar surfaces (cream room in light mode, dark forest in dark) */
  --chip-surface: var(--cream-100);
  --chip-head: var(--forest-800);
  --chip-subhead: var(--forest-700);
  --chip-eyebrow: var(--forest-600);
  --chip-gold: var(--bronze);           /* gold-family text on the surface */
  --chip-tint: rgba(217, 182, 90, 0.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1310;
  --ink: #ede8db;
  --muted: #a3a094;
  --hairline: rgba(237, 232, 219, 0.15);
  --hairline-soft: rgba(237, 232, 219, 0.08);
  --focus: var(--gold-400);

  --nav-bg: rgba(13, 19, 16, 0.8);
  --nav-ink: var(--cream-50);
  --nav-cta-hover-line: rgba(237, 232, 219, 0.35);
  --nav-cta-hover-bg: rgba(237, 232, 219, 0.07);

  --about-head: var(--cream-50);

  --lumi-surface: #0b1424;
  --lumi-head: #eaf1fd;
  --lumi-body: #a4b3c9;
  --lumi-accent: #6ea8ff;
  --lumi-marker: var(--electric-500);
  --lumi-line: rgba(164, 185, 220, 0.16);
  --lumi-tint: rgba(26, 125, 255, 0.07);
  --lumi-badge-line: rgba(110, 168, 255, 0.45);
  --lumi-ghost: #eaf1fd;
  --lumi-ghost-line: rgba(164, 185, 220, 0.35);
  --lumi-ghost-hover-line: rgba(164, 185, 220, 0.6);
  --lumi-ghost-hover-bg: rgba(164, 185, 220, 0.08);
  --wg-guide: rgba(110, 168, 255, 0.28);
  --wg-faint: rgba(110, 168, 255, 0.13);
  --wg-ring: rgba(110, 168, 255, 0.3);
  --wg-pad: rgba(110, 168, 255, 0.6);
  --lumi-grid: rgba(164, 185, 220, 0.07);
  --lumi-wafer: rgba(164, 185, 220, 0.08);
  --code-bg: #071120;
  --code-border: rgba(164, 185, 220, 0.18);
  --ipad-frame: rgba(164, 185, 220, 0.45);

  --maple-surface: #1a100a;
  --maple-head: #f7ead9;
  --maple-body: #c4ad97;
  --maple-accent: #f59e5b;
  --maple-ember: #ff9d4d;
  --maple-line: rgba(228, 190, 150, 0.16);
  --maple-tint: rgba(224, 122, 46, 0.06);

  --chip-surface: #101c15;
  --chip-head: var(--cream-50);
  --chip-subhead: #d6e4dc;
  --chip-eyebrow: #a9c6b6;
  --chip-gold: var(--gold-300);
  --chip-tint: rgba(217, 182, 90, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 240ms ease, color 240ms ease;
}

::selection { background: rgba(217, 182, 90, 0.45); }

a { color: inherit; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.hero-forest :focus-visible, .cta-forest :focus-visible, .footer :focus-visible,
.cta-electric :focus-visible, .hero-maple :focus-visible, .cta-maple :focus-visible { outline-color: var(--cream-50); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* theme-dependent image variants */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 4px 9px;
  border-radius: 4px;
  border: 1px solid;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 8px;
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease, border-color 160ms ease;
}
.btn-gold { background: var(--gold-400); color: var(--forest-900); }
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-electric { background: var(--electric-600); color: #ffffff; }
.btn-electric:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-white { background: #ffffff; color: var(--electric-600); }
.btn-white:hover { filter: brightness(0.97); transform: translateY(-1px); }
.btn-ghost-light { color: var(--cream-50); border: 1px solid rgba(251, 248, 241, 0.35); }
.btn-ghost-light:hover { border-color: rgba(251, 248, 241, 0.65); background: rgba(251, 248, 241, 0.08); }
.btn-ghost-dark { color: var(--lumi-ghost); border: 1px solid var(--lumi-ghost-line); }
.btn-ghost-dark:hover { border-color: var(--lumi-ghost-hover-line); background: var(--lumi-ghost-hover-bg); }

.more {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 160ms ease;
}
.more:hover { opacity: 0.75; }

/* ---------- Nav (Elyon frame on every page) ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
  transition: background 240ms ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 24px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
  color: var(--nav-ink);
}
.wordmark span { color: var(--muted); font-weight: 400; }
.wordmark-logo { width: 28px; height: 28px; border-radius: 24%; display: block; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none;
  font-size: 15.5px;
  color: var(--muted);
  transition: color 160ms ease;
}
.nav-links a:hover { color: var(--nav-ink); }
.nav-links a[aria-current="page"] {
  color: var(--nav-ink);
  text-decoration: underline;
  text-decoration-color: var(--gold-500);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav-links a.nav-cta {
  color: var(--nav-ink);
  border: 1px solid var(--hairline);
  padding: 8px 18px;
  border-radius: 8px;
  transition: border-color 160ms ease, background 160ms ease;
}
.nav-links a.nav-cta:hover { border-color: var(--nav-cta-hover-line); background: var(--nav-cta-hover-bg); }

.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--nav-ink);
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 320ms ease;
}
.theme-toggle:hover { border-color: var(--nav-cta-hover-line); background: var(--nav-cta-hover-bg); }
:root[data-theme="dark"] .theme-toggle { transform: rotate(180deg); }

/* ---------- Heroes ---------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(84px, 15vh, 160px) 0 clamp(66px, 11vh, 120px);
  max-width: 800px;
}

.hero .eyebrow { margin-bottom: 26px; }

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin-bottom: 26px;
}

.hero-sub {
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  max-width: 56ch;
  margin-bottom: 40px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Forest hero — Elyon & ChipStar (deep green in both themes) */
.hero-forest { background: var(--forest-800); color: var(--cream-50); }
.hero-forest .eyebrow { color: var(--gold-400); }
.hero-forest h1 .lit { color: var(--gold-300); }
.hero-forest .hero-sub { color: rgba(251, 248, 241, 0.8); }
.hero-forest .hero-sub strong { color: var(--cream-50); }
.hero-forest .badge { color: var(--gold-300); border-color: rgba(227, 205, 138, 0.45); }

/* Lumicron hero — white room in light mode, deep navy in dark */
.hero-white { background: var(--lumi-surface); color: var(--lumi-head); transition: background 240ms ease; }
.hero-white .eyebrow { color: var(--lumi-accent); }
.hero-white h1 .lit { color: var(--lumi-accent); }
.hero-white .hero-sub { color: var(--lumi-body); }
.hero-white .hero-sub strong { color: var(--lumi-head); }
.hero-white .badge { color: var(--lumi-accent); border-color: var(--lumi-badge-line); }

/* ---------- Product wordmark placements ---------- */

/* hero title version (product pages) */
.hero-wordmark-wrap { margin: 0 0 22px; line-height: 0; }
.hero-wordmark { width: min(560px, 82%); height: auto; display: block; }
.hero-wordmark--chipstar { width: min(480px, 74%); }
.hero-tagline {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
  margin-bottom: 18px;
}
.hero-white .hero-tagline { color: var(--lumi-head); }
.hero-white .hero-tagline .lit { color: var(--lumi-accent); }
.hero-forest .hero-tagline { color: var(--cream-50); }
.hero-forest .hero-tagline .lit { color: var(--gold-300); }

/* wordmark on a product CTA band */
.cta-wordmark { width: min(300px, 70%); height: auto; display: block; margin-bottom: 26px; }
.cta-wordmark--chipstar { width: min(230px, 60%); }

/* reticle grid, faded by a radial mask */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px 56px);
  -webkit-mask-image: radial-gradient(120% 90% at 62% 12%, black 30%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 62% 12%, black 30%, transparent 78%);
  pointer-events: none;
}
.hero-forest { --grid-line: rgba(251, 248, 241, 0.05); }
.hero-white { --grid-line: var(--lumi-grid); }

/* wafer edge, top right */
.hero::after {
  content: "";
  position: absolute;
  width: 1100px;
  height: 1100px;
  border-radius: 50%;
  border: 1px solid var(--wafer-line);
  top: -640px;
  right: -280px;
  pointer-events: none;
}
.hero-forest { --wafer-line: rgba(251, 248, 241, 0.1); }
.hero-white { --wafer-line: var(--lumi-wafer); }

/* home hero draws its own wafer, so skip the decorative arc there */
.hero-home::after { content: none; }

/* ---------- Wafer exposure scan (home hero) ---------- */

.wafermap {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  top: 50%;
  transform: translateY(-50%);
  width: min(44vw, 540px);
  pointer-events: none;
}
.wafermap .rim { fill: none; stroke: rgba(251, 248, 241, 0.14); stroke-width: 1.5; }
.wafermap .die-outlines rect { fill: none; stroke: rgba(217, 182, 90, 0.14); stroke-width: 1; }
.wafermap .dies rect {
  fill: var(--gold-400);
  opacity: 0;
  animation: expose 5.4s linear infinite;
  animation-delay: calc(var(--i) * -0.12s);
}

@keyframes expose {
  0%   { opacity: 0.95; }
  3%   { opacity: 0.5; }
  14%  { opacity: 0.16; }
  45%  { opacity: 0.05; }
  92%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Waveguide animation (home + Lumicron heroes) ---------- */

.waveguide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-white .guide { stroke: var(--wg-guide); }
.hero-white .guide-faint { stroke: var(--wg-faint); }
.hero-white .ring { stroke: var(--wg-ring); }
.hero-white .pad { fill: var(--wg-pad); }
.hero-white .pulse { stroke: var(--electric-500); filter: drop-shadow(0 0 7px rgba(26, 125, 255, 0.8)); }
.hero-white .ring-pulse { stroke: rgba(26, 125, 255, 0.6); filter: drop-shadow(0 0 5px rgba(26, 125, 255, 0.6)); }

.guide, .guide-faint, .ring { stroke-width: 2; fill: none; }

.pulse {
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 52 948;
  animation: travel 7s linear infinite;
}
.ring-pulse {
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 16 84;
  animation: orbit 5s linear infinite;
}

@keyframes travel { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes orbit  { from { stroke-dashoffset: 0; }    to { stroke-dashoffset: -100; } }

/* ---------- Constellation (ChipStar hero) ---------- */
/* Orb drift + edge tracking is driven by a small script in chipstar.html;
   the glow, breathing, sparks, and dashed flow below are pure CSS. */

.constellation {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  top: 40px;
  height: calc(100% - 60px);
  width: min(44vw, 600px);
  pointer-events: none;
}
.constellation .edge { stroke: rgba(217, 182, 90, 0.3); stroke-width: 1.5; }
.constellation .edge-phoebe {
  stroke: rgba(227, 205, 138, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 5 6;
  animation: dashflow 1.1s linear infinite;
}
.constellation .edge-spark {
  stroke: rgba(227, 205, 138, 0.9);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 7 93;
  filter: drop-shadow(0 0 4px rgba(227, 205, 138, 0.8));
  animation: edge-travel 4.2s linear infinite;
}
.constellation .orb {
  fill: rgba(227, 205, 138, 0.75);
  filter: drop-shadow(0 0 6px rgba(227, 205, 138, 0.5));
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 4.5s ease-in-out infinite;
}
.constellation .orb:nth-of-type(odd) { animation-delay: -2.25s; }
.constellation .orb-dim { fill: rgba(217, 182, 90, 0.4); }

@keyframes breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.14); }
}
@keyframes dashflow { to { stroke-dashoffset: -22; } }
@keyframes edge-travel { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, .ring-pulse { animation: none; stroke-dasharray: none; opacity: 0.3; filter: none; }
  .constellation .orb { animation: none; }
  .constellation .edge-phoebe { animation: none; }
  .constellation .edge-spark { display: none; }
  .wafermap .dies rect { animation: none; opacity: 0.09; }
}

/* ---------- Bands (shared section shell) ---------- */

.band { border-top: 1px solid var(--hairline-soft); position: relative; overflow: hidden; }
.band-inner { position: relative; padding: clamp(72px, 10vh, 110px) 0; }

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 20px 0 18px;
}

.band-copy p { color: var(--muted); max-width: 52ch; margin-bottom: 30px; }
.band-copy p strong { color: var(--ink); }

/* Lumicron's room */
.band-lumicron { background: var(--lumi-surface); transition: background 240ms ease; }
.band-lumicron::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 55%;
  background: linear-gradient(180deg, var(--lumi-tint), transparent);
  pointer-events: none;
}
.band-lumicron .eyebrow { color: var(--lumi-accent); }
.band-lumicron .badge { color: var(--lumi-accent); border-color: var(--lumi-badge-line); }
.band-lumicron h2 { color: var(--lumi-head); }
.band-lumicron .band-copy p { color: var(--lumi-body); }
.band-lumicron .band-copy p strong { color: var(--lumi-head); }
.band-lumicron .more { color: var(--lumi-accent); }

/* ChipStar's room */
.band-chipstar { background: var(--chip-surface); transition: background 240ms ease; }
.band-chipstar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 55%;
  background: linear-gradient(180deg, var(--chip-tint), transparent);
  pointer-events: none;
}
.band-chipstar .eyebrow { color: var(--chip-eyebrow); }
.band-chipstar .badge { color: var(--chip-gold); border-color: rgba(199, 162, 63, 0.6); }
.band-chipstar h2 { color: var(--chip-head); }
.band-chipstar .more { color: var(--chip-gold); }

/* ---------- Spec grids ---------- */

.specs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.specs-3 { grid-template-columns: 1fr 1fr 1fr; }

.spec { border-top: 1px solid var(--hairline); padding: 18px 0 22px; }
.band-lumicron .spec, .page-lumicron .spec { border-top-color: var(--lumi-line); }

.spec h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}
.spec h3::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--gold-500);
}
.band-lumicron .spec h3::before, .page-lumicron .spec h3::before { background: var(--lumi-marker); }
.band-lumicron .spec h3, .page-lumicron .spec h3 { color: var(--lumi-head); }
.band-chipstar .spec h3, .page-chipstar .spec h3 { color: var(--chip-subhead); }

.spec p { font-size: 15px; color: var(--muted); line-height: 1.6; padding-left: 17px; }
.band-lumicron .spec p, .page-lumicron .spec p { color: var(--lumi-body); }

.band-glyph {
  position: absolute;
  right: 4%;
  top: 56px;
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- Flow (numbered workflow — Lumicron page) ---------- */

.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
.flow-step { border-top: 1px solid var(--lumi-line); padding-top: 18px; }
.flow-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--lumi-accent);
  display: block;
  margin-bottom: 10px;
}
.flow-step h3 { font-size: 19px; font-weight: 600; color: var(--lumi-head); margin-bottom: 8px; }
.flow-step p { font-size: 15px; line-height: 1.65; color: var(--lumi-body); }

/* ---------- API panel (Lumicron page) ---------- */

.api-panel {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  overflow: hidden;
}
.api-panel-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.api-panel-head .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.api-file { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; color: #8fa3c0; margin-left: 8px; }
.api-panel pre { margin: 0; padding: 20px 22px; overflow-x: auto; }
.api-panel code { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: #cfe0f6; }
.code-k { color: #6ea8ff; }
.code-s { color: #e3cd8a; }

.pip-cmd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 8px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  color: #cfe0f6;
  user-select: all;
  -webkit-user-select: all;
}
.pip-prompt { color: #6b7f9c; user-select: none; -webkit-user-select: none; }
.api-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lumi-body);
  margin-top: 24px;
}

/* ---------- iPad companion (Lumicron page) ---------- */

/* give the gallery more room than the standard 5/6 split */
.band-grid-ipad { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: center; }

.ipad-shell {
  position: relative;
  border: 2.5px solid var(--ipad-frame);
  border-radius: 26px;
  padding: 14px;
}
.ipad-cam {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ipad-frame);
  transform: translateX(-50%);
}
.ipad-screen {
  border-radius: 12px;
  overflow: hidden;
  background: #0b1424;
}
.ipad-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ipad-track::-webkit-scrollbar { display: none; }
.ipad-track img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  scroll-snap-align: center;
  display: block;
}
.ipad-track:focus-visible { outline: 2px solid var(--lumi-accent); outline-offset: -2px; }

.ipad-dots { display: flex; justify-content: center; gap: 9px; margin-top: 16px; }
.ipad-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--ipad-frame);
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 160ms ease, background 160ms ease, transform 160ms ease;
}
.ipad-dots button.on { background: var(--lumi-accent); opacity: 1; transform: scale(1.2); }

.app-badge-link { display: inline-block; line-height: 0; }
.app-badge { height: 50px; width: auto; display: block; }
:root[data-theme="dark"] .app-badge {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  border-radius: 9px;
}

/* ---------- Pillars (division of labor — ChipStar page) ---------- */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
.pillar { border-top: 1px solid var(--hairline); padding-top: 18px; }
.pillar-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--chip-gold);
  display: block;
  margin-bottom: 10px;
}
.pillar h3 { font-size: 19px; font-weight: 600; color: var(--chip-head); margin-bottom: 8px; }
.pillar p { font-size: 15px; line-height: 1.65; color: var(--muted); }

/* ---------- Statement bands ---------- */

.statement { text-align: left; }
.statement-inner { padding: clamp(64px, 9vh, 100px) 0; max-width: 880px; }
.statement blockquote {
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.statement .sig {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  margin-top: 26px;
}
.statement-lumicron { background: var(--lumi-surface); transition: background 240ms ease; }
.statement-lumicron blockquote { color: var(--lumi-head); }
.statement-lumicron .sig { color: var(--lumi-accent); }
.statement-chipstar { background: var(--chip-surface); transition: background 240ms ease; }
.statement-chipstar blockquote { color: var(--chip-head); }
.statement-chipstar .sig { color: var(--chip-gold); }

/* ---------- About & values (home) ---------- */

.about .eyebrow { color: var(--muted); }
.about-inner { padding: clamp(72px, 10vh, 110px) 0; max-width: 720px; }
.about h2 { color: var(--about-head); }
.about p { color: var(--muted); max-width: 60ch; margin-bottom: 16px; }
.about p strong { color: var(--ink); }

.values {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  margin-top: 38px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.values span { display: flex; align-items: center; gap: 10px; }
.values span::before { content: ""; width: 6px; height: 6px; background: var(--gold-500); }

/* ---------- Ongoing work (home) ---------- */

.efforts .eyebrow { color: var(--muted); }
.efforts-inner { padding: clamp(72px, 10vh, 110px) 0; }
.efforts h2 { color: var(--about-head); }
.efforts-intro { color: var(--muted); max-width: 60ch; margin-bottom: 44px; }

.effort-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.effort-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 30px 30px 26px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.effort-card:hover {
  border-color: var(--nav-cta-hover-line);
  background: var(--nav-cta-hover-bg);
  transform: translateY(-2px);
}

.effort-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  margin-bottom: 18px;
}
.effort-logo { width: auto; display: block; }
.effort-logo-lumicron { height: 28px; }
.effort-logo-chipstar { height: 46px; }

.badge-gold { color: var(--chip-gold); border-color: rgba(199, 162, 63, 0.6); }

.effort-card p { color: var(--muted); font-size: 15.5px; line-height: 1.65; margin-bottom: 20px; flex: 1; }
.effort-more { font-weight: 600; font-size: 15.5px; color: var(--chip-gold); }

@media (max-width: 1000px) {
  .effort-grid { grid-template-columns: 1fr; }
}

/* ---------- CTA bands ---------- */

.cta-band-inner { padding: clamp(80px, 12vh, 130px) 0; max-width: 720px; }
.cta-band h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -0.015em;
  margin: 20px 0 16px;
}
.cta-band p { max-width: 52ch; margin-bottom: 36px; }

.cta-forest { background: var(--forest-800); color: var(--cream-50); }
.cta-forest .eyebrow { color: var(--gold-400); }
.cta-forest p { color: rgba(251, 248, 241, 0.75); }

.cta-electric { background: var(--electric-600); color: #ffffff; }
.cta-electric .eyebrow { color: rgba(255, 255, 255, 0.85); }
.cta-electric p { color: rgba(255, 255, 255, 0.85); }

/* ---------- Footer ---------- */

.footer { background: var(--forest-900); color: rgba(251, 248, 241, 0.65); border-top: 1px solid rgba(251, 248, 241, 0.12); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px 0;
  font-size: 15px;
}
.footer-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; }
.footer-meta a { text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }
.footer-meta .f-lumicron { color: #70aeff; }
.footer-meta .f-chipstar { color: var(--gold-400); }

/* ---------- Maple (autumn theme: page + cross-links) ---------- */

/* ember hero — warm dark in both themes, like the forest heroes */
.hero-maple { background: #20130b; color: #f7ead9; }
.hero-maple { --grid-line: rgba(247, 234, 217, 0.05); --wafer-line: rgba(247, 234, 217, 0.09); }
.hero-maple .eyebrow { color: var(--maple-ember, #ff9d4d); color: #ff9d4d; }
.hero-maple .badge { color: #ffb066; border-color: rgba(255, 176, 102, 0.45); }
.hero-maple .hero-sub { color: rgba(247, 234, 217, 0.8); }
.hero-maple .hero-sub strong { color: #f7ead9; }
.hero-maple .hero-tagline { color: #f7ead9; }
.hero-maple .hero-tagline .lit { color: #ffb066; }

.maple-name {
  font-size: clamp(3rem, 7vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.maple-acronym {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(247, 234, 217, 0.72);
  margin-bottom: 20px;
}
.maple-acronym b { color: #ffb066; font-weight: 600; }

.btn-ember { background: #e07a2e; color: #20130b; }
.btn-ember:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* FDTD wavefront animation: a source radiating inside an absorbing boundary */
.fdtd-field {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  top: 40px;
  height: calc(100% - 60px);
  width: min(44vw, 600px);
  pointer-events: none;
}
.fdtd-field .pml { fill: none; stroke: rgba(247, 234, 217, 0.22); stroke-width: 1.5; stroke-dasharray: 7 8; }
.fdtd-field .yee { stroke: rgba(247, 234, 217, 0.06); stroke-width: 1; }
.fdtd-field .wave {
  fill: none;
  stroke: #ff9d4d;
  stroke-width: 1.8;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: wavefront 6s linear infinite;
}
.fdtd-field .src {
  fill: #ffb066;
  filter: drop-shadow(0 0 6px rgba(255, 157, 77, 0.9));
  animation: srcpulse 1.5s ease-in-out infinite;
}

@keyframes wavefront {
  0%   { transform: scale(0.06); opacity: 0.9; }
  70%  { opacity: 0.35; }
  100% { transform: scale(1.55); opacity: 0; }
}
@keyframes srcpulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

/* maple bands */
.band-maple { background: var(--maple-surface); transition: background 240ms ease; }
.band-maple::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 55%;
  background: linear-gradient(180deg, var(--maple-tint), transparent);
  pointer-events: none;
}
.band-maple .eyebrow { color: var(--maple-accent); }
.band-maple h2 { color: var(--maple-head); }
.band-maple .band-copy p, .band-maple > .wrap > p { color: var(--maple-body); }
.band-maple .spec { border-top-color: var(--maple-line); }
.band-maple .spec h3 { color: var(--maple-head); }
.band-maple .spec h3::before { background: var(--maple-ember); }
.band-maple .spec p { color: var(--maple-body); }

.statement-maple { background: var(--maple-surface); transition: background 240ms ease; }
.statement-maple blockquote { color: var(--maple-head); }
.statement-maple .sig { color: var(--maple-accent); }

.cta-maple { background: #7c2d12; color: #f7ead9; }
.cta-maple .eyebrow { color: #ffb066; }
.cta-maple p { color: rgba(247, 234, 217, 0.82); }

/* cross-links elsewhere on the site */
.band-lumicron .spec a { color: var(--lumi-accent); }
.effort-name-maple { font-size: 27px; font-weight: 600; line-height: 1; color: var(--maple-accent); }
.footer-meta .f-maple { color: #f59e5b; }

@media (max-width: 900px) {
  .fdtd-field { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fdtd-field .src { animation: none; }
  .fdtd-field .wave { animation: none; opacity: 0.22; }
  .fdtd-field .wave:nth-of-type(1) { transform: scale(0.4); }
  .fdtd-field .wave:nth-of-type(2) { transform: scale(0.8); }
  .fdtd-field .wave:nth-of-type(3) { transform: scale(1.15); }
  .fdtd-field .wave:nth-of-type(4) { transform: scale(1.5); }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .band-grid { grid-template-columns: 1fr; }
  .band-glyph { display: none; }
  .flow, .pillars { grid-template-columns: 1fr; gap: 24px; }
  .constellation, .wafermap { display: none; }
}
@media (max-width: 680px) {
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 620px) {
  .specs, .specs-3 { grid-template-columns: 1fr; }
}
