/* QuoteCraft marketing site — design system
   Premium SaaS look: Material-adjacent palette matching the app (seed 2563EB),
   light/dark via prefers-color-scheme + manual toggle, subtle motion. */

:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-900: #1e3a8a;

  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1200px;

  /* Light theme (default) */
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-inset: #f1f5f9;
  --surface: #ffffff;
  --surface-border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  --nav-bg: rgba(255, 255, 255, 0.8);
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-alt: #0f172a;
  --bg-inset: #111c30;
  --surface: #131f34;
  --surface-border: #1f2c44;
  --text: #f1f5f9;
  --text-muted: #a9b6cc;
  --text-faint: #64748b;
  --nav-bg: rgba(11, 18, 32, 0.75);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --bg-alt: #0f172a;
    --bg-inset: #111c30;
    --surface: #131f34;
    --surface-border: #1f2c44;
    --text: #f1f5f9;
    --text-muted: #a9b6cc;
    --text-faint: #64748b;
    --nav-bg: rgba(11, 18, 32, 0.75);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-muted); }

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

section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: var(--brand-50);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}
:root[data-theme="dark"] .eyebrow,
@media (prefers-color-scheme: dark) { .eyebrow { background: rgba(59, 130, 246, 0.15); color: var(--brand-400); } }

.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head p { font-size: 1.1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35); }
.btn-primary:hover { background: var(--brand-700); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--surface-border); }
.btn-secondary:hover { border-color: var(--brand-400); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-inset); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--surface-border);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 10px 14px; border-radius: var(--radius-full); font-weight: 500;
  font-size: 0.95rem; color: var(--text-muted); transition: color 0.15s, background-color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-inset); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--surface-border); cursor: pointer;
  color: var(--text-muted); transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-inset); color: var(--text); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  /* Anchored to .site-nav (position:sticky, which establishes a containing
     block for absolutely-positioned descendants) rather than position:fixed
     with a hardcoded viewport offset. Mobile browsers' dynamic
     address/toolbar resize the visual viewport as you scroll, which is a
     well-known source of `position:fixed` overlays rendering off-screen or
     collapsed right after load — anchoring to the nav bar itself sidesteps
     that whole class of bug entirely. */
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; z-index: 99;
    background: var(--bg); border-bottom: 1px solid var(--surface-border); box-shadow: var(--shadow-md);
    flex-direction: column; align-items: stretch; padding: 8px 12px;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .25s var(--ease), opacity .2s var(--ease); }
  .nav-links.open { max-height: calc(100vh - 72px); opacity: 1; overflow-y: auto; }
  .nav-links a { padding: 14px 16px; font-size: 1.05rem; }
  .nav-toggle { display: flex; }
  .nav-actions .desktop-only { display: none; }
}

/* Hero */
.hero { padding: 88px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 640px;
  background: radial-gradient(60% 60% at 50% 0%, var(--brand-100), transparent 70%);
  z-index: -1; pointer-events: none;
}
:root[data-theme="dark"] .hero::before,
@media (prefers-color-scheme: dark) { .hero::before { background: radial-gradient(60% 60% at 50% 0%, rgba(37,99,235,0.25), transparent 70%); } }
.hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 0.9rem; color: var(--text-faint); }

.hero-shot { margin: 64px auto 0; max-width: 1040px; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--surface-border); }
.hero-shot .shot-frame { aspect-ratio: 16/9.2; background: linear-gradient(160deg, var(--bg-inset), var(--surface));
  display: flex; align-items: center; justify-content: center; padding: 5%; }
.hero-shot .shot-frame svg { width: 100%; height: 100%; }

/* Cards / grids */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-md);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand-600); font-size: 1.3rem; margin-bottom: 16px;
}
:root[data-theme="dark"] .feature-icon,
@media (prefers-color-scheme: dark) { .feature-icon { background: rgba(59,130,246,0.15); color: var(--brand-400); } }

.bg-alt { background: var(--bg-alt); }

/* Stats */
.stat-row { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; text-align: center; }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--brand-600); }
.stat-label { color: var(--text-muted); font-size: 0.92rem; }

