/* Tessera marketing site.
   Design direction: match the live map's own chrome exactly, not a
   separately-invented palette - read directly from public/map/app.css,
   whose own comment states the principle: "chrome is monochrome, the only
   colour in the interface is data." Same tokens (--bg/--ink/--dim/--off/
   --line), same single monospace font for all UI text, same zero border
   radius everywhere. Colour (orange/teal/amber) is used ONLY where it
   represents an actual data reading - score tiers, chart bars, the active
   data-layer tab - never as page decoration.
   Content is always visible in the DOM by default: an earlier version
   hid whole sections behind a scroll-triggered IntersectionObserver, which
   left real gaps and overlap when the observer didn't fire in time (slow
   devices, full-page screenshot tools, etc). Nothing here depends on JS
   running to be visible; bar fills use @starting-style, which degrades to
   "just show the final state" if unsupported, never to "blank".
   No underlines anywhere, no em dashes in any copy. */

:root {
  --bg: #0A0B0D;
  --panel: #14161B;
  --panel-2: #191B21;
  --line: #22262C;
  --ink: #E6E8EA;
  --dim: #6D747D;
  --off: #4A5057;

  --orange: #F2601C;
  --amber: #D6841A;
  --teal: #3E6A5F;

  --font: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, serif;

  --ease-out: cubic-bezier(.23,1,.32,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--sans); }
::selection { background: var(--teal); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover, a:focus { text-decoration: none; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; }
section { padding: 96px 0; }
.center { text-align: center; }

/* Headlines and body copy are a proportional sans - the map's dense info
   panel reads fine as tight all-monospace at 11px, but that same choice
   made large marketing headlines look mechanical and hard to scan (real
   feedback, a screenshot of the actual rendered headline). Monospace is
   now reserved for things that read as data or as an action: buttons, the
   score-card/chart readouts, tab labels - same "mono is a data signal"
   logic as the map's own "colour is a data signal" rule. */
h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .4em; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.lead { color: var(--dim); font-size: 1.05rem; }

.eyebrow {
  font: 600 11px/1 var(--font); text-transform: uppercase; letter-spacing: .1em;
  color: var(--dim); margin: 0 0 16px; display: flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 12px; height: 1px; background: var(--dim); }
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { display: none; }

/* ---------- entrance reveal, pure CSS, time-based not scroll-based ----------
   Deliberately NOT animation-timeline: view() or an IntersectionObserver:
   both tie visibility to scroll position/callback timing, and a full-page
   screenshot tool that resizes the viewport instead of performing a real
   incremental scroll (confirmed by testing this exact page with one) never
   advances that "scroll progress" - sections below the fold stayed stuck at
   opacity 0 forever, the same class of bug as before with a different
   mechanism. @starting-style instead fires once when an element is first
   rendered and is purely time-based, so it reliably finishes given any
   real wall-clock delay - the same pattern already used successfully for
   the score-card/chart bar fills below. Degrades to "always visible" (not
   "blank") if unsupported, and reduced-motion users skip it entirely. */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 1; transform: translateY(0);
    transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
  }
  @starting-style {
    [data-reveal] { opacity: 0; transform: translateY(16px); }
  }
  .props .card:nth-child(2), .timeline-step:nth-child(2) { transition-delay: 70ms; }
  .props .card:nth-child(3), .timeline-step:nth-child(3) { transition-delay: 140ms; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 0;
  font: 600 13px/1 var(--font); text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--ink);
  transition: transform 160ms var(--ease-out), background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn.small { padding: 8px 16px; font-size: 11px; }
.btn.solid { background: var(--ink); color: var(--bg); }
@media (hover: hover) and (pointer: fine) {
  .btn.solid:hover { background: var(--dim); border-color: var(--dim); color: var(--ink); }
}
.btn.outline { background: transparent; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn.outline:hover { background: var(--ink); color: var(--bg); }
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

/* ---------- nav ---------- */

nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 11, 13, 0);
  backdrop-filter: blur(0px);
  transition: background 300ms var(--ease-out), backdrop-filter 300ms var(--ease-out), border-color 300ms var(--ease-out);
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(10, 11, 13, .92);
  backdrop-filter: blur(6px);
  border-bottom-color: var(--line);
}
nav .inner {
  max-width: 1120px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 8px; font: 600 15px/1 var(--sans); letter-spacing: -.01em; }
.navlinks { display: flex; gap: 26px; font: 500 14px/1 var(--sans); }
.navlinks a { opacity: .7; transition: opacity 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .navlinks a:hover { opacity: 1; } }
@media (max-width: 720px) { .navlinks { display: none; } }

/* ---------- hero: headline + a real score-card mockup, no illustration ---------- */

