/* ==========================================================================
   THE DECCAN — Hyderabad & the Kingdoms of the South
   Dark, cinematic long-scroll design. Ink ground, ivory text, gold accents.
   ========================================================================== */

:root {
  --ink: #0c0a08;
  --ink-2: #14100c;
  --ink-3: #1c1712;
  --line: rgba(201, 166, 107, 0.22);
  --line-soft: rgba(201, 166, 107, 0.12);
  --gold: #c9a66b;
  --gold-bright: #e8c98d;
  --ivory: #f2e9da;
  --ivory-dim: #cfc4b0;
  --ivory-faint: #9a8f7c;
  --serif: "Cormorant Garamond", "Georgia", serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: rgba(201, 166, 107, 0.35); color: #fff; }

img { max-width: 100%; display: block; }

a { color: var(--gold-bright); text-decoration: none; }

/* ---------- type helpers ---------- */

.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-head {
  text-align: center;
  padding: 0 24px;
  margin-bottom: 56px;
}

.section-head .script {
  font-size: 20px;
  color: var(--ivory-faint);
  letter-spacing: 0.1em;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 6vw, 74px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 10px 0 14px;
}

.section-head .sub {
  font-style: italic;
  font-size: 22px;
  color: var(--ivory-dim);
}

.rule {
  width: 64px; height: 1px;
  margin: 26px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

section { padding: 120px 0; position: relative; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 32px; }

/* ---------- reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* capture mode: pin viewport-relative sizes for full-page screenshots */
.capture .hero { min-height: 900px; }
.capture .hero-bg { animation: none; }
.capture .overlay-hero { height: 500px; }
.capture .overlay.open { position: static; overflow: visible; animation: none; }
.capture body { overflow: visible !important; }
.capture body:has(.overlay.open) > :not(.overlay) { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
  .marker circle.pulse { animation: none; }
}

/* ---------- nav ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 34px;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.nav.scrolled {
  background: rgba(12, 10, 8, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-soft);
  padding: 12px 34px;
}

.nav .brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ivory);
}

.nav .brand span { color: var(--gold); }

.nav ul { display: flex; gap: 26px; list-style: none; }

.nav ul a {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.nav ul a:hover, .nav ul a.active { color: var(--gold-bright); border-color: var(--gold); }

.nav-toggle { display: none; background: none; border: none; color: var(--gold); font-size: 26px; cursor: pointer; }

/* ---------- hero ---------- */

.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  padding: 120px 24px 90px;
  isolation: isolate;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover;
  background-position: center 30%;
  filter: saturate(0.85) brightness(0.8);
  animation: heroDrift 30s ease-in-out infinite alternate;
}

@keyframes heroDrift { from { transform: scale(1); } to { transform: scale(1.07); } }

.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at center 42%, rgba(12,10,8,0.15) 0%, rgba(12,10,8,0.55) 62%, rgba(12,10,8,0.92) 100%),
    linear-gradient(180deg, rgba(12,10,8,0.55) 0%, rgba(12,10,8,0.1) 30%, rgba(12,10,8,0.2) 65%, var(--ink) 100%);
}

.hero .kicker { margin-bottom: 20px; }

.hero h1 {
  font-weight: 500;
  font-size: clamp(58px, 11vw, 148px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6);
}

.hero .scripts {
  display: flex; align-items: center; gap: 22px;
  margin: 22px 0 26px;
  font-size: 24px;
  color: var(--ivory-dim);
}

.hero .scripts .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.hero .lede {
  max-width: 560px;
  font-style: italic;
  font-size: 22px;
  color: var(--ivory-dim);
  text-shadow: 0 2px 18px rgba(0,0,0,0.7);
}

.hero .cta {
  margin-top: 44px;
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  padding: 16px 34px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero .cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201,166,107,0.25); }

/* two ways in */
.entry {
  margin-top: 46px;
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
}
.entry a {
  display: block; width: 262px; padding: 26px 22px 24px;
  border: 1px solid rgba(201, 166, 107, 0.45);
  background: rgba(12, 10, 8, 0.55);
  backdrop-filter: blur(3px);
  text-align: center;
  transition: background 0.4s, border-color 0.4s, transform 0.4s;
}
.entry a:hover {
  background: rgba(201, 166, 107, 0.14);
  border-color: var(--gold-bright);
  transform: translateY(-3px);
}
.entry a .glyph { display: block; height: 34px; margin-bottom: 12px; }
.entry a .glyph svg { height: 100%; width: auto; margin: 0 auto; }
.entry a .glyph svg * { stroke: var(--gold); fill: none; }
.entry a .t {
  font-family: var(--serif); font-size: 25px; font-weight: 500;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--ivory);
}
.entry a .d {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ivory-faint); margin-top: 9px;
}
.entry a:hover .t { color: var(--gold-bright); }

