/* ============================================================
   Privacy Policy Generator — Landing page
   Brand colours follow the app's sign-in screen (navy #11133C, blue #2563EB, violet #7C3AED).
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --navy: #11133c;
  --navy-2: #1a1d5c;
  --blue: #2563eb;
  --blue-600: #1d4ed8;
  --blue-300: #93c5fd;
  --violet: #7c3aed;
  --green: #10b981;

  --bg: #ffffff;
  --bg-alt: #f5f7fc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --border: #e2e8f0;
  --ring: rgba(37, 99, 235, .45);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .15);
  --shadow-lg: 0 30px 60px -20px rgba(8, 10, 40, .55);

  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --gutter: clamp(32px, 6vw, 64px); /* total horizontal space around content: 16px a side on phones, up to 32px */
  --container: 1160px;
  color-scheme: light;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
          text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
code { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: .1em .4em; border-radius: 6px; background: var(--bg-alt); border: 1px solid var(--border); }

.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - var(--gutter), var(--container)); margin-inline: auto; }
.container.narrow { width: min(100% - var(--gutter), 820px); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link {
  position: fixed; left: 16px; top: -64px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.25rem;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; text-align: center;
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 52px; padding: .85rem 1.6rem; font-size: 1rem; border-radius: 14px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .8); }
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost { color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .06); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #e8edff; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn .ic { transition: transform .2s ease; }
.btn:hover .ic { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 20px -16px rgba(15, 23, 42, .4); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .8); }
.brand-mark .ic { width: 20px; height: 20px; }
.brand-name { font-size: 1.1rem; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; font-size: .92rem; font-weight: 500; color: var(--text-2); text-decoration: none; transition: color .15s, background-color .15s; }
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.menu-btn { display: none; width: 44px; height: 44px; padding: 0; place-items: center; color: var(--text); background: transparent; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.menu-btn .ic { width: 22px; height: 22px; }
.menu-btn .ic-close { display: none; }
.menu-btn[aria-expanded="true"] .ic-open { display: none; }
.menu-btn[aria-expanded="true"] .ic-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(48px, 8vw, 96px) 0 clamp(72px, 9vw, 120px);
  color: #fff; background: var(--navy);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-bg::before, .hero-bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(120px); }
.hero-bg::before { top: -25%; left: -10%; width: 55%; aspect-ratio: 1; background: var(--blue); opacity: .45; }
.hero-bg::after { bottom: -30%; right: -5%; width: 50%; aspect-ratio: 1; background: var(--violet); opacity: .35; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(32px, 5vw, 72px); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin-bottom: 20px; font-size: .82rem; font-weight: 600; color: #cfe0ff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(16, 185, 129, .25); }

.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; }
.grad { background: linear-gradient(90deg, #7fb0ff, #b79bff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.lead { max-width: 56ch; margin-top: 20px; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #c7d2f5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: .92rem; color: #b8c6ee; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .ic { color: var(--green); width: 1.1em; height: 1.1em; stroke-width: 2.6; }

/* Hero mock document */
.hero-visual { position: relative; padding: 28px 0 48px 12px; }
.doc { border-radius: 18px; overflow: hidden; background: #fff; color: #0f172a; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .15); transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); transition: transform .5s ease; }
.hero-visual:hover .doc { transform: perspective(1400px) rotateY(0) rotateX(0); }
.doc-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.win { display: inline-flex; gap: 6px; }
.win i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.doc-url { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; padding: 4px 12px; font-size: .78rem; color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 999px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.doc-url .ic { width: 12px; height: 12px; color: var(--green); }
.doc-body { padding: 20px; }
.doc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; }
.doc-head b { display: block; line-height: 1.2; }
.doc-head small { color: #64748b; }
.doc-icon { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); border-radius: 12px; }
.doc-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px 10px; font-size: .74rem; font-weight: 600; color: #047857; background: #d1fae5; border-radius: 999px; }
.doc-badge .ic { width: 12px; height: 12px; stroke-width: 3; }
.doc-list { display: grid; gap: 14px; padding-top: 16px; }
.doc-list li { display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; row-gap: 6px; align-items: center; }
.doc-list b { font-size: .88rem; font-weight: 600; }
.doc-list .sk { grid-column: 2; height: 7px; border-radius: 4px; background: #e2e8f0; }
.sk.w80 { width: 80%; } .sk.w70 { width: 70%; } .sk.w65 { width: 65%; } .sk.w60 { width: 60%; } .sk.w50 { width: 50%; }
.tick { grid-row: span 2; display: grid; place-items: center; width: 24px; height: 24px; color: #fff; background: var(--green); border-radius: 50%; }
.tick .ic { width: 13px; height: 13px; stroke-width: 3; }

.float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: .84rem; font-weight: 600; color: #fff; background: rgba(21, 24, 70, .85); border: 1px solid rgba(147, 197, 253, .35); border-radius: 14px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6); }
.float .ic { color: var(--blue-300); }
.float.f1 { top: 0; right: -6px; animation: bob 5s ease-in-out infinite; }
.float.f2 { bottom: 0; left: -10px; animation: bob 6s ease-in-out -2s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Document strip ---------- */
.docs-strip { position: relative; z-index: 2; margin-top: -40px; }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.strip-item { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.strip-item h2 { font-size: 1.05rem; font-weight: 700; }
.strip-item p { margin-top: 4px; font-size: .92rem; color: var(--text-2); }

.fi { display: grid; place-items: center; flex: none; width: 46px; height: 46px; color: var(--blue); background: rgba(37, 99, 235, .12); background: color-mix(in srgb, var(--blue) 12%, transparent); border-radius: 12px; }
.fi .ic { width: 22px; height: 22px; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.kicker { margin-bottom: 12px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; font-weight: 800; letter-spacing: -.025em; }
.section-head p:not(.kicker) { margin-top: 14px; color: var(--text-2); font-size: 1.05rem; }
.muted { margin-top: 14px; color: var(--text-2); font-size: 1.05rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, var(--border)); }
.card h3 { margin: 18px 0 8px; font-size: 1.12rem; font-weight: 700; }
.card p { color: var(--text-2); font-size: .95rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 32px 28px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); border-radius: 50%; box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .8); }
.step h3 { margin-bottom: 8px; font-size: 1.15rem; font-weight: 700; }
.step p { color: var(--text-2); font-size: .95rem; }
.cta-inline { margin-top: 40px; text-align: center; }

/* Coverage */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chips li { padding: 7px 14px; font-size: .86rem; font-weight: 600; color: var(--blue); background: rgba(37, 99, 235, .1); border: 1px solid rgba(37, 99, 235, .25); border-radius: 999px; }
.note { margin-top: 20px; padding-left: 14px; font-size: .9rem; color: var(--text-2); border-left: 3px solid var(--violet); }
.toc { padding: 24px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.toc ol { columns: 2; column-gap: 28px; counter-reset: t; }
.toc li { counter-increment: t; display: flex; gap: 10px; padding: 8px 0; font-size: .9rem; border-bottom: 1px dashed var(--border); break-inside: avoid; }
.toc li::before { content: counter(t, decimal-leading-zero); flex: none; font-weight: 700; font-size: .78rem; color: var(--blue); padding-top: .1em; font-variant-numeric: tabular-nums; }

/* Lookup */
.lookup { display: flex; gap: 10px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.lookup-field { position: relative; flex: 1; min-width: 0; }
.lookup-field .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.lookup input { width: 100%; min-height: 48px; padding: 0 14px 0 44px; font: inherit; color: var(--text); background: transparent; border: 0; border-radius: 10px; }
.lookup input::placeholder { color: var(--text-2); opacity: .8; }
.lookup input:focus-visible { outline: none; }
.lookup:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--ring); }
.help { margin-top: 10px; font-size: .86rem; color: var(--text-2); text-align: center; }
.help code { white-space: nowrap; }

.lookup-result { margin-top: 20px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.lookup-result[data-state="error"] { border-color: #f87171; }
.lookup-result .msg { margin: 0; color: var(--text); }
.lookup-result .msg small { display: block; margin-top: 4px; color: var(--text-2); }
.found-head { display: flex; align-items: center; gap: 14px; }
.found-icon { display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; flex: none; color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); border-radius: 14px; font-weight: 800; font-size: 1.3rem; }
.found-icon img { width: 100%; height: 100%; object-fit: cover; }
.found-head h3 { font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
.found-head p { font-size: .88rem; color: var(--text-2); }
.found-links { display: grid; gap: 10px; margin-top: 18px; }
.found-links li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.found-links .name { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.found-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--blue); text-decoration: none; }
.found-links a:hover { text-decoration: underline; }
.found-links .off { font-size: .85rem; color: var(--text-2); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .2s; }
.faq details[open] { border-color: var(--blue); border-color: color-mix(in srgb, var(--blue) 50%, var(--border)); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 600; cursor: pointer; list-style: none; border-radius: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--text-2); transition: transform .2s ease; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { padding: 0 20px 20px; color: var(--text-2); }

/* Final CTA */
.final-cta { padding: 0 0 clamp(64px, 9vw, 112px); }
.cta-box { position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 6vw, 72px) 24px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-2)); border-radius: 28px; }
.cta-box::before { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 90%; z-index: -1; background: radial-gradient(closest-side, rgba(124, 58, 237, .55), transparent); }
.cta-box h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
.cta-box p { margin: 12px 0 28px; color: #c7d2f5; }

/* Footer */
.site-footer { padding: 36px 0; border-top: 1px solid var(--border); background: var(--bg-alt); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { font-size: .9rem; color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.copy { width: 100%; font-size: .84rem; color: var(--text-2); }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .doc-list li { opacity: 0; transform: translateX(-8px); }
.js.ready .doc-list li { animation: slide-in .5s ease forwards; animation-delay: calc(.35s + var(--d) * .12s); }
@keyframes slide-in { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .steps .step:last-child { grid-column: 1 / -1; }

  /* Mobile navigation panel */
  .menu-btn { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 16px; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    padding: 16px 16px 24px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: 0 24px 40px -24px rgba(15, 23, 42, .5);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
  }
  .nav.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-links { flex-direction: column; gap: 2px; }
  .nav-links a { padding: 14px 12px; font-size: 1rem; }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .nav-actions .btn { min-height: 48px; }
  .nav-actions .btn-ghost { border-color: var(--border); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; width: 100%; margin-inline: auto; padding-left: 0; }
  .doc { transform: none; }
  .split { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: 1fr; }
  .docs-strip { margin-top: -28px; }
}

@media (max-width: 640px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .toc { padding: 18px 20px; }
  .hero-cta .btn { width: 100%; }
  .lookup { flex-direction: column; }
  .lookup .btn { width: 100%; }
  .float.f1 { right: 0; }
  .float.f2 { left: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal, .js .doc-list li { opacity: 1; transform: none; }
}

/* Windows high-contrast / forced colours */
@media (forced-colors: active) {
  .btn, .card, .step, .toc, .lookup, .strip-item { border: 1px solid CanvasText; }
  .grad { -webkit-text-fill-color: currentColor; color: currentColor; }
}