.hero { position: relative; padding: 88px 0 60px; overflow: hidden; }
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero-copy h1 { margin-bottom: .45em; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-glow {
  position: absolute; inset: -20%; z-index: 0;
  background: radial-gradient(circle at 50% 40%, rgba(230, 232, 234, .08), transparent 70%);
  filter: blur(50px);
}

.score-mock {
  position: relative; z-index: 1; width: 100%; max-width: 340px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.score-mock-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.score-mock-id { font: 500 11px/1 var(--font); color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.score-mock-tier {
  font: 600 10px/1 var(--font); text-transform: uppercase; letter-spacing: .04em;
  padding: 5px 10px; border: 1px solid currentColor;
}
.score-mock-tier.tier-high { color: var(--orange); }
.score-mock-num { display: flex; align-items: baseline; gap: 4px; margin-bottom: 20px; }
.score-mock-value { font: 700 2.8rem/1 var(--font); letter-spacing: -.02em; }
.score-mock-max { font: 500 1rem/1 var(--font); color: var(--dim); }
.score-mock-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.score-mock-row { display: grid; grid-template-columns: 108px 1fr 28px; align-items: center; gap: 10px; }
.score-mock-row span { font: 500 12px/1 var(--font); color: var(--dim); }
.score-mock-row b { font: 600 12px/1 var(--font); text-align: right; }
.score-mock-bar { height: 5px; background: var(--panel-2); overflow: hidden; }
.score-mock-bar i {
  display: block; height: 100%; background: var(--c, var(--teal));
  width: var(--w, 0%); transition: width 640ms var(--ease-out);
}
@starting-style { .score-mock-bar i { width: 0%; } }
.score-mock-foot { border-top: 1px solid var(--line); padding-top: 14px; font: 500 11px/1.4 var(--font); color: var(--dim); text-transform: uppercase; letter-spacing: .03em; }

.stats {
  display: flex; gap: 48px; flex-wrap: wrap; justify-content: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 24px;
}
.stat b { display: block; font: 700 1.6rem/1 var(--font); font-variant-numeric: tabular-nums; }
.stat span { color: var(--dim); font: 500 11px/1 var(--font); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- card: the one reusable surface for props, tabs, insights, cta ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 28px;
}

/* ---------- value props ---------- */

.props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.props .card { border: 0; }
.prop-icon { width: 24px; height: 24px; color: var(--dim); margin-bottom: 16px; }
.props p:last-child { color: var(--dim); margin-bottom: 0; }
@media (max-width: 820px) { .props { grid-template-columns: 1fr; } }

/* ---------- console: technical claim section, dot-grid backdrop, no blob ---------- */

.console { position: relative; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 100px 0; overflow: hidden; }
.console-grid {
  position: absolute; inset: 0; opacity: .6;
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
}
.console .wrap { z-index: 1; }
.console h2 { max-width: 640px; margin: 0 auto 22px; }
.console .lead { max-width: 480px; margin: 0 auto 40px; }

.spec-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 40px; }
.spec { background: var(--panel-2); padding: 18px 20px; }
.spec-k { display: block; font: 600 10px/1 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin-bottom: 8px; }
.spec-v { display: block; font: 500 13px/1.4 var(--font); }
@media (max-width: 780px) { .spec-row { grid-template-columns: 1fr; } }

/* ---------- layer tabs ---------- */

.tabbar { display: flex; gap: 0; margin-bottom: 28px; flex-wrap: wrap; border: 1px solid var(--line); width: fit-content; }
.tabbar button {
  --accent: var(--teal);
  font: 600 12px/1 var(--font); text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 18px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--dim);
  cursor: pointer;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.tabbar button:last-child { border-right: 0; }
.tabbar button[aria-selected="true"] { background: var(--accent); color: var(--bg); }

[hidden] { display: none !important; }
.tabpanel { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.tabpanel-copy p { color: var(--dim); margin-bottom: 0; }
@media (max-width: 780px) { .tabpanel { grid-template-columns: 1fr; } }

.chart-mock { display: flex; flex-direction: column; gap: 14px; }
.chart-row { display: grid; grid-template-columns: 56px 1fr 28px; align-items: center; gap: 12px; }
.chart-row span { font: 500 11px/1 var(--font); color: var(--dim); text-transform: uppercase; letter-spacing: .03em; }
.chart-row b { font: 600 12px/1 var(--font); text-align: right; }
.chart-row i {
  display: block; height: 7px; background: var(--accent);
  width: var(--w, 0%); transition: width 560ms var(--ease-out);
}
@starting-style { .chart-row i { width: 0%; } }

/* ---------- how it works: timeline, no blob badges ---------- */

.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 15px; left: 6%; right: 6%; height: 1px; background: var(--line); }
.timeline-step { position: relative; text-align: center; }
.timeline-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-bottom: 18px; position: relative; z-index: 1;
  background: var(--bg); border: 1px solid var(--line);
  font: 600 11px/1 var(--font); color: var(--dim);
}
.timeline-step p { color: var(--dim); max-width: 260px; margin: 0 auto; font-size: .92rem; }
@media (max-width: 820px) {
  .timeline { grid-template-columns: 1fr; gap: 40px; }
  .timeline::before { display: none; }
}

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--line); padding: 20px 0; }
.faq summary {
  font-family: var(--sans); font-weight: 600; font-size: 1rem; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--dim); transition: transform 200ms var(--ease-out); flex: none; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--dim); margin: 14px 0 0; max-width: 720px; }

/* ---------- cta band ---------- */

.ctaband { text-align: center; padding: 48px 40px; }
.ctaband p { color: var(--dim); max-width: 460px; margin: 0 auto 28px; }

/* ---------- footer: a real sitemap, not a decorative wordmark ---------- */

footer { background: var(--panel); border-top: 1px solid var(--line); padding: 64px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 48px; border-bottom: 1px solid var(--line);
}
.footer-brand p { color: var(--dim); font-size: .92rem; max-width: 280px; margin: 14px 0 0; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font: 600 12px/1 var(--font); text-transform: uppercase; letter-spacing: .06em;
  color: var(--dim); margin: 0 0 4px;
}
.footer-col a { color: var(--ink); font-size: .92rem; opacity: .85; }
@media (hover: hover) and (pointer: fine) { .footer-col a:hover { opacity: 1; } }
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 8px; }
}
.footer-bottom {
  padding: 20px 24px 32px; color: var(--dim); font: 500 12px/1 var(--font);
  text-transform: uppercase; letter-spacing: .06em;
}
