/* MarineCast — site styles.
   Mobile-first. Design tokens mirror the canvas: instrument-grade dark,
   bioluminescent teal accent, Sora / Chivo / JetBrains Mono. */

:root {
  --void: #050B10;
  --deep: #0A141C;
  --shelf: #081118;
  --sink: #040A0E;
  --ridge: #142230;
  --line: #1a2c3a;
  --line-2: #243b4c;
  --edge: #2e4a5c;

  --foam: #e8f1f5;
  --tide: #93a9b6;
  --depth: #8fa3b0;
  --dim: #6d8492;

  --lume: #34d8c4;
  --lume-deep: #1d8f82;
  --lume-ink: #04231f;
  --signal: #ffb454;
  --signal-soft: #e0be86;
  --coral: #ff6b5a;

  --sans: Chivo, "Helvetica Neue", Arial, sans-serif;
  --display: Sora, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gutter: 20px;
  --measure: 1200px;
}

@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1080px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--foam);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  margin: 0;
  letter-spacing: -.02em;
  font-weight: 600;
  text-wrap: balance;
}

p { margin: 0 0 1rem; }
img, svg { max-width: 100%; }

a { color: var(--lume); text-decoration: none; }
a:hover { color: #6fe8d8; }
a:focus-visible,
button:focus-visible,
.btn:focus-visible { outline: 2px solid var(--lume); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--lume); color: var(--lume-ink);
  padding: 12px 20px; font-family: var(--display); font-weight: 600;
}
.skip:focus { left: 0; }

.wrap { max-width: var(--measure); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--lume); margin: 0 0 14px;
}
.lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--depth);
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.card { background: var(--deep); border: 1px solid var(--line); }

/* ---------- header ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px var(--gutter);
  border-bottom: 1px solid var(--ridge);
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 11, 16, .92);
  backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--foam); min-height: 44px; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.site-nav { display: none; gap: 28px; font-size: 14px; }
.site-nav a { color: var(--tide); display: inline-flex; align-items: center; min-height: 44px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--foam); }
@media (min-width: 900px) { .site-nav { display: flex; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 600; font-size: 15px;
  padding: 14px 26px; min-height: 48px; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--lume); color: var(--lume-ink); }
.btn-primary:hover { background: #6fe8d8; color: var(--lume-ink); }
.btn-ghost { border-color: var(--edge); color: var(--foam); }
.btn-ghost:hover { border-color: var(--lume); color: var(--foam); }
.btn-sm { font-size: 13px; padding: 9px 18px; min-height: 44px; font-weight: 500; }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
@media (min-width: 720px) { .section { padding: 76px 0; } }

.h-hero { font-size: clamp(34px, 7vw, 60px); line-height: 1.05; font-weight: 700; }
.h-sec { font-size: clamp(26px, 4.4vw, 34px); line-height: 1.16; }
.h-sub { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.18; }
.lede { font-size: clamp(17px, 2.2vw, 19px); line-height: 1.6; color: var(--tide); max-width: 56ch; }
.body-muted { color: var(--tide); max-width: 68ch; }

/* ---------- grids ---------- */
.split { display: grid; gap: 40px; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; } }
.split-top { align-items: start; }
@media (min-width: 960px) { .split-side { grid-template-columns: 360px 1fr; } }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
@media (min-width: 620px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 620px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.hairline { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hairline > * { background: var(--deep); }
@media (min-width: 620px) { .hairline-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 620px) { .hairline-3 { grid-template-columns: repeat(3, 1fr); } }

.stat { padding: 22px; }
.stat-n { font-family: var(--mono); font-size: clamp(24px, 4vw, 30px); color: var(--lume); }
.stat-t { font-size: 13px; color: var(--tide); margin-top: 9px; line-height: 1.45; }

.pad { padding: 24px; }
.pad-lg { padding: 28px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 48px 0 56px; }
@media (min-width: 720px) { .hero { padding: 80px 0 72px; } }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(760px 380px at 76% 40%, rgba(52, 216, 196, .10), transparent 68%);
}
.hero > .wrap { position: relative; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 24px 36px;
  padding-top: 22px; border-top: 1px solid var(--ridge);
}
.hero-stats .n { font-family: var(--mono); font-size: clamp(20px, 3vw, 26px); color: var(--foam); }
.hero-stats .t { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--depth); margin-top: 6px; }

