/* ═══════════════════════════════════════════════════════════════════════════
   Gantry waitlist page (/gantry) — page-scoped styles, prefixed .g-
   Spec: /home/trident/Downloads/Gantry_Waitlist_Page_Build_Brief.md §8, §10
   Owns its own light + dark scheme (styles.css is fixed-theme), so every
   colour here comes from the --g-* tokens below. Glass per §8: translucent
   panel, blur(24px), 1px white border at 18% opacity, solid @supports fallback.

   FONTS GAP: DM Serif Display + Inter are NOT self-hosted in this repo
   (assets/fonts/ holds Outfit only). Headlines fall back to Georgia, body to
   the self-hosted Outfit. To close it, drop the two woff2 files into
   assets/fonts/ and un-comment the @font-face block below — nothing else
   needs to change.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400;
   font-display: swap; src: url('../fonts/dm-serif-display-latin.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400;
   font-display: swap; src: url('../fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700;
   font-display: swap; src: url('../fonts/inter-latin-700.woff2') format('woff2'); }

:root {
  color-scheme: light dark;

  /* §8 tokens — verbatim */
  --g-indigo-900: #140F3F;
  --g-indigo:     #261977;
  --g-blue:       #5B6AF0;
  --g-gold:       #F7D667;
  --g-lavender:   #F3F3FF;
  --g-green:      #2ECC8F;
  --g-error:      #E05C5C;

  /* Scheme-dependent */
  --g-bg:        var(--g-lavender);
  --g-fg:        var(--g-indigo-900);
  --g-fg-mut:    #4B4770;
  --g-card:      rgba(255,255,255,.62);
  --g-card-solid:#FBFBFF;
  --g-badge-bg:  rgba(255,255,255,.7);
  --g-input:     rgba(255,255,255,.78);
  --g-input-line:rgba(20,15,63,.18);
  --g-placeholder:rgba(20,15,63,.62);
  --g-border-soft:rgba(20,15,63,.10);
  --g-link:      var(--g-indigo);
  --g-focus:     var(--g-indigo);
  --g-err-bg:    rgba(224,92,92,.10);
  --g-err-text:  #A34553;   /* #E05C5C is 3.2:1 on lavender — darkened for AA text */
  --g-ok-bg:     rgba(46,204,143,.12);
  --g-ok-text:   #1B6B57;   /* same reason: #2ECC8F is 1.9:1 on lavender */
  --g-glow-1:    rgba(91,106,240,.22);
  --g-glow-2:    rgba(247,214,103,.30);

  /* Type. DM Serif Display / Inter when the files land (see header note). */
  --g-font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --g-font-body: 'Inter', 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --g-bg:        var(--g-indigo-900);
    --g-fg:        #FFFFFF;
    --g-fg-mut:    rgba(255,255,255,.74);
    --g-card:      rgba(255,255,255,.06);
    --g-card-solid:#1B1550;
    --g-badge-bg:  rgba(255,255,255,.08);
    --g-input:     rgba(255,255,255,.07);
    --g-input-line:rgba(255,255,255,.20);
    --g-placeholder:rgba(255,255,255,.58);
    --g-border-soft:rgba(255,255,255,.14);
    --g-link:      #B9B9EF;
    --g-focus:     var(--g-gold);
    --g-err-bg:    rgba(224,92,92,.14);
    --g-err-text:  #EA7373;   /* #E05C5C is 4.35:1 on the glass card — lightened for AA text */
    --g-ok-bg:     rgba(46,204,143,.14);
    --g-ok-text:   var(--g-green);   /* 8.7:1 on deep indigo */
    --g-glow-1:    rgba(91,106,240,.28);
    --g-glow-2:    rgba(247,214,103,.14);
  }
}

/* ---------- Page base (overrides the shared fixed theme) ---------- */
body.gantry { background: var(--g-bg); color: var(--g-fg); font-family: var(--g-font-body); }
body.gantry input::placeholder,
body.gantry textarea::placeholder { color: var(--g-placeholder); opacity: 1; }
body.gantry::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(56rem 30rem at 8% -8%, var(--g-glow-1), transparent 64%),
    radial-gradient(44rem 26rem at 98% 6%, var(--g-glow-2), transparent 60%);
}

