/* Text2Air public site (4.8): the broadcast-desk brand, turned outward.
   Same dark palette and red-accent wordmark as the console, but editorial:
   display headlines, a monospace signal voice for labels and status lines,
   and the on-air motif. System font stacks only; no external assets. */
:root {
  --bg: #0e1116;
  --bg-deep: #090b0f;
  --panel: #161b22;
  --panel-2: #1c232c;
  --border: #2a323d;
  --text: #e6edf3;
  --muted: #9aa7b4;
  --accent-red: #e53935;
  --accent-red-dim: #7a2321;
  --accent: #4da3ff;
  --radius: 10px;
  --display: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas,
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Anchor jumps land below the sticky header (.site-header is a fixed 60px
     bar) plus breathing room, so a target section's first line (the #how
     kicker in particular) is never hidden under the nav. On the scroll root
     rather than per target, so every in-page anchor clears the nav. */
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--display);
}

a {
  color: var(--accent);
}

/* --- chrome ------------------------------------------------------------- */

.site-header {
  /* Three zones on one bar: brand pinned left, nav centred, Sign in
     pinned right. The equal 1fr side tracks are what centre the nav
     against the full bar width rather than against its siblings. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 24px;
  /* Always visible on scroll (public marketing chrome only: this class lives
     only on site_base.html, never the console/portal base, so the operator and
     publisher consoles are untouched). The solid header background lets the
     black workflow band scroll cleanly underneath, and the z-index keeps the
     bar above every section including that band. */
  position: sticky;
  top: 0;
  z-index: 50;
  /* The canonical header bar, shared with the console chrome (console.css
     .topbar): one fixed height and one left inset, so the brand lands at
     the same x and y on every surface. Vertical centring comes from the
     fixed height, never from sibling heights or vertical padding. */
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-deep), var(--bg));
}

.site-wordmark {
  /* start, not the grid default stretch: the click target must hug the
     brand, not span the whole left track. */
  justify-self: start;
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 24px;
  /* line-height 1 hugs the glyphs so the mark centres optically against
     the wordmark, the same values as the console chrome's a.wordmark. */
  line-height: 1;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
}

/* No link state may restyle the brand: no blue, no underline, ever. */
.site-wordmark:hover,
.site-wordmark:focus,
.site-wordmark:visited {
  color: var(--text);
  text-decoration: none;
}

.site-wordmark .accent {
  color: var(--accent-red);
}

.site-wordmark .logo-mark {
  display: block;
  flex-shrink: 0;
  height: 30px;
  width: 30px;
  margin-right: 4px;
}

.site-header nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--text);
}

/* The right zone: Sign in sits outside the nav so the centred group can
   hold the browsing links alone. It repeats the nav's type treatment. */
.site-header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.site-header .signin {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
}

.site-header .signin:hover {
  border-color: var(--accent-red);
}

/* The homepage-only marketing anchors: site_home fills the site_nav block
   with a .home-nav group, and no other page carries the class, so nothing
   here can reach the wall, plans or legal pages. display: contents lets
   the links join the nav's own flex flow and 20px gap; the wrapper gives
   one switch to hide all four on narrow screens (the mock hid its
   nav-links the same way) without touching the shared links or the
   60px bar. */
.site-header nav .home-nav {
  display: contents;
}

@media (max-width: 960px) {
  .site-header nav .home-nav {
    display: none;
  }
}

.site-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px) 64px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px clamp(20px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.4px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer .spacer {
  margin-left: auto;
}

/* --- the on-air motif ----------------------------------------------------- */

.onair {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #ffb3b1;
  background: var(--accent-red-dim);
  border: 1px solid var(--accent-red);
  border-radius: 999px;
  padding: 6px 16px;
}

.onair .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.6);
  animation: onair-pulse 2s infinite;
}

@keyframes onair-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(229, 57, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .onair .dot {
    animation: none;
  }
}

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

.hero {
  padding: clamp(56px, 10vw, 110px) 0 clamp(40px, 6vw, 72px);
  text-align: left;
  max-width: 780px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -1px;
  font-weight: 800;
  margin: 22px 0 18px;
}

.hero h1 .accent {
  color: var(--accent-red);
}

.hero .lede {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 32px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.button {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 16px;
}

.button.primary {
  background: var(--accent-red);
  color: #fff;
}

.button.primary:hover {
  filter: brightness(1.08);
}

.button.ghost {
  color: var(--text);
  border: 1px solid var(--border);
}

.button.ghost:hover {
  border-color: var(--muted);
}

/* --- sections -------------------------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-red);
  margin: 0 0 10px;
}

.section {
  padding: clamp(36px, 6vw, 64px) 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -0.5px;
  margin: 0 0 12px;
}

.section .sub {
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card .step {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.signal {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* --- the invite (stealth) page ---------------------------------------------- */

.invite .status-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* The decorative broadcast timecode beside the preview badge: quiet mono,
   incremented client-side on the wall. */
.rec-timer {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 1.5px;
  color: var(--muted);
}

.invite {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 620px;
  padding: clamp(56px, 12vw, 120px) 0;
}

.invite h1 {
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.5px;
  margin: 20px 0 12px;
}

.invite p {
  color: var(--muted);
  margin: 0 0 30px;
}

/* The stealth wall variant: one calm centred column filling the viewport
   between the header bar and the fixed legal bar. */
.invite-centred {
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
  min-height: calc(100vh - 220px);
  padding: clamp(24px, 6vw, 64px) 0;
}

.invite-centred .cta-row {
  justify-content: center;
}

/* The request overlay: a native modal dialog over a dimmed backdrop. The
   dialog element traps focus while open and closes on Esc; the script wires
   the backdrop click, the X, and focus return to the opener. */
.request-dialog {
  margin: auto;
  width: min(560px, calc(100vw - 32px));
  max-height: min(85vh, 720px);
  overflow-y: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 26px;
}

.request-dialog::backdrop {
  background: rgba(9, 11, 15, 0.72);
}

.request-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.request-dialog-head h2 {
  margin: 0;
  font-size: 22px;
}

.dialog-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.dialog-close:hover {
  color: var(--text);
}

/* The wall's slim legal bar, pinned to the bottom of the viewport. */
.wall-footbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

.wall-footbar a {
  color: var(--muted);
  text-decoration: none;
}

.wall-footbar a:hover {
  color: var(--text);
}

/* --- forms and policy pages -------------------------------------------------- */

.page {
  max-width: 680px;
  padding: clamp(36px, 7vw, 64px) 0;
}

.page h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.5px;
}

.page .updated {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.placeholder-note {
  background: var(--panel-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.site-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
}

.site-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.site-form input,
.site-form textarea {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font: 15px/1.5 var(--display);
}

.site-form input:focus,
.site-form textarea:focus {
  outline: 1px solid var(--accent-red);
  border-color: var(--accent-red);
}

.site-form button {
  align-self: flex-start;
  background: var(--accent-red);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

/* The honeypot: removed from every human's flow, present for automation. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-errors {
  background: #5a1f1f;
  color: #ff9d9d;
  border-radius: 8px;
  padding: 12px 16px;
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.success {
  background: #17361f;
  color: #7ee2a0;
  border-radius: var(--radius);
  padding: 18px 22px;
}
