/* Self-hosted fonts (OFL; instanced from the brand variable sources).
   Replaces Google Fonts — no third-party requests (privacy stance, #54). */
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/fonts/DMSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 600; font-display: swap; src: url('/fonts/DMSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/fonts/DMSans-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fonts/Inter-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/fonts/Inter-Medium.woff2') format('woff2'); }

/* w∞rds marketing site — styles.css
   Brand tokens (spec/woords/brand-brief.md §3):
     Midnight Ink  #0D0F1A  — background
     Chart Blue    #151B2E  — surface / cards / tiles
     Meridian      #1E2840  — dividers, borders, grid lines
     Compass Gold  #F0C040  — accent / CTA / the ∞ / lit seam
     Tropic Teal   #2EC4B6  — secondary accent
     Vellum        #F2EDD7  — primary text
     Faded Ink     #8A9BC4  — secondary text
     Stone         #3D465A  — disabled / muted tiles
   Type: DM Sans (display) + Inter (body), self-hosted.
*/

:root {
  --bg:        #0D0F1A;
  --surface:   #151B2E;
  --border:    #1E2840;
  --gold:      #F0C040;
  --teal:      #2EC4B6;
  --vellum:    #F2EDD7;
  --muted:     #8A9BC4;
  --stone:     #3D465A;
  --danger:    #E8622A;

  --radius:    12px;
  --radius-sm: 8px;
  --transition: 160ms ease;

  font-size: 16px;
}

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

html {
  background: var(--bg);
  color: var(--vellum);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Shared section shell ─────────────────────────────── */

.section {
  width: 100%;
  max-width: 560px;
  padding: 56px 20px;
  margin: 0 auto;
}

.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--vellum);
  margin-bottom: 14px;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 460px;
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px 20px 8px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(240, 192, 64, 0.06), transparent 60%),
    var(--bg);
}

.hero-inner {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 0 40px;
}

.wordmark {
  font-family: 'DM Sans', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--vellum);
  margin-bottom: 12px;
  user-select: none;
}

.wordmark .inf {
  color: var(--gold);
  font-size: 115%;
  letter-spacing: -0.06em;
  display: inline-block;
  transform: translateY(0.04em);
}

.tagline {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--vellum);
  margin: 4px 0 14px;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 420px;
  margin-bottom: 36px;
}

/* ── Hero animation (connected boards) ────────────────── */

.hero-demo {
  width: 100%;
  margin: 0 0 32px;
}

.hero-anim {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.hero-anim svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Board cells */
.cell-bg {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 1;
}

.board-frame {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
  rx: 8;
}

.cell-letter {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 22px;
  fill: var(--vellum);
  text-anchor: middle;
  dominant-baseline: central;
  opacity: 0;
}

.cell-letter.show { opacity: 1; }

/* The shared seam letter, lit gold + bordered */
.cell-bg.seam {
  fill: rgba(240, 192, 64, 0.12);
  stroke: var(--gold);
  stroke-width: 2;
}

.cell-letter.seam {
  fill: var(--gold);
}

/* The glowing dot/seam between the two boards */
.seam-dot {
  fill: var(--gold);
  opacity: 0.35;
}
.seam-dot.lit { opacity: 1; }

.hero-caption {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--gold);
  text-align: center;
  margin-top: 16px;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 300ms ease;
}
.hero-caption.show { opacity: 1; }

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
  -webkit-appearance: none;
}

.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }

.hero-cta {
  margin-top: 4px;
  padding: 15px 34px;
  font-size: 1.0625rem;
}

/* In the signup card the CTA is full-width */
#app .btn {
  display: block;
  width: 100%;
}

/* ── Features ─────────────────────────────────────────── */

.features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 36px;
}

.feature {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: start;
}

.feature-mark {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 192, 64, 0.08);
  border: 1px solid rgba(240, 192, 64, 0.25);
  border-radius: 10px;
  color: var(--gold);
  font-size: 1.375rem;
  line-height: 1;
}

.feature-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--vellum);
  margin-bottom: 4px;
}

.feature-text {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Alpha + signup ───────────────────────────────────── */

.alpha {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(21, 27, 46, 0.4);
}

.signup-section {
  padding-bottom: 64px;
}

.signup-section .section-title { margin-bottom: 24px; }

/* ── Card (state container) ───────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

/* ── Form elements ────────────────────────────────────── */

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--vellum);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