.g-shell { max-width: 1200px; margin: 0 auto; padding: 0 18px; }
.g-narrow { max-width: 840px; }
.g-sec { padding: 46px 0; }

/* ---------- Glass (§8) ---------- */
.g-glass {
  background: var(--g-card);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 48px -20px rgba(20,15,63,.28);
}
@supports not ((backdrop-filter: blur(24px)) or (-webkit-backdrop-filter: blur(24px))) {
  .g-glass { background: var(--g-card-solid); }
}

/* ---------- Type ---------- */
.g-h1 {
  font-family: var(--g-font-display); font-weight: 400;
  font-size: clamp(34px, 8vw, 62px); line-height: 1.05; letter-spacing: -.01em;
  color: var(--g-fg); text-wrap: balance;
}
.g-h2 {
  font-family: var(--g-font-display); font-weight: 400;
  font-size: clamp(26px, 5vw, 38px); line-height: 1.12; color: var(--g-fg);
}
.g-lede {
  font-size: clamp(17px, 2.4vw, 20px); line-height: 1.5;
  color: var(--g-fg-mut); margin-top: 16px; max-width: 32em;
}
.g-when { font-size: 14.5px; color: var(--g-fg-mut); margin-top: 18px; }

/* ---------- Hero (§3.1) ---------- */
.g-hero { padding: 40px 0 0; }
.g-hero-card { padding: clamp(26px, 6vw, 56px); max-width: 880px; }
.g-hero-card .g-btn { margin-top: 28px; }
.g-hero-foot { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--g-border-soft); }
.g-powered {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--g-border-soft); background: var(--g-badge-bg);
  font-size: 13px; font-weight: 600; color: var(--g-fg);
}

/* ---------- Body + columns (§3.2, §3.3) ---------- */
.g-quote {
  margin-top: 18px; padding-left: 20px; border-left: 3px solid var(--g-gold);
  font-size: 17px; line-height: 1.65; color: var(--g-fg);
}
.g-quote p + p { margin-top: 12px; }
.g-cols { display: grid; gap: 14px; list-style: none; margin-top: 22px; }
.g-col { padding: 22px; }
.g-col h3 { font-family: var(--g-font-display); font-weight: 400; font-size: 22px; color: var(--g-fg); }
.g-col p { margin-top: 8px; font-size: 15.5px; line-height: 1.55; color: var(--g-fg-mut); }

/* ---------- Form card + fields (§4) ---------- */
.g-form-card { padding: clamp(24px, 5vw, 48px); }

.g-field { display: grid; gap: 6px; margin-top: 20px; }
.g-field > label,
.g-fieldset > legend { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--g-fg); }
.g-opt { font-weight: 400; font-size: 14px; color: var(--g-fg-mut); }

.g-field input:not([type="checkbox"]):not([type="radio"]),
.g-field textarea,
.g-field select {
  width: 100%; min-height: 52px; padding: 14px 16px;
  font-family: inherit; font-size: 16px; line-height: 1.4; color: var(--g-fg);
  background: var(--g-input); border: 1px solid var(--g-input-line); border-radius: 12px;
}
.g-field textarea { min-height: 0; resize: vertical; }
.g-field select { cursor: pointer; }
.g-field :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--g-focus); outline-offset: 2px;
}
.g-field :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--g-error); box-shadow: inset 0 0 0 1px var(--g-error);
}

.g-fieldset { border: 0; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; }
.g-fieldset > legend { padding: 0; }

/* Pills: native radios, visually hidden, styled span — keyboard + SR stay native */
.g-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.g-pill { position: relative; display: inline-flex; cursor: pointer; }
.g-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.g-pill span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 11px 18px;
  border-radius: 999px; border: 1px solid var(--g-input-line); background: var(--g-input);
  color: var(--g-fg); font-size: 15px; font-weight: 500;
  transition: background .2s, border-color .2s, color .2s;
}
.g-pill input:checked + span {
  background: var(--g-indigo); border-color: var(--g-indigo); color: #FFFFFF; font-weight: 600;
}
.g-pill input:focus-visible + span { outline: 2px solid var(--g-focus); outline-offset: 2px; }

