/**
 * global.css — shared theme for ReceptionistAi
 * CSS variables, nav, footer, base components
 * Used by all route files
 */

/* ── Fonts ────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --teal: #5ce0d8;
  --teal-dark: #3cbfb8;
  --bg: #07070f;
  --bg2: #0e0e1a;
  --bg3: #131320;
  --border: rgba(255,255,255,0.08);
  --text: #e8e8ec;
  --muted: #8888a0;
  --gold: #f59e0b;
  --green: #4caf50;
  --red: #f44336;
  --purple: #a855f7;
  --font-body: 'DM Sans', sans-serif;
  --font-head: 'Space Grotesk', sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  padding: 9px 20px; border-radius: var(--radius); cursor: pointer;
  transition: all 0.18s; border: none; text-decoration: none;
}
.btn-primary { background: var(--teal); color: #07070f; }
.btn-primary:hover { background: var(--teal-dark); text-decoration: none; color: #07070f; }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }
.btn-lg { font-size: 17px; padding: 15px 32px; }

/* ── Navigation ────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,15,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  color: var(--text); letter-spacing: -0.5px;
}
.nav-logo span { color: var(--teal); }
.nav-links { display: flex; gap: 10px; align-items: center; }
.nav-spacer { flex: 1; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand .footer-logo {
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: var(--text); margin-bottom: 8px;
}
.footer-brand .footer-logo span { color: var(--teal); }
.footer-tagline { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; transition: all 0.15s;
}
.footer-social a:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }
.footer-col h4 {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 14px; color: var(--muted); }
.footer-col ul li a:hover { color: var(--teal); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 13px; color: var(--muted); }
.footer-trust { font-size: 12px; color: var(--muted); opacity: 0.7; }

/* ── Hero badge ──────────────────────────────────────────────────────────────── */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 20px;
}
.hero-badge.live { color: var(--teal); border: 1px solid rgba(92,224,216,0.3); }
.hero-badge.reviews { color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }
.hero-badge.quotes { color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }
.hero-badge.reactivate { color: var(--teal); border: 1px solid rgba(92,224,216,0.3); }
.hero-badge.demo { color: var(--teal); border: 1px solid rgba(92,224,216,0.3); }
.hero-badge::before { font-size: 11px; }
.hero-badge.live::before { content: '●'; animation: pulse 2s infinite; }
.hero-badge.reviews::before { content: '⭐'; }
.hero-badge.quotes::before { content: '💰'; }
.hero-badge.reactivate::before { content: '●'; animation: pulse 2s infinite; }
.hero-badge.demo::before { content: '●'; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }

/* ── Page wrap ─────────────────────────────────────────────────────────────────── */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 60px 24px 80px; }
.hero-header { text-align: center; margin-bottom: 56px; }
.hero-header h1 {
  font-family: var(--font-head); font-size: clamp(28px, 5vw, 48px);
  font-weight: 700; letter-spacing: -1.5px; line-height: 1.1;
  margin-bottom: 16px;
}
.hero-header h1 span { color: var(--teal); }
.hero-header p { color: var(--muted); font-size: 18px; max-width: 540px; margin: 0 auto; }

/* ── Demo columns ─────────────────────────────────────────────────────────────── */
.demo-columns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: start; margin-bottom: 72px;
}

/* ── Phone mockup ─────────────────────────────────────────────────────────────── */
.phone-shell {
  background: #111; border-radius: 40px; padding: 16px;
  border: 2px solid #222; box-shadow: 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
  max-width: 320px; margin: 0 auto;
}
.phone-screen {
  background: #000; border-radius: 28px; overflow: hidden;
  min-height: 520px; display: flex; flex-direction: column;
}
.phone-status {
  background: #000; padding: 12px 20px 4px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 600; color: #fff;
}
.phone-status .time { font-size: 14px; font-weight: 700; }
.phone-status .icons { display: flex; gap: 4px; align-items: center; }

/* SMS in phone */
.phone-sms-area {
  flex: 1; padding: 12px 12px 16px; display: flex; flex-direction: column;
  overflow-y: auto; max-height: 460px;
}
.phone-sms-header {
  text-align: center; padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid #222;
}
.phone-sms-header .contact-name { font-size: 13px; font-weight: 600; color: #fff; }
.phone-sms-header .contact-sub { font-size: 10px; color: #888; }
.sms-messages { display: flex; flex-direction: column; gap: 6px; }
.sms-msg {
  max-width: 82%; padding: 8px 12px; border-radius: 16px; font-size: 12px;
  line-height: 1.45; word-wrap: break-word; opacity: 0;
  animation: fadeUp 0.35s ease forwards;
}
.sms-msg.from-ai {
  background: #1c1c1e; color: #e8e8e8;
  border-bottom-left-radius: 4px; align-self: flex-start;
}
.sms-msg.from-customer {
  background: var(--teal); color: #07070f; font-weight: 500;
  border-bottom-right-radius: 4px; align-self: flex-end;
}
.sms-msg.system-note {
  background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25);
  color: var(--gold); font-size: 11px; text-align: center;
  align-self: center; max-width: 95%; border-radius: 8px;
}
.sms-msg.day-label {
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2);
  color: var(--gold); font-size: 10px; font-weight: 600; text-align: center;
  align-self: center; max-width: 95%; border-radius: 8px; padding: 4px 10px;
}
.sms-timestamp { font-size: 10px; color: #555; text-align: center; margin: 4px 0 2px; }

/* Typing indicator */
.sms-typing {
  display: none; align-items: center; gap: 4px;
  padding: 8px 12px; background: #1c1c1e; border-radius: 14px; border-bottom-left-radius: 4px;
  max-width: 60px; align-self: flex-start;
}
.sms-typing.show { display: flex; }
.sms-typing .dot {
  width: 5px; height: 5px; background: #555; border-radius: 50%;
  animation: bounce 1.4s infinite;
}
.sms-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.sms-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }
@keyframes fadeUp { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

/* Booked badge */
.booked-badge {
  display: none; align-items: center; justify-content: center; gap: 6px;
  background: rgba(76,175,80,0.15); border: 1px solid rgba(76,175,80,0.3);
  border-radius: 8px; padding: 8px 12px; margin: 8px 12px 0;
  font-size: 11px; font-weight: 600; color: var(--green);
}
.booked-badge.show { display: flex; }
.result-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--teal); text-align: center; padding: 8px 0 4px; opacity: 0;
  transition: opacity 0.4s;
}
.result-label.show { opacity: 1; }

