/* ============================================================
   PHOTO ATLAS — the photographs behind the book, placed on a
   globe and a timeline and matched to the chapters.
   Layout: title hero; sticky globe beside a cinematic story
   card; a full-width timeline tape; a reading companion list
   that follows the chosen order; a lightbox with Live Photos.
   Loads after css/style.css (which owns the tokens, header,
   footer, .wrap, .btn, .eyebrow, .lead, headings).
   ============================================================ */

.atlas button { font: inherit; color: inherit; }
.atlas :focus-visible { outline: 1px solid var(--green); outline-offset: 3px; }
.atlas h4 { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .01em; line-height: .95; }
.mono { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; }

/* button variants used only here */
.btn.solid { background: var(--green); color: var(--black); border-color: var(--green); }
.btn.small { padding: .7rem 1rem; font-size: .66rem; letter-spacing: .2em; }
.btn svg { width: 12px; height: 12px; }
@media (hover: hover) { .btn.solid:hover { color: var(--black); } }
/* style.css makes every .btn full-width under 520px; the small ones stay compact */
@media (max-width: 520px) { .atlas .btn.small { width: auto; } }

/* order toggle (chronological / by country) */
.order-row { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: .6rem .9rem; cursor: pointer; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); white-space: nowrap; transition: background .35s var(--ease), color .35s; }
.seg button[aria-pressed="true"] { background: var(--green); color: var(--black); }
@media (hover: hover) { .seg button:hover:not([aria-pressed="true"]) { color: var(--white); } }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: end; }
.atlas-hero h1 { text-wrap: balance; }
.atlas-hero h1 em { font-style: normal; color: var(--green); }
.atlas-hero .lead { margin: 0 0 28px; opacity: .86; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------
   Stage — sticky globe + story card
   ------------------------------------------------------------ */

.stage-sec { padding: clamp(28px, 4vw, 56px) 0; scroll-margin-top: 4.5rem; }   /* clears the fixed header when Play scrolls here */
.stage { scroll-margin-top: 6rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.globe-col { position: sticky; top: 6rem; }
.globe-box { position: relative; aspect-ratio: 1 / 1; max-width: 100%; border-radius: 50%; overflow: hidden; }
.globe-box::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 80px rgba(0, 0, 0, .55); pointer-events: none; }
#globe { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#globe.drag { cursor: grabbing; }
body.custom-cursor #globe { cursor: none !important; }
.globe-label { position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%); background: rgba(15, 14, 13, .9); border: 1px solid var(--line); padding: .45rem .9rem; white-space: nowrap; pointer-events: none; max-width: 86%; overflow: hidden; text-overflow: ellipsis; font-size: .62rem; z-index: 2; }
.globe-tip { position: absolute; pointer-events: none; background: var(--black-card); border: 1px solid var(--line); padding: .4rem .7rem; font-size: .6rem; transform: translate(-50%, calc(-100% - 14px)); white-space: nowrap; z-index: 3; }
.countries { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; justify-content: center; }
.chip { border: 1px solid var(--line); background: transparent; padding: .45rem .7rem; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; color: var(--grey); transition: color .3s, border-color .3s; }
.chip .n { color: var(--grey-dark); margin-left: .4rem; }
@media (hover: hover) { .chip:hover { color: var(--white); } }
.chip[aria-current="true"] { border-color: var(--green); color: var(--green); }
.globe-hint { text-align: center; color: var(--grey-dark); margin: 14px 0 0; font-size: .58rem; }
.globe-hint .gh-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .globe-hint .gh-fine { display: none; } .globe-hint .gh-touch { display: inline; } }

