/* DocuStudio website — shared styles for index.html and privacy.html.
   Colours follow the app: deep navy surfaces with an emerald accent. */

:root {
  --bg: #f6f8fb;
  --bg-tint: #eef3f7;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0b1726;
  --text-2: #3f4f63;
  --muted: #66768a;
  --border: #e1e8ef;
  --primary: #059669;
  --primary-strong: #047857;
  --primary-soft: #e3f6ee;
  --on-primary: #ffffff;
  --focus: #0ea5e9;
  --shadow: 0 1px 2px rgba(11, 23, 38, .05), 0 8px 24px rgba(11, 23, 38, .06);
  --shadow-lg: 0 24px 60px rgba(11, 23, 38, .16);

  /* Tool category accents (same hues as the app's category chips) */
  --c-organize: #7357f6;
  --c-edit: #db3f78;
  --c-convert: #2a7fd8;
  --c-optimize: #c9850f;
  --c-security: #d63b52;
  --pro: #e8860c;

  --hero-bg: #0d1424;
  --hero-text: #eef3f8;
  --hero-muted: #a9b6c8;

  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1424;
    --bg-tint: #111a2c;
    --surface: #151f33;
    --surface-2: #1b263d;
    --text: #edf2f8;
    --text-2: #b4c1d2;
    --muted: #8796ab;
    --border: #253250;
    --primary: #10b981;
    --primary-strong: #34d399;
    --primary-soft: rgba(16, 185, 129, .14);
    --on-primary: #04130d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
    --c-organize: #9b86ff;
    --c-edit: #f36b9c;
    --c-convert: #5aa6f2;
    --c-optimize: #f0b44a;
    --c-security: #f2697c;
    --pro: #f5a33a;
    --hero-bg: #0a1020;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1424;
  --bg-tint: #111a2c;
  --surface: #151f33;
  --surface-2: #1b263d;
  --text: #edf2f8;
  --text-2: #b4c1d2;
  --muted: #8796ab;
  --border: #253250;
  --primary: #10b981;
  --primary-strong: #34d399;
  --primary-soft: rgba(16, 185, 129, .14);
  --on-primary: #04130d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
  --c-organize: #9b86ff;
  --c-edit: #f36b9c;
  --c-convert: #5aa6f2;
  --c-optimize: #f0b44a;
  --c-security: #f2697c;
  --pro: #f5a33a;
  --hero-bg: #0a1020;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-strong); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 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(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand small { display: block; font-size: 11.5px; font-weight: 600; color: var(--primary-strong); letter-spacing: .02em; line-height: 1; margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
@media (max-width: 860px) { .nav { display: none; } .header-actions { margin-left: auto; } }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 15.5px/1 var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 480px) { .header-actions .btn-sm { display: none; } }