/* Pricing */
.plan-toggle { display: flex; justify-content: center; margin: 0 auto 48px; }
.toggle-pill { display: inline-flex; padding: 4px; border-radius: var(--radius-full); background: var(--bg-inset); border: 1px solid var(--surface-border); }
.toggle-pill button {
  border: none; background: transparent; padding: 9px 20px; border-radius: var(--radius-full); font-weight: 600;
  color: var(--text-muted); cursor: pointer; font-size: 0.92rem; transition: all .2s var(--ease);
}
.toggle-pill button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.save-badge { font-size: 0.72rem; background: var(--success); color: #fff; padding: 2px 8px; border-radius: var(--radius-full); margin-left: 6px; }

.plan-card { display: flex; flex-direction: column; position: relative; }
.plan-card.featured { border-color: var(--brand-500); box-shadow: 0 0 0 1px var(--brand-500), var(--shadow-lg); }
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand-600); color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 5px 14px; border-radius: var(--radius-full); letter-spacing: .02em;
}
.plan-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.plan-price { font-size: 2.4rem; font-weight: 800; margin: 8px 0 2px; }
.plan-price span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.plan-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }
.plan-features { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.94rem; color: var(--text); }
.plan-features li svg { flex-shrink: 0; margin-top: 3px; color: var(--success); }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--surface-border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 22px 4px; display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 1.02rem; color: var(--text); gap: 16px;
}
.faq-q .chev { transition: transform .25s var(--ease); color: var(--text-faint); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 4px 22px; color: var(--text-muted); }

/* Testimonials */
.testimonial { display: flex; flex-direction: column; gap: 16px; }
.stars { color: #f59e0b; letter-spacing: 2px; }
.t-person { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.t-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
:root[data-theme="dark"] .t-avatar,
@media (prefers-color-scheme: dark) { .t-avatar { background: rgba(59,130,246,.2); color: var(--brand-400); } }
.t-name { font-weight: 600; font-size: 0.9rem; }
.t-role { font-size: 0.82rem; color: var(--text-faint); }

/* Logos row */
.logo-row { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; opacity: 0.6; align-items: center; }
.logo-row span { font-weight: 700; font-size: 1.1rem; color: var(--text-faint); }

/* Tabs (interactive feature showcase) */
.tabs-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.tab-btn {
  padding: 11px 18px; border-radius: var(--radius-full); border: 1px solid var(--surface-border);
  background: var(--surface); color: var(--text-muted); font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: all .2s var(--ease);
}
.tab-btn.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.tab-panel { display: none; }
.tab-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 800px) { .tab-panel.active { grid-template-columns: 1fr; } }
.tab-visual { aspect-ratio: 4/3; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--bg-inset), var(--surface));
  border: 1px solid var(--surface-border); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; padding: 10%; }
.tab-visual svg { width: 100%; height: 100%; }
.tab-check-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 10px; }
.tab-check-list li { display: flex; gap: 10px; color: var(--text); font-size: 0.95rem; }
.tab-check-list li svg { color: var(--brand-600); flex-shrink: 0; margin-top: 3px; }

/* Download OS cards */
.os-card { text-align: center; }
.os-card .os-icon { font-size: 2.4rem; margin-bottom: 12px; }
.os-detected { border-color: var(--brand-500); box-shadow: 0 0 0 1px var(--brand-500), var(--shadow-md); }
.os-detected-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--brand-600);
  background: var(--brand-50); padding: 3px 10px; border-radius: var(--radius-full); margin-bottom: 10px; }
:root[data-theme="dark"] .os-detected-badge,
@media (prefers-color-scheme: dark) { .os-detected-badge { background: rgba(59,130,246,.15); color: var(--brand-400); } }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-900));
  border-radius: var(--radius-lg); padding: 72px 40px; text-align: center; color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 1.1rem; }
.cta-band .btn-secondary { background: #fff; color: var(--brand-700); border-color: transparent; }

/* Footer */
.site-footer { border-top: 1px solid var(--surface-border); padding: 64px 0 32px; background: var(--bg-alt); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 32px; margin-bottom: 48px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; color: var(--text-muted); font-size: 0.92rem; }
.footer-col a:hover { color: var(--brand-600); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding-top: 28px; border-top: 1px solid var(--surface-border); font-size: 0.85rem; color: var(--text-faint); }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.footer-socials a:hover { color: var(--brand-600); border-color: var(--brand-400); }

/* Scroll-reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Simple page header for interior pages */
.page-header { padding: 64px 0 48px; text-align: center; background: var(--bg-alt); border-bottom: 1px solid var(--surface-border); }
.page-header p { max-width: 640px; margin: 12px auto 0; font-size: 1.05rem; }

/* Prose (legal pages) */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { color: var(--text-muted); }
.prose .updated { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 2.5em; }

/* Contact / forms */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--surface-border);
  background: var(--surface); color: var(--text); font-size: 0.95rem; font-family: inherit;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100);
}

/* Status page */
.status-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--surface-border); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); display: inline-block; margin-right: 10px; }
.status-pill { display: inline-flex; align-items: center; font-weight: 600; font-size: 0.9rem; color: var(--success); }

.badge-soon { font-size: 0.7rem; background: var(--bg-inset); color: var(--text-faint); padding: 2px 8px; border-radius: var(--radius-full); margin-left: 8px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
