/* ===================================================================
   LOBBY — design tokens
   A reception desk, not a server rack: warm hardware tones (brass,
   stone, deep forest charcoal) instead of the usual cream+serif or
   near-black+neon SaaS defaults.
   =================================================================== */

:root {
  /* Color */
  --ink: #16231F;
  --ink-soft: #1F2E29;
  --ink-border: #2C3A34;
  --surface: #E7E9E1;
  --surface-white: #FAFAF7;
  --border: #D7DACF;
  --brass: #B8893A;
  --brass-dark: #96702E;
  --brass-tint: #F1E6D2;
  --signal: #4F7A6B;
  --signal-tint: #DCE8E2;
  --danger: #B3463B;
  --danger-tint: #F3DEDA;
  --text-dark: #1B231F;
  --text-muted: #5B655F;
  --text-on-dark: #F3F1EA;
  --text-on-dark-muted: #A9B3AC;

  /* Type */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Misc */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(22, 35, 31, 0.08);
  --shadow-md: 0 8px 24px rgba(22, 35, 31, 0.10);
  --shadow-lg: 0 24px 64px rgba(22, 35, 31, 0.18);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 250ms;
  --container: 1180px;
}

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

/* ===================================================================
   Reset & base
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-dark);
  background: var(--surface-white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ===================================================================
   Buttons
   =================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brass); color: #1B1304; }
.btn-primary:hover { background: var(--brass-dark); }
.btn-ghost-light { background: transparent; color: var(--text-on-dark); border-color: rgba(243,241,234,0.35); }
.btn-ghost-light:hover { background: rgba(243,241,234,0.08); }
.btn-ghost-dark { background: transparent; color: var(--text-dark); border-color: var(--border); }
.btn-ghost-dark:hover { background: rgba(22,35,31,0.05); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ===================================================================
   Marketing nav
   =================================================================== */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-nav.is-scrolled {
  background: rgba(22, 35, 31, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-on-dark);
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brass);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 2px solid #1B1304;
  border-bottom-color: transparent;
  border-right-color: transparent;
  transform: rotate(45deg);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links a {
  color: var(--text-on-dark-muted);
  font-size: 15px;
  transition: color var(--dur-fast) var(--ease);
}
.nav-links a:hover { color: var(--text-on-dark); }
.nav-cta { display: flex; align-items: center; gap: var(--space-3); }
.nav-toggle {
  display: none;
  background: none; border: none;
  width: 44px; height: 44px;
  color: var(--text-on-dark);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ===================================================================
   Hero
   =================================================================== */

.hero {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 168px 0 var(--space-9);
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-8);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  letter-spacing: -0.01em;
  margin: var(--space-4) 0 var(--space-5);
}
.hero h1 em {
  font-style: normal;
  color: var(--brass);
}
.hero-sub {
  font-size: 18px;
  color: var(--text-on-dark-muted);
  max-width: 480px;
  margin-bottom: var(--space-6);
}
.hero-actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.hero-note { margin-top: var(--space-6); font-size: 14px; color: var(--text-on-dark-muted); display: flex; align-items: center; gap: var(--space-2); }
.hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); flex-shrink: 0; }

/* Signature element: live call card with waveform + typed transcript */
.call-card {
  background: var(--ink-soft);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
}
.call-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.call-card-label { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: 13px; color: var(--text-on-dark-muted); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(79,122,107,0.6);
  animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(79,122,107,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(79,122,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,122,107,0); }
}
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 48px;
  margin-bottom: var(--space-4);
}
.waveform span {
  width: 4px;
  border-radius: 2px;
  background: var(--brass);
  animation: wave 1.2s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
.transcript { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.7; }
.transcript .who { color: var(--brass); }
.transcript .agent { color: var(--signal); }
.transcript p { margin-bottom: var(--space-2); color: var(--text-on-dark); }
.call-card-foot {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--ink-border);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-on-dark-muted);
}
.call-card-foot strong { color: var(--text-on-dark); font-family: var(--font-mono); }

@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero { padding-top: 128px; }
}