.play-badge {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 22px 8px 18px;
  border-radius: 14px; background: #000; color: #fff; text-decoration: none; border: 1px solid #3a3a3a;
}
.play-badge:hover { color: #fff; background: #111; }
.play-badge svg { width: 28px; height: 28px; }
.play-badge span { display: grid; line-height: 1.1; }
.play-badge small { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.play-badge strong { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }

/* ── Sections ───────────────────────────────────────────── */
section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }
.section-tint { background: var(--bg-tint); border-block: 1px solid var(--border); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-strong); margin-bottom: 12px; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 17.5px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; padding: 72px 0 88px;
  background:
    radial-gradient(900px 480px at 85% 10%, rgba(16, 185, 129, .22), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(115, 87, 246, .16), transparent 60%),
    var(--hero-bg);
  color: var(--hero-text);
}
.hero .wrap { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.6vw, 60px); font-weight: 800; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: #34d399; }
.hero .lede { margin-top: 20px; font-size: clamp(17px, 1.6vw, 19.5px); color: var(--hero-muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.hero .btn-ghost { color: var(--hero-text); border-color: rgba(255, 255, 255, .22); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: var(--hero-text); font-weight: 600; font-size: 15px; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: #34d399; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: 13.5px; font-weight: 600; color: var(--hero-text); margin-bottom: 22px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual .phone:first-child { position: relative; z-index: 2; transform: translateX(-12%); }
.hero-visual .phone:nth-child(2) { position: absolute; right: -2%; top: 12%; width: 54%; transform: rotate(6deg); z-index: 1; filter: brightness(.82); }
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual .phone:nth-child(2) { right: 2%; }
}
@media (max-width: 480px) {
  .hero { padding: 48px 0 64px; }
  .hero-visual .phone:first-child { transform: none; }
  .hero-visual .phone:nth-child(2) { display: none; }
}

/* Phone frame around a real app screenshot */
.phone {
  width: min(300px, 78vw); aspect-ratio: 720 / 1600; border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #2b364b, #121a2b); box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .08);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 30px; background: #0d1424; }

/* ── Privacy strip ──────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.fact .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); margin-bottom: 14px; }
.fact .ic svg { width: 22px; height: 22px; }
.fact h3 { font-size: 17px; font-weight: 700; }
.fact p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
@media (max-width: 920px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.panel h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.panel ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--text-2); font-size: 15.5px; }
.panel li { display: flex; gap: 10px; }
.panel li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.panel.stays li svg { color: var(--primary); }
.panel.leaves li svg { color: var(--muted); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* ── Tools ──────────────────────────────────────────────── */
.tool-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font: 600 14.5px/1 var(--font); cursor: pointer;
}
.chip b { font-weight: 700; color: var(--muted); font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-pressed="true"] b { color: inherit; opacity: .7; }
.tool-group { margin-top: 34px; }
.tool-group[hidden] { display: none; }
.tool-group h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin-bottom: 14px; }
.tool-group h3 .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); }
.tool-group h3 small { font-size: 14px; font-weight: 600; color: var(--muted); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tool {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 16px 16px 18px; border-left: 4px solid var(--accent);
}
.tool strong { display: block; font-size: 15.5px; font-weight: 700; }
.tool span { display: block; margin-top: 3px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.badge-pro {
  position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  padding: 3px 7px; border-radius: 6px; color: #fff; background: var(--pro);
}
.tool:has(.badge-pro) strong { padding-right: 44px; }
.legend { margin-top: 26px; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.legend .badge-pro { position: static; }

/* ── Steps ──────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--primary); color: var(--on-primary); font-weight: 800; margin-bottom: 16px;
}
.steps h3 { font-size: 18px; }
.steps p { margin-top: 8px; color: var(--text-2); font-size: 15.5px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ── Screens gallery ────────────────────────────────────── */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 6px 4px 26px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery figure { margin: 0; flex: none; scroll-snap-align: center; text-align: center; }
.gallery .phone { width: 236px; }
.gallery figcaption { margin-top: 14px; font-weight: 600; font-size: 14.5px; color: var(--text-2); }

/* ── Plans ──────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; margin: 0 auto; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 30px; }
.plan.pro { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.plan h3 { font-size: 22px; }
.plan .price { margin-top: 6px; color: var(--text-2); font-weight: 600; }
.plan ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 11px; font-size: 15.5px; }
.plan li { display: flex; gap: 10px; color: var(--text-2); }
.plan li svg { width: 19px; height: 19px; flex: none; margin-top: 2px; color: var(--primary); }
.plan li.no svg { color: var(--muted); }
.fineprint { max-width: 900px; margin: 18px auto 0; color: var(--muted); font-size: 13.5px; text-align: center; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ── FAQ ────────────────────────────────────────────────── */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; font-weight: 700; font-size: 16.5px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 22px 20px; color: var(--text-2); font-size: 15.5px; }
.faq .answer p + p { margin-top: 10px; }

/* ── CTA band ───────────────────────────────────────────── */
.cta-band {
  border-radius: 28px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: radial-gradient(600px 300px at 100% 0%, rgba(16, 185, 129, .3), transparent 60%), var(--hero-bg); color: var(--hero-text);
}
.cta-band h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; }
.cta-band p { margin-top: 8px; color: var(--hero-muted); }
@media (max-width: 520px) { .cta-band { padding: 32px 22px; } }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { padding: 56px 0 40px; border-top: 1px solid var(--border); background: var(--surface); font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.footer-grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-2); text-decoration: none; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-grid p { color: var(--text-2); margin-top: 12px; max-width: 360px; }
.copyright { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ── Policy page ────────────────────────────────────────── */
.doc-hero { padding: 56px 0 40px; background: var(--bg-tint); border-bottom: 1px solid var(--border); }
.doc-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; }
.doc-hero .lede { margin-top: 14px; max-width: 720px; color: var(--text-2); font-size: 17.5px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.doc-meta > span { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 88px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; }
.toc h2 { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc details summary { display: none; }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 8px; }
  .toc h2 { display: none; }
  .toc details summary { display: block; padding: 12px 10px; font-weight: 700; cursor: pointer; color: var(--text); }
}
.doc { max-width: 760px; min-width: 0; }
.doc section { padding: 0; margin-bottom: 52px; }
.doc h2 { font-size: 26px; font-weight: 800; margin-bottom: 14px; scroll-margin-top: 90px; }
.doc h3 { font-size: 18px; font-weight: 700; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text-2); font-size: 16.5px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 12px 0; display: grid; gap: 8px; }
.doc strong { color: var(--text); }
.callout { border-radius: 16px; padding: 20px 22px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); margin: 16px 0; }
.callout p { color: var(--text); }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
th { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td code, .doc code { font-size: 13.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--text); word-break: break-word; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
@media (max-width: 640px) { .summary-grid { grid-template-columns: 1fr; } }
