/* ═══════════════════════════════════════════════════════════════
   STRATOATLAS — style.css
   Single shared stylesheet. All page-specific styles stay inline.
   Last updated: March 2026 · v15
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:       #080b10;
  --bg2:      #0d1117;
  --bg3:      #131820;
  --bg4:      #1a2030;

  --text:     #e2e6ef;
  --text2:    #8f9db2;
  --text3:    #6a7a8e;

  --accent:   #c0392b;
  --accent-l: #e07060;
  --accent-d: #8a2820;

  --line:     rgba(255,255,255,.10);
  --line2:    rgba(255,255,255,.06);
  --line3:    rgba(255,255,255,.04);

  --gap:       24px;
  --container: 1200px;
  --prose:     680px;

  --radius-sm: 2px;
  --radius-md: 4px;

  --t: .2s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body { min-height: 100vh; overflow-x: hidden; }

img, svg { display: block; }

/* ── TYPOGRAPHY SCALE ── */

/* 01 — Display XL */
.t-display-xl {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(52px, 8vw, 108px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -4px;
  color: #fff;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
}

/* 02 — Display */
.t-display {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(44px, 6.5vw, 88px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -2.5px;
  color: #fff;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
}

/* 03 — H1 Page */
.t-h1,
.page-title {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: #fff;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
}

/* 04 — H2 Section */
.t-h2,
.sec-title {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  color: #fff;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
}

/* 05 — H3 Card */
.t-h3 {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.5px;
  color: #fff;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
}

/* 06 — H4 Minor */
.t-h4 {
  font-family: 'Geologica', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.3px;
  color: var(--text);
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
}

/* 07 — Body Lead */
.t-body-lead,
.page-intro {
  font-family: 'Inter', sans-serif;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--text2);
}
.t-body-lead strong,
.page-intro strong { color: var(--text); font-weight: 400; }

/* 08 — Body */
.t-body {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text2);
}
.t-body strong { color: var(--text); font-weight: 400; }
.t-body em     { font-style: italic; color: var(--text); }

/* 09 — Body Small */
.t-body-sm,
.sec-intro {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text2);
}

/* 10 — Label */
.t-label,
.sec-num,
.page-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
}
.page-label          { color: var(--accent); margin-bottom: 24px; }
.sec-num             { color: var(--text3);  margin-bottom: 16px; }
.t-label.accent      { color: var(--accent); }
.t-label.bright      { color: var(--text2);  }

/* 11 — Mono */
.t-mono {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .5px;
  color: var(--text3);
}
.t-mono.accent { color: var(--accent-l); }

/* 12 — Micro */
.t-micro {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
}

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }
.col-start-2 { grid-column-start: 2; }

.section       { padding: 120px 0; }
.section.full-bleed      { background: var(--bg2); }
.section.full-bleed-dark { background: var(--bg); }
.full-bleed    { width: 100%; }

/* ── PAGE HEADER (inner pages) ── */
#pageheader {
  padding-top: 160px;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--line);
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(8,11,16,.97) 60%, transparent);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: 'Geologica', sans-serif;
  font-size: 13px; font-weight: 800; letter-spacing: .5px;
  color: #fff; text-decoration: none;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
  display: flex; align-items: center; gap: 10px;
}
.nav-links {
  display: flex; gap: 32px; list-style: none;
}
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text3); text-decoration: none;
  transition: color var(--t);
}
.nav-links a:hover   { color: var(--text); }
.nav-links a.current {
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent);
}
.nav-lang {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: .5px;
  color: var(--text3); text-decoration: none;
  border: 1px solid var(--line);
  padding: 4px 10px; border-radius: var(--radius-sm);
  transition: all var(--t);
}
.nav-lang:hover { color: var(--text); border-color: rgba(255,255,255,.2); }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 28px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-left  { display: flex; flex-direction: column; gap: 4px; }
.footer-brand {
  font-family: 'Geologica', sans-serif; font-size: 13px; font-weight: 700;
  color: var(--text); letter-spacing: .3px;
}
.footer-copy  {
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--text3); letter-spacing: .3px;
}
.footer-right { display: flex; align-items: center; gap: 20px; }
.footer-icon-link {
  display: flex; align-items: center; gap: 7px;
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .5px;
  color: var(--text3); text-decoration: none;
  transition: color var(--t);
}
.footer-icon-link:hover    { color: var(--text); }
.footer-icon-link svg      { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.footer-divider            { width: 1px; height: 16px; background: var(--line); }
.footer-copy-wrap          { position: relative; }
.footer-email-btn {
  display: flex; align-items: center; gap: 7px;
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .5px;
  color: var(--text3);
  background: none; border: none; cursor: pointer; padding: 0;
  transition: color var(--t);
}
.footer-email-btn:hover    { color: var(--text); }
.footer-email-btn svg      { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.footer-copied {
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace; font-size: 10px;
  background: var(--bg3); color: var(--text);
  padding: 4px 10px; border-radius: var(--radius-sm);
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity var(--t);
  border: 1px solid var(--line);
}
.footer-copied.show { opacity: 1; }

/* ── INTERACTIVE COMPONENTS ── */

/* Primary button */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  padding: 10px 20px; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.btn-primary:hover {
  color: #fff;
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.05);
}

/* Ghost button (entry-btn equivalent) */
.btn-ghost,
.entry-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text2);
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  padding: 9px 16px; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.btn-ghost:hover,
.entry-btn:hover,
.entry-card:hover .entry-btn {
  color: var(--text);
  border-color: rgba(255,255,255,.40);
  background: rgba(255,255,255,.04);
}
.btn-ghost .btn-arrow,
.entry-btn .btn-arrow {
  font-size: 14px; color: var(--accent-l);
  transition: transform var(--t); line-height: 1;
}
.btn-ghost:hover .btn-arrow,
.entry-btn:hover .btn-arrow,
.entry-card:hover .btn-arrow { transform: translateX(5px); }

