/* ===================================================================
   Atlasul Revoluției Silențioase — Shared Stylesheet
   rt.md/atlas
   =================================================================== */

:root {
  --paper:      #f1ece1;
  --paper-shade:#e6dfce;
  --paper-deep: #d4cab2;
  --ink:        #14140e;
  --ink-soft:   #2e2a20;
  --faded:      #6e6651;
  --teal:       #1f4742;
  --teal-soft:  #336864;
  --rust:       #9c4422;
  --gold:       #a07a2c;
  --line:       #b8a87c;
  --line-soft:  #d4c898;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Spectral', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 10% 5%, rgba(160,122,44,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 95%, rgba(31,71,66,0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(20,20,14,0.04) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ===================== NAVIGATION ===================== */
nav.atlas-nav {
  position: sticky;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.atlas-nav .brand {
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.atlas-nav .brand a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s;
}
.atlas-nav .brand a:hover { color: var(--rust); }

.atlas-nav .brand-sep {
  color: var(--line);
  font-weight: 400;
}

.atlas-nav .pages { display: flex; gap: 28px; }
.atlas-nav .pages a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 4px;
}
.atlas-nav .pages a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.atlas-nav .pages a:hover { color: var(--rust); }
.atlas-nav .pages a:hover::after { transform: scaleX(1); }

.atlas-nav .pages a.current {
  color: var(--rust);
  font-weight: 600;
}
.atlas-nav .pages a.current::after { transform: scaleX(1); }

/* ===================== CHAPTER LAYOUT ===================== */
.chapter-page {
  padding: 80px 32px 120px;
  position: relative;
  z-index: 2;
}

.chapter-wrap { max-width: 980px; margin: 0 auto; }
.prose-wrap { max-width: 720px; margin: 0 auto; }

/* ===================== CHAPTER HEADER ===================== */
.chapter-eyebrow {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 24px;
}

.chapter-eyebrow a {
  color: var(--rust);
  text-decoration: none;
  border-bottom: 1px dotted var(--rust);
}

.chapter-roman {
  text-align: center;
  font-family: 'Libre Caslon Text', 'Cormorant Garamond', serif;
  font-size: 132px;
  line-height: 0.9;
  font-weight: 400;
  font-style: italic;
  color: var(--rust);
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.chapter-title {
  text-align: center;
  font-family: 'Libre Caslon Text', 'Cormorant Garamond', serif;
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 32px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.chapter-title em { font-style: italic; color: var(--teal); }

.chapter-deck {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 24px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto 60px;
}

.chapter-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 60px 0;
  gap: 24px;
}

.chapter-divider::before,
.chapter-divider::after {
  content: '';
  width: 80px;
  height: 1px;
  background: var(--line);
}

.chapter-divider span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ===================== PROSE ===================== */
.prose p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 26px;
  color: var(--ink-soft);
}

.prose p strong {
  font-weight: 600;
  background: linear-gradient(180deg, transparent 60%, rgba(160,122,44,0.25) 60%);
  padding: 0 2px;
  color: var(--ink);
}

.prose p em { font-style: italic; color: var(--rust); }

.prose p.lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
  margin: 40px 0 36px;
}

.prose p:first-of-type::first-letter,
.prose .dropcap::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 80px;
  float: left;
  line-height: 0.85;
  margin: 8px 12px 0 0;
  color: var(--rust);
  font-weight: 600;
}

/* ===================== SECTION HEADINGS ===================== */
.section-num {
  text-align: center;
  margin: 80px 0 40px;
  position: relative;
}

.section-num::before,
.section-num::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 1px;
  background: var(--line);
}
.section-num::before { left: calc(50% - 130px); }
.section-num::after { right: calc(50% - 130px); }

.section-num span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--paper);
  padding: 0 18px;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: 'Libre Caslon Text', 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  margin-bottom: 50px;
  color: var(--ink);
  font-style: italic;
}

.section-title em { color: var(--teal); }

/* ===================== PULLQUOTE ===================== */
.pullquote {
  margin: 60px -20px;
  padding: 40px 50px;
  border-left: 3px solid var(--rust);
  background: rgba(176,74,54,0.04);
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 400;
}

.pullquote::before {
  content: '"';
  font-size: 80px;
  line-height: 0;
  color: var(--rust);
  margin-right: 8px;
  position: relative;
  top: 28px;
  opacity: 0.5;
}

.pullquote cite {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  font-style: normal;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faded);
}

/* ===================== CALLOUT BOX ===================== */
.callout {
  margin: 50px 0;
  padding: 36px 40px;
  background: var(--paper-shade);
  border: 1px solid var(--line);
  position: relative;
}

.callout::before {
  content: attr(data-label);
  position: absolute;
  top: -10px;
  left: 24px;
  background: var(--paper);
  padding: 0 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--rust);
}

.callout p { font-style: italic; margin-bottom: 16px; }
.callout p:last-child { margin-bottom: 0; }

/* ===================== ENUMERATED LIST ===================== */
.enumerated {
  list-style: none;
  margin: 50px 0;
  counter-reset: enum;
}

