/* ─────────────────────────────────────────────────────────
   Nuqsaf — Marketing Site Styles
   Design tokens sourced from DESIGN.md
   Fraunces (display) + Instrument Sans (body)
   Accent #10B981, documentary modernism, minimal decoration
   ───────────────────────────────────────────────────────── */

:root {
  /* Surfaces */
  --surface-light: #ffffff;
  --surface-elevated: #f9fafb;
  --surface-dark: #0c0f14;
  --surface-secondary-dark: #151921;

  /* Accent */
  --accent: #10b981;
  --accent-muted: #065f46;

  /* Text */
  --text-primary: #0a0a0a;
  --text-primary-dark: #f9fafb;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;

  /* Borders */
  --border-subtle: #e5e7eb;
  --border-dark: #1f2937;

  /* Typography */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv01";
}

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

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

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

/* ─── Layout ─── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 128px 0;
}

.section-light {
  background: var(--surface-elevated);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 20px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 48px 0;
  max-width: 820px;
}

/* ─── Typography — prose ─── */
.prose {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 680px;
}

.prose p {
  margin: 0 0 24px 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-primary);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  line-height: 1;
  white-space: nowrap;
}

.btn-sm {
  font-size: 14px;
  padding: 10px 20px;
}

.btn-lg {
  font-size: 16px;
  padding: 18px 36px;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-muted);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── Navigation ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 16px;
  transition: color var(--duration-fast) var(--ease);
}

.nav-link:hover {
  color: var(--text-primary);
}

/* ─── Hero ─── */
.hero {
  padding: 128px 24px 160px;
  text-align: center;
  background: var(--surface-light);
}

.hero-inner {
  max-width: 920px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.16);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-muted);
  margin-bottom: 48px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 112px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin: 0 0 32px 0;
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
}

.hero-sub {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 48px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Steps ─── */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  counter-reset: step;
}

.step {
  position: relative;
}

.step-number {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-dark);
  color: var(--text-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.step-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ─── Meta grid ─── */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border-subtle);
}

.meta-item {
  /* empty on purpose */
}

.meta-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin: 0 0 8px 0;
}

.meta-value {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

/* ─── CTA section ─── */
.cta {
  background: var(--surface-dark);
  padding: 128px 24px;
  text-align: center;
}

.cta-inner {
  max-width: 720px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary-dark);
  margin: 0 0 24px 0;
}

.cta-sub {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  max-width: 560px;
  margin: 0 auto 48px;
}

/* ─── Footer ─── */
.footer {
  background: var(--surface-light);
  padding: 96px 0 48px;
  border-top: 1px solid var(--border-subtle);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand .wordmark {
  display: block;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin: 0 0 20px 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease);
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-ayah {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-ayah p {
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.footer-ayah-source {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 13px;
  color: var(--text-subtle);
}

.footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy,
.footer-note {
  font-size: 13px;
  color: var(--text-subtle);
  margin: 0;
}

/* ─────────────────────────────────────────────────────────
   Long-form whitepaper layout
   Used on /methodology and any future long-form documents.
   Reading-optimized: narrow column, generous line-height,
   Fraunces for display, Instrument Sans for body.
   ───────────────────────────────────────────────────────── */

.whitepaper {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px 120px;
}

.whitepaper-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 64px;
  transition: color var(--duration-fast) var(--ease);
}

.whitepaper-back:hover {
  color: var(--text-primary);
}

.whitepaper-eyebrow {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 20px 0;
}

.whitepaper-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0 0 32px 0;
}

.whitepaper-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 48px;
  font-size: 13px;
}

.whitepaper-meta dt {
  color: var(--text-subtle);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  align-self: center;
}

.whitepaper-meta dd {
  color: var(--text-primary);
  margin: 0;
  line-height: 1.5;
}

.whitepaper-status {
  background: #fefce8;
  border: 1px solid #fde047;
  border-left: 4px solid #ca8a04;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 48px;
  font-size: 14px;
  line-height: 1.6;
  color: #713f12;
}