.hero .scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.4em;
  text-transform: uppercase; color: var(--ivory-faint);
  animation: hintPulse 2.6s ease-in-out infinite;
}

@keyframes hintPulse { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

/* ---------- map section ---------- */

#map { background: var(--ink); }

.map-frame {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 40%, #191410 0%, #100d0a 70%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 0 120px rgba(0,0,0,0.55);
}

/* the recoloured base map sits underneath; the marker overlay shares its
   viewBox exactly, so the two stay registered at any width */
.map-frame .basemap { width: 100%; height: auto; display: block; }
.map-frame svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; display: block;
}
.map-frame .grat { stroke: rgba(201, 166, 107, 0.07); stroke-width: 1; }
/* where two cities are too close to draw apart, the pin steps aside and a
   hairline points back to where the place actually is */
.marker .leader { stroke: rgba(201, 166, 107, 0.4); stroke-width: 0.8; }
.marker .truespot { fill: rgba(201, 166, 107, 0.75); }
.marker:hover .leader, .marker:focus .leader { stroke: var(--gold-bright); }
.map-frame .grat-label {
  font-family: var(--sans); font-size: 9px; letter-spacing: 0.16em;
  fill: rgba(201, 166, 107, 0.3);
}

.map-caption {
  text-align: center;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  margin-top: 26px;
}

/* svg internals */
.land { fill: #1a1510; stroke: rgba(201,166,107,0.35); stroke-width: 1.2; }
.sea-label, .region-label {
  font-family: var(--sans);
  fill: rgba(154,143,124,0.55);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.river { fill: none; stroke: rgba(120,150,160,0.45); stroke-width: 1.4; }
.river-label { font-family: var(--serif); font-style: italic; fill: rgba(140,165,175,0.6); }

.marker { cursor: pointer; }
.marker circle.ring {
  fill: rgba(201,166,107,0.12);
  stroke: var(--gold);
  stroke-width: 1;
  transition: fill 0.3s;
}
.marker circle.pulse {
  fill: none; stroke: var(--gold); stroke-width: 1; opacity: 0.6;
  animation: markerPulse 2.8s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes markerPulse {
  0% { transform: scale(0.6); opacity: 0.7; }
  80% { transform: scale(2.1); opacity: 0; }
  100% { opacity: 0; }
}
.marker text.num {
  font-family: var(--sans); font-size: 10px; fill: var(--gold-bright);
  text-anchor: middle; dominant-baseline: central; letter-spacing: 0;
}
.marker text.place {
  font-family: var(--sans); font-size: 9.5px; fill: var(--ivory-dim);
  letter-spacing: 0.18em; text-transform: uppercase; text-anchor: middle;
  transition: fill 0.3s;
}
.marker:hover circle.ring { fill: rgba(201,166,107,0.4); }
.marker:hover text.place { fill: var(--gold-bright); }

/* map legend chips */
.map-chips {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin-top: 40px; padding: 0 24px;
}
.map-chips button, .map-chips a {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  background: none; border: 1px solid var(--line);
  padding: 10px 18px; cursor: pointer;
  transition: all 0.3s;
}
.map-chips button:hover, .map-chips a:hover { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.map-chips button b, .map-chips a b { color: var(--gold); margin-right: 8px; font-weight: 500; }
.map-chips button:hover b { color: var(--ink); }

/* ---------- place overlay ---------- */

.overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8, 6, 4, 0.97);
  display: none;
  overflow-y: auto;
}
.overlay.open { display: block; animation: overlayIn 0.45s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.overlay-close {
  position: fixed; top: 22px; right: 28px; z-index: 320;
  background: none; border: 1px solid var(--line);
  color: var(--gold-bright); font-family: var(--sans);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  padding: 12px 20px; cursor: pointer;
  background: rgba(12,10,8,0.8);
  transition: all 0.3s;
}
.overlay-close:hover { background: var(--gold); color: var(--ink); }

.overlay-nav {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; z-index: 320;
}
.overlay-nav button {
  background: rgba(12,10,8,0.85); border: 1px solid var(--line);
  color: var(--ivory-dim); font-family: var(--sans);
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  padding: 12px 22px; cursor: pointer; transition: all 0.3s;
}
.overlay-nav button:hover { color: var(--ink); background: var(--gold); }

.overlay-hero {
  height: 56vh; min-height: 380px;
  background-size: cover; background-position: center;
  position: relative;
  display: flex; align-items: flex-end;
}
.overlay-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,6,4,0.35), rgba(8,6,4,0) 40%, rgba(8,6,4,0.95) 100%);
}
.overlay-hero .inner {
  position: relative; z-index: 2;
  max-width: 860px; margin: 0 auto; width: 100%;
  padding: 0 32px 42px;
}
.overlay-hero .kicker { margin-bottom: 12px; }
.overlay-hero h3 {
  font-weight: 500; font-size: clamp(40px, 6vw, 68px);
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.05;
}
.overlay-hero .era { font-style: italic; font-size: 20px; color: var(--ivory-dim); margin-top: 8px; }