.enumerated li {
  counter-increment: enum;
  padding: 28px 0 28px 80px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.enumerated li::before {
  content: counter(enum, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.enumerated li strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  margin-bottom: 8px;
  background: none;
  color: var(--ink);
  font-weight: 600;
  padding: 0;
}

.enumerated li p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.enumerated li:last-child { border-bottom: none; }

/* ===================== GRID CARDS (regions / tools) ===================== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 60px 0;
}

.gcard {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 36px 32px;
  position: relative;
}

.gcard-coord {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 12px;
}

.gcard h3 {
  font-family: 'Libre Caslon Text', 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 16px;
  color: var(--ink);
  font-style: italic;
}

.gcard h3 em { color: var(--teal); }

.gcard p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

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

.gcard-symbol {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  color: var(--teal);
  margin-bottom: 18px;
}

.gcard .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--faded);
  margin-bottom: 14px;
}

/* ===================== TESTIMONIES ===================== */
.testimony {
  border-left: 3px solid var(--rust);
  padding: 32px 40px;
  margin-bottom: 36px;
  background: var(--paper);
  position: relative;
}

.testimony::before {
  content: '';
  position: absolute;
  left: -3px; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--rust), var(--gold));
}

.testimony p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 16px;
}

.testimony footer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--faded);
  text-transform: uppercase;
}

.testimony footer strong { color: var(--rust); font-weight: 600; }

/* ===================== JOURNEY ===================== */
.journey {
  margin: 60px 0;
  position: relative;
  padding-left: 70px;
}

.journey::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--line);
}

.stage {
  margin-bottom: 60px;
  position: relative;
}

.stage-marker {
  position: absolute;
  left: -64px;
  top: 4px;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  color: var(--rust);
  border-radius: 50%;
}

.stage-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.stage h3 {
  font-family: 'Libre Caslon Text', 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 14px;
  color: var(--ink);
  font-style: italic;
}

.stage p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

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

/* ===================== CHAPTER NAVIGATION (prev/next) ===================== */
.ch-nav {
  margin-top: 100px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ch-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: transform 0.25s ease, border-color 0.2s, background 0.2s, box-shadow 0.25s;
  display: block;
  position: relative;
  overflow: hidden;
}

/* Accent stripe on the leading edge — subtle by default, full on hover */
.ch-nav a::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: var(--rust);
  transition: width 0.25s ease;
}
.ch-nav a.prev::before { left: 0; }
.ch-nav a.next::before { right: 0; }

.ch-nav a:hover {
  background: var(--paper-shade);
  border-color: var(--rust);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20,20,14,0.06);
}

.ch-nav a:hover::before { width: 6px; }

.ch-nav .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ch-nav .ch-title {
  font-family: 'Libre Caslon Text', 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}

.ch-nav .next {
  text-align: right;
}
.ch-nav .next .label { justify-content: flex-end; }

/* Continue indicator — small subtitle below the chapter title */
.ch-nav .ch-hint {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faded);
  margin-top: 10px;
}

/* ===================== INVITATION / CTA ===================== */
.invitation {
  background: var(--ink);
  color: var(--paper);
  padding: 140px 32px;
  text-align: center;
  border-bottom: 3px double var(--ink);
}

.invitation .wrap { max-width: 720px; margin: 0 auto; }

.invitation .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.invitation h2 {
  font-family: 'Libre Caslon Text', 'Cormorant Garamond', serif;
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 32px;
  font-style: italic;
}

.invitation h2 strong { color: var(--gold); font-style: normal; font-weight: 600; }

.invitation p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 56px;
  color: rgba(241,236,225,0.85);
}

.ctas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.ctas.ctas-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.cta {
  border: 1px solid rgba(241,236,225,0.3);
  padding: 36px 28px;
  text-decoration: none;
  color: var(--paper);
  transition: transform 0.25s ease, background 0.2s, border-color 0.2s, box-shadow 0.25s;
  text-align: left;
  position: relative;
}

.cta:hover {
  background: rgba(160,122,44,0.15);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.cta:hover .cta-arrow { transform: translateX(4px); }
.cta-arrow { transition: transform 0.25s ease; }

.cta-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 16px;
}

.cta-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 8px;
}

.cta-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  margin-top: 16px;
}

/* ===================== COLOPHON / FOOTER ===================== */
.colophon {
  padding: 80px 32px;
  text-align: center;
  background: var(--paper);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.colophon-wrap { max-width: 600px; margin: 0 auto; }

.colophon h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 24px;
}

.colophon p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.7;
  color: var(--faded);
  margin-bottom: 16px;
}

.colophon .links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.colophon .links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

.colophon .links a:hover { border-bottom-color: var(--rust); }

/* ===================== MOBILE ===================== */
@media (max-width: 720px) {
  .grid-cards { grid-template-columns: 1fr; }
  .ch-nav { grid-template-columns: 1fr; }
  .ch-nav .next { text-align: left; }
  .ctas { grid-template-columns: 1fr; }

  /* All page-level horizontal padding aligned to 16px on mobile, including
     top space from sticky nav to first element — 16px vertical / 16px lateral
     gives a consistent gutter throughout the atlas. */
  .atlas-nav { padding: 12px 16px; }
  .atlas-nav .pages { display: none; }

  .chapter-page { padding: 16px 16px 64px; }
  .invitation { padding: 64px 16px; }
  .colophon { padding: 56px 16px; }

  /* Cover (index page only) lives in its own scoped style block, but the
     header sits inside `.cover` with padding: 80px 32px → see index.html
     mobile override there. */

  .pullquote { margin: 36px 0; padding: 24px 16px; font-size: 21px; }
  .pullquote::before { font-size: 52px; top: 16px; }
  .chapter-roman { font-size: 80px; }
  .chapter-title { font-size: clamp(32px, 8vw, 48px); }
  .chapter-deck { font-size: 19px; }
  .testimony { padding: 20px 16px; }
  .testimony p { font-size: 19px; }
  .gcard { padding: 24px 16px; }
  .callout { padding: 24px 16px; }
  .journey { padding-left: 44px; }
  .stage-marker { left: -40px; width: 32px; height: 32px; font-size: 11px; }
  .ch-nav a { padding: 22px 18px; }
}