/* Checkboxes (fields 15 + 16) */
.g-check-row {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  font-weight: 400; font-size: 15px; line-height: 1.45; color: var(--g-fg);
}
.g-check-row input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--g-indigo); }
.g-check-row a { color: var(--g-link); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.g-check-row a:hover, .g-check-row a:focus-visible { color: var(--g-fg); }

/* ---------- Messages ---------- */
.g-err { font-size: 14px; line-height: 1.4; color: var(--g-err-text); }
.g-hint {
  font-size: 14px; line-height: 1.45; color: var(--g-fg-mut);
  padding: 9px 12px; border-left: 3px solid var(--g-gold);
  background: var(--g-badge-bg); border-radius: 8px;
}
.g-error {
  margin-top: 22px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--g-error); background: var(--g-err-bg);
  color: var(--g-err-text); font-size: 15px; line-height: 1.5;
}
.g-error a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* §4.1 — replaces the form in place */
.g-success {
  margin-top: 18px; padding: clamp(22px, 5vw, 32px); border-radius: 18px;
  border: 1px solid var(--g-green); background: var(--g-ok-bg);
}
.g-success h3 {
  font-family: var(--g-font-display); font-weight: 400;
  font-size: clamp(24px, 5vw, 32px); color: var(--g-ok-text);
}
.g-success p { margin-top: 12px; font-size: 16.5px; line-height: 1.6; color: var(--g-fg); }
.g-success:focus { outline: 2px solid var(--g-focus); outline-offset: 4px; }

/* ---------- Buttons ---------- */
.g-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 30px; border: 0; border-radius: 999px;
  cursor: pointer; text-align: center;
  transition: transform .18s var(--ease), box-shadow .2s, opacity .2s;
}
/* White on #5B6AF0 is 4.38:1 — 19px/700 puts the label in WCAG "large text", AA 3:1 */
.g-btn-primary { background: var(--g-blue); color: #FFFFFF; font-size: 19px; font-weight: 700; }
.g-btn-primary:hover, .g-btn-primary:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 22px -12px var(--g-blue); }
.g-btn:active { transform: translateY(0); }
.g-submit { width: 100%; margin-top: 26px; }
.g-submit[disabled] { opacity: .6; cursor: progress; transform: none; box-shadow: none; }

/* ---------- Honeypot (§6) ---------- */
.g-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.g-hp input { width: 1px; height: 1px; padding: 0; border: 0; }

/* ---------- Footer (§3.7) ---------- */
.g-footer {
  margin-top: 24px; padding: 34px 0 calc(38px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--g-border-soft);
  font-size: 14.5px; line-height: 1.6; color: var(--g-fg-mut); text-align: center;
}
.g-footer a { color: var(--g-link); text-decoration: underline; text-underline-offset: 2px; }
.g-footer a:hover, .g-footer a:focus-visible { color: var(--g-fg); }

/* ---------- Prose (privacy notice) ---------- */
.g-prose { margin-top: 18px; font-size: 16.5px; line-height: 1.65; color: var(--g-fg); }
.g-prose h3 {
  font-family: var(--g-font-display); font-weight: 400;
  font-size: 22px; color: var(--g-fg); margin-top: 30px;
}
.g-prose p { margin-top: 10px; }
.g-prose ul { margin: 10px 0 0 20px; }
.g-prose li { margin-top: 6px; }
.g-prose a { color: var(--g-link); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.g-prose a:hover, .g-prose a:focus-visible { color: var(--g-fg); }
.g-meta {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--g-border-soft);
  font-size: 14px; color: var(--g-fg-mut);
}

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .g-cols { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .g-hero-card { max-width: 100%; }
  .g-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .g-btn, .g-pill span { transition: none; }
  .g-btn-primary:hover, .g-btn-primary:focus-visible { transform: none; }
  html { scroll-behavior: auto; }
}
