/* ============================================================
   W4GGJ Mission Control — theme
   Stencil "mission control" look: dark, blueprint grid,
   cyan + amber accents. Inspired by the F4IOW dashboard.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Saira+Stencil+One&family=Share+Tech+Mono&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --bg: #05070d;
  --bg2: #080b13;
  --panel: rgba(13, 19, 29, 0.72);
  --panel-solid: #0b111b;
  --border: rgba(80, 180, 190, 0.16);
  --border-strong: rgba(90, 200, 210, 0.34);
  --cyan: #3fe0cf;
  --cyan-dim: #63b4b2;
  --amber: #f6a821;
  --amber-soft: #ffcf7a;
  --green: #24d97a;
  --red: #ff4d4d;
  --text: #dce5ef;
  --muted: #7d8da3;
  --mono: 'Share Tech Mono', ui-monospace, monospace;
  --stencil: 'Saira Stencil One', 'Rajdhani', sans-serif;
  --body: 'Rajdhani', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(246, 168, 33, 0.10), transparent 60%),
    radial-gradient(900px 600px at 8% 8%, rgba(63, 224, 207, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* blueprint grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(90, 180, 190, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 180, 190, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 0 22px 80px; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px;
  background: rgba(5, 7, 13, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 9px;
  background: linear-gradient(135deg, var(--amber), #b5760a);
  display: grid; place-items: center; font-size: 20px;
  box-shadow: 0 0 18px rgba(246, 168, 33, 0.35);
}
.brand .call { font-family: var(--stencil); font-size: 22px; letter-spacing: 1px; line-height: 1; }
.brand .sub { font-family: var(--mono); font-size: 10px; letter-spacing: 3px; color: var(--cyan-dim); }
.topbar .spacer { flex: 1; }
.clock { font-family: var(--mono); font-size: 17px; letter-spacing: 2px; color: var(--cyan); }
.clock small { display: block; font-size: 9px; letter-spacing: 3px; color: var(--muted); }

.pill {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  padding: 7px 14px; border-radius: 30px; border: 1px solid var(--border-strong);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s infinite; }
.dot.tx { background: var(--red); box-shadow: 0 0 12px var(--red); animation: pulse 0.7s infinite; }
.pill.tx { color: var(--red); border-color: rgba(255, 77, 77, 0.5); }
.pill.live { color: var(--green); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ── Ticker ──────────────────────────────────────────────── */
.ticker {
  overflow: hidden; white-space: nowrap;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 11, 19, 0.6);
  font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--cyan-dim);
  padding: 8px 0;
}
.ticker span { display: inline-block; padding-left: 100%; animation: scroll 34s linear infinite; }
@keyframes scroll { to { transform: translateX(-100%); } }

/* ── Section headers ─────────────────────────────────────── */
.section { margin-top: 46px; }
.sec-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 4px; color: var(--cyan); }
.sec-title { font-family: var(--stencil); font-size: clamp(30px, 5vw, 52px); line-height: 1; margin: 6px 0 4px; }
.sec-desc { color: var(--muted); font-size: 15px; max-width: 680px; }
.sec-rule { height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); margin: 14px 0 22px; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  backdrop-filter: blur(6px);
}
.card .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 3px; color: var(--muted); }
.card .big { font-family: var(--stencil); font-size: 34px; line-height: 1.05; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 720px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }

.cyan { color: var(--cyan); }
.amber { color: var(--amber); }
.green { color: var(--green); }
.red { color: var(--red); }
.mono { font-family: var(--mono); }

