/* ============================================================
   Crossroads of Time — Saudi Arabia's Cultural Landmarks
   Design system drawn from the book: IBM Plex Sans,
   teal / purple / orange / cyan / gold, Sadu triangle motifs.
   ============================================================ */

:root {
  --teal: #0f9b8e;
  --teal-deep: #0b7268;
  --purple: #7b2d69;
  --orange: #f05a28;
  --cyan: #00aeef;
  --gold: #c8912b;

  --ink: #14212b;
  --ink-2: #45586a;
  --ink-3: #7a8b9a;
  --paper: #ffffff;
  --mist: #eef5fb;          /* book's light-blue panel */
  --night: #0c2430;         /* deep teal-navy */
  --night-2: #10303f;
  --line: #dbe6ef;

  --accent: var(--teal);    /* per-page region accent (JS sets it) */
  --accent-soft: rgba(15, 155, 142, .12);

  --radius: 14px;
  --shadow: 0 10px 30px rgba(12, 36, 48, .10);
  --shadow-lg: 0 24px 60px rgba(12, 36, 48, .18);
  --maxw: 1180px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Sadu triangle divider ---------- */
.sadu {
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='14' viewBox='0 0 56 14'%3E%3Cpath d='M0 14 L7 2 L14 14 Z' fill='%230f9b8e'/%3E%3Cpath d='M14 14 L21 2 L28 14 Z' fill='%237b2d69'/%3E%3Cpath d='M28 14 L35 2 L42 14 Z' fill='%23f05a28'/%3E%3Cpath d='M42 14 L49 2 L56 14 Z' fill='%23c8912b'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 56px 14px;
}
.sadu.flip { transform: scaleY(-1); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 28px;
  transition: background .35s, box-shadow .35s, padding .35s;
  color: #fff;
}
.nav.solid {
  background: rgba(12, 36, 48, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
  padding: 10px 28px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; letter-spacing: .2px; margin-right: auto; }
.nav-logo svg { width: 30px; height: 30px; }
.nav-logo small { display: block; font-weight: 400; font-size: 11px; opacity: .75; letter-spacing: 1.4px; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  opacity: .92; transition: background .2s, opacity .2s;
}
.nav-links a:hover { background: rgba(255,255,255,.14); opacity: 1; }
.nav-links a.cta { background: var(--orange); font-weight: 600; margin-left: 6px; }
.nav-links a.cta:hover { background: #d84c1e; }
.nav-burger { display: none; background: none; border: 0; color: #fff; }
.nav-burger svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  color: #fff; overflow: hidden;
  background: var(--night);
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroDrift 22s ease-in-out infinite alternate; }
@keyframes heroDrift { from { transform: scale(1.06) translateX(0); } to { transform: scale(1.12) translateX(-1.5%); } }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,25,34,.55) 0%, rgba(8,25,34,.35) 40%, rgba(8,25,34,.88) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 120px 24px 40px; max-width: 900px; margin: 0 auto; text-align: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 3.5px; text-transform: uppercase; font-weight: 600;
  color: #ffd9a8; margin-bottom: 22px;
}
.hero-kicker::before, .hero-kicker::after { content: ""; width: 36px; height: 2px; background: var(--orange); }
.hero h1 {
  font-size: clamp(42px, 7.2vw, 84px);
  line-height: 1.03; font-weight: 700; letter-spacing: -1.5px;
  margin-bottom: 18px; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: #ffb347; }
.hero-sub { font-size: clamp(16px, 2vw, 20px); font-weight: 300; max-width: 640px; margin: 0 auto 14px; opacity: .95; }
.hero-by { font-size: 14px; opacity: .75; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; border: 0;
  font-size: 15.5px; font-weight: 600; transition: transform .18s, box-shadow .18s, background .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 24px rgba(240,90,40,.4); }
.btn-primary:hover { background: #d84c1e; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-dark { background: var(--night); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }

.hero-stats {
  position: relative; z-index: 2;
  display: flex; justify-content: center; gap: clamp(26px, 6vw, 84px);
  padding: 26px 24px 90px; flex-wrap: wrap;
}
.hstat { text-align: center; }
.hstat b { display: block; font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.1; }
.hstat span { font-size: 12.5px; letter-spacing: 2.2px; text-transform: uppercase; opacity: .78; }
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px;
}
.scroll-cue::after {
  content: ""; position: absolute; top: 7px; left: 50%; width: 4px; height: 8px;
  background: #fff; border-radius: 2px; transform: translateX(-50%);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0%,100% { opacity: 1; top: 7px; } 55% { opacity: 0; top: 22px; } }

/* ---------- Section scaffolding ---------- */
.section { padding: 92px 0; }
.section.tint { background: var(--mist); }
.section.dark { background: var(--night); color: #fff; }
.sec-head { max-width: 720px; margin-bottom: 48px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: var(--orange); margin-bottom: 12px;
}
.sec-eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--orange); border-radius: 2px; }
.sec-head.center .sec-eyebrow::after { content: ""; width: 26px; height: 3px; background: var(--orange); border-radius: 2px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -.8px; margin-bottom: 14px; text-wrap: balance; }
.sec-head p { color: var(--ink-2); font-size: 17px; }
.section.dark .sec-head p { color: #b9cdd8; }

/* ---------- Stat tiles ---------- */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 22px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat-tile::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--tile-c, var(--teal)); }
.stat-tile b { display: block; font-size: 42px; font-weight: 700; line-height: 1.1; letter-spacing: -1px; }
.stat-tile b small { font-size: 22px; font-weight: 600; }
.stat-tile .lbl { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.stat-tile .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }

/* ---------- Map section ---------- */
#map { height: 560px; border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 1; }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); background: var(--paper);
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: all .18s;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--teal)); }
.chip:hover { border-color: var(--c, var(--teal)); color: var(--ink); }
.chip.on { background: var(--c, var(--teal)); border-color: var(--c, var(--teal)); color: #fff; }
.chip.on .dot { background: #fff; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 0; width: 240px !important; }
.pop { overflow: hidden; border-radius: 12px; font-family: var(--font); }
.pop img { height: 120px; width: 100%; object-fit: cover; }
.pop .pd { padding: 12px 14px 14px; }
.pop .pr { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--pc, var(--teal)); }
.pop h4 { font-size: 15.5px; line-height: 1.25; margin: 3px 0 8px; color: var(--ink); }
.pop a.go { font-size: 13px; font-weight: 600; color: var(--pc, var(--teal)); }
.marker-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: var(--mc, var(--teal));
  border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
}
.marker-pin span { transform: rotate(45deg); color: #fff; font-weight: 700; font-size: 12px; font-family: var(--font); }

/* ---------- Region cards ---------- */
.region-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.region-card {
  border-radius: var(--radius); padding: 26px 22px; color: #fff;
  background: var(--rc, var(--teal)); position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s; box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 210px;
}
.region-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.region-card::after {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 130px; height: 130px;
  background: rgba(255,255,255,.10); transform: rotate(45deg);
}
.region-card b.cnt { font-size: 38px; font-weight: 700; line-height: 1; }
.region-card h3 { font-size: 18px; margin: 6px 0 8px; }
.region-card p { font-size: 13px; line-height: 1.5; opacity: .92; flex: 1; }
.region-card .go { font-size: 13px; font-weight: 700; margin-top: 14px; opacity: .95; }

/* ---------- Landmark grid ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 30px; }
.search {
  flex: 1; min-width: 220px; max-width: 340px;
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 18px; background: var(--paper);
}
.search input { border: 0; outline: 0; font-family: inherit; font-size: 14.5px; width: 100%; background: transparent; color: var(--ink); }
.search svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .22s, box-shadow .22s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-num {
  position: absolute; top: 12px; left: 12px;
  background: var(--cc, var(--teal)); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  padding: 5px 11px; border-radius: 999px; text-transform: uppercase;
}
.card-era {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(10,28,38,.72); backdrop-filter: blur(6px); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 18.5px; line-height: 1.25; letter-spacing: -.2px; }
.card-body .sub { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.card-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }
.card-meta svg { width: 14px; height: 14px; color: var(--cc, var(--teal)); }
.card-blurb { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--cc, var(--teal)); display: flex; align-items: center; gap: 6px; }

/* ---------- Timeline ---------- */
.tl-scroller { overflow-x: auto; padding: 10px 4px 26px; scrollbar-width: thin; }
.tl-track { display: flex; gap: 0; min-width: max-content; position: relative; padding-top: 46px; }
.tl-track::before {
  content: ""; position: absolute; top: 30px; left: 40px; right: 40px; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--purple), var(--orange), var(--gold));
  border-radius: 2px;
}
.tl-era { width: 300px; flex: none; padding: 0 18px; position: relative; }
.tl-era::before {
  content: ""; position: absolute; top: -22px; left: 40px; width: 15px; height: 15px;
  border-radius: 50%; background: #fff; border: 4px solid var(--orange);
  box-shadow: 0 0 0 4px rgba(240,90,40,.18);
}
.tl-era h3 { font-size: 19px; letter-spacing: -.3px; }
.tl-era .rng { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: #ffb347; margin-bottom: 6px; display: block; }
.tl-era p.blurb { font-size: 13.5px; color: #b9cdd8; margin-bottom: 14px; min-height: 62px; }
.tl-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--night-2); border: 1px solid rgba(255,255,255,.09);
  padding: 8px 10px; border-radius: 10px; margin-bottom: 8px;
  font-size: 13.5px; font-weight: 500; color: #e6eff4;
  transition: background .18s, transform .18s;
}
.tl-item:hover { background: #17414f; transform: translateX(4px); }
.tl-item img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; }
.tl-item .d { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--tc, var(--teal)); }