.overlay-body { max-width: 860px; margin: 0 auto; padding: 48px 32px 140px; }
.overlay-body p { margin-bottom: 22px; color: var(--ivory-dim); font-size: 20px; }
/* direct child only — otherwise the city-map caption and the site-card hint
   each become a :first-of-type inside their own box and grow a drop cap */
.overlay-body > p:first-of-type::first-letter {
  font-size: 64px; line-height: 0.85; float: left;
  padding: 8px 12px 0 0; color: var(--gold);
}
.overlay-body blockquote {
  margin: 34px 0; padding: 6px 0 6px 26px;
  border-left: 1px solid var(--gold);
  font-style: italic; font-size: 22px; color: var(--ivory);
}
.overlay-body h4.ov-h {
  font-family: var(--serif); font-weight: 600;
  font-size: 27px; letter-spacing: 0.05em;
  color: var(--ivory); margin: 42px 0 16px;
  padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.overlay-body h4.ov-h:first-child { border-top: none; padding-top: 0; margin-top: 8px; }

.goto-place {
  margin-top: 14px;
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold);
  background: none; border: 1px solid var(--line);
  padding: 11px 18px; cursor: pointer; transition: all 0.3s;
}
.goto-place:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.overlay-body blockquote cite {
  display: block; margin-top: 10px;
  font-family: var(--sans); font-style: normal; font-size: 10px;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
}

/* ---------- at-a-glance facts strip ---------- */

.glance {
  display: grid;
  /* 230px lands on three columns at full width, so six facts fill two rows
     exactly rather than leaving a ragged empty cell */
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  margin: 6px 0 40px;
}
.glance div { background: var(--ink-2); padding: 16px 18px; }
.glance dt {
  font-family: var(--sans); font-size: 9.5px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px;
}
.glance dd { font-size: 18px; color: var(--ivory); line-height: 1.35; }

/* ---------- collapsible detail boxes ---------- */

.box {
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
  margin: 26px 0;
}
.box > summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 20px;
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ivory-dim);
  transition: color 0.3s, background 0.3s;
}
.box > summary::-webkit-details-marker { display: none; }
.box > summary::after {
  content: "+"; margin-left: auto;
  font-family: var(--serif); font-size: 20px; color: var(--gold);
  transition: transform 0.35s; line-height: 1;
}
.box[open] > summary::after { transform: rotate(45deg); }
.box > summary:hover { color: var(--gold-bright); background: rgba(201, 166, 107, 0.04); }
.box > summary .tag {
  font-size: 9px; letter-spacing: 0.2em; padding: 3px 8px;
  border: 1px solid var(--line); color: var(--gold);
  white-space: nowrap; flex: none;
}
.box .box-body { padding: 4px 20px 20px; }
.box .box-body p { font-size: 18px; margin-bottom: 16px; color: var(--ivory-dim); }
.box .box-body p:last-child { margin-bottom: 0; }
.box .box-body p:first-of-type::first-letter { font-size: inherit; float: none; padding: 0; color: inherit; }
.box .box-body ul { margin: 0 0 16px 20px; color: var(--ivory-dim); font-size: 18px; }
.box .box-body li { margin-bottom: 8px; }
.box .box-body li::marker { color: var(--gold); }

