/* ==========================================================================
   SegForge landing pages: shared design system
   One typeface (Inter), three colour themes: .theme-dark / .theme-clean / .theme-amber
   Motion is restrained: scroll reveal + hover states only, all disabled for
   prefers-reduced-motion. No continuously animating backgrounds (cheap on phones).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1120px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

.theme-dark {
  --bg: #07080d;
  --bg-2: #0b0d15;
  --card: #0f121b;
  --card-2: #131723;
  --line: #1c2132;
  --text: #eceef6;
  --muted: #9ba3b9;
  --faint: #6b7389;
  --accent: #6a5cff;
  --accent-2: #8f7bff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(106, 92, 255, .14);
  --good: #3ddc97;
  --warn: #f5b84a;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(106, 92, 255, .22), transparent 70%);
}
.theme-clean {
  --bg: #fafbfe;
  --bg-2: #f1f4fa;
  --card: #ffffff;
  --card-2: #f7f9fd;
  --line: #e1e6f0;
  --text: #0e1322;
  --muted: #545e75;
  --faint: #8089a0;
  --accent: #4338ca;
  --accent-2: #5b50e8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(67, 56, 202, .08);
  --good: #0f9d6b;
  --warn: #b7791f;
  --shadow: 0 24px 50px -28px rgba(30, 41, 82, .35);
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(91, 80, 232, .12), transparent 70%);
}
.theme-amber {
  --bg: #0b0907;
  --bg-2: #110d09;
  --card: #16110c;
  --card-2: #1c150e;
  --line: #2b2217;
  --text: #f7f0e6;
  --muted: #b8a995;
  --faint: #7d7160;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --accent-ink: #1b1203;
  --accent-soft: rgba(245, 158, 11, .13);
  --good: #4ade80;
  --warn: #fbbf24;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .75);
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(245, 158, 11, .18), transparent 70%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.page-glow {
  position: absolute; inset: 0 0 auto 0; height: 720px; pointer-events: none;
  background: var(--glow);
}
.page { position: relative; overflow: clip; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.site-header .header-cta { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 12px; border: 0; cursor: pointer;
  font-size: 16px; font-weight: 700; letter-spacing: -.005em; text-decoration: none;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 34px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn:active { transform: translateY(0); }
.btn svg { transition: transform .18s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 17px 32px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { background: var(--card); box-shadow: none; filter: none; }

/* ---------- Hero ---------- */
.hero { padding: 44px 0 28px; text-align: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--card); border: 1px solid var(--line);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.hero h1 {
  margin: 20px auto 16px; max-width: 880px;
  font-size: clamp(32px, 6.4vw, 60px); line-height: 1.07; letter-spacing: -.035em; font-weight: 800;
  text-wrap: balance;
}
.hl {
  background: linear-gradient(100deg, var(--accent-2), var(--accent) 40%, var(--accent-2) 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hl-sweep 6s var(--ease) infinite alternate;
}
@keyframes hl-sweep { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.hero .sub {
  margin: 0 auto; max-width: 660px; color: var(--muted);
  font-size: clamp(16px, 2.2vw, 19px); line-height: 1.6; text-wrap: pretty;
}
.hero-cta { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.price-line { display: flex; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; }
.price-line .was { color: var(--faint); text-decoration: line-through; font-size: 18px; }
.price-line .now { font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.price-line .tag { font-size: 13px; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.micro { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; color: var(--muted); font-size: 13.5px; }
.micro span { display: inline-flex; align-items: center; gap: 7px; }
.micro svg { color: var(--good); flex: none; }

/* ---------- Demo ---------- */
.demo { margin: 40px auto 0; max-width: 1060px; }
.demo-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.demo-tab {
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted);
  background: var(--card); border: 1px solid var(--line);
  transition: color .15s, background .15s, border-color .15s;
}
.demo-tab:hover { color: var(--text); }
.demo-tab.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.demo-frame {
  border-radius: 18px; padding: 8px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.demo-stage { position: relative; overflow: hidden; border-radius: 12px; background: #000; aspect-ratio: 32 / 9; }
.demo-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-toggle { display: none; justify-content: center; gap: 6px; margin-top: 12px; }
.demo-toggle button {
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--muted); background: var(--card); border: 1px solid var(--line);
}
.demo-toggle button.active { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.demo-caption { margin: 14px auto 0; max-width: 640px; text-align: center; color: var(--faint); font-size: 13.5px; }

@media (max-width: 720px) {
  .demo-stage { aspect-ratio: 16 / 9; }
  .demo-video { width: 200%; max-width: none; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
  .demo[data-view="after"] .demo-video { transform: translateX(-50%); }
  .demo[data-view="before"] .demo-video { transform: translateX(0); }
  .demo[data-view="both"] .demo-stage { aspect-ratio: 32 / 9; }
  .demo[data-view="both"] .demo-video { width: 100%; transform: none; }
  .demo-toggle { display: flex; }
}

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 72px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.section-head h2 {
  margin: 10px 0 12px; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; text-wrap: balance;
}
.section-head p { margin: 0; color: var(--muted); font-size: 17px; text-wrap: pretty; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fact { padding: 18px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.fact b { display: block; font-size: 15px; letter-spacing: -.01em; }
.fact span { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.steps { display: grid; gap: 14px; counter-reset: s; }
.step {
  position: relative; padding: 22px 22px 22px 70px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.step h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.cards { display: grid; gap: 14px; }
.card { padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.card .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  color: var(--accent-2); background: var(--accent-soft);
}
.card h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.015em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* comparison */
.compare { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.compare-scroll { overflow-x: auto; }
.compare table { width: 100%; min-width: 620px; border-collapse: collapse; }
.compare th, .compare td { padding: 15px 18px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--card-2); }
.compare tbody th { font-weight: 600; color: var(--text); width: 20%; }
.compare td { color: var(--muted); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .us { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.compare thead .us { color: var(--accent-2); }

/* fit */
.fit { display: grid; gap: 14px; }
.fit .card h3 { display: flex; align-items: center; gap: 10px; }
.fit ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.fit li { display: flex; gap: 10px; color: var(--muted); font-size: 15px; }
.fit li svg { flex: none; margin-top: 3px; }
.fit .yes svg { color: var(--good); }
.fit .know svg { color: var(--warn); }

/* offer */
.offer {
  max-width: 880px; margin: 0 auto; display: grid; gap: 0;
  border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.offer-main { padding: 30px 26px; }
.offer-side { padding: 30px 26px; background: var(--card-2); border-top: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.offer h3 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.offer .price { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 4px; font-variant-numeric: tabular-nums; }
.offer .price .now { font-size: 56px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.offer .price .was { color: var(--faint); text-decoration: line-through; font-size: 20px; }
.offer .note { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.checks { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 11px; }
.checks li { display: flex; gap: 10px; font-size: 15px; }
.checks svg { flex: none; margin-top: 4px; color: var(--good); }
.pay-line { margin-top: 14px; color: var(--faint); font-size: 13px; text-align: center; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.pay-chips span { padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: var(--card); }
.guarantee h4 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.01em; }
.guarantee p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.guarantee a { color: var(--accent-2); font-weight: 600; }

/* maker */
.maker { max-width: 760px; margin: 0 auto; padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.maker .who { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.maker .avatar { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.maker .who b { display: block; font-size: 17px; }
.maker .who span { color: var(--muted); font-size: 14px; }
.maker p { margin: 0 0 12px; color: var(--muted); font-size: 15.5px; }
.maker .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* changelog */
.changelog { max-width: 760px; margin: 0 auto; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.log-row { display: grid; gap: 4px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-row .ver { font-weight: 700; font-size: 15px; }
.log-row .ver small { color: var(--faint); font-weight: 500; margin-left: 8px; }
.log-row p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* faq */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq-row { border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); transition: border-color .2s; }
.faq-row.open { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.faq-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--text); font-size: 16px; font-weight: 600; letter-spacing: -.005em;
}
.faq-trigger svg { flex: none; color: var(--muted); transition: transform .25s var(--ease); }
.faq-row.open .faq-trigger svg { transform: rotate(180deg); }
.faq-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.faq-row.open .faq-panel { grid-template-rows: 1fr; }
.faq-panel > div { overflow: hidden; }
.faq-panel p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: 15.5px; }

/* final cta */
.final { text-align: center; }
.final h2 { margin: 0 auto 14px; max-width: 640px; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.final p { margin: 0 auto 26px; max-width: 520px; color: var(--muted); font-size: 17px; }

/* footer */
.site-footer { padding: 40px 0 120px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13.5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.site-footer p { margin: 0 0 8px; max-width: 760px; }

/* sticky mobile bar */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .3s var(--ease);
}
.sticky-bar.show { transform: translateY(0); }
.sticky-bar .meta small { display: block; color: var(--faint); font-size: 12px; line-height: 1.2; }
.sticky-bar .meta b { font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Wider screens ---------- */
@media (min-width: 760px) {
  .site-header .header-cta { display: inline-flex; }
  .hero { padding: 72px 0 40px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 70px 22px 22px; }
  .step::before { left: 22px; top: 22px; }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .fit { grid-template-columns: 1fr 1fr; }
  .offer { grid-template-columns: 1.15fr .85fr; }
  .offer-side { border-top: 0; border-left: 1px solid var(--line); }
  .sticky-bar { display: none; }
  .site-footer { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hl { animation: none; }
  .demo-video { transition: none; }
  .faq-panel, .btn, .sticky-bar { transition: none; }
}