.whitepaper-status strong {
  display: block;
  color: #422006;
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.whitepaper-toc {
  padding: 24px 28px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 64px;
}

.whitepaper-toc-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 16px 0;
}

.whitepaper-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.whitepaper-toc li {
  counter-increment: toc;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.whitepaper-toc li::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 24px;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.whitepaper-toc a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

.whitepaper-toc a:hover {
  color: var(--accent);
}

.whitepaper-toc .toc-pending {
  color: var(--text-subtle);
  font-style: italic;
}

.whitepaper-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  color: #1f2937;
}

.whitepaper-body h2 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 80px 0 24px 0;
  scroll-margin-top: 96px;
}

.whitepaper-body h2:first-child {
  margin-top: 0;
}

.whitepaper-body h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 48px 0 16px 0;
  scroll-margin-top: 96px;
}

.whitepaper-body p {
  margin: 0 0 24px 0;
}

.whitepaper-body ul,
.whitepaper-body ol {
  margin: 0 0 28px 0;
  padding-left: 28px;
}

.whitepaper-body li {
  margin-bottom: 12px;
}

.whitepaper-body li:last-child {
  margin-bottom: 0;
}

.whitepaper-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.whitepaper-body em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-primary);
}

.whitepaper-body a {
  color: var(--accent-muted);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: all var(--duration-fast) var(--ease);
}

.whitepaper-body a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

.whitepaper-body blockquote {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.6;
  font-style: italic;
  color: #374151;
  margin: 32px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  background: var(--surface-elevated);
  border-radius: 0 12px 12px 0;
}

.whitepaper-body blockquote p {
  margin-bottom: 12px;
}

.whitepaper-body blockquote p:last-child {
  margin-bottom: 0;
}

.whitepaper-body blockquote strong {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.whitepaper-body hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 64px 0;
}

.whitepaper-body .callout {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}

.whitepaper-body .callout-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.whitepaper-feedback {
  margin-top: 96px;
  padding: 48px 32px;
  background: var(--surface-dark);
  border-radius: 20px;
  text-align: center;
}

.whitepaper-feedback h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  color: white;
  margin: 0 0 16px 0;
}

.whitepaper-feedback p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  max-width: 480px;
  margin: 0 auto 28px;
}

.whitepaper-feedback a.btn {
  background: var(--accent);
  color: white;
  font-size: 14px;
  padding: 12px 24px;
}

.whitepaper-feedback a.btn:hover {
  background: var(--accent-muted);
}

/* Print styles — for scholars who want to read on paper */
@media print {
  body {
    background: white;
    color: #0a0a0a;
    font-size: 11pt;
  }

  .nav,
  .footer,
  .whitepaper-back,
  .whitepaper-feedback {
    display: none !important;
  }

  .whitepaper {
    max-width: 100%;
    padding: 0;
  }

  .whitepaper-title {
    font-size: 24pt;
  }

  .whitepaper-body {
    font-size: 11pt;
    line-height: 1.55;
    color: #000;
  }

  .whitepaper-body h2 {
    font-size: 16pt;
    page-break-after: avoid;
  }

  .whitepaper-body h3 {
    font-size: 13pt;
    page-break-after: avoid;
  }

  .whitepaper-body blockquote {
    background: transparent;
    border-left: 2pt solid #666;
    page-break-inside: avoid;
  }

  .whitepaper-body a {
    color: #000;
    text-decoration: underline;
  }

  .whitepaper-body h2,
  .whitepaper-body h3,
  .whitepaper-body blockquote {
    break-inside: avoid;
  }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .hero {
    padding: 80px 24px 96px;
  }

  .section-title {
    font-size: 32px;
    margin-bottom: 32px;
  }

  .cta {
    padding: 80px 24px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .nav-link[href="#how"],
  .nav-link[href="#methodology"] {
    display: none;
  }
}