.box.legend { border-left-color: var(--gold); }
.box.legend .box-body p { font-style: italic; }
.box.legend > summary .tag { color: var(--gold-bright); border-color: var(--gold); }
.box.numbers { border-left-color: #6d8a94; }
.box.numbers > summary .tag { color: #9fbcc6; border-color: rgba(159, 188, 198, 0.4); }
.box.deep { border-left-color: #8a6d94; }
.box.deep > summary .tag { color: #b79fc6; border-color: rgba(183, 159, 198, 0.4); }

/* fact table inside boxes */
.box table { width: 100%; border-collapse: collapse; font-size: 17px; }
.box table td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); color: var(--ivory-dim); vertical-align: top; }
.box table td:first-child { width: 42%; color: var(--ivory); padding-right: 18px; }
.box table tr:last-child td { border-bottom: none; }

/* ---------- city mini-map inside overlay ---------- */

.citymap-wrap { margin: 46px 0 10px; }
.citymap-wrap > .kicker { display: block; text-align: center; margin-bottom: 6px; }
.citymap-wrap > .lede-sm {
  text-align: center; font-style: italic; color: var(--ivory-faint);
  font-size: 17px; margin-bottom: 24px;
}
/* The plan is a grid of OpenStreetMap tiles with the monuments pinned onto it
   from their real coordinates. The tiles are inverted and pushed toward the
   site's gold so a modern street map sits in the same world as everything
   else; pins are positioned in per-cent, so the whole thing stays registered
   at any width. */
.citymap {
  position: relative;
  border: 1px solid var(--line);
  background: #0f0c09;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.citymap .tiles {
  display: grid;
  width: 100%;
  filter: invert(1) sepia(0.72) saturate(1.25) hue-rotate(352deg)
          brightness(0.82) contrast(0.95);
}
.citymap .tiles img,
.citymap .tiles .tile-gap { width: 100%; height: 100%; display: block; }
.citymap .tiles .tile-gap { background: #d8d4cc; }
.citymap .pins { position: absolute; inset: 0; }
.citymap .pins.placing .site-pin,
.citymap .pins.placing .pin-label { transition: none !important; }

.citymap .site-pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(12, 10, 8, 0.82);
  color: var(--gold-bright);
  font-family: var(--sans); font-size: 10px; line-height: 1;
  cursor: pointer; z-index: 2;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.citymap .site-pin span { display: block; transform: translateY(0.5px); }
.citymap .site-pin:hover,
.citymap .site-pin.active {
  background: var(--gold); color: var(--ink);
  transform: translate(-50%, -50%) scale(1.18);
}
.citymap .pin-label {
  position: absolute; transform: translate(-50%, 14px);
  font-family: var(--sans); font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ivory-dim); white-space: nowrap;
  text-shadow: 0 1px 5px #000, 0 0 10px #000;
  pointer-events: none; z-index: 1;
  transition: color 0.3s;
}
.citymap .pin-label.above { transform: translate(-50%, -24px); }
.citymap .pin-label.active { color: var(--gold-bright); }

/* a pin that had to step aside, and the hairline back to its true position */
.citymap .site-pin.moved { border-style: dashed; }
.citymap .pin-leader {
  position: absolute; height: 1px; transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(201,166,107,0.8), rgba(201,166,107,0.32));
  pointer-events: none; z-index: 0;
}
.citymap .pin-leader::before {
  content: ""; position: absolute; left: -2px; top: -2px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
/* labels that would collide are held back until the pin is hovered or picked */
.citymap .pin-label.crowded { opacity: 0; transition: opacity 0.25s; }
.citymap .pin-label.crowded.active { opacity: 1; }
.citymap .site-pin:hover + .pin-label,
.citymap .site-pin:focus + .pin-label { opacity: 1; color: var(--gold-bright); }

.overlay-body p.map-credit, .map-credit {
  font-family: var(--sans); font-size: 9.5px; letter-spacing: 0.14em;
  color: var(--ivory-faint); text-align: right; margin: 8px 0 0;
  line-height: 1.5;
}
.map-credit a { color: var(--ivory-faint); border-bottom: 1px solid var(--line-soft); }
.map-credit a:hover { color: var(--gold); }

/* a site with no place on this frame — Ajanta is 100 km from Aurangabad */
.site-strip figure.beyond { opacity: 0.72; }
.site-strip figure.beyond figcaption::before {
  content: "beyond the map · "; color: var(--gold); opacity: 0.75;
}

/* selected-site card */
.site-card {
  display: grid; grid-template-columns: 190px 1fr; gap: 22px;
  border: 1px solid var(--line-soft); border-top: none;
  padding: 20px; background: var(--ink-2);
  min-height: 132px; align-items: center;
}
.site-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: saturate(0.8) brightness(0.85); }
.site-card .ph {
  width: 100%; aspect-ratio: 4/3;
  background: repeating-linear-gradient(45deg, #17120e, #17120e 8px, #1c1712 8px, #1c1712 16px);
}
.site-card h5 { font-size: 24px; font-weight: 600; letter-spacing: 0.03em; }
.site-card .date { font-family: var(--sans); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin: 6px 0 10px; }
.site-card p { font-size: 17.5px; color: var(--ivory-dim); margin: 0; }
.site-card .hint-pick { font-style: italic; color: var(--ivory-faint); }

/* monument thumb strip */
.site-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin-top: 34px; }
.site-strip figure { margin: 0; cursor: pointer; border: 1px solid var(--line-soft); overflow: hidden; }
.site-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(0.7) brightness(0.75); transition: transform 0.6s, filter 0.6s; }
.site-strip figure:hover img { transform: scale(1.07); filter: saturate(0.95) brightness(0.95); }
.site-strip figcaption {
  font-family: var(--sans); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ivory-faint); padding: 9px 8px; text-align: center;
}

