/* ============================================================
   ATLAS GUIDE — ABOUT PAGE
   about.css
   Requires: global.css loaded first
   ============================================================ */

/* ============================================================
   LOCAL TOKEN BRIDGE
   Maps the about page's --teal-* / --coral / --sand names
   to global --ag-* values. HTML markup unchanged.
   ============================================================ */
:root {
  --teal:   var(--ag-green-800);   /* #1A3A2B */
  --teal-d: var(--ag-green-900);   /* #0D2118 */
  --teal-l: var(--ag-green-600);   /* #2E6B4A */
  --coral:  var(--ag-terra-500);   /* #C24B3A */
  --sand:   var(--ag-gold-500);    /* #C9A85C */
  --ink:    var(--ag-ink);         /* #2A2420 */
  --mid:    var(--ag-ink-mid);     /* #5C5248 */
  --dim:    var(--ag-ink-light);   /* #9A8E85 */
  --bg:     var(--ag-warm-white);  /* #FBF8F2 */
  --bg-warm:var(--ag-parchment);   /* #F5F0E8 */
  --card:   var(--ag-white);
  --line:   rgba(42, 36, 32, .12);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  z-index: 10000;
  transition: width .1s linear;
}

/* ============================================================
   OPENING / HERO
   ============================================================ */
.opening {
  position: relative;
  min-height: 88vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  background: linear-gradient(135deg, var(--teal-d) 0%, var(--teal) 60%, var(--teal-l) 100%);
}

.opening-photo {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.opening-photo img {
  width: clamp(260px, 22vw, 360px);
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  filter: brightness(.9) saturate(.85);
  display: block;
  margin: 0 auto;
  border-radius: 20px 20px 0 0;
  mask-image: linear-gradient(to top, transparent 0%, rgba(0,0,0,.6) 20%, black 60%);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, rgba(0,0,0,.6) 20%, black 60%);
}
.opening-veil { display: none; }

/* Top rule */
.opening-rule {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px; z-index: 3;
  background: linear-gradient(90deg, var(--teal-l), var(--coral), var(--sand));
}

/* Content */
.opening-content {
  position: relative; z-index: 2;
  padding:
    clamp(80px, 10vh, 120px)
    clamp(28px, 6vw,  80px)
    clamp(48px, 7vh,  80px);
}

/* Kicker eyebrow */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 20px;
}
.kicker::before {
  content: '';
  display: block;
  width: 32px; height: 1.5px;
  background: var(--sand);
}

/* Hero h1 */
.opening h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -.03em;
  max-width: 720px;
  margin-bottom: 28px;
}
.opening h1 em { font-style: italic; color: var(--sand); }

/* Deck / subtitle */
.opening-deck {
  font-size: clamp(.88rem, 1.2vw, 1.05rem);
  color: rgba(255, 255, 255, .55);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 36px;
}

/* Byline */
.byline { display: flex; align-items: center; gap: 14px; }
.byline-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sand);
  position: relative;
}
.byline-dot::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--sand);
  animation: ag-ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ag-ping {
  75%, 100% { transform: scale(2.4); opacity: 0; }
}
.byline-text {
  font-size: .75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .45);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.byline-text strong { color: rgba(255, 255, 255, .82); font-weight: 800; }

/* Scroll cue */
.opening-scroll {
  position: absolute;
  bottom: 32px;
  right: clamp(28px, 5vw, 56px);
  z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, .28);
  font-size: .64rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  animation: ag-nudge 2.5s ease-in-out infinite;
  grid-column: 1 / -1;
}
.opening-scroll .scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .28));
}
@keyframes ag-nudge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(9px); }
}

/* ============================================================
   ISSUE / BREADCRUMB STRIP
   ============================================================ */
.issue-strip {
  background: var(--teal-d);
  padding: 11px clamp(28px, 6vw, 96px);
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.issue-strip-left { display: flex; align-items: center; gap: 20px; }
.issue-number {
  font-size: .67rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
}
.issue-sep  { width: 1px; height: 16px; background: rgba(255, 255, 255, .10); }
.issue-title { font-size: .72rem; font-weight: 700; color: rgba(255, 255, 255, .6); letter-spacing: .04em; }

.breadcrumb-strip {
  font-size: .72rem; color: rgba(255, 255, 255, .38);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb-strip a     { color: rgba(255, 255, 255, .52); font-weight: 600; transition: color .2s; }
.breadcrumb-strip a:hover { color: #fff; }
.breadcrumb-strip .sep  { font-size: .65rem; }

/* ============================================================
   EDITORIAL BODY
   ============================================================ */
.editorial {
  max-width: 1380px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) clamp(28px, 6vw, 96px);
}

/* Chapter grid */
.chapter {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(32px, 5vw, 72px);
  margin-bottom: clamp(72px, 11vw, 128px);
  align-items: start;
}

/* Chapter aside / sticky label */
.chapter-aside {
  padding-top: 4px;
  position: sticky;
  top: 104px;
}
.chapter-num {
  font-family: var(--font-display);
  font-size: 6rem; font-weight: 700;
  color: var(--teal);
  opacity: .10;
  line-height: 1;
  margin-bottom: -12px;
  user-select: none;
}
.chapter-label {
  font-size: .67rem; font-weight: 800;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--teal);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.chapter-label::before {
  content: '';
  display: block;
  width: 18px; height: 2px;
  background: var(--ag-gold-500);
  border-radius: 2px;
}
.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.8vw, 1.75rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -.03em;
}

/* Chapter body */
.chapter-body { min-width: 0; }

/* Drop cap */
.drop-cap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 5.5rem; font-weight: 700;
  line-height: .72;
  margin: 10px 18px 0 0;
  color: var(--teal);
}

