/* SnapPage Pro — marketing site (builds on app.css tokens) */

/* Legacy variable names used by older page styles → new theme tokens */
:root, :root[data-theme="dark"] {
  --primary: var(--brand);
  --primary-dark: var(--brand-600);
  --secondary: #ec4899;
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --text-muted: var(--muted);
  --bg-primary: var(--bg);
  --bg-secondary: var(--surface);
  --bg-tertiary: var(--surface-3);
  --bg-card: var(--surface);
  --border-color: var(--border);
  --border-radius: 14px;
  --border-radius-sm: 10px;
}

body.site { background: var(--bg); }
.site-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-main { min-height: 60vh; }

/* ---------- Nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-nav.scrolled { border-bottom-color: var(--border); }
.site-nav .bar { display: flex; align-items: center; gap: 28px; height: 68px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); letter-spacing: -.01em; }
.site-brand:hover { text-decoration: none; }
.site-links { display: flex; gap: 4px; }
.site-links a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.site-links a:hover, .site-links a.active { color: var(--text); background: var(--surface-3); text-decoration: none; }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-burger { display: none; }
.site-mobile { display: none; border-top: 1px solid var(--border); padding: 12px 24px 20px; }
.site-mobile a { display: block; padding: 10px 0; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--border); }
.site-nav.open .site-mobile { display: block; }

/* ---------- Typography ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-50); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.display { font-size: clamp(38px, 6vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.display .grad, .h2 .grad { background: linear-gradient(120deg, #7c5cfc 10%, #ec4899 60%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); line-height: 1.6; max-width: 640px; }
.h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .lead { margin: 16px auto 0; }
.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Hero ---------- */
.hero-site { position: relative; padding: 88px 0 40px; overflow: hidden; text-align: center; }
.hero-site::before { content: ''; position: absolute; inset: -40% -10% auto; height: 760px; z-index: -1;
  background: radial-gradient(600px 300px at 30% 30%, rgba(124, 92, 252, .22), transparent 70%), radial-gradient(500px 300px at 72% 20%, rgba(236, 72, 153, .16), transparent 70%); }
