/* My Ad Beacons — Sky Technologies
   Visual identity: a signals-lab console for making inaudible sound visible.
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #05070d;
  --panel: #0d1526;
  --panel-2: #101a30;
  --line: #1c2a45;
  --sky: #38bdf8;
  --sky-dim: #1b6a8f;
  --violet: #a78bfa;
  --text: #f5f7fa;
  --muted: #7f8ba8;
  --muted-2: #4a5875;
  --danger: #fb7185;
  --good: #4ade80;

  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% -10%, rgba(56,189,248,0.14), transparent),
    radial-gradient(ellipse 50% 35% at 100% 10%, rgba(167,139,250,0.10), transparent);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- Nav ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,7,13,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--sky), var(--violet));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 15px; height: 15px; }
.brand small {
  display: block;
  font-family: var(--body);
  font-weight: 500;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-top: 1px;
}
.navlinks { display: flex; gap: 4px; align-items: center; }
.navlinks a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.navlinks a:hover, .navlinks a.active { color: var(--text); background: rgba(255,255,255,0.05); }
.navlinks a:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

/* ---- Sections ---- */
section { padding: 64px 0; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--sky);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 8px var(--sky);
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 18px; }
p { color: var(--muted); margin: 0 0 16px; }
p.lede { font-size: 17px; color: #c3cbe0; max-width: 620px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--sky), #2196c9);
  color: #04121a;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.3), 0 8px 24px -8px rgba(56,189,248,0.55);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(56,189,248,0.5), 0 10px 28px -6px rgba(56,189,248,0.7); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--panel-2); border-color: var(--sky-dim); }
.btn-danger { background: rgba(251,113,133,0.12); color: var(--danger); border-color: rgba(251,113,133,0.3); }
.btn-danger:hover { background: rgba(251,113,133,0.2); }

/* ---- Panels / cards ---- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---- Form elements ---- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
textarea, input[type="text"] {
  width: 100%;
  background: #070b15;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  padding: 13px 14px;
  resize: vertical;
}
textarea:focus, input[type="text"]:focus { border-color: var(--sky-dim); }
.hint { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; }

/* ---- Frequency ladder (signature structural motif: the 8 real tone bins) ---- */
.ladder {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
}
.ladder-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
}
.ladder-freq {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  text-align: right;
}
.ladder-bar-track {
  height: 14px;
  background: #070b15;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.ladder-bar-fill {
  height: 100%;
  width: 4%;
  background: linear-gradient(90deg, var(--sky-dim), var(--sky));
  border-radius: 4px;
  transition: width .06s linear;
}
.ladder-bar-fill.active { box-shadow: 0 0 12px rgba(56,189,248,0.7); }

/* ---- Mono readouts ---- */
.mono { font-family: var(--mono); }
.readout {
  font-family: var(--mono);
  font-size: 13px;
  background: #070b15;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  color: #9fe6ff;
  word-break: break-all;
}

/* ---- Status pill ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.pill.live { color: var(--good); border-color: rgba(74,222,128,0.35); }
.pill.live .dot { background: var(--good); box-shadow: 0 0 8px var(--good); animation: pulse 1.6s infinite; }
.pill.armed { color: var(--sky); border-color: rgba(56,189,248,0.35); }
.pill.armed .dot { background: var(--sky); box-shadow: 0 0 8px var(--sky); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ---- Log table ---- */
.log-table { width: 100%; border-collapse: collapse; }
.log-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.log-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}
.log-table tr:last-child td { border-bottom: none; }
.log-table .t-time { font-family: var(--mono); color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.log-table .t-text { color: var(--text); }
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.03em;
}
.badge.ok { background: rgba(74,222,128,0.12); color: var(--good); }
.badge.warn { background: rgba(251,191,36,0.12); color: #fbbf24; }
.badge.bad { background: rgba(251,113,133,0.12); color: var(--danger); }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
}
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer p { margin: 0; font-size: 13px; color: var(--muted-2); }

/* ---- Empty state ---- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted-2);
}
.empty h3 { color: var(--muted); }

/* ---- utility ---- */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.small { font-size: 13px; }