.chapter-body p {
  font-size: clamp(.93rem, 1.1vw, 1.06rem);
  color: var(--mid);
  line-height: 1.92;
  margin-bottom: 1.4rem;
}
.chapter-body p:last-child { margin-bottom: 0; }

/* Inline text accents */
.hl  { color: var(--teal);  font-weight: 700; }
.acc { color: var(--coral); font-weight: 700; }

/* Pull quote */
.pull {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 1.8vw, 1.5rem);
  font-weight: 700; font-style: italic;
  color: var(--ink);
  line-height: 1.45;
  border-top: 2px solid var(--teal);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0 1.4rem 1.6rem;
  margin: 2.4rem 0;
  position: relative;
}
.pull::before {
  content: '';
  position: absolute;
  left: 0; top: -2px; bottom: -1px;
  width: 3px;
  background: var(--ag-gold-500);
}

/* ============================================================
   TIMELINE SECTION
   ============================================================ */
.timeline-section {
  background: var(--teal-d);
  padding: clamp(48px, 7vw, 88px) 0;
  overflow: hidden; position: relative;
}
.timeline-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.timeline-header { padding: 0 clamp(28px, 6vw, 96px); margin-bottom: 44px; }
.timeline-header .kicker { color: rgba(255,255,255,.42); margin-bottom: 10px; }
.timeline-header .kicker::before { background: rgba(255,255,255,.28); }
.timeline-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.04em;
  line-height: 1.05;
}

/* Draggable rail */
.timeline-rail {
  display: flex; gap: 12px;
  padding: 8px clamp(28px, 6vw, 96px) 16px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.timeline-rail:active { cursor: grabbing; }
.timeline-rail::-webkit-scrollbar { display: none; }

/* Timeline card */
.t-card {
  flex: 0 0 clamp(260px, 28vw, 360px);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  position: relative; overflow: hidden;
  transition: background .35s, border-color .35s, transform .35s;
}
.t-card:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.17);
  transform: translateY(-5px);
}
.t-card-num {
  font-family: var(--font-display);
  font-size: 5rem; font-weight: 700;
  color: rgba(255,255,255,.04);
  line-height: 1;
  position: absolute; bottom: 8px; right: 16px;
  pointer-events: none; user-select: none;
}
.t-card-icon  { font-size: 1.9rem; margin-bottom: 18px; display: block; }
.t-card-phase {
  font-size: .64rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--sand); margin-bottom: 6px;
}
.t-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  color: #fff; line-height: 1.2;
  margin-bottom: 12px; letter-spacing: -.02em;
}
.t-card-desc { font-size: .83rem; color: rgba(255,255,255,.44); line-height: 1.78; }

/* ============================================================
   SCROLL REVEAL — about page variants
   (data-r, data-r-left, data-stagger)
   These use their own attribute selectors to avoid
   conflicting with global .rv / .reveal classes.
   ============================================================ */
[data-r] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
[data-r].v { opacity: 1; transform: none; }

[data-r-left] {
  opacity: 0; transform: translateX(-28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
[data-r-left].v { opacity: 1; transform: none; }

[data-stagger] > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
[data-stagger].v > :nth-child(1) { opacity: 1; transform: none; transition-delay: .04s; }
[data-stagger].v > :nth-child(2) { opacity: 1; transform: none; transition-delay: .10s; }
[data-stagger].v > :nth-child(3) { opacity: 1; transform: none; transition-delay: .16s; }
[data-stagger].v > :nth-child(4) { opacity: 1; transform: none; transition-delay: .22s; }
[data-stagger].v > :nth-child(5) { opacity: 1; transform: none; transition-delay: .28s; }
[data-stagger].v > :nth-child(6) { opacity: 1; transform: none; transition-delay: .34s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .opening { grid-template-columns: 1fr; min-height: auto; }
  .opening-photo { order: -1; height: 320px; justify-content: flex-end; padding-right: 32px; }
  .opening-photo img { width: clamp(180px, 40vw, 260px); }
  .chapter { grid-template-columns: 1fr; gap: 20px; }
  .chapter-aside { position: static; }
  .chapter-num { font-size: 3.5rem; }
}

@media (max-width: 680px) {
  .opening h1          { font-size: clamp(1.8rem, 7vw, 2.8rem); }
  .opening-photo       { height: 220px; padding-right: 16px; }
  .opening-photo img   { width: clamp(140px, 35vw, 200px); }
  .issue-strip         { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .opening          { height: auto; }
  .opening-photo,
  .opening-veil     { display: none; }
  .opening h1,
  .opening-deck     { color: var(--ink) !important; }
  .timeline-section { background: transparent !important; }
  .timeline-section * { color: var(--ink) !important; }
  .progress-bar     { display: none; }
}