/* Sonar landing page. The Widescope "cyanotype blueprint" palette, shared
   with the app (client/src/theme.css): navy ink on drafting paper by day,
   the cyanotype itself in dark mode. Fonts are self-hosted, as in the app. */

@font-face { font-family: "Archivo"; font-weight: 400; font-display: swap; src: url(fonts/archivo-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url(fonts/archivo-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url(fonts/archivo-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "B612 Mono"; font-weight: 400; font-display: swap; src: url(fonts/b612-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  --bg: #EDF1F8;
  --card: #ffffff;
  --ink: #16305A;
  --sub: #52678C;
  --faint: #8A9BB8;
  --line: #DCE4F0;
  --line2: #B9C7DC;
  --blue: #1E3F72;
  --blue-soft: #E5EBF5;
  --amber: #C08A2D;
  --amber-soft: #F6ECD9;
  --amber-ink: #8A6320;
  --green: #216B47;
  --grid: rgba(30, 63, 114, 0.05);
  --on-blue: #ffffff;
  --mark-bg: #16305A;
  --mark-ink: #E2B566;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E3F72;
    --card: #16305A;
    --ink: #ECF0F8;
    --sub: #A9B7CF;
    --faint: #7488A9;
    --line: #2A4677;
    --line2: #47648F;
    --blue: #5E95D5;
    --blue-soft: #20447F;
    --amber: #E2B566;
    --amber-soft: #443B24;
    --amber-ink: #F4D597;
    --green: #8AD6A5;
    --grid: rgba(236, 240, 248, 0.055);
    --on-blue: #0F2547;
    --mark-bg: #0F2547;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

a { color: var(--blue); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 8px;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.mark { width: 30px; height: 30px; flex: none; }
.mark-bg { fill: var(--mark-bg); }
.mark-ink { stroke: var(--mark-ink); }
.mark-dot { fill: var(--mark-ink); stroke: none; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: .01em; }
.brand-by { color: var(--sub); font-size: 13px; white-space: nowrap; }
@media (max-width: 360px) { .brand-by { display: none; } }

/* ---------- hero ---------- */
.hero { padding-top: 64px; padding-bottom: 40px; }
.eyebrow { font-family: "B612 Mono", monospace; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-ink); margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 7vw, 62px); font-weight: 700; letter-spacing: -.015em; max-width: 16ch; }
.accent { color: var(--amber); }
.lede { margin-top: 20px; font-size: clamp(17px, 2.2vw, 20px); color: var(--sub); max-width: 60ch; }
.hero-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- sections ---------- */
main > section { padding-top: 48px; padding-bottom: 48px; }
.section-head { margin-bottom: 24px; max-width: 70ch; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; }
.section-head p { margin-top: 10px; color: var(--sub); font-size: 17px; }
.note { color: var(--sub); }

/* ---------- demo ---------- */
.demo { background: var(--card); border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(22, 48, 90, .08); }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: "B612 Mono", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.demo-stats { font-size: 14px; color: var(--sub); }

.demo-body { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .demo-body { grid-template-columns: minmax(0, 1fr) 320px; } }

.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; padding: 16px; min-width: 0; }
.station { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); min-width: 0; }
.station.pulse { animation: pulse 1.2s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 3px var(--amber); } 100% { box-shadow: 0 0 0 3px transparent; } }
.station-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.station-name { font-weight: 700; font-size: 16px; }
.station-count { font-family: "B612 Mono", monospace; font-size: 13px; color: var(--sub); }
.station-kind { display: block; font-size: 12px; color: var(--faint); margin-bottom: 8px; }
.chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.chip.moved { border-color: var(--amber); background: var(--amber-soft); animation: arrive .5s ease-out; }
@keyframes arrive { from { transform: translateY(-4px); opacity: .3; } to { transform: none; opacity: 1; } }
.chip-id { font-family: "B612 Mono", monospace; font-weight: 400; color: var(--blue); }
.chip-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.chip-empty { font-size: 13px; color: var(--faint); padding: 6px 2px; }

.side { border-top: 1px solid var(--line); padding: 16px; display: grid; gap: 18px; align-content: start; min-width: 0; }
@media (min-width: 900px) { .side { border-top: 0; border-left: 1px solid var(--line); } }
.scan { display: grid; gap: 10px; }
.scan-title { font-family: "B612 Mono", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--sub); }
.scan label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; min-width: 0; }
.scan select { font: inherit; font-weight: 400; font-size: 15px; min-height: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); width: 100%; min-width: 0; }
.scan-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.scan-actions .btn { flex: 1 1 auto; }

.feed { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; min-height: 120px; }
.feed-item { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; font-size: 13px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); animation: arrive .4s ease-out; }
.feed-time { font-family: "B612 Mono", monospace; color: var(--faint); grid-row: span 2; }
.feed-text { overflow-wrap: anywhere; }
.feed-who { color: var(--faint); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .live-dot, .station.pulse, .chip.moved, .feed-item { animation: none; }
}

/* ---------- how it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); font-family: "B612 Mono", monospace; font-weight: 400; margin-bottom: 10px; }
.steps h3 { font-size: 20px; margin-bottom: 6px; }
.steps p { color: var(--sub); }

/* ---------- feature grid ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; border-top: 3px solid var(--blue); }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { color: var(--sub); font-size: 15px; }

/* ---------- who ---------- */
.who { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.who article { padding: 4px 0 4px 16px; border-left: 3px solid var(--amber); }
.who h3 { font-size: 18px; margin-bottom: 6px; }
.who p { color: var(--sub); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact h2 { font-size: clamp(26px, 4vw, 38px); }
.contact p { margin: 12px auto 24px; color: var(--sub); font-size: 17px; }
.contact .btn { white-space: normal; text-align: center; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 32px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; padding-bottom: 28px; color: var(--sub); font-size: 14px; }
