/* ════════════════════════════════════════════════════════
   PDFArena — marketing site
   Evolved editorial emerald · dark + light
   ════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Light (default) — green-tinted paper */
  --bg:          oklch(0.992 0.006 150);
  --bg-2:        oklch(0.968 0.008 155);
  --bg-3:        oklch(0.945 0.010 155);
  --ink:         oklch(0.235 0.026 162);
  --ink-soft:    oklch(0.455 0.022 162);
  --ink-faint:   oklch(0.605 0.016 160);
  --line:        oklch(0.905 0.013 155);
  --line-strong: oklch(0.855 0.016 155);

  --brand:        oklch(0.560 0.118 162);
  --brand-strong: oklch(0.490 0.128 162);
  --brand-ink:    oklch(0.430 0.120 162);
  --brand-soft:   oklch(0.945 0.035 162);
  --on-brand:     oklch(0.992 0.010 160);

  --shadow-sm: 0 1px 2px oklch(0.40 0.03 162 / 0.06), 0 2px 8px oklch(0.40 0.03 162 / 0.05);
  --shadow-md: 0 4px 14px oklch(0.40 0.03 162 / 0.08), 0 1px 3px oklch(0.40 0.03 162 / 0.06);
  --shadow-lg: 0 18px 50px oklch(0.40 0.03 162 / 0.12), 0 6px 16px oklch(0.40 0.03 162 / 0.07);
  --shadow-glow: 0 10px 40px oklch(0.56 0.118 162 / 0.18);

  --maxw: 1160px;
  --radius: 18px;
  --radius-sm: 11px;
  --radius-lg: 26px;

  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg:          oklch(0.168 0.020 162);
  --bg-2:        oklch(0.205 0.022 162);
  --bg-3:        oklch(0.245 0.024 162);
  --ink:         oklch(0.945 0.018 158);
  --ink-soft:    oklch(0.760 0.022 158);
  --ink-faint:   oklch(0.620 0.020 160);
  --line:        oklch(0.300 0.022 162);
  --line-strong: oklch(0.360 0.026 162);

  --brand:        oklch(0.815 0.130 162);
  --brand-strong: oklch(0.870 0.128 162);
  --brand-ink:    oklch(0.840 0.130 162);
  --brand-soft:   oklch(0.285 0.050 162);
  --on-brand:     oklch(0.175 0.030 162);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.30), 0 2px 8px oklch(0 0 0 / 0.24);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.36), 0 1px 3px oklch(0 0 0 / 0.30);
  --shadow-lg: 0 22px 60px oklch(0 0 0 / 0.50), 0 8px 20px oklch(0 0 0 / 0.34);
  --shadow-glow: 0 14px 50px oklch(0.815 0.130 162 / 0.16);
}

/* ── Reset / base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[data-theme="dark"] { color-scheme: dark; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--brand); color: var(--on-brand); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: var(--radius-sm);
  z-index: 200; font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ── Eyebrow / kicker ───────────────────────────────────── */
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-ink);
}
.kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  --_pad: 0 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: var(--_pad);
  font-family: var(--font-sans); font-size: 15.5px; font-weight: 600; letter-spacing: 0.005em;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.18s cubic-bezier(.2,.7,.3,1), box-shadow 0.22s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand); color: var(--on-brand);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-2px); box-shadow: 0 16px 44px oklch(0.56 0.118 162 / 0.26); }
[data-theme="dark"] .btn-primary:hover { box-shadow: 0 16px 44px oklch(0.815 0.130 162 / 0.22); }

.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--ink-faint); transform: translateY(-2px); }

.btn-sm { height: 42px; font-size: 14.5px; padding: 0 18px; }
.btn-arrow { transition: transform 0.22s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 74px; display: flex; align-items: center; gap: 22px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-strong) 100%);
  display: grid; place-items: center;
  box-shadow: var(--shadow-glow);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.25);
}
.brand-mark span {
  font-size: 19px; line-height: 1;
  filter: saturate(1.05);
}
.brand-name {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink);
}
.brand-name em { font-style: normal; color: var(--brand-ink); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 14px; }
.nav a {
  padding: 9px 14px; border-radius: 9px; font-size: 15px; font-weight: 500;
  white-space: nowrap;
  color: var(--ink-soft); transition: color 0.16s, background 0.16s;
}
.nav a:hover { color: var(--ink); background: var(--bg-2); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--ink-soft); cursor: pointer;
  display: grid; place-items: center;
  transition: color 0.16s, background 0.16s, border-color 0.16s, transform 0.16s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); transform: translateY(-1px); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(70px, 11vw, 132px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--brand-soft) 0%, transparent 55%);
  opacity: 0.7;
}
.hero-inner { position: relative; z-index: 1; max-width: 940px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 8.2vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 26px 0 0;
  text-wrap: balance;
}
.hero h1 .accent {
  color: var(--brand-ink);
  font-style: italic;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink-soft);
  max-width: 600px; margin: 48px 0 0;
  line-height: 1.55; text-wrap: pretty;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 42px;
  list-style: none;
}
.hero-trust li {
  display: flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
}
.hero-trust svg { width: 17px; height: 17px; color: var(--brand); flex-shrink: 0; }

