/* ==========================================================================
   QOTE · PRODUCTION CSS · v1 (editorial)
   Forest & clay palette, Playfair Display + Inter + IBM Plex Mono, editorial.
   Mobile-first. Design tokens via CSS variables.

   2026-06-07 — Reverted the "Bold Modern v2" overhaul (rounded pills,
   gradient text, glassy blur, depth shadows, ambient washes). That direction
   fought the sharp editorial homepage. This system is flat, 0-radius, mono-
   labelled and paper-toned to match the Qote homepage 1:1. Only the tasteful
   scroll-reveal (fade-up) is kept from v2.
   ========================================================================== */

/* --- tokens --- */
:root {
  --bg: #f5f0e8;            /* warm cream paper */
  --surface: #ffffff;
  --border: #e4ddcd;
  --border-strong: #c8bfab;
  --ink: #111c17;          /* near-black forest ink */
  --ink-soft: #3a5244;     /* muted forest-gray */
  --muted: #6f8175;
  --accent: #166534;       /* deep forest — primary */
  --accent-hover: #047857; /* mid forest — hover */
  --accent-light: #e7efe8; /* pale forest wash */
  --accent-ink: #166534;
  --accent-soft: #a7f3d0;  /* soft forest — on dark */
  --secondary: #c4a573;    /* clay */
  --forest-deep: #065f46;  /* darkest forest — dark sections */
  --gain: #047857;
  --gain-light: #e6efe7;

  --nav-h: 64px;
  --subnav-h: 48px;
  --wrap: 1240px;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--subnav-h) + 16px);
  overflow-x: hidden;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* --- typography --- */
.mono { font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace; }
h1, h2, h3, h4 {
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 900;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.12; margin-bottom: 0.35em; }
h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.14; }
h3 { font-size: 22px; line-height: 1.12; letter-spacing: -0.015em; font-weight: 700; }
h4 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
/* Italic emphasis inside headings — editorial accent (flat forest, no gradient) */
h1 em, h2 em, h3 em, .accent-text {
  font-style: italic;
  color: var(--accent-hover);
  font-weight: 700;
}
h1 em, h2 em, h3 em { font-family: 'Playfair Display', Georgia, serif; }
body { font-weight: 400; }
a { text-decoration: none; color: var(--ink-soft); transition: color 0.15s ease; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 11px; color: var(--accent-ink);
  letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 5px; height: 5px; background: var(--accent); display: block; }
.gain-text { color: var(--gain); }
.muted-text { color: var(--muted); }