/* ---------- map figure ---------- */
.mapfig { position: relative; background: #07121a; border: 1px solid var(--line); }
.mapfig-head, .mapfig-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; background: var(--deep);
}
.mapfig-head { border-bottom: 1px solid var(--ridge); }
.mapfig-foot { border-top: 1px solid var(--ridge); }
.mapfig svg { display: block; width: 100%; height: auto; background: #061119; }
.ramp { flex: 1; height: 6px; background: linear-gradient(90deg, #0b2e4f, #1b6e8c, #35b0a0, #c9d74e, #f2a03d, #e4574a); }
.readout {
  position: absolute; right: 12px; bottom: 68px; width: 190px;
  background: rgba(6, 17, 25, .94); border: 1px solid var(--line-2); padding: 12px 14px;
}
.readout .v { font-family: var(--mono); font-size: 24px; color: var(--lume); margin: 6px 0 2px; }
.readout .row { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 10px; }
@media (max-width: 560px) { .readout { display: none; } }

/* ---------- tables ---------- */
.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--depth); text-align: left; padding: 13px 14px;
  border-bottom: 1px solid var(--line-2); font-weight: 500; white-space: nowrap;
}
td { padding: 14px; border-bottom: 1px solid var(--ridge); font-size: 14px; color: var(--tide); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sci { color: var(--dim); font-style: italic; }
.hi { color: var(--foam); }
.acc { color: var(--lume); }

/* ---------- misc blocks ---------- */
.note { border-left: 2px solid var(--lume); padding: 2px 0 2px 16px; }
.note-warn { border-left-color: var(--signal); }
.note h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--lume); margin: 0 0 7px; font-weight: 500; }
.note-warn h4 { color: var(--signal); }
.note p { font-size: 13.5px; line-height: 1.6; color: var(--tide); margin: 0; }

.badge { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; padding: 4px 9px; white-space: nowrap; }
.badge-live { background: var(--lume); color: var(--lume-ink); }
.badge-work { color: var(--signal); border: 1px solid var(--signal); }
.badge-plan { color: var(--depth); border: 1px solid var(--edge); }

.chip { font-family: var(--mono); font-size: 11px; padding: 6px 10px; display: inline-block; }
.chip-in { border: 1px solid var(--lume-deep); color: var(--lume); }
.chip-out { border: 1px dashed #5a3a36; color: #a37b75; text-decoration: line-through; }
.chip-queue { border: 1px solid #4a3a18; color: var(--signal-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.steps { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 13px; align-items: flex-start; }
.step svg { flex: none; margin-top: 2px; }
.step h4 { font-family: var(--display); font-size: 14px; font-weight: 500; color: var(--foam); margin: 0 0 4px; }
.step p { font-size: 13px; color: var(--tide); line-height: 1.5; margin: 0; }

pre {
  margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.9;
  color: var(--tide); overflow-x: auto;
}
pre .c { color: var(--depth); }
pre .s { color: #c9d74e; }
pre .n { color: var(--signal); }
pre .f { color: var(--lume); }

.timeline { display: flex; flex-wrap: wrap; }
.timeline > div { min-height: 44px; display: flex; align-items: center; padding: 10px 16px; }
.tl-train { flex: 1 1 220px; background: linear-gradient(90deg, #123241, var(--lume-deep)); }
.tl-test { flex: 1 1 160px; background: #2a1f0e; border: 1px solid #4a3a18; }

.cta { position: relative; padding: 64px 0; border-top: 1px solid var(--ridge); }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(640px 280px at 50% 100%, rgba(52, 216, 196, .09), transparent 70%);
}
.cta > .wrap { position: relative; text-align: center; }
.cta .hero-cta { justify-content: center; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--ridge); background: var(--sink); padding: 32px 0; }
.foot-inner { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 860px) { .foot-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.attrib {
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  color: var(--depth); line-height: 1.8; max-width: 58ch;
}
@media (min-width: 860px) { .attrib { text-align: right; } }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; }
.foot-nav a { color: var(--tide); display: inline-flex; align-items: center; min-height: 44px; }