/* ===================================================================
   Stat strip
   =================================================================== */

.stat-strip {
  background: var(--surface);
  padding: var(--space-7) 0;
}
.stat-strip .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.stat-block { text-align: left; }
.stat-num { font-family: var(--font-mono); font-size: 2.4rem; color: var(--ink); font-weight: 600; }
.stat-label { color: var(--text-muted); margin-top: var(--space-2); font-size: 15px; }

@media (max-width: 760px) {
  .stat-strip .container { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* ===================================================================
   How it works
   =================================================================== */

.section { padding: var(--space-9) 0; }
.section-head { max-width: 640px; margin-bottom: var(--space-7); }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-top: var(--space-3); }
.section-head p { color: var(--text-muted); margin-top: var(--space-4); font-size: 17px; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.step {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.step-num {
  font-family: var(--font-mono);
  color: var(--brass);
  font-size: 14px;
  margin-bottom: var(--space-3);
}
.step h3 { font-size: 17px; margin-bottom: var(--space-2); }
.step p { color: var(--text-muted); font-size: 14.5px; }

@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
}

/* ===================================================================
   Features
   =================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.feature-card {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--brass);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.feature-card h3 { font-size: 17px; margin-bottom: var(--space-2); }
.feature-card p { color: var(--text-muted); font-size: 14.5px; }

@media (max-width: 980px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

/* ===================================================================
   Pricing
   =================================================================== */

.pricing-section { background: var(--ink); color: var(--text-on-dark); }
.pricing-section .section-head p { color: var(--text-on-dark-muted); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.price-card {
  background: var(--ink-soft);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
}
.price-card.is-featured {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass);
}
.price-tier-name { font-family: var(--font-mono); font-size: 14px; color: var(--brass); text-transform: uppercase; letter-spacing: 0.05em; }
.price-amount { font-family: var(--font-display); font-size: 2.6rem; margin: var(--space-3) 0 var(--space-2); }
.price-amount span { font-size: 15px; font-family: var(--font-body); color: var(--text-on-dark-muted); }
.price-blurb { color: var(--text-on-dark-muted); font-size: 14.5px; margin-bottom: var(--space-5); min-height: 44px; }
.price-features { margin-bottom: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.price-features li { display: flex; gap: var(--space-3); font-size: 14.5px; align-items: flex-start; }
.price-features li::before {
  content: "";
  width: 16px; height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--signal-tint);
  border: 1px solid var(--signal);
}
.price-card .btn { margin-top: auto; }

@media (max-width: 980px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ===================================================================
   FAQ
   =================================================================== */

.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: none; border: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) 0;
  font-family: var(--font-display);
  font-size: 17px;
  text-align: left;
  color: var(--text-dark);
}
.faq-q .plus { font-family: var(--font-mono); color: var(--brass); transition: transform var(--dur) var(--ease); }
.faq-item[open] .plus { transform: rotate(45deg); }
.faq-a { padding: 0 0 var(--space-5); color: var(--text-muted); font-size: 15px; max-width: 620px; }

/* ===================================================================
   Final CTA + footer
   =================================================================== */

.cta-band {
  background: var(--brass-tint);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  margin: 0 var(--space-5);
}
.cta-band h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: var(--space-4); }
.cta-band p { color: var(--text-muted); margin-bottom: var(--space-6); }

.site-footer { background: var(--ink); color: var(--text-on-dark-muted); padding: var(--space-7) 0 var(--space-6); margin-top: var(--space-9); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
.site-footer a:hover { color: var(--text-on-dark); }
.footer-links { display: flex; gap: var(--space-5); }

/* ===================================================================
   Auth pages (login / register)
   =================================================================== */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: var(--space-5);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-md);
}
.auth-card .brand { color: var(--text-dark); margin-bottom: var(--space-6); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: var(--space-2); }
.auth-card .auth-sub { color: var(--text-muted); margin-bottom: var(--space-6); font-size: 15px; }
.auth-foot { margin-top: var(--space-5); text-align: center; font-size: 14.5px; color: var(--text-muted); }
.auth-foot a { color: var(--brass); font-weight: 600; }

