/* =========================================================================
   DocScanX — shared stylesheet
   Axain Studios
   ========================================================================= */

:root {
  --accent: #2f6bed;
  --accent-strong: #1f52c9;
  --accent-soft: #eaf0fe;
  --ink: #0b1220;
  --body: #3d4759;
  --muted: #6b7688;
  --line: #e7eaf0;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --card: #ffffff;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .06);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #6a9bff;
    --accent-strong: #85adff;
    --accent-soft: #182338;
    --ink: #f2f5fb;
    --body: #c2cad8;
    --muted: #8d97a8;
    --line: #26303f;
    --bg: #0c1017;
    --bg-alt: #10151e;
    --card: #141a24;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { display: block; max-width: 100%; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(47, 107, 237, .28); }
.btn-primary:hover { background: var(--accent-strong); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; font-size: 18px; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--body); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(720px 380px at 78% -8%, var(--accent-soft), transparent 60%),
    radial-gradient(560px 320px at 0% 8%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 62%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 6px 13px; border-radius: 999px; letter-spacing: .01em;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); font-weight: 800; margin: 22px 0 0; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent), #7aa2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); margin-top: 20px; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* Phone stage */
.stage { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 520px; }
.phone {
  border-radius: 40px; background: #0b0f16; padding: 10px;
  box-shadow: 0 30px 60px rgba(16, 24, 40, .28), 0 4px 12px rgba(16, 24, 40, .16);
  border: 1px solid rgba(255, 255, 255, .06);
}
.phone img { border-radius: 30px; width: 232px; display: block; }
.phone.back { position: absolute; transform: rotate(-8deg) translateX(-92px) scale(.86); opacity: .92; z-index: 1; }
.phone.mid { position: absolute; transform: rotate(7deg) translateX(96px) scale(.86); opacity: .92; z-index: 1; }
.phone.front { position: relative; z-index: 2; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-note { justify-content: center; }
  .eyebrow { margin: 0 auto; }
  .stage { margin-top: 20px; min-height: 460px; }
}
@media (max-width: 480px) {
  .phone.back { transform: rotate(-8deg) translateX(-58px) scale(.7); }
  .phone.mid { transform: rotate(7deg) translateX(62px) scale(.7); }
  .phone img { width: 200px; }
}

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.section-head p { margin-top: 14px; font-size: 17px; }
.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--card-shadow); transition: transform .18s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); }
.feature .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--body); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- Privacy band ---------- */
.privacy-band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.privacy-band .shot { display: flex; justify-content: center; }
.privacy-band .shot .phone img { width: 260px; }
.privacy-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.privacy-list li { display: flex; gap: 13px; align-items: flex-start; font-size: 15.5px; }
.privacy-list .check {
  flex: none; width: 24px; height: 24px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; margin-top: 1px;
}
.privacy-list .check svg { width: 14px; height: 14px; }
.privacy-list b { color: var(--ink); }
@media (max-width: 860px) {
  .privacy-band .wrap { grid-template-columns: 1fr; }
  .privacy-band .shot { order: -1; }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--card-shadow); }
.step .num {
  counter-increment: step; width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 16px;
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 17px; margin-bottom: 7px; }
.step p { font-size: 15px; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 820px; margin: 0 auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--card-shadow); position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--card-shadow); }
.plan .tag { position: absolute; top: 22px; right: 22px; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; }
.plan h3 { font-size: 20px; }
.plan .price { font-size: 40px; font-weight: 800; color: var(--ink); margin: 14px 0 2px; letter-spacing: -0.03em; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan .price-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; }
.plan li { display: flex; gap: 11px; font-size: 15px; align-items: flex-start; }
.plan li svg { flex: none; width: 19px; height: 19px; color: var(--accent); margin-top: 2px; }
@media (max-width: 700px) { .pricing { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta-final { text-align: center; }
.cta-card {
  background: linear-gradient(135deg, var(--accent), #2350c8);
  border-radius: 28px; padding: 60px 32px; color: #fff;
  box-shadow: 0 30px 60px rgba(47, 107, 237, .3);
}
.cta-card h2 { color: #fff; font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.cta-card p { color: rgba(255, 255, 255, .9); margin-top: 14px; font-size: 17px; }
.cta-card .btn { margin-top: 28px; background: #fff; color: var(--accent-strong); }
.cta-card .btn:hover { background: #fff; transform: translateY(-1px); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 48px 0 40px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; align-items: flex-start; }
.footer-brand { max-width: 300px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: var(--muted); }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--body); font-size: 15px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Badge (App Store) ---------- */
.store-badge {
  display: inline-flex; align-items: center; gap: 11px; background: #0b0f16; color: #fff;
  padding: 11px 20px 11px 18px; border-radius: 14px; border: 1px solid rgba(255,255,255,.08);
}
.store-badge svg { width: 26px; height: 26px; }
.store-badge .b-top { font-size: 10.5px; opacity: .8; line-height: 1; display: block; }
.store-badge .b-main { font-size: 18px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.store-badge:hover { color: #fff; }

/* =========================================================================
   Legal pages (privacy.html / terms.html)
   ========================================================================= */
.legal { padding: 60px 0 90px; }
.legal .wrap { max-width: 780px; }
.legal-head { border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 12px; }
.legal-head a.back { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.legal-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin: 20px 0 10px; }
.legal-head .updated { font-size: 14px; color: var(--muted); }
.legal-body { font-size: 16px; }
.legal-body h2 { font-size: 22px; font-weight: 700; margin: 42px 0 12px; }
.legal-body h3 { font-size: 17px; font-weight: 700; margin: 26px 0 8px; }
.legal-body p { margin: 12px 0; }
.legal-body ul { margin: 12px 0; padding-left: 22px; }
.legal-body li { margin: 8px 0; }
.legal-body strong { color: var(--ink); }
.callout {
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 22px 0; font-size: 15px; color: var(--ink);
}
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 24px; margin: 24px 0 8px; }
.toc h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { margin: 6px 0; font-size: 14.5px; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
