/* site-next: new public design (P2). ERP Night Haul language: palette, Instrument Serif, Geist, Geist Mono.
   Loads nothing from assets/css/site.css or showcase.css. Scripts: assets/valley.js (optional 3D Valley) and assets/theme.js (light and dark themes). */
@font-face { font-family: "Geist"; src: url("fonts/Geist-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }

:root {
  --bg: #0a0b0c; --ink: #f3eee3; --muted: #a39d91; --gold: #d4a94e; --gold-ink: #14110a;
  --line: rgba(var(--ink-rgb), 0.14); --card: #131417; --field: #1a1b1f; --gold-wash: rgba(212, 169, 78, 0.12);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --gutter: 16px; --max: 1200px;
  --bg-rgb: 10, 11, 12; --ink-rgb: 243, 238, 227; --card-rgb: 19, 20, 23; --accent: #d4a94e; --shadow: rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
/* Light theme: html[data-theme="light"] (visitor's choice, assets/theme.js), or the system preference when no choice is stored.
   --gold stays the fill (buttons, ticks, top rule) with --gold-ink on it; --accent is gold dark enough for text and focus on ivory. */
:root[data-theme="light"] {
  --bg: #f4efe4; --ink: #17150f; --muted: #575146; --gold: #d4a94e; --gold-ink: #14110a; --accent: #7a570e;
  --line: rgba(23, 21, 15, 0.16); --card: #fbf8f1; --field: #ebe5d7; --gold-wash: rgba(212, 169, 78, 0.16);
  --bg-rgb: 244, 239, 228; --ink-rgb: 23, 21, 15; --card-rgb: 251, 248, 241; --shadow: rgba(60, 48, 20, 0.12);
  color-scheme: light;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #f4efe4; --ink: #17150f; --muted: #575146; --gold: #d4a94e; --gold-ink: #14110a; --accent: #7a570e;
  --line: rgba(23, 21, 15, 0.16); --card: #fbf8f1; --field: #ebe5d7; --gold-wash: rgba(212, 169, 78, 0.16);
  --bg-rgb: 244, 239, 228; --ink-rgb: 23, 21, 15; --card-rgb: 251, 248, 241; --shadow: rgba(60, 48, 20, 0.12);
  color-scheme: light;
} }
@media (min-width: 600px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--sans); overflow-wrap: break-word; }
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 4px; background: var(--gold); z-index: 20; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: var(--gutter); top: -100px; background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 30; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap > *, .grid > *, .fields > *, .states > *, .contact > * { min-width: 0; }

/* Theme stills: night map in dark, ivory map in light (hero backdrop and Valley figures); the hidden one is never fetched (lazy, not displayed) */
:is(.hero-map, .valley) .ivory, :root[data-theme="light"] :is(.hero-map, .valley) .night { display: none; }
:root[data-theme="light"] :is(.hero-map, .valley) .ivory { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) :is(.hero-map, .valley) .night { display: none; } :root:not([data-theme="dark"]) :is(.hero-map, .valley) .ivory { display: block; } }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(var(--bg-rgb), 0.92); border-bottom: 1px solid var(--line); padding-top: 4px; }
@supports (backdrop-filter: blur(8px)) { .top { background: rgba(var(--bg-rgb), 0.78); backdrop-filter: blur(10px); } }
.top .wrap { display: flex; align-items: center; gap: 10px; min-height: 64px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; margin-right: auto; }
.brand img { width: 32px; height: 32px; }
@media (max-width: 374px) { .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
/* Under 600px the header keeps one row: language pill shows the code (ES / EN; its name stays in the accessible name), tighter gaps */
.lang-code { display: none; }
@media (max-width: 599px) {
  .top .wrap { gap: 8px; } .brand { gap: 8px; font-size: 0.9375rem; }
  .lang-code { display: inline; } .lang-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 600px) { .top .wrap { gap: 16px; } }
.nav { display: none; gap: 24px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.875rem; }
.nav a:hover { color: var(--ink); }
@media (min-width: 1080px) { .nav { display: flex; gap: 10px; } .top .wrap { gap: 12px; } }
@media (min-width: 1280px) { .nav { gap: 20px; } .top .wrap { gap: 16px; } }
.lang { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.06em; color: var(--ink); text-decoration: none; border: 1px solid rgba(var(--ink-rgb), 0.3); border-radius: 999px; padding: 8px 10px; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 999px; border: 1px solid rgba(var(--ink-rgb), 0.3); background: transparent; color: var(--ink); cursor: pointer; }
.theme-btn[hidden] { display: none; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .to-dark, :root[data-theme="light"] .theme-btn .to-light { display: none; }
:root[data-theme="light"] .theme-btn .to-dark { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-btn .to-light { display: none; } :root:not([data-theme="dark"]) .theme-btn .to-dark { display: block; } }
.top .call-top .num { display: none; }
@media (min-width: 600px) and (max-width: 1079px), (min-width: 1280px) { .top .call-top .num { display: inline; } } /* 1080 to 1279: nav shown, number hidden so the header stays one row */

/* Type */
.eyebrow { font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.eyebrow b { color: var(--accent); font-weight: 500; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.04; margin: 0 0 16px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: 1.0625rem; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 16px; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.1875rem); max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* Buttons and labels */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 12px; font-weight: 600; text-decoration: none; border: 1.5px solid var(--gold); background: var(--gold); color: var(--gold-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: rgba(var(--ink-rgb), 0.35); }
.btn:hover { filter: brightness(1.08); }
.top .btn { min-height: 40px; padding: 8px 14px; font-size: 0.875rem; }
.tag { display: inline-block; font-size: 0.8125rem; color: var(--muted); border: 1px dashed rgba(var(--ink-rgb), 0.35); border-radius: 8px; padding: 4px 10px; margin: 0 8px 8px 0; }
.tag.live { color: var(--accent); border: 1px solid var(--accent); background: var(--gold-wash); }
.chip { display: inline-block; font: 500 0.8125rem/1.3 var(--mono); color: var(--accent); border: 1px solid var(--accent); background: var(--gold-wash); border-radius: 999px; padding: 6px 12px; }

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
section.hero { border-top: 0; padding-top: 48px; }
/* Hero: the real-data Valley map as a backdrop under glass panels (decorative; the F2 figure carries the map's meaning) */
section.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-map { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-map img { position: absolute; right: -8%; top: 50%; width: min(1100px, 120vw); height: auto; max-width: none; transform: translateY(-46%); opacity: 0.9; }
.hero-map::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(var(--bg-rgb), 0.9) 36%, rgba(var(--bg-rgb), 0.2) 66%, rgba(var(--bg-rgb), 0.35) 100%), linear-gradient(180deg, rgba(var(--bg-rgb), 0) 60%, var(--bg) 100%); }
@media (max-width: 899px) { .hero-map img { right: -40%; opacity: 0.4; } .hero-map::after { background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.88) 0%, rgba(var(--bg-rgb), 0.94) 55%, var(--bg) 100%); } }
.glass { background: rgba(var(--card-rgb), 0.9); border: 1px solid rgba(var(--ink-rgb), 0.16); border-radius: 20px; padding: 24px; box-shadow: inset 0 1px 0 rgba(var(--ink-rgb), 0.07), 0 24px 60px var(--shadow); }
@supports (backdrop-filter: blur(12px)) { .glass { background: rgba(var(--card-rgb), 0.76); backdrop-filter: blur(14px) saturate(1.15); } }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--card); backdrop-filter: none; } }
.paths { display: grid; gap: 16px; margin-top: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr)); } /* two equal cards side by side when each gets 248px, else stacked */
.path { display: flex; flex-direction: column; padding: 20px; }
.path .h3 { font: 600 1.25rem/1.25 var(--sans); margin: 4px 0 8px; }
.path p:not(.eyebrow) { color: var(--muted); font-size: 0.9375rem; margin: 0; }
.path .btns { margin: auto 0 0; padding-top: 16px; flex-direction: column; align-items: stretch; gap: 10px; }
.today { align-self: start; }
.today .steps { margin-top: 8px; }
.soon { margin: 16px 0 0; padding-top: 16px; border-top: 1px dashed rgba(var(--ink-rgb), 0.25); color: var(--muted); font-size: 0.875rem; }
.soon strong { color: var(--ink); font-weight: 600; }
.grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .grid { grid-template-columns: 1.05fr 1fr; gap: 64px; } .grid.flip > :first-child { order: 2; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.card.dashed { border-style: dashed; }
.card.gold { background: var(--gold-wash); border-color: var(--accent); }
.card + .card { margin-top: 16px; }
.step-no { font: 500 0.8125rem/1 var(--mono); color: var(--accent); }

/* Lists */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li p { grid-column: 2; margin: 0; color: var(--muted); font-size: 0.9375rem; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding: 8px 0 8px 34px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font: 600 0.75rem/22px var(--sans); text-align: center; }
/* F7 sample portal list; planned features get open rings, not checks */
.plist { list-style: none; margin: 0 0 12px; padding: 0; }
.plist li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.plist li:first-child { border-top: 0; padding-top: 4px; }
.plist .ref { font: 500 0.8125rem/1.4 var(--mono); color: var(--accent); }
.plan { list-style: none; margin: 0; padding: 0; }
.plan li { position: relative; padding: 8px 0 8px 34px; }
.plan li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--accent); }
.fields { margin: 0; display: grid; gap: 12px; }
.fields div { background: var(--field); border-radius: 10px; padding: 10px 14px; }
.fields dt { font-size: 0.8125rem; color: var(--muted); }
.fields dd { margin: 2px 0 0; }
@media (min-width: 600px) { .fields { grid-template-columns: 1fr 1fr; } .fields .wide { grid-column: 1 / -1; } }