/* ---------- About / book ---------- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 60px; align-items: center; }
.book-cover { position: relative; perspective: 900px; }
.book-cover img {
  border-radius: 6px 14px 14px 6px; box-shadow: -18px 24px 50px rgba(12,36,48,.35);
  transform: rotateY(6deg); transition: transform .35s;
}
.book-cover:hover img { transform: rotateY(0deg); }
.about-text p { color: var(--ink-2); margin-bottom: 16px; font-size: 16px; }
.about-text p:first-of-type::first-letter {
  font-size: 52px; font-weight: 700; float: left; line-height: .9;
  padding: 6px 10px 0 0; color: var(--teal);
}
.about-facts { display: flex; gap: 26px; flex-wrap: wrap; margin: 26px 0; }
.afact b { font-size: 26px; display: block; color: var(--ink); }
.afact span { font-size: 12.5px; color: var(--ink-3); letter-spacing: 1px; text-transform: uppercase; }

/* ---------- QR strip ---------- */
.qr-strip { display: flex; align-items: center; gap: 28px; background: linear-gradient(120deg, var(--purple), #5b1f4e); color: #fff; border-radius: var(--radius); padding: 34px 38px; box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.qr-strip img { width: 110px; height: 110px; border-radius: 12px; background: #fff; padding: 8px; }
.qr-strip h3 { font-size: 22px; margin-bottom: 6px; }
.qr-strip p { font-size: 14.5px; opacity: .9; max-width: 560px; }

/* ---------- Footer ---------- */
footer { background: var(--night); color: #9db4c0; }
.foot-inner { display: flex; justify-content: space-between; gap: 30px; padding: 54px 0 40px; flex-wrap: wrap; }
.foot-brand { max-width: 340px; }
.foot-brand .nav-logo { color: #fff; margin-bottom: 12px; }
.foot-brand p { font-size: 13.5px; line-height: 1.6; }
.foot-col h4 { color: #fff; font-size: 14px; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 14px; }
.foot-col a { display: block; font-size: 14px; padding: 4px 0; opacity: .85; }
.foot-col a:hover { opacity: 1; color: #fff; }
.foot-base { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Story page ---------- */
.story-hero { position: relative; min-height: 78svh; display: flex; align-items: flex-end; color: #fff; background: var(--night); overflow: hidden; }
.story-hero .hero-bg img { animation: none; transform: scale(1.02); }
.story-hero .hero-bg::after { background: linear-gradient(180deg, rgba(8,25,34,.42) 0%, rgba(8,25,34,.18) 45%, rgba(8,25,34,.92) 100%); }
.story-hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 150px 24px 46px; }
.story-num {
  font-size: clamp(72px, 11vw, 130px); font-weight: 200; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.55); position: absolute; right: 24px; bottom: 40px;
}
.story-crumb { font-size: 13px; letter-spacing: 2.4px; text-transform: uppercase; font-weight: 700; color: #ffd9a8; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.story-crumb .rdot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.story-hero h1 { font-size: clamp(34px, 5.6vw, 62px); line-height: 1.06; letter-spacing: -1px; max-width: 800px; text-wrap: balance; }
.story-hero .sub { font-size: clamp(17px, 2.2vw, 23px); font-weight: 300; opacity: .93; margin-top: 10px; max-width: 700px; }
.story-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.meta-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px); padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
}
.meta-pill svg { width: 15px; height: 15px; }
.meta-pill.solid { background: var(--accent); border-color: var(--accent); font-weight: 600; }

.story-layout { display: grid; grid-template-columns: 1fr 320px; gap: 56px; padding: 64px 0 80px; }
.story-lead {
  font-size: 20px; line-height: 1.7; color: var(--ink);
  border-left: 4px solid var(--accent); background: var(--mist);
  padding: 26px 30px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 40px;
  position: relative;
}
.story-lead::before {
  content: "\201C"; position: absolute; top: -8px; left: 14px; font-size: 74px; font-weight: 700;
  color: var(--accent); opacity: .25; line-height: 1;
}
.story-body h2 {
  font-size: 25px; letter-spacing: -.4px; margin: 42px 0 14px;
  display: flex; align-items: center; gap: 12px; scroll-margin-top: 90px;
}
.story-body h2::before { content: ""; width: 16px; height: 16px; flex: none;
  background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.story-body p { margin-bottom: 15px; color: #2c3d4c; font-size: 16.5px; }
.story-body ul { margin: 4px 0 18px; padding-left: 4px; list-style: none; }
.story-body li { position: relative; padding: 4px 0 4px 28px; color: #2c3d4c; font-size: 16px; }
.story-body li::before {
  content: ""; position: absolute; left: 6px; top: 13px; width: 9px; height: 9px;
  background: var(--accent); clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.story-body .label { font-weight: 600; color: var(--ink); margin: 14px 0 8px; font-size: 16.5px; }
.story-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 46px; }
.story-gallery img { border-radius: 12px; aspect-ratio: 16/10; object-fit: cover; width: 100%; cursor: zoom-in; transition: transform .2s, box-shadow .2s; box-shadow: var(--shadow); }
.story-gallery img:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }

.side { position: sticky; top: 86px; align-self: start; display: flex; flex-direction: column; gap: 18px; }
.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.side-card .sc-head { background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 1.4px; text-transform: uppercase; padding: 12px 18px; }
.side-card .sc-body { padding: 18px; }
.fact-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.fact-row:last-child { border-bottom: 0; }
.fact-row span { color: var(--ink-3); flex: none; }
.fact-row b { font-weight: 600; text-align: right; }
.qr-card { text-align: center; }
.qr-card img { width: 150px; height: 150px; margin: 6px auto 10px; }
.qr-card p { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
#minimap { height: 190px; border-radius: 10px; z-index: 1; }

.story-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 0 80px; }
.snav {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
  display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, transform .2s;
  background: var(--paper);
}
.snav:hover { border-color: var(--accent); transform: translateY(-3px); }
.snav span { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-3); }
.snav b { font-size: 17px; }
.snav.next { text-align: right; }

/* ---------- Back button + progress ---------- */
.back-fab {
  position: fixed; top: 74px; left: 20px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(12,36,48,.85); color: #fff; backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  padding: 9px 18px 9px 14px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .18s, background .2s;
}
.back-fab:hover { transform: translateX(-3px); background: var(--accent); border-color: var(--accent); }
.back-fab svg { width: 16px; height: 16px; }
.read-progress {
  position: fixed; top: 0; left: 0; height: 3.5px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--orange)); z-index: 1200;
  transition: width .1s linear;
}

/* ---------- Story tabs ---------- */
.tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 0 0 30px; padding: 6px; background: var(--mist);
  border-radius: 999px; width: fit-content; max-width: 100%;
}
.tab-btn {
  border: 0; background: transparent; padding: 10px 20px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px; transition: all .2s; white-space: nowrap;
}
.tab-btn svg { width: 16px; height: 16px; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.on { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.tab-panel { display: none; animation: tabIn .35s ease; }
.tab-panel.on { display: block; }
@keyframes tabIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Info-card grid ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 6px 0 26px; }
.info-card {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 18px 20px 14px; box-shadow: var(--shadow);
}
.info-card h3 { font-size: 16px; letter-spacing: -.2px; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.info-card h3::before { content: ""; width: 12px; height: 12px; flex: none; background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.info-card ul { list-style: none; }
.info-card li { position: relative; padding: 3.5px 0 3.5px 20px; font-size: 14.5px; color: #2c3d4c; }
.info-card li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px;
  background: var(--accent); opacity: .55; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.info-card .label { font-weight: 600; font-size: 14px; margin: 8px 0 4px; color: var(--ink); }
.info-card p { font-size: 14.5px; color: #2c3d4c; margin-bottom: 8px; }
@media (max-width: 720px) { .info-grid { grid-template-columns: 1fr; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 2000; background: rgba(8, 20, 28, .93);
  display: none; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.lightbox button {
  position: absolute; top: 22px; right: 26px; background: rgba(255,255,255,.12);
  border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px;
}

/* ---------- Reveal animations ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hero-bg img { animation: none; }
}

/* ---------- Screenshot/test mode (?shot) ---------- */
html.shot .hero { min-height: 760px; }
html.shot .story-hero { min-height: 700px; }
html.shot .rv { opacity: 1 !important; transform: none !important; }
html.shot .hero-bg img { animation: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .region-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .story-layout { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-card { flex: 1 1 280px; }
  .about-grid { grid-template-columns: 1fr; }
  .book-cover { max-width: 300px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; top: 0; right: -290px; width: 280px; height: 100svh;
    background: var(--night); flex-direction: column; align-items: stretch;
    padding: 84px 22px 22px; gap: 6px; transition: right .3s; box-shadow: -10px 0 40px rgba(0,0,0,.35);
  }
  .nav-links.open { right: 0; }
  .nav-links a { padding: 12px 16px; font-size: 16px; }
  .nav-burger { display: block; z-index: 1002; }
  .cards { grid-template-columns: 1fr; }
  .region-grid { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-tile b { font-size: 32px; }
  #map { height: 420px; }
  .section { padding: 64px 0; }
  .story-gallery { grid-template-columns: 1fr; }
  .story-nav { grid-template-columns: 1fr; }
  .qr-strip { padding: 26px; }
}