/* --- buttons — sharp editorial, no radius --- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; font-size: 13px; font-weight: 500;
  border: 0.5px solid transparent; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-light); color: var(--accent-ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-sm { padding: 10px 16px; font-size: 12px; }

/* --- nav --- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; min-width: 0; }
.nav-brand-mark {
  width: 24px; height: 24px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 14px;
}
.nav-brand-text { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 17px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 24px; align-items: center; font-size: 13px; }
.nav-links a { color: var(--ink-soft); }
.nav-links a.active { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; font-size: 13px; flex-shrink: 0; min-width: 0; }
.nav-lang {
  display: flex; gap: 0; border: 0.5px solid var(--border-strong); font-size: 11px;
  font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.08em;
}
.nav-lang a { padding: 5px 10px; color: var(--ink-soft); }
.nav-lang a.active { background: var(--ink); color: #fff; }
.nav-cta { display: none !important; }
.nav-auth { color: var(--ink-soft); font-size: 13px; padding: 6px 4px; }
.nav-auth:hover { color: var(--ink); }
.nav-auth + .nav-auth { border-left: 0.5px solid var(--border); padding-left: 12px; }

.nav-burger { display: none; background: transparent; border: 0.5px solid var(--border-strong); padding: 8px 10px; }
.nav-burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); margin: 3px 0; }

/* --- sub-nav (anchor links per page) --- */
.subnav {
  position: sticky; top: var(--nav-h); z-index: 50;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  height: var(--subnav-h);
}
.subnav-inner {
  max-width: var(--wrap); margin: 0 auto; height: 100%;
  padding: 0 24px;
  display: flex; gap: 24px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
  padding: 6px 0; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: color 0.15s ease, border-color 0.15s ease;
}
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* --- layout --- */
.container { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 24px; }
.section-sm { padding: 48px 24px; }
.section-surface { background: var(--surface); border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* --- tabs --- */
.tabs { display: flex; flex-direction: column; gap: 24px; }
.tabs-head {
  display: flex; gap: 0; border-bottom: 0.5px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.tabs-head::-webkit-scrollbar { display: none; }
.tab-btn {
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap; transition: color 0.15s ease, border-color 0.15s ease;
  margin-bottom: -0.5px;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* --- common bits --- */
.sep { width: 5px; height: 5px; background: var(--accent); flex-shrink: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: var(--accent-light); color: var(--accent-ink);
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
}
.pill-gain { background: var(--gain-light); color: var(--gain); }
.pill-muted { background: var(--border); color: var(--ink-soft); }
.card {
  background: var(--surface); border: 0.5px solid var(--border);
  padding: 24px;
}
.card-bg { background: var(--bg); }
.dark-section { background: var(--forest-deep); color: #fff; }
.dark-section h1, .dark-section h2, .dark-section h3 { color: #fff; }
.dark-section .accent-text { color: var(--accent-soft); }

.ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--accent-light); color: var(--accent-ink);
  flex-shrink: 0;
}
.ic svg { width: 18px; height: 18px; }
.ic-dark { background: var(--accent); color: #fff; }

.step-num {
  width: 24px; height: 24px; background: var(--accent); color: #fff;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-num.off { background: var(--ink); opacity: 0.35; }

.partner-logo {
  font-family: 'IBM Plex Mono', monospace; font-weight: 600;
  font-size: 14px; letter-spacing: -0.01em; color: var(--ink-soft);
  white-space: nowrap; padding: 14px 24px;
  border: 0.5px solid var(--border); background: var(--surface);
}

.img-placeholder {
  background: var(--surface); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.img-placeholder::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  opacity: 0.06;
}
.img-label { position: relative; text-align: center; padding: 18px; }
.img-label .mono-cap { display: none; }
.img-label .hint { display: none; }
.img-label .title {
  font-size: 11px; color: var(--muted); font-weight: 400;
  display: block; font-style: italic; opacity: 0.6;
}

.metric { display: flex; flex-direction: column; gap: 6px; padding: 28px 24px; background: var(--bg); }
.metric-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 46px; font-weight: 900; letter-spacing: -0.02em;
  color: var(--accent); line-height: 1;
}
.metric-label { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
}
.field input, .field textarea, .field select {
  padding: 12px 14px; border: 0.5px solid var(--border-strong);
  background: var(--surface); font-family: inherit; font-size: 14px;
  color: var(--ink); outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, auto); gap: 32px;
  padding-top: 20px; border-top: 0.5px solid var(--border);
}
.hero-stat-value { font-family: 'Playfair Display', Georgia, serif; font-size: 26px; font-weight: 900; color: var(--accent); letter-spacing: -0.01em; }
.hero-stat-label { font-size: 12px; color: var(--muted); }

/* --- footer --- */
.footer {
  background: var(--forest-deep); color: #fff;
  padding: 48px 24px 24px;
  margin-top: 0;
}
.footer-inner { max-width: var(--wrap); margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px;
  padding-bottom: 32px; border-bottom: 0.5px solid rgba(255,255,255,0.12);
}
.footer-col-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #8da093; margin-bottom: 14px;
}
.footer-col a { display: block; color: #dfe8e1; font-size: 13px; padding: 5px 0; }
.footer-col a:hover { color: var(--accent-soft); }
.footer-intro { font-size: 13px; color: #b6c4ba; line-height: 1.55; margin: 14px 0; max-width: 280px; }
.footer-meta {
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: #8a8a8a;
}
.footer-meta a { color: #8a8a8a; }
.footer-meta a:hover { color: #e5e4df; }

/* --- responsive --- */
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .section { padding: 48px 20px; }
  .section-sm { padding: 32px 20px; }
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  .subnav { height: auto; }
  .subnav-inner {
    padding: 8px 20px;
    gap: 10px 18px;
    flex-wrap: wrap;
    overflow-x: visible;
    height: auto;
  }
  .subnav a { padding: 4px 0; }

  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .grid-2-stack { display: flex !important; flex-direction: column !important; gap: 16px !important; }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  [style*="display:flex"][style*="gap:6"]:not(.flex):not(.btn) {
    flex-wrap: wrap !important;
  }

  .grid-2 > *, .grid-3 > *, .grid-4 > *,
  .hero-stats > *, .footer-grid > *,
  [style*="display:grid"] > *,
  [style*="display:flex"] > * { min-width: 0; }
  h1, h2, h3, h4, p, span, a, div {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  pre, code, kbd, samp { overflow-wrap: normal; word-break: normal; }

  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 0.5px solid var(--border);
    padding: 12px 20px; align-items: stretch;
  }
  .nav-links.mobile-open a {
    padding: 12px 0; border-bottom: 0.5px solid var(--border);
  }
  .nav-links.mobile-open a:last-child { border-bottom: none; }
}

@media (max-width: 800px) {
  .nav-brand { display: none; }
}

@media (max-width: 560px) {
  html { scroll-padding-top: calc(var(--nav-h) + 96px); }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .hero-stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
  .nav-auth { display: none; }
  .section { padding: 40px 16px; }
  .section-sm { padding: 28px 16px; }
  .container { padding: 0 16px; }
  .nav-inner { padding: 0 14px; gap: 10px; }
  .subnav-inner { padding: 8px 14px; gap: 6px 14px; }
  .nav-lang a { padding: 5px 7px; }
  .nav-brand-text { font-size: 13px; }
  .nav-burger { padding: 7px 9px; }
  .footer { padding: 36px 16px 20px; }

  .mono[style*="font-size:44px"],
  .mono[style*="font-size:40px"],
  .mono[style*="font-size:36px"] { font-size: 30px !important; }
  .mono[style*="font-size:28px"] { font-size: 22px !important; }

  [style*="padding:36px"], [style*="padding: 36px"] { padding: 24px 18px !important; }
  [style*="padding:32px"], [style*="padding: 32px"] { padding: 22px 16px !important; }

  .metric { padding: 22px 16px; }
  .metric-value { font-size: 32px; }

  .card { padding: 18px; }

  .btn { white-space: normal; }
  .partner-logo { padding: 10px 14px; font-size: 12px; }
}

@media (max-width: 380px) {
  .nav-brand-text { display: none; }
}

/* --- utilities --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.mb-6 { margin-bottom: 6px; } .mb-8 { margin-bottom: 8px; } .mb-10 { margin-bottom: 10px; } .mb-12 { margin-bottom: 12px; } .mb-14 { margin-bottom: 14px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-22 { margin-bottom: 22px; } .mb-28 { margin-bottom: 28px; }
.items-center { align-items: center; }
.text-center { text-align: center; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; }
.fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; } .fs-16 { font-size: 16px; } .fs-17 { font-size: 17px; }
.c-ink { color: var(--ink); } .c-soft { color: var(--ink-soft); } .c-muted { color: var(--muted); }
.lh-15 { line-height: 1.5; } .lh-16 { line-height: 1.6; } .lh-17 { line-height: 1.7; }
.mw-440 { max-width: 440px; } .mw-500 { max-width: 500px; } .mw-620 { max-width: 620px; } .mw-640 { max-width: 640px; }

/* ==========================================================================
   Scroll reveal (kept from v2) — JS opt-in; no-JS & reduced-motion keep
   content visible. Simple fade-up, matching the homepage's qw-fade.
   ========================================================================== */
html.reveal-ready [data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
html.reveal-ready [data-reveal].reveal-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