.card { background: var(--black-soft); border: 1px solid var(--line); min-width: 0; overflow: hidden; position: relative; }
.media { position: relative; aspect-ratio: 16 / 9; max-height: 46vh; max-width: 100%; overflow: hidden; background: var(--black); cursor: zoom-in; border: 0; padding: 0; display: block; width: 100%; }
.media .layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; will-change: opacity, transform; }
.media .layer.show { opacity: 1; }
.media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 14, 13, 0) 55%, rgba(15, 14, 13, .85)); pointer-events: none; }
.media-cap { position: absolute; left: clamp(16px, 2.5vw, 28px); right: clamp(16px, 2.5vw, 28px); bottom: 14px; z-index: 2; display: flex; justify-content: space-between; gap: 12px; font-size: .6rem; color: var(--white); pointer-events: none; }
.media .progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3; background: rgba(244, 243, 239, .1); }
.media .progress i { display: block; height: 100%; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left center; }
.card-inner { padding: clamp(18px, 2.5vw, 30px); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.meta .when { color: var(--green); }
.meta .where { color: var(--grey); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; padding: .35rem .6rem; border: 1px solid currentColor; display: inline-flex; align-items: center; gap: .5rem; }
.tag.exact { color: var(--green); } .tag.scene { color: var(--white); } .tag.context { color: var(--grey); }
.tag.ch { color: var(--grey); border-color: var(--line); }
.tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.card h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin: 18px 0 12px; text-wrap: balance; }
.card h2 .ln { display: block; overflow: hidden; }
.card h2 .ln > span { display: block; }
.card p.text { margin: 0 0 18px; max-width: 38em; color: rgba(244, 243, 239, .86); }
.card blockquote { margin: 0 0 22px; padding: 0 0 0 18px; border-left: 1px solid var(--green); font-family: var(--font-head); font-weight: 400; text-transform: uppercase; font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.2; letter-spacing: .01em; max-width: 30em; }
.card blockquote cite { display: block; margin-top: 10px; font-style: normal; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .2em; color: var(--grey); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 4px; }
.thumb { position: relative; aspect-ratio: 1 / 1; border: 0; padding: 0; overflow: hidden; background: var(--black); cursor: zoom-in; max-width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease), opacity .4s; opacity: .82; }
@media (hover: hover) { .thumb:hover img { transform: scale(1.07); opacity: 1; } }
.thumb.lead-img img { opacity: 1; }
.thumb.lead-img::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--green); }
.thumb .live { position: absolute; left: 4px; top: 4px; font-family: var(--font-mono); font-size: .5rem; letter-spacing: .14em; background: rgba(15, 14, 13, .8); color: var(--green); padding: 2px 4px; }
.card-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.card-nav .pos { color: var(--grey); font-size: .6rem; text-align: center; }
.echo { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------
   Timeline tape
   ------------------------------------------------------------ */

.tape-sec { padding: clamp(36px, 5vw, 64px) 0 12px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.sec-head h3 { font-size: clamp(2rem, 4vw, 3.2rem); margin-top: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--grey); font-size: .6rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tape-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--black-soft); scrollbar-color: var(--grey-dark) transparent; }
.tape { position: relative; min-width: 980px; height: 240px; }
.band { position: absolute; top: 0; height: 52px; border: 0; border-left: 1px solid var(--line); padding: 10px 8px; overflow: hidden; cursor: pointer; background: transparent; text-align: left; transition: background .5s var(--ease); }
.band .bn { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; line-height: 1; color: var(--grey); transition: color .5s var(--ease); }
.band .bt { font-family: var(--font-mono); font-size: .5rem; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; margin-top: 4px; }
.band.cur { background: rgba(145, 199, 61, .08); }
.band.cur .bn { color: var(--green); }
.axis { position: absolute; left: 0; right: 0; top: 200px; height: 1px; background: var(--line); }
.tape .tick { position: absolute; top: 208px; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .2em; color: var(--grey); transform: translateX(-50%); }
.tape .tick::before { content: ""; position: absolute; left: 50%; top: -8px; height: 6px; border-left: 1px solid var(--line); }
.pd { position: absolute; width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--grey-dark); transform: translateX(-50%); transition: background .6s var(--ease), transform .3s var(--ease), box-shadow .6s; }
.pd.same { background: var(--grey); }
.pd.cur { background: var(--green); box-shadow: 0 0 10px rgba(145, 199, 61, .7); }
@media (hover: hover) { .pd:hover { transform: translateX(-50%) scale(1.7); z-index: 2; } }
.playhead { position: absolute; top: 52px; bottom: 40px; width: 1px; background: var(--green); will-change: transform; left: 0; }
.playhead::after { content: ""; position: absolute; left: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.tape-tip { position: fixed; z-index: 250; pointer-events: none; background: var(--black-card); border: 1px solid var(--line); padding: 6px; width: 168px; }
.tape-tip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tape-tip div { font-family: var(--font-mono); font-size: .55rem; letter-spacing: .12em; text-transform: uppercase; margin-top: 6px; color: var(--grey); }

/* ------------------------------------------------------------
   Reading companion
   ------------------------------------------------------------ */

.companion { padding: clamp(36px, 5vw, 64px) 0 56px; scroll-margin-top: 5rem; }
.comp-intro { color: var(--grey); max-width: 40em; margin: 0 0 28px; }
#groups { transition: opacity .35s var(--ease), transform .35s var(--ease); }
#groups.swap { opacity: 0; transform: translateY(12px); }
.group { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 18px 40px; padding-block: 28px; border-top: 1px solid var(--line); }
.group h4 { font-size: 1.5rem; line-height: 1; }
.group h4 .cn { color: var(--green); }
.group h4 small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: .58rem; letter-spacing: .2em; color: var(--grey); margin-top: 10px; }
.rows { display: grid; gap: 2px; min-width: 0; }
.row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 16px; align-items: center; text-align: left; background: transparent; border: 0; border-left: 1px solid transparent; padding: 10px 12px; cursor: pointer; width: 100%; transition: background .35s var(--ease), border-color .35s; }
@media (hover: hover) { .row:hover { background: var(--black-soft); } .row:hover .strip img { filter: none; } }
.row[aria-current="true"] { background: var(--black-soft); border-left-color: var(--green); }
.row .d { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.row[aria-current="true"] .d { color: var(--green); }
.row .t { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; font-size: 1.2rem; line-height: 1.05; }
.row .pl { font-family: var(--font-mono); font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.strip { display: flex; gap: 3px; }
.strip img { width: 40px; height: 40px; object-fit: cover; display: block; filter: grayscale(.4); transition: filter .4s; }
.row[aria-current="true"] .strip img { filter: none; }
.pre { color: var(--grey); max-width: 38em; margin: 0; }

/* ------------------------------------------------------------
   About the photographs (small print above the site footer)
   ------------------------------------------------------------ */

.atlas-note { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.atlas-note p { max-width: 62ch; font-size: .88rem; }
.atlas-note p + p { margin-top: 12px; }
.atlas-note .tag { vertical-align: middle; margin-right: .3rem; }

/* ------------------------------------------------------------
   Lightbox
   ------------------------------------------------------------ */

dialog.lb { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; color: var(--white); }
dialog.lb::backdrop { background: rgba(15, 14, 13, .96); }
/* the dialog sits in the top layer, above the custom cursor — show the native one inside it */
body.custom-cursor dialog.lb { cursor: auto; }
body.custom-cursor dialog.lb button { cursor: pointer; }
.lb-in { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; padding: max(14px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lb-media { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 100%; object-fit: contain; animation: lbin .5s var(--ease) both; }
@keyframes lbin { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.lb-cap { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; align-items: baseline; text-align: center; color: var(--grey); font-size: .62rem; }
.lb-cap b { color: var(--white); font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .01em; font-size: 1.3rem; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; background: rgba(15, 14, 13, .7); border: 1px solid var(--line); color: var(--white); cursor: pointer; font-size: 1rem; transition: border-color .3s, color .3s; }
@media (hover: hover) { .lb-arrow:hover { border-color: var(--green); color: var(--green); } }
.lb-arrow.l { left: 4px; } .lb-arrow.r { right: 4px; }

/* ------------------------------------------------------------
   Small screens
   ------------------------------------------------------------ */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .globe-col { position: relative; top: 0; }
  .globe-box { max-width: 520px; margin: 0 auto; }
  .group { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .order-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: .6rem .4rem; font-size: .58rem; letter-spacing: .12em; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .cta .btn { width: 100%; justify-content: center; }
  .globe-box { max-width: 300px; }
  .card-nav .btn { padding: .7rem .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas *, .atlas *::before, .atlas *::after { animation: none !important; transition: none !important; }
}
