/* ============================================
   RAZDEVATOR — design tokens & base styles
   ============================================ */

:root {
  /* Light theme (default) */
  --bg: #FAFBFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F4F8;
  --border: #E2E7EE;
  --text: #16202B;
  --text-muted: #5B6B7C;
  --accent: #0057E7;
  --accent-hover: #0046BD;
  --accent-soft: #E8F0FE;
  --success: #10B981;
  --success-soft: #E6F9F2;
  --warn: #F59E0B;
  --shadow-sm: 0 1px 2px rgba(16, 32, 55, 0.06);
  --shadow-md: 0 4px 16px rgba(16, 32, 55, 0.08);
  --shadow-lg: 0 12px 40px rgba(16, 32, 55, 0.12);

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --container: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F16;
    --surface: #131A24;
    --surface-alt: #1A2330;
    --border: #263041;
    --text: #EAEEF3;
    --text-muted: #8E9CAD;
    --accent: #4A90FF;
    --accent-hover: #6BA3FF;
    --accent-soft: #17233A;
    --success: #34D399;
    --success-soft: #10281F;
    --warn: #FBBF24;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #0B0F16;
  --surface: #131A24;
  --surface-alt: #1A2330;
  --border: #263041;
  --text: #EAEEF3;
  --text-muted: #8E9CAD;
  --accent: #4A90FF;
  --accent-hover: #6BA3FF;
  --accent-soft: #17233A;
  --success: #34D399;
  --success-soft: #10281F;
  --warn: #FBBF24;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0; color: var(--text-muted); max-width: 65ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #6BA3FF);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .15s ease;
}

.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-alt); }

.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin: 16px 0 18px; }

.hero .lede {
  font-size: 1.1rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.trust-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.trust-row strong { color: var(--text); font-family: var(--font-mono); }

/* ---------- Upload card ---------- */
.upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  background: var(--surface-alt);
  transition: border-color .15s ease, background .15s ease;
  cursor: pointer;
}

.dropzone:hover, .dropzone.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.dropzone strong { display: block; margin-bottom: 4px; font-size: 1rem; color: var(--text); }
.dropzone span { font-size: 0.85rem; color: var(--text-muted); }

.upload-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.upload-meta span strong { color: var(--success); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}
.section-head h2 { margin: 12px 0 12px; }

.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.step-card h3 { margin-bottom: 8px; }
.step-card p { font-size: 0.92rem; }

/* ---------- Before/After ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.compare-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.compare-imgs figure {
  margin: 0;
  position: relative;
  aspect-ratio: 3/4;
  background: var(--surface-alt);
}

.compare-imgs figure figcaption {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
}

.compare-body { padding: 16px 18px; }
.compare-body p { font-size: 0.85rem; margin: 0; }

.placeholder-img {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: repeating-linear-gradient(45deg, var(--surface-alt), var(--surface-alt) 10px, var(--border) 10px, var(--border) 11px);
}

/* ---------- Feature list ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-item {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--success-soft);
  color: var(--success);
  display: grid;
  place-items: center;
}

.feature-item h3 { font-size: 1rem; margin-bottom: 4px; }
.feature-item p { font-size: 0.88rem; }

/* ---------- Stats ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 780px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform .15s ease;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 22px 20px;
  font-size: 0.92rem;
  max-width: none;
}

/* ---------- Internal links / related ---------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color .15s ease, transform .15s ease;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-card .eyebrow { margin-bottom: 8px; }
.related-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.related-card p { font-size: 0.85rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--accent), #0038A8);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 12px auto 24px; }
.cta-band .btn-primary { background: #fff; color: var(--accent); }
.cta-band .btn-primary:hover { background: #EAF1FF; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: var(--text-muted); }
.footer-col a:hover { color: var(--accent); }

.footer-brand p { font-size: 0.88rem; margin-top: 12px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps, .compare-grid, .feature-grid, .related-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .cta-band { padding: 32px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Age gate (18+) ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  animation: ageGateIn .25s ease;
}
.age-gate.is-closing { animation: ageGateOut .2s ease forwards; }

@keyframes ageGateIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ageGateOut { from { opacity: 1; } to { opacity: 0; } }

.age-gate-card {
  max-width: 440px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.age-gate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.1rem;
}

.age-gate-card h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  text-wrap: balance;
}

.age-gate-card p {
  font-size: 0.92rem;
  margin: 0 auto 24px;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-gate-actions .btn { width: 100%; }

/* ---------- Fake processing flow ---------- */
.processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}

.processing-preview {
  position: relative;
  width: 100%;
  max-width: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface-alt);
}

.processing-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1.5px) saturate(0.9);
}

.processing-scan {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent);
  animation: scanMove 1.6s ease-in-out infinite;
}

@keyframes scanMove {
  0% { top: 0%; }
  50% { top: 96%; }
  100% { top: 0%; }
}

.processing-label {
  font-size: 0.95rem;
  color: var(--text);
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #6BA3FF);
  border-radius: 999px;
  transition: width .2s linear;
}

.progress-percent {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Result block ---------- */
.result-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  text-align: center;
}

.result-preview {
  position: relative;
  width: 100%;
  max-width: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface-alt);
  border: 2px solid var(--success);
}

.result-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--success);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}

.result-title { font-size: 1.05rem; }

.result-text {
  font-size: 0.85rem;
  max-width: 32ch;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.result-btn { width: 100%; }

.result-reset {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}
.result-reset:hover { color: var(--text); }
