/* Wow! Signal — wow.actuna.com
 *
 * Palette continues the product's own identity: cool paper neutrals, near-black ink, and one
 * red — Jerry Ehman's ballpoint, the pen that circled the 1977 signal on the Big Ear printout.
 * That red is never decorative here: it marks an OCCUPIED port, exactly as it does in the app
 * icon. A free slot is a hollow outline. The page and the product encode state the same way.
 */

:root {
  --ground:  #F4F5F7;
  --surface: #FFFFFF;
  --raise:   #FAFAFC;
  --plate:   #1D1D1F;   /* macOS chrome in the demo — always dark, in either theme */
  --ink:     #14151A;
  --muted:   #6E7078;
  --faint:   #93959E;
  --line:    #DFE1E6;
  --accent:  #D62828;
  --accent-soft: #FBE9E9;
  --shadow:  0 1px 2px rgba(20,21,26,.05), 0 14px 40px -18px rgba(20,21,26,.25);

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:  #0E0F13;
    --surface: #17181E;
    --raise:   #1D1F26;
    --plate:   #08080A;
    --ink:     #E9EAEE;
    --muted:   #9A9CA6;
    --faint:   #71737C;
    --line:    #2A2C34;
    --accent:  #FF5A4D;
    --accent-soft: #2A1614;
    --shadow:  0 1px 2px rgba(0,0,0,.5), 0 14px 40px -18px rgba(0,0,0,.8);
  }
}

:root[data-theme="dark"] {
  --ground:  #0E0F13;
  --surface: #17181E;
  --raise:   #1D1F26;
  --plate:   #08080A;
  --ink:     #E9EAEE;
  --muted:   #9A9CA6;
  --faint:   #71737C;
  --line:    #2A2C34;
  --accent:  #FF5A4D;
  --accent-soft: #2A1614;
  --shadow:  0 1px 2px rgba(0,0,0,.5), 0 14px 40px -18px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 980px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */

h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.06; font-weight: 700; }
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 600; }
p  { margin: 0; max-width: var(--measure); }

a { color: var(--ink); text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- layout rhythm ---------- */

section { padding: clamp(56px, 9vw, 104px) 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
.stack   { display: flex; flex-direction: column; gap: 20px; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }

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

nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
nav .row { display: flex; align-items: center; gap: 18px; height: 58px; }
nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
nav .brand img { width: 26px; height: 26px; border-radius: 6px; display: block; }
nav .links { margin-left: auto; display: flex; gap: 20px; font-size: 15px; }
nav .links a { color: var(--muted); text-decoration: none; }
nav .links a:hover { color: var(--ink); }
@media (max-width: 620px) { nav .links a.hide-sm { display: none; } }

/* ---------- hero ---------- */

.hero { padding-top: clamp(48px, 8vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(36px, 6vw, 56px); align-items: start; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }

.badge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent); background: var(--accent-soft);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-size: 15px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-primary:hover { opacity: .88; }
.btn-quiet { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-quiet:hover { border-color: var(--faint); }

/* ---------- the popover demo ---------- */

.demo { display: flex; flex-direction: column; gap: 10px; }
.menubar {
  display: flex; align-items: center; justify-content: flex-end; gap: 15px;
  background: var(--plate); border-radius: 9px 9px 0 0; padding: 0 14px; height: 28px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.menubar .mark { width: 17px; height: 17px; }
.menubar .glyph { width: 15px; height: 15px; opacity: .82; }
.menubar .clock { font-size: 12px; color: #F2F2F5; font-variant-numeric: tabular-nums; }

.popover {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0 0 12px 12px; box-shadow: var(--shadow); overflow: hidden;
}
.popover-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600;
}
.popover-head .count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }

.prow { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow .num {
  font-family: var(--mono); font-weight: 600; font-size: 16px;
  font-variant-numeric: tabular-nums; width: 46px; text-align: right;
}
.prow .proto { font-family: var(--mono); font-size: 10px; color: var(--muted); display: block; font-weight: 400; }
.prow .meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.prow .name { font-size: 14px; font-weight: 500; }
.prow .path {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prow .age { font-size: 11px; color: var(--faint); }
.prow .copy {
  margin-left: auto; flex: none; font-size: 12px; font-family: var(--sans);
  padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--raise); color: var(--ink); cursor: pointer; min-width: 66px;
}
.prow .copy:hover { border-color: var(--faint); }
.prow .copy[data-copied="true"] { border-color: var(--accent); color: var(--accent); }
.prow .foreign { font-size: 11px; color: var(--accent); font-family: var(--mono); }
.demo-note { font-size: 13px; color: var(--faint); }

/* ---------- occupied / free markers ---------- */

.slot { display: inline-block; width: 9px; height: 22px; border-radius: 3px; vertical-align: -5px; }
.slot-filled { background: var(--accent); }
.slot-free { border: 2px solid var(--faint); }

/* ---------- generic blocks ---------- */

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 7px;
}
.card p { font-size: 15px; color: var(--muted); }

.split { display: grid; gap: clamp(28px, 5vw, 48px); grid-template-columns: 1fr; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }

.term {
  background: var(--plate); color: #E4E4E8; border-radius: 11px; padding: 18px 20px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.8;
  /* Terminal transcripts are meaningful line by line, so newlines must survive. Long lines
     then scroll inside the block rather than forcing the page to scroll sideways. */
  white-space: pre;
  overflow-x: auto;
}
.term .c { color: #8A8D96; }
.term .p { color: #FF6B5E; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tbl td.api { font-family: var(--mono); font-size: 12.5px; }
.tbl td.no { color: var(--muted); }
.scroll-x { overflow-x: auto; }

.pill {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  padding: 2px 8px; border-radius: 6px; background: var(--raise); border: 1px solid var(--line);
}

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer .row { display: flex; flex-wrap: wrap; gap: 22px 30px; align-items: baseline; }
footer a { color: var(--muted); }
footer .fine { margin-top: 22px; font-size: 13px; color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