/* ── Section scaffolding ────────────────────────────────── */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-head { max-width: 660px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(31px, 4.4vw, 50px);
  line-height: 1.04; letter-spacing: -0.025em;
  margin: 18px 0 0; text-wrap: balance;
}
.section-head p {
  font-size: clamp(16px, 1.7vw, 18.5px); color: var(--ink-soft);
  margin: 18px 0 0; line-height: 1.6; text-wrap: pretty;
}

/* ── Features ───────────────────────────────────────────── */
.features { border-top: 1px solid var(--line); }
.feature-grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.feature {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 34px;
  transition: transform 0.24s cubic-bezier(.2,.7,.3,1), box-shadow 0.24s ease, border-color 0.24s ease;
  position: relative;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--brand-soft); color: var(--brand-ink);
  display: grid; place-items: center; margin-bottom: 22px;
}
.feature-icon svg { width: 23px; height: 23px; }
.feature h3 {
  font-family: var(--font-display);
  font-size: 20.5px; font-weight: 600; letter-spacing: -0.012em;
  margin-bottom: 9px;
}
.feature p { font-size: 15px; color: var(--ink-soft); line-height: 1.58; }

/* spanning feature (privacy) */
.feature-wide {
  grid-column: span 2;
  display: flex; align-items: center; gap: 30px;
  background: linear-gradient(140deg, var(--brand-soft) 0%, var(--bg-2) 75%);
}
[data-theme="dark"] .feature-wide {
  background: linear-gradient(140deg, var(--brand-soft) 0%, var(--bg-2) 80%);
}
.feature-wide .feature-icon { background: var(--brand); color: var(--on-brand); }
.feature-wide .copy { flex: 1; }

/* ── How it works ───────────────────────────────────────── */
.how { border-top: 1px solid var(--line); }
.steps {
  margin-top: 60px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  counter-reset: step;
}
.step { position: relative; padding-top: 30px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  color: var(--brand-ink); letter-spacing: 0.04em;
  display: block; margin-bottom: 18px;
}
.step-line {
  position: absolute; top: 7px; left: 0; right: 0; height: 1px;
  background: var(--line);
}
.step-line::after {
  content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand);
}
.step h3 {
  font-family: var(--font-display);
  font-size: 23px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 11px;
}
.step p { font-size: 15.5px; color: var(--ink-soft); line-height: 1.6; }

/* ── CTA band ───────────────────────────────────────────── */
.cta-band { border-top: 1px solid var(--line); }
.cta-card {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(46px, 6vw, 78px) clamp(32px, 5vw, 76px);
  text-align: center; position: relative; overflow: hidden;
}
[data-theme="dark"] .cta-card { background: var(--bg-2); border: 1px solid var(--line); }
.cta-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(90% 140% at 50% 0%, oklch(0.56 0.118 162 / 0.28) 0%, transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] .cta-card::before { background: radial-gradient(90% 140% at 50% 0%, oklch(0.815 0.13 162 / 0.14) 0%, transparent 60%); }
.cta-card h2 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.03; letter-spacing: -0.028em; text-wrap: balance;
  color: var(--bg);
}
[data-theme="dark"] .cta-card h2 { color: var(--ink); }
.cta-card p {
  position: relative;
  color: oklch(0.92 0.01 160 / 0.78); margin: 18px auto 0; max-width: 480px;
  font-size: 17px;
}
[data-theme="dark"] .cta-card p { color: var(--ink-soft); }
.cta-card .hero-cta { position: relative; justify-content: center; margin-top: 34px; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 66px 0 40px; }
.footer-top {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; color: var(--ink-soft); max-width: 280px; line-height: 1.6; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14.5px; color: var(--ink-soft); transition: color 0.16s; }
.footer-col a:hover { color: var(--brand-ink); }
.footer-bottom {
  margin-top: 54px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: var(--ink-faint);
}
.footer-bottom .privacy-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 600;
}
.footer-bottom .privacy-pill svg { width: 14px; height: 14px; }

/* ── Reveal animations ─────────────────────────────────── */
.reveal { opacity: 1; transform: none; }
@keyframes revealUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
html.js .reveal { opacity: 0; }
html.js .reveal.in { animation: revealUp 0.6s cubic-bezier(.2,.7,.3,1) both; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .reveal.in { animation: none; opacity: 1; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 880px) {
  .nav { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-wide { grid-column: span 2; flex-direction: row; }
  .steps { grid-template-columns: 1fr; gap: 38px; }
  .step-line { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-wide { grid-column: span 1; flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { flex: 1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