/* ── Form cards ────────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px;
}
.form-card h2 {
  font-family: var(--font-head); font-size: 22px; font-weight: 700;
  letter-spacing: -0.5px; margin-bottom: 8px;
}
.form-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.form-group { margin-bottom: 16px; }
label {
  display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; color: var(--text);
  font-size: 15px; font-family: var(--font-body); outline: none;
  transition: border-color 0.2s; -webkit-appearance: none; appearance: none;
}
.form-input:focus, .form-select:focus { border-color: var(--teal); }
.form-input::placeholder { color: var(--muted); }
.form-select option { background: var(--bg3); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: '▾'; position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 14px;
}

/* CTA button */
.cta-btn {
  width: 100%; background: var(--teal); color: #07070f;
  border: none; border-radius: var(--radius); padding: 15px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: var(--font-body); transition: opacity 0.18s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cta-btn:hover { opacity: 0.9; }
.cta-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cta-btn .spinner { display: none; }
.cta-btn.loading .spinner { display: block; }
.cta-btn.loading .btn-label { display: none; }
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(7,7,15,0.25);
  border-top-color: #07070f; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

/* ── Comparison / stats panels ─────────────────────────────────────────────────── */
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--teal); margin-bottom: 12px;
  text-align: center;
}
.comparison-section, .stats-section, .explainer-section, .sequence-section { margin-bottom: 72px; }
.comparison-section h2, .stats-section h2,
.explainer-section h2, .sequence-section h2 {
  font-family: var(--font-head); font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 700; letter-spacing: -0.8px; text-align: center;
  margin-bottom: 40px; line-height: 1.2;
}
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.comp-card {
  border-radius: var(--radius-lg); padding: 36px 32px;
  border: 1px solid var(--border); background: var(--bg3);
}
.comp-card.bad { border-color: rgba(244,67,54,0.3); background: rgba(244,67,54,0.04); }
.comp-card.good { border-color: rgba(92,224,216,0.3); background: rgba(92,224,216,0.04); }
.comp-card-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 16px;
}
.comp-card.bad .comp-card-label { color: var(--red); }
.comp-card.good .comp-card-label { color: var(--teal); }
.comp-card h3 {
  font-family: var(--font-head); font-size: 20px; font-weight: 700;
  margin-bottom: 20px; line-height: 1.25;
}
.comp-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.comp-card li { font-size: 14px; color: var(--muted); display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.comp-card li::before { flex-shrink: 0; font-size: 14px; }
.comp-card.bad li::before { content: '✗'; color: var(--red); font-weight: 700; }
.comp-card.good li::before { content: '✓'; color: var(--teal); font-weight: 700; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px; text-align: center;
}
.stat-card .stat-icon { font-size: 28px; margin-bottom: 12px; }
.stat-card .stat-value {
  font-family: var(--font-head); font-size: 36px; font-weight: 700;
  color: var(--teal); line-height: 1; margin-bottom: 8px;
}
.stat-card .stat-label { font-size: 14px; color: var(--muted); }

/* ── Final CTA ────────────────────────────────────────────────────────────────── */
.final-cta-section {
  text-align: center;
  background: linear-gradient(135deg, rgba(92,224,216,0.08) 0%, rgba(58,123,213,0.06) 100%);
  border: 1px solid rgba(92,224,216,0.2); border-radius: 24px; padding: 56px 32px;
}
.final-cta-section h2 {
  font-family: var(--font-head); font-size: clamp(24px, 4vw, 38px);
  font-weight: 700; letter-spacing: -1px; margin-bottom: 12px;
}
.final-cta-section p { color: var(--muted); font-size: 17px; margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Responsive ────────────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .demo-columns { grid-template-columns: 1fr; }
  .phone-shell { margin-bottom: 0; }
  .comparison-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .sequence-grid { grid-template-columns: 1fr; }
  .explainer-grid { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; align-items: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .form-card { padding: 24px 20px; }
  .final-cta-section { padding: 40px 20px; }
  .comp-card { padding: 28px 24px; }
  .stat-card { padding: 24px 20px; }
  .seq-card { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}