/* Status timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 36px; }
.timeline li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font: 600 0.75rem/22px var(--sans); text-align: center; }
.timeline li::after { content: ""; position: absolute; left: 10.5px; top: 26px; bottom: 2px; width: 1.5px; background: var(--gold); opacity: 0.5; }
.timeline li:last-child::after { display: none; }
.timeline .when { display: block; font: 500 0.8125rem/1.4 var(--mono); color: var(--muted); }
.states { display: grid; gap: 10px; margin: 0; }
.states div { display: grid; gap: 2px; align-content: start; }
.states dt { font-weight: 600; }
.states dd { margin: 0; color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 600px) { .states { grid-template-columns: 1fr 1fr; gap: 16px 24px; } }

/* Figures */
figure { margin: 0; }
.shot { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #111214; }
.shot.paper { background: #fff; }
figcaption { margin-top: 10px; }
/* Valley (F2, F5): still map with the 95833 marker; assets/valley.js may lay one 3D canvas over the figure on screen */
.valley-fig { width: 100%; max-width: 460px; margin: 0 auto; }
.grid > div > .valley-fig { margin: 24px 0 0; }
.valley { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.valley img { max-width: none; height: auto; }
.valley .valley-mark { position: absolute; inset: 0; width: 100%; height: 100%; }
.valley-mark text { font-family: var(--mono); fill: var(--ink); }
.valley-mark .ring { fill: var(--gold-wash); stroke: var(--accent); }
.valley-mark .dot { fill: var(--accent); }
.valley canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.6s ease; }
.valley.live canvas { opacity: 1; }
.valley.live img, .valley.live .valley-mark { visibility: hidden; transition: visibility 0s 0.6s; }
@media (prefers-reduced-motion: reduce) { .valley canvas, .valley.live img, .valley.live .valley-mark { transition: none; } }

/* Contact and footer */
.contact { display: grid; gap: 16px; }
@media (min-width: 700px) { .contact { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .contact { grid-template-columns: repeat(4, 1fr); } }
.contact .card { margin: 0; }
.contact .card + .card { margin-top: 0; }
.big { font: 400 1.75rem/1.1 var(--serif); color: var(--ink); text-decoration: none; }
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 0.875rem; }
footer .wrap { display: grid; gap: 12px; }