/* Pill / TOC link */
.c-pill {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: .5px;
  color: var(--text2); text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  transition: color var(--t), border-color var(--t), background var(--t);
}
.c-pill:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.30);
  background: rgba(255,255,255,.04);
}

/* Badge */
.c-badge {
  display: inline-flex; align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 8px; border-radius: var(--radius-sm);
}
.c-badge.pending { color: var(--text3);  border: 1px solid var(--line); }
.c-badge.active  { color: var(--accent-l); border: 1px solid rgba(192,57,43,.35); background: rgba(192,57,43,.08); }

/* Inline link */
.c-link {
  color: var(--text2); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t), border-color var(--t);
}
.c-link:hover { color: var(--text); border-color: rgba(255,255,255,.3); }

/* Entry cards */
.entry-card {
  background: var(--bg2);
  padding: 44px 36px 40px;
  text-decoration: none; display: flex; flex-direction: column;
  transition: background var(--t), border-color var(--t), border-top-color var(--t);
  border: 1px solid transparent;
  border-top: 2px solid rgba(192,57,43,.45);
}
.entry-card:hover {
  background: var(--bg3);
  border-color: var(--line);
  border-top-color: var(--accent-l);
}
.entry-tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.entry-title {
  font-family: 'Geologica', sans-serif;
  font-size: 22px; font-weight: 700;
  color: #fff; margin-bottom: 16px;
  letter-spacing: -.3px;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
}
.entry-desc {
  font-size: 14px; font-weight: 300;
  line-height: 1.8; color: var(--text2);
  margin-bottom: 32px; flex: 1;
}

/* Log entry */
.log-entry {
  display: block; text-decoration: none;
  padding: 32px 0;
  border-bottom: 1px solid var(--line2);
  transition: opacity var(--t);
}
.log-entry:hover { opacity: .8; }

/* ── REVEAL ANIMATION ── */
.reveal         { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay   { transition-delay: .15s; }

/* ── ANIMATIONS ── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }

/* ── ARTICLE PAGES (observations, cases) ── */

#article-header {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 160px 48px 64px;
}

.obs-label {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.label-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.back-link {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--text3);
  text-decoration: none;
  transition: color var(--t);
}
.back-link:hover { color: var(--text); }

.article-title {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -1.5px;
  color: #fff;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--text3);
}

#article-body {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 0 48px 120px;
}

.article-lede {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text2);
  padding-left: 24px;
  border-left: 2px solid var(--accent);
  margin-bottom: 64px;
}

.body-section {
  padding: 48px 0;
  position: relative;
}

.body-section + .body-section {
  border-top: 1px solid var(--line2);
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  display: block;
  margin-bottom: 16px;
}

.body-section h2 {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.5px;
  color: #fff;
  font-variation-settings: 'CRSV' 0, 'SHRP' 0;
  margin-bottom: 24px;
}

.body-section p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text2);
  margin-bottom: 20px;
}

.body-section p strong {
  color: var(--text);
  font-weight: 400;
}

.body-section p em {
  font-style: italic;
  color: var(--text);
}

.article-callout {
  background: var(--bg2);
  border-left: 2px solid var(--accent);
  padding: 24px 28px;
  margin: 28px 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text2);
}

.article-callout strong {
  color: var(--text);
  font-weight: 500;
}

.article-conclusion {
  padding: 48px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.article-conclusion p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text2);
  margin-bottom: 20px;
}

.article-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 0 0;
  margin-top: 48px;
  border-top: 1px solid var(--line2);
  gap: 20px;
}

.article-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--text3);
  text-decoration: none;
  transition: color var(--t);
}
.article-nav a:hover { color: var(--text); }

.nav-placeholder {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--text3);
  opacity: .4;
}

/* ── ARTICLE FIGURES (diagrams) ── */

.article-figure {
  margin: 36px 0;
}

.article-figure svg {
  width: 100%;
  display: block;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--radius-md);
  padding: 16px 0;
}

.article-figure figcaption {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .3px;
  color: var(--text3);
  text-align: center;
  margin-top: 12px;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar              { width: 3px; }
::-webkit-scrollbar-track        { background: var(--bg); }
::-webkit-scrollbar-thumb        { background: var(--bg4); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover  { background: var(--text3); }
