/* ai-talkie marketing site — Warm Instrument Panel tokens
   Source of truth mirrored from app/mac/playground/ui-design/shared.css
   Keep the two in sync when redesigning. */

:root {
  --surface: #1A1614;
  --surface-2: #241E1A;
  --surface-3: #2E2722;
  --surface-glass: rgba(36, 30, 26, 0.82);
  --highlight: rgba(245, 235, 221, 0.08);
  --highlight-edge: rgba(255, 225, 180, 0.14);
  --text: #F5EBDD;
  --text-mute: #8C8176;
  --text-dim: #5A5149;
  --brass: #E3B25C;
  --brass-glow: #FFD98A;
  --brass-dim: rgba(227, 178, 92, 0.18);
  --green: #7ECB8F;
  --amber: #E3A54C;
  --red: #D96C5A;
  --blue: #7BB0DC;
  --divider: rgba(245, 235, 221, 0.06);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow: 0 12px 32px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3);
  --font-ui: 'Instrument Sans', -apple-system, system-ui, sans-serif;
  --font-display: 'Fraunces', 'Instrument Serif', Georgia, serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

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

html, body {
  background: radial-gradient(ellipse at top, #0F0C0A 0%, #050403 60%);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--brass-glow); }

img, svg { max-width: 100%; display: block; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px 96px;
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface-glass);
  backdrop-filter: blur(30px) saturate(1.2);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  border-bottom: 1px solid var(--divider);
  padding: 14px 0;
  margin-bottom: 48px;
}
.nav-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 20px;
  font-size: 13px;
  flex-wrap: wrap;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.nav-brand .italic { font-style: italic; color: var(--brass); }
.nav-spacer { flex: 1; }
.nav-link {
  color: var(--text-mute);
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover { color: var(--text); }

/* ============ HERO ============ */
.hero {
  padding: 72px 0 56px;
  text-align: left;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(44px, 7vw, 80px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 20px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
.hero-title .italic { font-style: italic; color: var(--brass); }
.hero-tagline {
  font-size: 19px;
  color: var(--text-mute);
  max-width: 600px;
  line-height: 1.55;
  margin-bottom: 36px;
}
.hero-slogan {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--brass-glow);
  margin-bottom: 12px;
  font-weight: 400;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  line-height: 1;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: var(--brass);
  color: #1A1614;
  border-color: var(--brass-glow);
}
.btn.primary:hover { background: var(--brass-glow); color: #1A1614; }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--divider);
}
.btn.ghost:hover { background: var(--highlight); border-color: var(--highlight-edge); }
.btn.danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(217, 108, 90, 0.4);
}
.btn.danger:hover { background: rgba(217, 108, 90, 0.12); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ============ CAPABILITY CARDS ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 40px 0 56px;
}
.card {
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 225, 180, 0.04), transparent 40%);
  pointer-events: none;
}
.card-icon {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brass);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.card-body {
  color: var(--text-mute);
  font-size: 14px;
  line-height: 1.55;
}

/* ============ SECTIONS ============ */
.section { margin: 56px 0; }
.section-title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.section-sub {
  color: var(--text-mute);
  font-size: 14px;
  margin-bottom: 24px;
  max-width: 640px;
}

/* ============ FORMS ============ */
.form {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.input {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 15px;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.input:focus {
  outline: none;
  border-color: var(--brass);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--brass-dim);
}
.input.code {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ============ MESSAGES ============ */
.msg {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.msg.info {
  background: rgba(123, 176, 220, 0.08);
  color: var(--blue);
  border-color: rgba(123, 176, 220, 0.24);
}
.msg.error {
  background: rgba(217, 108, 90, 0.08);
  color: var(--red);
  border-color: rgba(217, 108, 90, 0.28);
}
.msg.success {
  background: rgba(126, 203, 143, 0.08);
  color: var(--green);
  border-color: rgba(126, 203, 143, 0.24);
}
.msg[hidden] { display: none; }

.hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ============ DASHBOARD ============ */
.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}
.dash-email {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brass-dim);
  color: var(--brass-glow);
  border: 1px solid rgba(227, 178, 92, 0.35);
}
.badge.muted {
  background: var(--highlight);
  color: var(--text-mute);
  border-color: var(--divider);
}

.stat-tile {
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.stat-tile::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255, 225, 180, 0.04), transparent 50%);
  pointer-events: none;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-value .total {
  color: var(--text-dim);
  font-size: 28px;
  margin-left: 6px;
}
.stat-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}

.usage-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--text-mute);
}
.usage-row strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ============ LEGAL ============ */
.legal-banner {
  background: rgba(227, 165, 76, 0.08);
  border: 1px solid rgba(227, 165, 76, 0.3);
  color: var(--amber);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 28px;
}
.legal-body {
  max-width: 680px;
  color: var(--text-mute);
  font-size: 15px;
  line-height: 1.7;
}
.legal-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--text);
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
}
.legal-body p { margin-bottom: 14px; }
.legal-body ul { padding-left: 22px; margin-bottom: 14px; }
.legal-body li { margin-bottom: 6px; }

/* ============ 404 ============ */
.not-found {
  padding: 120px 0;
  text-align: center;
}
.not-found-code {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 350;
  font-size: 120px;
  color: var(--brass);
  line-height: 1;
  margin-bottom: 8px;
  font-variation-settings: 'opsz' 144;
}
.not-found-msg {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text);
  margin-bottom: 24px;
  font-weight: 350;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--divider);
  padding: 28px 0 40px;
  margin-top: 80px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.footer a { color: var(--text-mute); }
.footer a:hover { color: var(--text); }
.footer-spacer { flex: 1; }

/* ============ FOCUS RING ============ */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 560px) {
  .wrap { padding: 0 20px 80px; }
  .nav-inner { padding: 0 20px; }
  .hero { padding: 48px 0 32px; }
  .hero-tagline { font-size: 17px; }
  .stat-value { font-size: 44px; }
  .stat-value .total { font-size: 22px; }
  .card { padding: 18px; }
  .not-found-code { font-size: 88px; }
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