/* ===================================================================
   Forms (shared by auth + onboarding)
   =================================================================== */

.field { margin-bottom: var(--space-5); }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: var(--space-2); }
.field .hint { font-size: 13px; color: var(--text-muted); margin-top: var(--space-2); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-white);
  color: var(--text-dark);
  min-height: 48px;
  transition: border-color var(--dur-fast) var(--ease);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brass); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin-top: var(--space-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.alert {
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  margin-bottom: var(--space-5);
}
.alert-error { background: var(--danger-tint); color: var(--danger); }
.alert-success { background: var(--signal-tint); color: var(--signal); }

.plan-select { display: flex; flex-direction: column; gap: var(--space-3); }
.plan-option {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.plan-option:has(input:checked) { border-color: var(--brass); background: var(--brass-tint); }
.plan-option input { width: auto; min-height: 0; }
.plan-option-name { font-weight: 600; }
.plan-option-price { font-family: var(--font-mono); color: var(--text-muted); font-size: 14px; }

/* ===================================================================
   Dashboard app shell
   =================================================================== */

.app-shell { display: flex; min-height: 100vh; background: var(--surface); }
.app-sidebar {
  width: 240px;
  background: var(--ink);
  color: var(--text-on-dark);
  flex-shrink: 0;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
}
.app-sidebar .brand { margin-bottom: var(--space-7); color: var(--text-on-dark); }
.app-nav { display: flex; flex-direction: column; gap: var(--space-2); flex-grow: 1; }
.app-nav a {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-on-dark-muted);
  font-size: 14.5px;
  font-weight: 500;
}
.app-nav a:hover { background: rgba(243,241,234,0.06); color: var(--text-on-dark); }
.app-nav a.is-active { background: var(--ink-soft); color: var(--text-on-dark); }
.app-sidebar-foot { font-size: 13px; color: var(--text-on-dark-muted); }
.app-sidebar-foot a { color: var(--text-on-dark); font-weight: 600; }

.app-main { flex-grow: 1; padding: var(--space-7); max-width: 980px; }
.app-topbar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-7); flex-wrap: wrap; gap: var(--space-3); }
.app-topbar h1 { font-size: 1.7rem; }
.app-topbar p { color: var(--text-muted); margin-top: var(--space-2); }

.card {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
.card h2 { font-size: 1.2rem; margin-bottom: var(--space-4); }

.badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: 12.5px;
  padding: 4px 10px; border-radius: var(--radius-full);
}
.badge-pending { background: var(--brass-tint); color: var(--brass-dark); }
.badge-progress { background: var(--surface); color: var(--text-muted); }
.badge-live { background: var(--signal-tint); color: var(--signal); }

.status-timeline { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.status-step { flex: 1; text-align: center; }
.status-step .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); margin: 0 auto var(--space-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.status-step.is-done .dot { background: var(--signal); border-color: var(--signal); color: white; }
.status-step.is-current .dot { background: var(--brass); border-color: var(--brass); color: #1B1304; }
.status-step span.label { font-size: 13px; color: var(--text-muted); }
.status-step.is-done span.label, .status-step.is-current span.label { color: var(--text-dark); font-weight: 600; }
.status-line { flex: 0 0 100%; height: 2px; background: var(--border); margin-top: 13px; }

.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.usage-block { padding: var(--space-4); background: var(--surface); border-radius: var(--radius-md); }
.usage-num { font-family: var(--font-mono); font-size: 1.8rem; color: var(--ink); }
.usage-label { font-size: 13px; color: var(--text-muted); margin-top: var(--space-1); }
.empty-state { text-align: center; padding: var(--space-7) var(--space-5); color: var(--text-muted); }
.empty-state h3 { color: var(--text-dark); margin-bottom: var(--space-2); }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; padding: var(--space-4); }
  .app-sidebar .brand { margin-bottom: 0; }
  .app-nav { flex-direction: row; }
  .app-sidebar-foot { display: none; }
  .app-main { padding: var(--space-5); }
  .usage-grid { grid-template-columns: 1fr; }
}