.hero-site .lead { margin: 22px auto 0; }
.hero-cta { display: flex; justify-content: center; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: 13px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .icon { color: var(--success); }
.showcase { position: relative; margin: 64px auto 0; max-width: 1080px; border-radius: 18px; padding: 10px; background: linear-gradient(140deg, rgba(124, 92, 252, .45), rgba(236, 72, 153, .35) 50%, rgba(34, 211, 238, .3)); box-shadow: 0 50px 120px -40px rgba(76, 46, 216, .55); }
.showcase .frame { border-radius: 12px; overflow: hidden; background: var(--surface); }
.showcase .chrome { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.showcase .chrome i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f56; display: block; }
.showcase .chrome i:nth-child(2) { background: #ffbd2e; } .showcase .chrome i:nth-child(3) { background: #27c93f; }
.showcase .chrome .url { margin-left: 14px; flex: 1; max-width: 420px; height: 26px; border-radius: 8px; background: var(--surface-3); font-size: 12px; color: var(--muted); display: flex; align-items: center; padding: 0 12px; }
.showcase img { display: block; width: 100%; height: auto; }
.floating-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-weight: 600; font-size: 13px; }
.floating-chip.a { left: -28px; top: 34%; } .floating-chip.b { right: -28px; bottom: 18%; }

/* ---------- Strip ---------- */
.strip { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; color: var(--muted); font-weight: 600; font-size: 14px; }
.strip span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Feature cards ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { padding: 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s, border-color .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.feature .f-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; color: #fff; background: linear-gradient(135deg, #7c5cfc, #a855f7); box-shadow: 0 10px 24px -10px rgba(124, 92, 252, .8); }
.feature:nth-child(3n+2) .f-icon { background: linear-gradient(135deg, #ec4899, #f97316); box-shadow: 0 10px 24px -10px rgba(236, 72, 153, .8); }
.feature:nth-child(3n) .f-icon { background: linear-gradient(135deg, #06b6d4, #3b82f6); box-shadow: 0 10px 24px -10px rgba(14, 165, 233, .8); }
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--text-2); line-height: 1.6; }
.feature .tag { display: inline-block; margin-top: 12px; font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-50); padding: 2px 8px; border-radius: 6px; }

/* ---------- Split rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split + .split { margin-top: 96px; }
.split.rev .split-media { order: -1; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.checks li .icon { color: var(--success); margin-top: 3px; }
.mock { border-radius: 18px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); padding: 22px; }
.mock-toolbar { display: flex; gap: 6px; padding: 8px; border-radius: 12px; background: var(--surface-3); width: fit-content; margin-bottom: 16px; }
.mock-toolbar span { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); }
.mock-toolbar span.on { background: var(--brand); color: #fff; }
.mock-canvas { position: relative; height: 260px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, var(--surface-2), var(--surface-3)); border: 1px solid var(--border); }
.mock-canvas .line { position: absolute; left: 24px; right: 40%; height: 10px; border-radius: 6px; background: var(--border-strong); }
.mock-canvas .box { position: absolute; border: 3px solid #ef4444; border-radius: 8px; }
.mock-canvas .blur { position: absolute; border-radius: 6px; background: repeating-linear-gradient(45deg, var(--muted) 0 6px, var(--border-strong) 6px 12px); opacity: .55; }
.mock-canvas .step { position: absolute; width: 28px; height: 28px; border-radius: 50%; background: #ef4444; color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(239, 68, 68, .5); }
.mock-canvas .arrow { position: absolute; height: 3px; background: #ef4444; transform-origin: left center; }
.mock-canvas .arrow::after { content: ''; position: absolute; right: -2px; top: -6px; border-left: 12px solid #ef4444; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.formats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.formats span { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; font-size: 13px; }

/* ---------- Steps ---------- */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: how; }
.how-step { padding: 28px; border-radius: 16px; border: 1px dashed var(--border-strong); position: relative; }
.how-step::before { counter-increment: how; content: counter(how); position: absolute; top: -16px; left: 24px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--text); color: var(--bg); }
.how-step h3 { font-size: 17px; margin: 8px 0; }
.how-step p { color: var(--text-2); }
.kbds { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.kbds kbd { font-size: 12px; padding: 4px 8px; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.pricing-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-card { display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.price-card.popular { border: 2px solid var(--brand); box-shadow: 0 30px 60px -30px rgba(124, 92, 252, .55); }
.price-card .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: linear-gradient(135deg, #7c5cfc, #ec4899); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.price-card h3 { font-size: 18px; }
.price-card .amount { font-size: 42px; font-weight: 800; letter-spacing: -.03em; }
.price-card .amount small { font-size: 15px; font-weight: 500; color: var(--muted); }
.price-card .save { font-size: 12px; font-weight: 700; color: var(--success); background: var(--success-bg); padding: 2px 8px; border-radius: 6px; width: fit-content; }
.price-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); flex: 1; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; }
.price-card li .icon { color: var(--success); margin-top: 2px; }
.price-card li.no { color: var(--muted); } .price-card li.no .icon { color: var(--muted); }
.billing-note { text-align: center; color: var(--muted); margin-top: 22px; font-size: 14px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------- Compare table ---------- */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); }
.compare th, .compare td { padding: 14px 20px; border-bottom: 1px solid var(--border); text-align: left; }
.compare tr:last-child td { border-bottom: 0; }
.compare th { background: var(--surface-2); font-size: 13px; color: var(--muted); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .yes { color: var(--success); } .compare .no { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 0 22px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding: 0 0 18px; line-height: 1.7; }

/* ---------- CTA band ---------- */
.cta-band { border-radius: 24px; padding: 64px 40px; text-align: center; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(700px 300px at 85% 0%, rgba(236, 72, 153, .6), transparent 60%), radial-gradient(600px 300px at 0% 100%, rgba(34, 211, 238, .35), transparent 60%), linear-gradient(135deg, #3b1fb8, #6d4bf5 55%, #8b5cf6); }
.cta-band h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; }
.cta-band p { opacity: .88; margin: 14px auto 0; max-width: 560px; font-size: 18px; }
.cta-band .btn { background: #fff; color: #3b1fb8; border-color: #fff; }
.cta-band .btn.btn-ghost { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 32px; margin-top: 96px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--text-2); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: 72px 0 40px; text-align: center; position: relative; }
.page-hero::before { content: ''; position: absolute; inset: 0 0 auto; height: 400px; z-index: -1; background: radial-gradient(500px 240px at 50% 0%, rgba(124, 92, 252, .18), transparent 70%); }
.page-hero .lead { margin: 16px auto 0; }

/* ---------- Legacy inner pages (privacy/terms/welcome) ---------- */
.legal-container, .welcome-container { max-width: 880px !important; margin: 48px auto !important; padding: 0 24px !important; }
.legal-card { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 18px !important; box-shadow: var(--shadow-sm); }
.legal-card h1 { letter-spacing: -.02em; }
.legal-card a { color: var(--brand); }

/* ---------- Share viewer ---------- */
.viewer { max-width: 1200px; margin: 32px auto; padding: 0 24px; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.viewer-img { display: block; max-width: 100%; margin: 0 auto; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: #fff; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.rev .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .floating-chip { display: none; }
}
@media (max-width: 760px) {
  .site-links, .site-actions .hide-m { display: none; }
  .site-burger { display: inline-flex; }
  .features-grid, .pricing-grid, .pricing-grid.three, .how { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero-site { padding-top: 56px; }
  .site-container { padding: 0 16px; }
  .cta-band { padding: 44px 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .compare th, .compare td { padding: 12px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
