/* ------------------------------------------------------------------ */
/* Mode toggle (nav)                                                   */
/* ------------------------------------------------------------------ */
.navr { display: flex; align-items: center; gap: 22px; }
.mode { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; pointer-events: auto;
  background: rgba(12, 11, 11, .62); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mode span { position: relative; z-index: 1; padding: 9px 16px; text-align: center; white-space: nowrap; font-size: 10.5px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--mute); transition: color .45s; }
.mode i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--copper);
  transition: transform .6s cubic-bezier(.75, 0, .2, 1); }
.mode[aria-pressed="true"] i { transform: translateX(100%); }
.mode[aria-pressed="false"] span[data-m="3d"], .mode[aria-pressed="true"] span[data-m="photo"] { color: var(--ink); }
.mode:hover span { color: var(--paper); }
.mode[aria-pressed="false"]:hover span[data-m="3d"], .mode[aria-pressed="true"]:hover span[data-m="photo"] { color: var(--ink); }
.mode em { font-style: normal; }
.mode .s { display: none; }

.nav { transition: background-color .5s ease, padding .5s ease; }
body.photo .nav { background-color: rgba(18, 17, 18, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-top: 12px; padding-bottom: 12px; }
body.photo #hud, body.photo #labels, body.photo main, body.photo .shade { visibility: hidden; }

/* ------------------------------------------------------------------ */
/* Photo layer                                                         */
/* ------------------------------------------------------------------ */
#photo { position: fixed; inset: 0; z-index: 35; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--ink); color: var(--paper); visibility: hidden; clip-path: inset(0 0 0 100%); outline: none; scrollbar-width: none; }
#photo::-webkit-scrollbar { display: none; }
body.photo #photo, #photo.moving { visibility: visible; }
#pEdge { position: fixed; top: 0; bottom: 0; left: 0; width: 3px; z-index: 36; background: var(--copper); transform: translateX(100vw); pointer-events: none; opacity: 0; }

.ph img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.ph img.ld, .ph .by img { opacity: 1; }
.ph .by img { width: auto; height: 34px; object-fit: contain; }
.ph .by img.m { height: 40px; }
.ph h1, .ph h2, .ph h3 { text-shadow: none; }
.ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln > span { display: block; }
.pad { padding-left: clamp(20px, 6vw, 96px); padding-right: clamp(20px, 6vw, 96px); }

/* full-bleed chapter openers */
.p-hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; display: flex; align-items: flex-end; background: #0c0b0b; }
.p-hero .bg, .p-day .bg { position: absolute; inset: 0; overflow: hidden; }
.p-hero .bg img, .p-day .bg img { transform-origin: 50% 55%; will-change: transform; }
.p-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(10, 9, 9, .82) 0%, rgba(10, 9, 9, .3) 40%, rgba(10, 9, 9, 0) 62%),
              linear-gradient(180deg, rgba(10, 9, 9, .5) 0%, rgba(10, 9, 9, 0) 20%); }
.p-head { position: relative; z-index: 2; padding-bottom: clamp(56px, 12vh, 130px); max-width: 1180px; }
.p-head h1 { font-size: clamp(52px, 8.6vw, 156px); }
.p-head h2 { font-size: clamp(46px, 7.6vw, 136px); margin-bottom: 0; }
.p-head p { margin-top: 22px; max-width: 44ch; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.6; color: var(--mute); }
.p-head .eyebrow { margin-bottom: 26px; }
.p-cap { position: absolute; z-index: 2; right: clamp(16px, 4vw, 56px); bottom: 24px; max-width: 34ch; text-align: right;
  font-size: 10px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; color: rgba(244, 240, 234, .55); }
.p-cap b { display: block; font-weight: 600; color: rgba(244, 240, 234, .8); }
.p-hint { display: flex; align-items: center; gap: 14px; margin-top: 34px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }
.p-hint span { position: relative; width: 1px; height: 40px; background: var(--line); overflow: hidden; }
.p-hint span::after { content: ''; position: absolute; inset: 0 0 60% 0; background: var(--copper); animation: drip 1.8s ease-in-out infinite; }