/* ── Hero ────────────────────────────────────────────────── */
.hero { margin-top: 34px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.hero h1 {
  font-family: var(--stencil); font-size: clamp(64px, 13vw, 150px); line-height: 0.9;
  background: linear-gradient(180deg, #eaf6f4 20%, var(--cyan) 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}
.hero .kick { font-family: var(--mono); font-size: 12px; letter-spacing: 4px; color: var(--cyan); margin-bottom: 12px; }
.hero .tag { font-size: 20px; margin-top: 14px; }
.hero .tag b { color: var(--amber); }
.hero .desc { color: var(--muted); margin-top: 12px; max-width: 560px; line-height: 1.5; }
.facts { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.facts .f .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.facts .f .v { font-family: var(--stencil); font-size: 20px; }

/* ── Live radio big readout ──────────────────────────────── */
.radio-main { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 820px) { .radio-main { grid-template-columns: 1fr; } }
.freq-readout { text-align: center; padding: 26px 20px; }
.freq-readout .hz {
  font-family: var(--stencil); font-size: clamp(46px, 9vw, 84px); line-height: 1;
  color: #eafffb; text-shadow: 0 0 30px rgba(63, 224, 207, 0.25); letter-spacing: 2px;
}
.freq-readout .unit { font-family: var(--mono); color: var(--cyan-dim); letter-spacing: 4px; font-size: 14px; }
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.chip {
  font-family: var(--mono); font-size: 13px; letter-spacing: 2px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: rgba(63, 224, 207, 0.05);
}
.chip.tx { color: var(--red); border-color: rgba(255, 77, 77, 0.5); }
.chip.rx { color: var(--green); border-color: rgba(36, 217, 122, 0.4); }

/* S-meter */
.smeter .s-val { font-family: var(--stencil); font-size: 46px; text-align: center; }
.s-bar { height: 14px; border-radius: 8px; margin: 12px 0 6px;
  background: linear-gradient(90deg, #24d97a, #a9e34b 40%, var(--amber) 68%, var(--red)); position: relative; }
.s-bar .mask { position: absolute; top: 0; right: 0; bottom: 0; background: rgba(5,7,13,0.82); border-radius: 8px; transition: left .4s; }
.s-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: var(--muted); }

/* ── Decode feed ─────────────────────────────────────────── */
.feed { max-height: 340px; overflow-y: auto; }
.feed-row {
  display: grid; grid-template-columns: 62px 44px 52px 1fr; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: 13px; padding: 7px 4px;
  border-bottom: 1px solid rgba(90, 180, 190, 0.07);
}
.feed-row .t { color: var(--muted); font-size: 11px; }
.feed-row .snr { text-align: right; }
.feed-row .msg { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row.cq .msg { color: var(--amber); }
.feed-row.new { animation: flashIn 1.4s ease; }
@keyframes flashIn { from { background: rgba(63, 224, 207, 0.16); } to { background: transparent; } }
.empty { color: var(--muted); font-family: var(--mono); font-size: 13px; padding: 20px; text-align: center; }

/* ── Band chips (propagation) ────────────────────────────── */
.band-chip { text-align: center; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--border); }
.band-chip .bn { font-family: var(--stencil); font-size: 16px; }
.band-chip .bc { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; }
.band-good { border-color: rgba(36, 217, 122, 0.4); } .band-good .bc { color: var(--green); }
.band-fair { border-color: rgba(246, 168, 33, 0.4); } .band-fair .bc { color: var(--amber); }
.band-poor { border-color: rgba(255, 77, 77, 0.35); } .band-poor .bc { color: var(--red); }

/* ── Log table ───────────────────────────────────────────── */
.log-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13px; }
.log-table th { text-align: left; font-size: 10px; letter-spacing: 2px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--border); font-weight: normal; }
.log-table td { padding: 9px 6px; border-bottom: 1px solid rgba(90, 180, 190, 0.06); }
.log-table tr.fresh td { animation: flashIn 2s ease; }
.log-table .call { color: var(--cyan); }

/* ── POTA / DX rows ──────────────────────────────────────── */
.spot-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 6px; border-bottom: 1px solid rgba(90,180,190,0.07); font-family: var(--mono); font-size: 13px; }
.spot-row .a { color: var(--cyan); }
.spot-row .meta { color: var(--muted); font-size: 11px; }
.spot-row .f { color: var(--amber); text-align: right; }

.foot { margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--muted); text-align: center; }