/* ---------- chronicle / timeline ---------- */

#chronicle { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 50%, var(--ink) 100%); }

/* 1040 rather than 900 so that most event titles fit on a single line and the
   "+" marker stays beside the last word instead of dropping below it */
.timeline { position: relative; max-width: 1040px; margin: 0 auto; padding: 0 32px; }
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; background: linear-gradient(180deg, transparent, var(--line) 6%, var(--line) 94%, transparent);
}

.era-label {
  position: relative; text-align: center; margin: 90px 0 50px; z-index: 2;
}
.era-label:first-child { margin-top: 0; }
.era-label .badge {
  display: inline-block; background: var(--ink);
  border: 1px solid var(--line);
  padding: 14px 30px;
}
.era-label .badge .kicker { display: block; }
.era-label .badge .years { font-style: italic; color: var(--ivory-faint); font-size: 17px; margin-top: 4px; }

.event {
  position: relative;
  width: calc(50% - 44px);
  margin-bottom: 46px;
}
.event:nth-child(odd of .event) { margin-left: 0; text-align: right; }
.event:nth-child(even of .event) { margin-left: calc(50% + 44px); text-align: left; }

.event::before {
  content: ""; position: absolute; top: 10px;
  width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--ink); border: 1px solid var(--gold);
}
.event:nth-child(odd of .event)::before { right: -49px; }
.event:nth-child(even of .event)::before { left: -49px; }

.event .year {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.3em;
  color: var(--gold); margin-bottom: 6px;
}
.event h3 {
  font-weight: 600; font-size: 23px; letter-spacing: 0.04em;
  cursor: pointer; transition: color 0.3s;
}
.event h3:hover { color: var(--gold-bright); }
.event h3::after {
  /* the nbsp keeps the marker attached to the last word instead of
     wrapping onto a line of its own */
  content: "\00a0\00a0+"; display: inline-block;
  color: var(--gold); font-weight: 400;
  transition: transform 0.35s;
}
.event.open h3::after { transform: rotate(45deg); }
.event .teaser { font-style: italic; color: var(--ivory-faint); font-size: 17.5px; margin-top: 4px; }
.event .detail {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 0.55s ease, opacity 0.45s ease, margin 0.45s ease;
  color: var(--ivory-dim); font-size: 18px; text-align: left;
}
.event .detail > .inner { overflow: hidden; }
.event.open .detail { grid-template-rows: 1fr; opacity: 1; margin-top: 16px; }
/* half a column is too narrow for several paragraphs and a table, so an
   opened event lets its detail break out across the full timeline width */
.event.open .detail { width: calc(200% + 88px); }
.event:nth-child(even of .event).open .detail { margin-left: calc(-100% - 88px); }
/* …but keep the measure readable inside that full width */
.event.open .detail > .inner { max-width: 800px; margin-inline: auto; }
.event .detail p { margin-bottom: 15px; }
.event .detail p:last-child { margin-bottom: 0; }
.event .detail .box { margin: 18px 0; }
.event .detail .box .box-body p { font-size: 17px; }
/* right-aligned events keep their heading right but read left inside */
.event:nth-child(odd of .event) .detail { text-align: left; }

/* ---------- kingdoms ---------- */

#kingdoms { background: var(--ink); }

.kingdom-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.kingdom-card {
  position: relative; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line-soft);
  aspect-ratio: 3 / 4;
  background: var(--ink-3);
}
.kingdom-card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.7) brightness(0.72);
  transition: transform 0.8s ease, filter 0.8s ease;
}
.kingdom-card:hover img { transform: scale(1.06); filter: saturate(0.9) brightness(0.85); }
.kingdom-card .plate {
  position: absolute; inset: auto 0 0 0;
  padding: 60px 24px 24px;
  background: linear-gradient(180deg, transparent, rgba(8,6,4,0.94));
}
.kingdom-card .plate .kicker { font-size: 9.5px; }
.kingdom-card .plate h3 { font-weight: 600; font-size: 27px; letter-spacing: 0.06em; margin: 6px 0 2px; }
.kingdom-card .plate .years { font-style: italic; color: var(--ivory-faint); font-size: 16px; }
.kingdom-card .plate .hint {
  font-family: var(--sans); font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); margin-top: 12px; opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s, transform 0.4s;
}
.kingdom-card:hover .plate .hint { opacity: 1; transform: none; }

/* ---------- city (hyderabad) ---------- */

#city { background: linear-gradient(180deg, var(--ink), var(--ink-2)); }