/* intro */
.p-intro { background: var(--paper); color: var(--ink); padding-top: clamp(90px, 16vh, 180px); padding-bottom: clamp(90px, 16vh, 180px); }
.p-intro .big { font-family: var(--display); font-stretch: 108%; font-weight: 600; font-size: clamp(30px, 4vw, 64px); line-height: 1.08; letter-spacing: -.015em; max-width: 22ch; }
.p-intro .big em { font-style: normal; color: #a4602f; }
.p-days { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(16px, 2.4vw, 40px); margin-top: clamp(56px, 9vh, 100px); border-top: 1px solid rgba(18, 17, 18, .16); }
.p-days li { padding-top: 22px; font-size: 14px; line-height: 1.55; color: #4a4541; }
.p-days b { display: block; margin-bottom: 10px; font-family: var(--display); font-stretch: 118%; font-size: 13px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: #a4602f; }

/* text + photographs */
.p-spread { background: var(--paper); color: var(--ink); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.2vw, 36px);
  padding-top: clamp(90px, 15vh, 170px); padding-bottom: clamp(90px, 15vh, 170px); align-items: start; }
.p-spread.dark { background: var(--ink-2); color: var(--paper); }
.p-text { grid-column: 1 / span 5; position: sticky; top: 16vh; }
.p-spread.rev .p-text { grid-column: 8 / span 5; grid-row: 1; }
.p-imgs { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px); row-gap: clamp(28px, 5vh, 56px); }
.p-spread.rev .p-imgs { grid-column: 1 / span 6; grid-row: 1; }
.p-lead { font-family: var(--display); font-stretch: 104%; font-weight: 500; font-size: clamp(24px, 2.35vw, 38px); line-height: 1.2; letter-spacing: -.012em; }
.p-text p { margin-top: 22px; max-width: 46ch; font-size: 16px; line-height: 1.72; color: #4d4843; }
.p-spread.dark .p-text p { color: var(--mute); }
.p-text .eyebrow { color: #a4602f; }
.p-spread.dark .p-text .eyebrow { color: var(--copper-2); }
.p-facts { list-style: none; margin-top: 30px; display: grid; gap: 11px; }
.p-facts li { display: flex; gap: 14px; align-items: baseline; font-size: 14px; }
.p-facts li::before { content: ''; flex: none; width: 14px; height: 1px; background: var(--copper); transform: translateY(-4px); }

.f { margin: 0; will-change: transform; }
.f .fi { position: relative; overflow: hidden; aspect-ratio: var(--ar, 3 / 2); background: #e1d9ce; }
.p-spread.dark .f .fi, .p-rail .f .fi { background: #26221f; }
.f figcaption, .p-band figcaption { margin-top: 12px; font-size: 10.5px; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; color: #6e665e; }
.f figcaption span, .p-band figcaption span { display: block; margin-top: 2px; font-size: 9.5px; letter-spacing: .1em; color: #9a9188; }
.p-spread.dark .f figcaption, .p-rail .f figcaption { color: rgba(244, 240, 234, .7); }
.p-spread.dark .f figcaption span, .p-rail .f figcaption span { color: rgba(244, 240, 234, .42); }
.w6 { grid-column: span 6; } .w4 { grid-column: span 4; } .w3 { grid-column: span 3; }
.o2 { grid-column: 3 / span 4; } .o3 { grid-column: 3 / span 4; margin-top: -8vh; }

/* panorama bands */
.p-band { position: relative; background: var(--ink); padding-bottom: 28px; }
.p-band .fi { position: relative; height: clamp(300px, 64vh, 760px); overflow: hidden; }
.p-band .fi img { position: absolute; top: 0; left: -8%; width: 116%; height: 100%; }
.p-band figcaption { padding: 0 clamp(20px, 6vw, 96px); color: rgba(244, 240, 234, .6); }
.p-band figcaption span { color: rgba(244, 240, 234, .38); }

/* pull quotes */
.p-quote { background: var(--ink); padding-top: clamp(100px, 18vh, 200px); padding-bottom: clamp(100px, 18vh, 200px); }
.p-quote blockquote { font-family: var(--display); font-stretch: 118%; font-weight: 700; text-transform: uppercase; font-size: clamp(34px, 5.8vw, 100px); line-height: .98; letter-spacing: -.01em; max-width: 15ch; }
.p-quote .w { opacity: .14; }
.p-quote .w.em { color: var(--copper-2); }

/* horizontal gallery (sticky, scrubbed) */
.p-rail { position: relative; background: var(--ink); }
.p-rail .stick { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.p-rail .track { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); padding: 0 clamp(20px, 6vw, 96px); will-change: transform; }
.p-rail .intro { flex: none; width: min(30vw, 400px); }
.p-rail .intro h3 { font-family: var(--display); font-stretch: 118%; font-weight: 700; text-transform: uppercase; font-size: clamp(34px, 3.6vw, 60px); line-height: .96; }
.p-rail .intro h3 em { font-style: normal; color: var(--copper-2); }
.p-rail .intro p { margin-top: 20px; font-size: 16px; line-height: 1.7; color: var(--mute); }
.p-rail .f { flex: none; width: min(58vw, 860px); }
.p-rail .f .fi { aspect-ratio: 3 / 2; }
.p-rail .f .fi img { transform: scale(1.12); }

/* day dividers */
.p-day { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; text-align: center; background: #0c0b0b; }
.p-day::after { content: ''; position: absolute; inset: 0; background: rgba(12, 11, 11, .56); pointer-events: none; }
.p-day .in { position: relative; z-index: 2; padding: 120px 20px; }
.p-day .num { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(120px, 23vw, 360px); line-height: .8; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(244, 240, 234, .75); }
.p-day .lbl { margin-bottom: 18px; font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--copper-2); }
.p-day h3 { margin-top: 22px; font-family: var(--display); font-stretch: 118%; font-weight: 700; text-transform: uppercase; font-size: clamp(28px, 3.4vw, 54px); line-height: 1; }
.p-day h3 em { font-style: normal; color: var(--copper-2); }
.p-stops { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px clamp(20px, 3vw, 44px); margin-top: 40px; }
.p-stops li { font-size: 13px; color: var(--mute); }
.p-stops b { display: block; margin-bottom: 4px; font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }
.p-day .p-cap { text-align: right; }

/* finale */
.p-fin { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; text-align: center; background: #0c0b0b; }
.p-fin::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 9, 9, .85), rgba(10, 9, 9, .45)); pointer-events: none; }
.p-fin .in { position: relative; z-index: 2; max-width: 900px; padding: 120px 20px; }
.p-fin h2 { font-size: clamp(40px, 6vw, 96px); margin-bottom: 0; }
.p-fin p { margin: 22px auto 0; max-width: 52ch; color: var(--mute); font-size: 16px; line-height: 1.6; }
.p-fin .eyebrow { justify-content: center; }
.p-fin .cta { justify-content: center; }
.p-fin .fine { margin-top: 28px; }

/* credits */
.p-credits { background: var(--ink); padding-top: 70px; padding-bottom: 90px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.65; color: var(--faint); }
.p-credits h4 { margin-bottom: 18px; font-size: 10px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }
.p-credits ul { list-style: none; columns: 3 260px; column-gap: 40px; }
.p-credits li { break-inside: avoid; margin-bottom: 6px; }
.p-credits a { color: inherit; text-decoration: underline; text-decoration-color: rgba(244, 240, 234, .25); text-underline-offset: 2px; }
.p-credits .note { margin-top: 26px; max-width: 90ch; }

@media (max-width: 820px), (max-aspect-ratio: 1/1) {
  .navr { gap: 12px; }
  .navr #day { display: none; }
  .brand b { font-size: 9px; letter-spacing: .16em; max-width: 160px; line-height: 1.5; }
  .brand .sep { display: none; }
  body.photo #ctl { opacity: 0; pointer-events: none; }
  .p-head h1 { font-size: 12vw; }
  .p-head h2 { font-size: 10.6vw; }
  .p-quote blockquote { font-size: 9.4vw; }
  .p-day .num { font-size: 40vw; }
  .mode span { padding: 8px 11px; letter-spacing: .14em; }
  .mode .l { display: none; } .mode .s { display: inline; }
  .p-cap { left: 20px; right: 150px; bottom: 16px; text-align: left; max-width: none; }
  .p-head { padding-bottom: 96px; }
  .p-days { grid-template-columns: 1fr 1fr; }
  .p-spread { display: block; }
  .p-text { position: static; margin-bottom: 48px; }
  .p-imgs { row-gap: 28px; }
  .o2, .o3 { grid-column: span 6; margin-top: 0; }
  .p-rail .stick { position: static; height: auto; display: block; padding: 90px 0; }
  .p-rail .track { display: grid; gap: 36px; transform: none !important; }
  .p-rail .intro, .p-rail .f { width: auto; }
  .p-day .p-cap, .p-fin .p-cap { text-align: left; }
}