input[type="email"]:focus,
input[type="text"]:focus { border-color: var(--gold); }

input[type="email"]::placeholder,
input[type="text"]::placeholder { color: var(--stone); }

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-copy {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  width: auto;
  padding: 9px 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.state-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--vellum);
  margin-bottom: 8px;
}

.state-sub {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Code input (6-digit) ─────────────────────────────── */

.code-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.code-cell {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--vellum);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  padding: 10px 4px;
  outline: none;
  -webkit-appearance: none;
  transition: border-color var(--transition);
  caret-color: var(--gold);
}

.code-cell:focus { border-color: var(--gold); }
.code-cell.filled { border-color: var(--muted); }

/* ── Inline messages ──────────────────────────────────── */

.msg {
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: none;
}

.msg.visible { display: block; }

.msg-error {
  color: var(--danger);
  background: rgba(232, 98, 42, 0.1);
  border: 1px solid rgba(232, 98, 42, 0.25);
}

.msg-info {
  color: var(--muted);
  background: rgba(138, 155, 196, 0.08);
  border: 1px solid var(--border);
}

.msg-success {
  color: var(--teal);
  background: rgba(46, 196, 182, 0.08);
  border: 1px solid rgba(46, 196, 182, 0.25);
}

/* ── Directions steps ─────────────────────────────────── */

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
}

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--gold);
  color: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  font-size: 0.9375rem;
  color: var(--vellum);
  line-height: 1.5;
  padding-top: 3px;
}

.step-text a { color: var(--gold); text-decoration: none; }
.step-text a:hover { text-decoration: underline; }

/* ── Referral block ───────────────────────────────────── */

.referral-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.referral-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--vellum);
  margin-bottom: 6px;
}

.referral-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.invite-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.invite-link-box {
  flex: 1 1 220px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.8125rem;
  font-family: 'Inter', sans-serif;
  padding: 10px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  user-select: all;
}

/* ── Not-you / link buttons ───────────────────────────── */

.not-you {
  font-size: 0.8125rem;
  color: var(--stone);
  text-align: center;
  margin-top: 14px;
}

.not-you a, .link-btn {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
}

.not-you a:hover, .link-btn:hover {
  color: var(--vellum);
  text-decoration: underline;
}

.resend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resend-countdown {
  font-size: 0.8125rem;
  color: var(--stone);
}

.build-coming {
  background: rgba(240, 192, 64, 0.06);
  border: 1px solid rgba(240, 192, 64, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ── Footer ───────────────────────────────────────────── */

footer {
  padding: 28px 20px 40px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--stone);
  width: 100%;
  border-top: 1px solid var(--border);
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--vellum); text-decoration: underline; }

/* ── Privacy / prose page ─────────────────────────────── */

.prose { max-width: 560px; }

.prose .back-link {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  display: block;
  margin-bottom: 32px;
}
.prose .back-link:hover { color: var(--vellum); }

.prose .wordmark-sm {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}
.prose .wordmark-sm .inf { color: var(--gold); }

.prose h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--vellum);
  margin-bottom: 6px;
}

.prose .eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 24px;
  display: block;
}

.prose h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--vellum);
  margin: 28px 0 8px;
}

.prose p, .prose li {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 8px;
}

.prose ul { padding-left: 20px; margin-bottom: 8px; }
.prose a { color: var(--gold); text-decoration: none; }
.prose a:hover { text-decoration: underline; }

.prose .notice {
  background: rgba(138, 155, 196, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ── Mock mode badge ──────────────────────────────────── */

.mock-badge {
  position: fixed;
  top: 12px;
  right: 12px;
  background: var(--danger);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 100;
}

/* ── Responsive (larger viewports) ────────────────────── */

@media (min-width: 600px) {
  .wordmark { font-size: 3.5rem; }
  .tagline { font-size: 2.5rem; }
  .hero-inner { padding-top: 72px; }
  .section-title { font-size: 2rem; }
}

/* ── Reduced motion ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* hero.js renders a static end-state when this is set. */
  .hero-caption { transition: none; }
}
