/* ── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #1a2332;
  --border:    #21262d;
  --accent:    #2ea043;
  --accent-lt: #0d2818;
  --accent2:   #3fb950;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --muted2:    #6e7681;
  --success:   #2ea043;
  --danger:    #f85149;
  --radius:    14px;
  --shadow:    0 2px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .85rem 2rem;
}
.nav-inner {
  max-width: 1140px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.25rem; font-weight: 800; color: var(--accent);
  display: flex; align-items: center; gap: .4rem;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: .75rem; align-items: center; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background: linear-gradient(160deg, #0d1f14 0%, #0d1117 60%, #0d1117 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(46,160,67,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--accent-lt); color: var(--accent2);
  border: 1px solid rgba(46,160,67,.3); border-radius: 99px;
  padding: .3rem .9rem; font-size: .82rem; font-weight: 600;
  margin-bottom: 1.5rem; letter-spacing: .02em;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 900; line-height: 1.15;
  margin-bottom: 1.25rem; color: var(--text); letter-spacing: -.02em;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p {
  color: var(--muted); font-size: 1.15rem; margin-bottom: 2.25rem;
  max-width: 560px; margin-left: auto; margin-right: auto;
}
.hero-cta   { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-trust {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  flex-wrap: wrap; margin-top: 1rem;
}
.trust-pill {
  display: flex; align-items: center; gap: .4rem;
  font-size: .83rem; color: var(--muted); font-weight: 500;
}
.trust-pill svg { color: var(--success); }

/* ── Trust badges row ────────────────────────────────────────────────── */
.jurisdictions {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: .5rem; padding: 1.5rem 1.5rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.jurisdictions span {
  font-size: .8rem; color: var(--muted); font-weight: 500;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 99px; padding: .25rem .75rem;
}
.jurisdictions .label { font-size: .8rem; color: var(--muted2); margin-right: .25rem; }

/* ── Section ──────────────────────────────────────────────────────────── */
.section       { padding: 4rem 1.5rem; }
.section-inner { max-width: 1140px; margin: auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: .6rem; letter-spacing: -.02em; }
.section-header p  { color: var(--muted); font-size: 1rem; max-width: 500px; margin: auto; }
.section-label {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .75rem;
}

/* ── Document Library ────────────────────────────────────────────────── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.doc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.doc-card:hover {
  border-color: var(--accent); box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.doc-card-icon { font-size: 1.4rem; margin-bottom: .6rem; }
.doc-card-name { font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: .3rem; }
.doc-card-cat  { font-size: .75rem; color: var(--muted); }

/* ── How it works ────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

.step {
  text-align: center; padding: 2rem 1.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-lt); color: var(--accent);
  font-size: 1.1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.step p  { font-size: .9rem; color: var(--muted); }

/* ── Pricing ──────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px; margin: 0 auto;
}
@media (max-width: 720px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.price-card:hover    { box-shadow: var(--shadow-lg); }
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}
.price-popular {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .25rem .85rem; border-radius: 99px;
}
.price-tier  { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: .5rem; }
.price-amount {
  font-size: 2.6rem; font-weight: 900; line-height: 1; margin-bottom: .25rem; color: var(--text);
}
.price-amount sup { font-size: 1.2rem; font-weight: 700; vertical-align: super; }
.price-amount sub { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-desc  { color: var(--muted); font-size: .88rem; margin-bottom: 1.5rem; }
.price-features { list-style: none; margin-bottom: 1.75rem; display: flex; flex-direction: column; gap: .6rem; }
.price-features li {
  display: flex; align-items: flex-start; gap: .5rem;
  font-size: .9rem; color: var(--text);
}
.price-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 1px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: .5rem;
}
.faq-q {
  width: 100%; background: none; border: none; text-align: left;
  padding: 1.1rem 1.4rem; font-size: .97rem; font-weight: 600; color: var(--text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.faq-q .arrow { color: var(--muted); transition: transform .2s; font-size: .85rem; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 0 1.4rem 1.1rem;
  font-size: .92rem; color: var(--muted); line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ── CTA Banner ───────────────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border-radius: var(--radius); padding: 3rem 2rem;
  text-align: center; color: #fff;
}
.cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: .75rem; }
.cta-banner p  { opacity: .85; margin-bottom: 1.75rem; font-size: 1rem; }
.btn-white { background: #fff; color: var(--accent); font-weight: 700; }
.btn-white:hover { opacity: .92; }

/* ── App card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
  width: 100%;
}
.narrow { max-width: 520px; margin: 0 auto; }
.wide   { max-width: 880px; margin: 0 auto; }
.card h2 { font-size: 1.4rem; margin-bottom: .5rem; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .6rem 1.4rem; border-radius: 8px; font-weight: 600;
  cursor: pointer; border: none; transition: opacity .15s, transform .1s, box-shadow .15s;
  font-size: .95rem; text-decoration: none;
}
.btn:hover  { opacity: .88; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.25); }
.btn-primary:hover { box-shadow: 0 4px 16px rgba(37,99,235,.35); }
.btn-outline { background: var(--surface); border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: .8rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .4rem .9rem; font-size: .85rem; }

/* ── Form ─────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.form-group       { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-group label { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.form-row         { display: flex; gap: .75rem; }
.form-row .input  { flex: 1; }

.input {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px;
  color: var(--text); padding: .65rem 1rem; font-size: .97rem; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.textarea    { resize: vertical; min-height: 100px; font-family: inherit; }

select.input { cursor: pointer; }
select.input:disabled { opacity: .5; cursor: not-allowed; }

.checks { gap: 1.5rem; align-items: center; margin-bottom: 1.25rem; }
.checks label { display: flex; align-items: center; gap: .4rem; color: var(--muted); cursor: pointer; font-size: .95rem; }

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.75rem; }
.tab  {
  background: none; border: none; color: var(--muted); padding: .65rem 1.25rem;
  cursor: pointer; font-size: .95rem; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover  { color: var(--text); }

/* ── Status ───────────────────────────────────────────────────────────── */
.status-box {
  margin-top: 1rem; padding: .9rem 1rem; border-radius: 8px;
  border: 1.5px solid var(--border); font-size: .93rem; background: var(--surface2);
}
.status-box.ok   { border-color: var(--success); color: var(--accent2); background: var(--accent-lt); }
.status-box.warn { border-color: #d29922; color: #e3b341; background: #1a1500; }

/* ── Pricing (inline in app section) ─────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 1rem; }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }

.plan-card {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  background: var(--surface);
}
.plan-card:hover    { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.plan-card.featured { border-color: var(--accent); background: var(--accent-lt); }
.plan-badge { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: .5rem; font-weight: 700; }
.plan-price { font-size: 2rem; font-weight: 900; margin-bottom: .2rem; color: var(--text); }
.plan-price span { font-size: .95rem; font-weight: 400; color: var(--muted); }
.plan-desc  { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }

/* ── Output ───────────────────────────────────────────────────────────── */
.output-header  { display: flex; align-items: center; justify-content: space-between; margin: 1.5rem 0 .75rem; flex-wrap: wrap; gap: .5rem; }
.output-actions { display: flex; gap: .5rem; }
.doc-output {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 1.5rem; white-space: pre-wrap; word-break: break-word;
  font-family: 'Courier New', monospace; font-size: .88rem; line-height: 1.8;
  max-height: 600px; overflow-y: auto; color: var(--text);
}

/* ── Document Preview & Watermark ────────────────────────────────────── */
.doc-preview-wrap   { position: relative; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--border); }
.doc-visible        { position: relative; overflow: hidden; }
.doc-visible .doc-output { border: none; border-radius: 0; max-height: none; }
.watermark-canvas   { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.doc-blurred        { position: relative; }
.doc-output-blur    {
  filter: blur(6px); user-select: none; -webkit-user-select: none; pointer-events: none;
  border: none; border-radius: 0; max-height: none; opacity: .45;
}
.paywall-overlay    {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, rgba(13,17,23,0) 0%, rgba(13,17,23,.97) 30%);
  z-index: 10;
}
.paywall-box        {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 2rem; text-align: center;
  max-width: 420px; width: 90%; box-shadow: var(--shadow-lg);
}
.paywall-icon       { font-size: 2rem; margin-bottom: .75rem; }
.paywall-box h3     { font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
.paywall-box p      { color: var(--muted); font-size: .9rem; margin-bottom: 1.25rem; }
.paywall-plans      { display: flex; flex-direction: column; gap: .6rem; }
.paywall-plans .btn { width: 100%; justify-content: space-between; padding: .65rem 1.1rem; }
.paywall-plans span { color: var(--muted); font-weight: 400; font-size: .85rem; }

/* ── Loader ───────────────────────────────────────────────────────────── */
.loader { text-align: center; padding: 3rem 1rem; }
.spinner {
  width: 42px; height: 42px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ────────────────────────────────────────────────────────────── */
.error-box { margin-top: 1rem; padding: 1rem; border-radius: 8px; border: 1.5px solid var(--danger); color: var(--danger); font-size: .93rem; background: #1e0a0a; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  background: var(--text); color: rgba(255,255,255,.6);
  padding: 2.5rem 1.5rem; text-align: center; font-size: .85rem;
}
.footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-inner { max-width: 1140px; margin: auto; }
.footer-logo  { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: .5rem; }

/* ── Misc ─────────────────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.bg-alt { background: var(--surface2); }