.city-feature {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px;
  align-items: center; margin-bottom: 90px;
}
.city-feature.flip .media { order: 2; }
.city-feature .media {
  border: 1px solid var(--line-soft);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
}
.city-feature .media img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 4 / 3;
  filter: saturate(0.8) brightness(0.85);
  transition: transform 1s ease;
}
.city-feature:hover .media img { transform: scale(1.04); }
.city-feature h3 { font-weight: 600; font-size: 32px; letter-spacing: 0.05em; margin: 10px 0 16px; }
.city-feature p { color: var(--ivory-dim); font-size: 19px; margin-bottom: 14px; }

.portrait-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  margin-top: 30px;
}
.portrait {
  text-align: center;
}
.portrait .frame {
  border: 1px solid var(--line);
  padding: 8px; background: var(--ink-3);
}
.portrait img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top;
  filter: sepia(0.25) saturate(0.8) brightness(0.9);
}
.portrait h4 { font-weight: 600; font-size: 19px; margin-top: 14px; letter-spacing: 0.04em; }
.portrait .role { font-style: italic; font-size: 15px; color: var(--ivory-faint); }

/* pull quote band */
.quote-band {
  margin: 40px 0 0;
  padding: 100px 24px;
  background-size: cover; background-position: center;
  background-attachment: fixed;
  position: relative; text-align: center;
}
.quote-band::after { content: ""; position: absolute; inset: 0; background: rgba(8,6,4,0.82); }
.quote-band .inner { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; }
.quote-band blockquote { font-style: italic; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.5; color: var(--ivory); }
.quote-band cite {
  display: block; margin-top: 22px;
  font-family: var(--sans); font-style: normal;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
}

/* ---------- gallery ---------- */

#gallery { background: var(--ink); }

.gallery-grid {
  columns: 3; column-gap: 18px;
}
.gallery-grid figure {
  break-inside: avoid; margin: 0 0 18px;
  position: relative; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line-soft);
}
.gallery-grid img {
  width: 100%;
  filter: saturate(0.75) brightness(0.8);
  transition: transform 0.7s, filter 0.7s;
}
.gallery-grid figure:hover img { transform: scale(1.05); filter: saturate(0.95) brightness(0.95); }
.gallery-grid figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 40px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(8,6,4,0.92));
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ivory-dim);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
}
.gallery-grid figure:hover figcaption { opacity: 1; transform: none; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(5,4,3,0.96);
  display: none; align-items: center; justify-content: center;
  flex-direction: column; padding: 40px;
}
.lightbox.open { display: flex; animation: overlayIn 0.3s ease; }
.lightbox img { max-width: 92vw; max-height: 80vh; object-fit: contain; box-shadow: 0 30px 90px rgba(0,0,0,0.7); }
.lightbox .cap {
  margin-top: 20px; font-family: var(--sans); font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--ivory-dim);
  text-align: center;
}

/* ---------- sources ---------- */

#sources { background: linear-gradient(180deg, var(--ink), #090705); padding-bottom: 80px; }

.sources-list { max-width: 760px; margin: 0 auto; }
.sources-list li {
  list-style: none;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ivory-dim); font-size: 18px;
  display: flex; gap: 20px;
}
.sources-list li .n {
  font-family: var(--sans); color: var(--gold); font-size: 12px;
  letter-spacing: 0.1em; padding-top: 5px; min-width: 26px;
}
.sources-list li i { color: var(--ivory); }

.colophon {
  text-align: center; margin-top: 70px;
  font-style: italic; color: var(--ivory-faint); font-size: 17px;
  max-width: 640px; margin-left: auto; margin-right: auto;
  padding: 0 24px;
}

