/* Second Source landing. Colours and fonts are the app's (src/app/globals.css), so the two feel like one product. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7f5f0;
  --surface: #ffffff;
  --sunken: #efece5;
  --ink: #1c1b18;
  --muted: #65625a;
  --line: #e2ded4;
  --line-strong: #cfc9bc;
  --accent: #1f3a5f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(31, 58, 95, 0.08);
  --good: #11663f;
  --good-bg: #e4f2ea;
  --bad: #a3271c;
  --bad-bg: #fae8e5;
  --dot: rgba(28, 27, 24, 0.13);
  --glow: rgba(31, 58, 95, 0.14);
  --shadow: 0 1px 2px rgba(28, 27, 24, 0.05), 0 12px 32px -12px rgba(28, 27, 24, 0.14);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141311;
    --surface: #1d1c19;
    --sunken: #181714;
    --ink: #f1eee7;
    --muted: #a8a49a;
    --line: #34322d;
    --line-strong: #4a4740;
    --accent: #9dbde3;
    --accent-ink: #10202f;
    --accent-soft: rgba(157, 189, 227, 0.1);
    --good: #66cf9c;
    --good-bg: #13291f;
    --bad: #f39185;
    --bad-bg: #331916;
    --dot: rgba(241, 238, 231, 0.1);
    --glow: rgba(157, 189, 227, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141311;
  --surface: #1d1c19;
  --sunken: #181714;
  --ink: #f1eee7;
  --muted: #a8a49a;
  --line: #34322d;
  --line-strong: #4a4740;
  --accent: #9dbde3;
  --accent-ink: #10202f;
  --accent-soft: rgba(157, 189, 227, 0.1);
  --good: #66cf9c;
  --good-bg: #13291f;
  --bad: #f39185;
  --bad-bg: #331916;
  --dot: rgba(241, 238, 231, 0.1);
  --glow: rgba(157, 189, 227, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--paper); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mark { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.mark .mark-fill { fill: currentColor; stroke: none; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.6; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 640px; }
.pill {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: translateY(1px); }
.btn .i { width: 16px; height: 16px; transition: transform 0.15s ease; }
.btn:hover .i { transform: translateX(2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--sunken); opacity: 1; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-large { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--sunken); }
.icon-btn .i-moon { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: none; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: block; }
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; font-size: 16px; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; }
.nav a { display: inline-block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--ink); background: var(--sunken); }
.nav-signin { display: none !important; }
.header-tools { display: flex; align-items: center; gap: 4px; }
.lang { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-decoration: none; color: var(--muted); padding: 8px 10px; border-radius: 8px; }
.lang:hover { color: var(--ink); background: var(--sunken); }
.menu-btn { display: none; }

@media (max-width: 960px) {
  .nav { position: fixed; inset: 64px 0 auto 0; margin: 0; padding: 12px 16px 20px; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a { display: block; padding: 12px; font-size: 16px; color: var(--ink); }
  .nav-signin { display: block !important; margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0; padding-top: 16px !important; }
  .menu-btn { display: inline-grid; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 420px) {
  .header-tools .btn-small { display: none; }
}

/* Hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero-grid {
  position: absolute; inset: -1px 0 0 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 {
  margin-top: 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7.2vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--muted); font-style: italic; }
.hero .lead { margin-top: 22px; font-size: clamp(17px, 2.1vw, 19px); text-wrap: pretty; }
.checkbar {
  margin-top: 34px; width: 100%; max-width: 680px; display: flex; gap: 8px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.checkbar:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft); }
.checkbar input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 400 16px/1.4 var(--sans); padding: 10px 10px; outline: none;
}
.checkbar input::placeholder { color: var(--muted); opacity: 0.9; transition: opacity 0.25s ease; }
.checkbar input.fading::placeholder { opacity: 0; }
.kinds { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.kinds li { font-size: 13px; color: var(--muted); padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--muted); max-width: 520px; }
@media (max-width: 520px) {
  .hero { padding-top: 48px; }
  .checkbar { flex-direction: column; }
  .checkbar .btn { width: 100%; }
}

/* Example result */
.example-section { padding: 24px 0 24px; }
.example {
  position: relative; margin: 0 auto; max-width: 820px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.example::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 70%; z-index: 0;
  background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none;
}
.example-bar { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--sunken); }
.example-body { position: relative; padding: 20px 18px 22px; }
@media (min-width: 720px) { .example-body { padding: 28px 32px 30px; } }
.post { border-left: 2px solid var(--line-strong); padding-left: 14px; }
.post-by { font-size: 13px; color: var(--muted); }
.post-by strong { color: var(--ink); font-weight: 600; }
.post-text { margin-top: 6px; font-family: var(--serif); font-size: 20px; line-height: 1.4; }
.summary { margin-top: 18px; font-size: 15px; color: var(--muted); }
.claims { margin-top: 18px; display: grid; gap: 12px; }
.claim { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); }
.claim-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.reason { font-size: 13px; color: var(--muted); }
.verdict { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.verdict .i { width: 14px; height: 14px; stroke-width: 2.4; }
.verdict-refuted { color: var(--bad); background: var(--bad-bg); }
.verdict-confirmed { color: var(--good); background: var(--good-bg); }
.claim-text { margin-top: 10px; font-weight: 500; }
.sources { margin-top: 12px; display: grid; gap: 8px; }
.source { border-top: 1px dashed var(--line); padding-top: 10px; }
.source-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.publisher { font-weight: 600; }
.stance { margin-left: auto; font-size: 12px; font-weight: 600; }
.stance-contradicts { color: var(--bad); }
.stance-supports { color: var(--good); }
.source blockquote { margin: 6px 0 0; font-family: var(--serif); font-size: 16px; line-height: 1.45; color: var(--ink); }
.source blockquote::before { content: "“"; }
.source blockquote::after { content: "”"; }
.source blockquote:lang(fr)::before { content: "« "; }
.source blockquote:lang(fr)::after { content: " »"; }
.checked { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.checked .i { width: 13px; height: 13px; color: var(--good); stroke-width: 2.4; }
.claim > .checked { margin-top: 10px; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 {
  margin-top: 14px; font-family: var(--serif); font-size: clamp(32px, 5vw, 50px); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance;
}
.section-head .lead { margin-top: 16px; }
.section-link { margin-top: 28px; }
.section-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; font-weight: 500; }
.section-link a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) { .section { padding: 72px 0; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-n { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.step-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.step h3 { margin-top: 18px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.step p { margin-top: 8px; font-size: 15px; color: var(--muted); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Rules */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rule { padding: 26px 24px; background: var(--surface); }
.rule-n { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.rule h3 { margin-top: 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.rule p { margin-top: 8px; font-size: 15px; color: var(--muted); }
@media (max-width: 900px) { .rules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .rules { grid-template-columns: 1fr; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { display: flex; flex-direction: column; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-top { display: flex; align-items: center; justify-content: space-between; }
.feature-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); }
.feature h3 { margin-top: 18px; font-family: var(--serif); font-size: 24px; letter-spacing: -0.01em; }
.feature p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.mini { margin-top: auto; padding-top: 20px; }
.mini-post { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-account, .mini-narrative { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.mini-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.level { flex: none; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); }
.mini-account p { margin-top: 8px; font-size: 13px; }
.mini-account .tag { display: inline-block; margin-top: 8px; }
.mini-narrative strong { font-size: 14px; }
.mini-narrative ul { margin-top: 10px; display: grid; gap: 8px; }
.mini-narrative li { position: relative; font-size: 13px; padding-left: 0; }
.bar { display: block; height: 4px; border-radius: 4px; background: var(--accent); opacity: 0.75; margin-bottom: 4px; }
.bar-1 { width: 78%; }
.bar-2 { width: 54%; }
.bar-3 { width: 31%; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.plan { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.plan-premium { border-color: var(--accent); box-shadow: var(--shadow); }
.plan h3 { font-size: 15px; font-weight: 600; font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.audience { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); min-height: 3em; }
@media (max-width: 960px) { .audience { min-height: 0; } }
.price { margin: 14px 0 18px; color: var(--muted); font-size: 14px; }
.price span { font-family: var(--serif); font-size: 44px; color: var(--ink); letter-spacing: -0.02em; }
.highlights { margin-top: 20px; display: grid; gap: 10px; }
.highlights li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; }
.highlights .i { width: 16px; height: 16px; margin-top: 2px; color: var(--good); stroke-width: 2.2; }
.fine { margin-top: 24px; font-size: 14px; color: var(--muted); max-width: 720px; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; }
.faq-wrap .section-head { margin-bottom: 0; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 2px; font-size: 17px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 20px; color: var(--muted); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2px 20px; color: var(--muted); max-width: 62ch; }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; gap: 24px; } }

/* Closing call to action */
.cta { padding: 96px 0; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 20%, transparent 70%);
}
.cta-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta h2 { font-family: var(--serif); font-size: clamp(38px, 6vw, 64px); letter-spacing: -0.02em; line-height: 1.05; }
.cta p { margin: 14px 0 28px; color: var(--muted); font-size: 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-tagline { margin-top: 10px; color: var(--muted); font-size: 14px; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-fine { margin-top: 28px; font-size: 12px; color: var(--muted); }

/* 404 */
.not-found { padding: 96px 0; }
.not-found h1 { margin-top: 40px; font-family: var(--serif); font-size: clamp(36px, 6vw, 56px); letter-spacing: -0.02em; }
.not-found h2 { font-family: var(--serif); font-size: 28px; }
.not-found p { margin-top: 12px; color: var(--muted); }
.not-found hr { margin: 48px 0; border: 0; border-top: 1px solid var(--line); }

/* Gentle entrances below the fold. Only once site.js is running, so nothing stays hidden if it doesn't load. */
.reveal-ready .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-ready .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}
