/* SpinConvert design tokens */
:root {
  --brand: #5b2ee6;
  --brand-600: #4a22c9;
  --brand-50: #f3efff;
  --brand-100: #e6deff;
  --accent: #ffb020;
  --pink: #ff4d8d;
  --teal: #14b8a6;
  --ink: #1b1530;
  --ink-2: #3b3456;
  --muted: #5d5776;
  --line: #e6e1f7;
  --bg: #ffffff;
  --soft: #f8f6ff;
  --success: #0f9d74;
  --danger: #d33a3a;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(27, 21, 48, 0.06), 0 8px 24px rgba(27, 21, 48, 0.08);
  --shadow-lg: 0 20px 60px rgba(48, 22, 140, 0.18);
  --max: 1160px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-600); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

.section { padding: 80px 0; }
.section--soft { background: var(--soft); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-50);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.lead { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(91, 46, 230, 0.35); }
.btn--primary:hover { background: var(--brand-600); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #f5a300; color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cards & grids */
.grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) and (max-width: 979px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand); margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list li::before {
  content: ''; flex: 0 0 20px; height: 20px; margin-top: 4px; border-radius: 50%;
  background: var(--brand-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%235b2ee6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand); }
.badge--sample { background: #fff4dd; color: #8a5a00; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.logo img { width: 34px; height: 34px; }
.nav { display: none; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--brand); background: var(--brand-50); }
.header-cta { display: none; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; padding: 12px 16px 20px; }
.mobile-nav.open { display: block; }
.mobile-nav a:not(.btn) { display: block; padding: 12px 4px; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 16px; }
@media (min-width: 960px) {
  .nav, .header-cta { display: flex; }
  .menu-btn, .mobile-nav, .mobile-nav.open { display: none; }
}

/* Hero */
.hero { padding: 56px 0 72px; background: radial-gradient(1200px 500px at 85% -10%, var(--brand-100), transparent 60%), radial-gradient(900px 400px at -10% 110%, #fff1d6, transparent 60%); }
.hero .container { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero { padding: 80px 0 96px; } .hero .container { grid-template-columns: 1.1fr 0.9fr; } }
.hero h1 span { background: linear-gradient(90deg, var(--brand), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 560px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; padding: 0; list-style: none; color: var(--muted); font-size: 0.95rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 56px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 28px; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800;
}
.step.card { padding-top: 84px; }

/* Code snippet */
.code {
  background: #17122b; color: #e9e4ff; border-radius: var(--radius); padding: 18px 20px; overflow-x: auto;
  font: 0.9rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.code .t { color: #ff8fb8; } .code .a { color: #ffd27a; } .code .s { color: #8ef0d9; }

/* Analytics sample */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.kpi b { display: block; font-size: 1.6rem; line-height: 1.2; }
.kpi span { color: var(--muted); font-size: 0.85rem; }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 60px; gap: 12px; align-items: center; font-size: 0.9rem; }
.funnel-bar { height: 14px; border-radius: 999px; background: var(--brand-50); overflow: hidden; }
.funnel-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--pink)); }

/* Pricing */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); position: relative; }
.price-card .ribbon { position: absolute; top: -14px; left: 28px; background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.price { font-size: 2.6rem; font-weight: 800; line-height: 1; margin: 8px 0 4px; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-card .check-list { margin: 20px 0 28px; flex: 1; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-size: 1.5rem; color: var(--brand); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin: 0; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, #2a1570, var(--brand)); color: #fff; border-radius: var(--radius-lg); padding: 56px 24px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e3dcff; max-width: 600px; margin: 0 auto 28px; }
.cta-band .btn-row { justify-content: center; }

/* Prose (legal) */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.page-head { padding: 64px 0 24px; text-align: center; }
.page-head p { color: var(--muted); max-width: 680px; margin: 0 auto; font-size: 1.15rem; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--brand-50); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 20px; accent-color: var(--brand); }
.form-status { min-height: 1.5em; font-weight: 600; margin: 12px 0 0; }
.form-status.error { color: var(--danger); }
.form-status.ok { color: var(--success); }
.turnstile-box { min-height: 65px; margin-bottom: 16px; }

/* Dialog */
dialog.modal { border: none; border-radius: var(--radius-lg); padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.modal::backdrop { background: rgba(17, 13, 31, 0.6); }
.modal-body { padding: 32px 24px 24px; position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (min-width: 560px) { .modal-body { padding: 36px 36px 28px; } }
.modal-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: none; background: transparent; font-size: 1.6rem; cursor: pointer; color: var(--muted); border-radius: 10px; }
.modal-close:hover { background: var(--soft); }
.success-panel { text-align: center; padding: 16px 0; }
.success-panel .icon { margin: 0 auto 16px; background: #dcfaf0; color: var(--success); }

/* Footer */
.site-footer { background: #120d24; color: #cfc8ea; padding: 56px 0 32px; margin-top: 80px; }
.site-footer a { color: #cfc8ea; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.95rem; }
.site-footer .logo { color: #fff; }
.footer-bottom { border-top: 1px solid #2a2342; margin-top: 40px; padding-top: 24px; font-size: 0.85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Cookie banner */
.cookie-banner { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px 20px; font-size: 0.92rem; }
.cookie-banner[hidden] { display: none; }
.cookie-banner .btn-row { margin-top: 12px; }
.cookie-banner .btn { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }

/* ---------- Header extras ---------- */
.btn--link { background: transparent; color: var(--ink-2); padding-left: 12px; padding-right: 12px; }
.btn--link:hover { color: var(--brand); }
#site-header { min-height: 69px; }

/* ---------- Demo wheel ---------- */
.demo-wheel { display: grid; gap: 20px; justify-items: center; scroll-margin-top: 90px; }
.wheel-frame { position: relative; width: min(100%, 400px); filter: drop-shadow(0 24px 40px rgba(48, 22, 140, 0.28)); }
.wheel-frame [data-wheel-mount] { aspect-ratio: 1 / 1; }
.wheel { width: 100%; will-change: transform; transform-origin: 50% 50%; }
.wheel-pointer { position: absolute; top: -6px; left: 50%; width: 40px; transform: translateX(-50%); z-index: 2; }
.demo-panel { width: min(100%, 400px); text-align: center; }
.demo-result { min-height: 3.2em; margin-top: 14px; font-size: 1rem; }
.demo-result.win { color: var(--success); }
.demo-result code { background: var(--brand-50); color: var(--brand); padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.demo-note { margin: 6px 0 0; }

/* ---------- Analytics sample ---------- */
.analytics-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }

/* ---------- Pricing comparison ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.compare { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare th, .compare td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.compare th[scope='row'], .compare thead th:first-child { text-align: left; }
.compare thead th { background: var(--brand-50); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

/* ---------- Forms ---------- */
.icon--ok { margin: 0 auto 16px; background: #dcfaf0; color: var(--success); }
.icon--ok svg { width: 24px; height: 24px; }