footer {
  text-align: center; padding: 46px 24px 60px;
  background: #090705;
  border-top: 1px solid var(--line-soft);
}
footer .brand { font-size: 18px; letter-spacing: 0.34em; text-transform: uppercase; }
footer .brand span { color: var(--gold); }
footer p { font-family: var(--sans); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ivory-faint); margin-top: 14px; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .kingdom-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { columns: 2; }
  .portrait-row { grid-template-columns: repeat(2, 1fr); }
  .city-feature { grid-template-columns: 1fr; gap: 30px; }
  .city-feature.flip .media { order: 0; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav ul {
    position: fixed; inset: 0 0 auto 0; top: 58px;
    flex-direction: column; align-items: center; gap: 0;
    background: rgba(12,10,8,0.97);
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  }
  .nav ul.open { max-height: 420px; padding: 18px 0 26px; }
  .nav ul li { padding: 12px 0; }
  .nav-toggle { display: block; }

  .timeline::before { left: 12px; }
  .event, .event:nth-child(odd of .event), .event:nth-child(even of .event) {
    width: auto; margin-left: 44px; text-align: left;
  }
  .event:nth-child(odd of .event)::before, .event:nth-child(even of .event)::before { left: -37px; right: auto; }
  /* the events are already full width here, so cancel the desktop break-out */
  .event.open .detail,
  .event:nth-child(even of .event).open .detail { width: auto; margin-left: 0; }

  /* scaled to a phone the city plans render their labels at about 4px, which
     is unreadable — so keep the plan at its drawn size and scroll it instead */
  /* the plans are tiled maps now — scroll them rather than shrink the pins */
  .citymap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .citymap .tiles, .citymap .pins { width: 820px; }
  .citymap .pins { position: absolute; left: 0; right: auto; }
  .citymap .pin-label { font-size: 9px; }

  /* the Deccan map has the same problem: scaled to a phone its city labels
     render at about 4px. Keep it at a readable size and scroll it. */
  .map-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .map-frame { width: 880px; max-width: none; }
  .map-caption::after {
    content: " · drag the map sideways";
    color: var(--gold);
  }
  .citymap-wrap > .lede-sm::after {
    content: " (drag the plan sideways to follow it)";
    color: var(--gold); font-style: normal; font-size: 13px;
  }

  .kingdom-grid { grid-template-columns: 1fr; }
  .gallery-grid { columns: 1; }
  .quote-band { background-attachment: scroll; }
  .overlay-nav { width: calc(100% - 40px); justify-content: center; }

  .entry { flex-direction: column; align-items: center; gap: 14px; margin-top: 34px; }
  .entry a { width: 100%; max-width: 320px; padding: 20px 18px; }
  .site-card { grid-template-columns: 1fr; gap: 14px; }
  .site-card img, .site-card .ph { max-width: 240px; }
  .glance { grid-template-columns: 1fr 1fr; }
  .overlay-body { padding: 36px 20px 150px; }
  .overlay-body p { font-size: 18px; }
  .box > summary { padding: 13px 15px; font-size: 10px; letter-spacing: 0.16em; }
  .box .box-body { padding: 2px 15px 16px; }
  .box .box-body p, .box .box-body ul { font-size: 17px; }
  .box table { font-size: 15.5px; }
  .box table td:first-child { width: 46%; padding-right: 12px; }
  .site-strip { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }
}

/* ---------- portraits inside a timeline event ---------- */
.event .figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 4px 0 26px;
}
.event .figures figure { margin: 0; }
.event .figures img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top center;
  border: 1px solid var(--line-soft);
  filter: saturate(0.78) brightness(0.86);
  transition: filter 0.5s;
}
.event .figures figure:hover img { filter: saturate(1) brightness(1); }
.event .figures figcaption {
  font-family: var(--sans); margin-top: 9px; line-height: 1.45;
}
.event .figures figcaption b {
  display: block; font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
}
.event .figures figcaption span {
  display: block; font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--ivory-faint); margin-top: 3px;
}
@media (max-width: 760px) {
  .event .figures { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 11px; }
}

/* ---------- era scrubber: where you are in the chronicle ---------- */
.era-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: linear-gradient(180deg, rgba(12,10,8,0) 0%, rgba(12,10,8,0.93) 34%, rgba(12,10,8,0.97) 100%);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line-soft);
  padding: 16px 22px 13px;
  opacity: 0; transform: translateY(100%);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.era-bar.show { opacity: 1; transform: none; pointer-events: auto; }

.era-bar-inner { max-width: 1180px; margin: 0 auto; }

.era-track {
  position: relative; height: 1px; background: var(--line-soft); margin-bottom: 13px;
}
.era-progress {
  position: absolute; left: 0; top: -1px; height: 3px; width: 0;
  background: linear-gradient(90deg, rgba(201,166,107,0.25), var(--gold));
  transition: width 0.18s linear;
}

.era-steps { display: flex; gap: 4px; }
.era-step {
  flex: 1 1 0; min-width: 0;
  background: none; border: none; cursor: pointer;
  padding: 4px 6px 2px; text-align: center;
  font-family: var(--sans); color: var(--ivory-faint);
  transition: color 0.3s;
}
.era-step .dot {
  display: block; width: 6px; height: 6px; margin: 0 auto 8px;
  transform: rotate(45deg);
  border: 1px solid var(--line); background: var(--ink);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.era-step .nm {
  display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.era-step .yr {
  display: block; font-family: var(--serif); font-style: italic;
  font-size: 12.5px; margin-top: 2px; opacity: 0.75;
}
.era-step:hover { color: var(--ivory-dim); }
.era-step:hover .dot { border-color: var(--gold); }
.era-step.past { color: var(--ivory-faint); }
.era-step.past .dot { background: rgba(201,166,107,0.45); border-color: rgba(201,166,107,0.45); }
.era-step.active { color: var(--gold-bright); }
.era-step.active .dot {
  background: var(--gold); border-color: var(--gold-bright);
  transform: rotate(45deg) scale(1.5);
}

@media (max-width: 760px) {
  .era-bar { padding: 12px 10px 10px; }
  .era-step { padding: 3px 2px 1px; }
  .era-step .nm { font-size: 0; letter-spacing: 0; }
  /* on a phone there is no room for seven names — keep the years and the dots */
  .era-step.active .nm { font-size: 9px; letter-spacing: 0.12em; }
  .era-step .yr { font-size: 10.5px; }
}

/* ---------- further reading, at the foot of an opened event ---------- */
.event .reading {
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
}
.event .reading .rl {
  font-family: var(--sans); font-size: 9.5px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--gold);
  margin-right: 4px; flex: none;
}
.event .reading a {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--ivory-dim);
  border: 1px solid var(--line-soft);
  padding: 6px 12px;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.event .reading a::after { content: " ↗"; color: var(--gold); opacity: 0.6; }
.event .reading a:hover {
  color: var(--gold-bright); border-color: var(--gold);
  background: rgba(201, 166, 107, 0.07);
}
@media (max-width: 760px) {
  .event .reading { gap: 7px; }
  .event .reading a { font-size: 11px; padding: 5px 10px; }
}

/* ==========================================================================
   City pages — city/<id>.html, generated by scripts/build_seo.py
   The same content as the overlay, but at its own URL so it can be found,
   linked and indexed on its own terms.
   ========================================================================== */

.city-page { padding-bottom: 0; }

.city-hero {
  position: relative; min-height: 62vh;
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center 38%;
  padding: 0 32px 58px;
}
.city-hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,10,8,0.72) 0%, rgba(12,10,8,0.35) 42%, var(--ink) 100%);
}
.city-hero .inner { position: relative; max-width: 860px; margin: 0 auto; width: 100%; }
.city-hero h1 {
  font-weight: 500; font-size: clamp(44px, 8vw, 92px);
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  margin: 14px 0 10px;
}
.city-hero .era { font-style: italic; font-size: 20px; color: var(--ivory-dim); }

.city-body { padding-top: 56px; padding-bottom: 90px; }
.city-body p { margin-bottom: 22px; color: var(--ivory-dim); font-size: 20px; }
.city-body .lede-in::first-letter {
  font-size: 64px; line-height: 0.85; float: left;
  padding: 8px 12px 0 0; color: var(--gold);
}
.city-body h2.ov-h {
  font-size: 30px; font-weight: 500; letter-spacing: 0.05em;
  color: var(--ivory); margin: 52px 0 20px;
  padding-top: 30px; border-top: 1px solid var(--line-soft);
}
.city-body blockquote {
  border-left: 2px solid var(--gold); padding: 6px 0 6px 26px;
  margin: 34px 0; font-size: 23px; font-style: italic; color: var(--ivory);
}
.city-body blockquote cite {
  display: block; margin-top: 12px; font-family: var(--sans); font-style: normal;
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
}

.crumbs {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ivory-faint); margin-bottom: 34px;
}
.crumbs a { color: var(--gold); }
.crumbs span { margin: 0 8px; }

.site-list { margin-top: 26px; }
.site-entry {
  display: grid; grid-template-columns: 190px 1fr; gap: 24px;
  padding: 24px 0; border-top: 1px solid var(--line-soft);
  align-items: start;
}
.site-entry img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  filter: saturate(0.82) brightness(0.88);
}
.site-entry h3 { font-size: 23px; font-weight: 600; letter-spacing: 0.03em; }
.site-entry .date {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold); margin: 6px 0 10px;
}
.site-entry p { font-size: 18px; margin: 0; }

.back-home { margin-top: 56px; font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; }

.foot {
  border-top: 1px solid var(--line-soft); padding: 40px 32px 60px;
  text-align: center; color: var(--ivory-faint); font-size: 16px;
}

@media (max-width: 760px) {
  .city-hero { min-height: 48vh; padding-bottom: 40px; }
  .city-body p { font-size: 18px; }
  .site-entry { grid-template-columns: 1fr; gap: 14px; }
  .site-entry img { max-width: 280px; }
}

/* the chips are anchors now, so stop them inheriting link styling */
.map-chips a { text-decoration: none; display: inline-flex; align-items: center; }
.kingdom-card { display: block; color: inherit; text-decoration: none; }
.full-chapter { margin-top: 46px; text-align: center; }
.full-chapter a {
  display: inline-block; font-family: var(--sans); font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 14px 26px; color: var(--gold);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.full-chapter a:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
