/* Three layouts for the four sites (js/stays-options.js). Nothing here applies without ?stays=. */

/* Reel: one big film, the four sites as tabs under it */
.st-reel { margin-top: clamp(30px, 4vw, 56px); }
.st-screen { aspect-ratio: 16 / 8; box-shadow: 0 40px 70px -46px rgba(30, 26, 20, .7); }
.st-screen .st-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 16vh clamp(22px, 3vw, 44px) clamp(22px, 3vw, 40px); background: linear-gradient(rgba(20, 19, 18, 0), rgba(20, 19, 18, .62)); color: var(--paper); }
.st-screen .st-cap .w { font-family: var(--caps); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; opacity: .8; }
.pg .st-screen .st-cap h3 { font-weight: 300; font-size: clamp(40px, 4.4vw, 76px); letter-spacing: -.025em; margin: 8px 0 8px; color: var(--paper); }
.st-screen .st-cap .d { font-size: 16px; max-width: 34em; opacity: .85; }
.st-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 18px; margin-top: 18px; }
.st-tabs button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 5px; padding: 16px 0 6px; position: relative; }
.st-tabs button i { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rule); }
.st-tabs button i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleX(var(--p, 0)); transform-origin: left; }
.st-tabs b { font-weight: 300; font-size: clamp(20px, 1.8vw, 30px); letter-spacing: -.01em; }
.st-tabs span { font-family: var(--caps); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--ink2); }
.st-tabs em { font-style: normal; font-size: 14px; color: var(--ink2); }
.st-tabs button:not(.on) b { opacity: .45; }

/* Journey: the section holds, four tall films slide sideways */
.st-track { position: relative; height: 380vh; margin-top: clamp(20px, 3vw, 40px); }
.sx-journey .st-track { width: 100vw; margin-left: calc(50% - 50vw); }
.st-stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.st-row { position: absolute; left: 0; top: 13vh; display: flex; gap: 28px; will-change: transform; }
.st-row .site { width: min(56vw, 900px); flex: none; margin: 0; transform: none !important; }
.st-row .site .ph { aspect-ratio: auto; height: 60vh; transform: none !important; transition: filter .5s; }
.st-row .site:not(.on) .ph { filter: saturate(.55) brightness(.92); }
.st-row .site .site-cap { opacity: 1 !important; transform: none !important; }
/* the head pinned on the left of the stage, the cards travel in from the right and slide away under its paper edge */
.sx-journey .st-head { position: absolute; z-index: 2; left: 0; top: 0; bottom: 0; margin: 0; width: calc(var(--pad) + 2vw + min(26vw, 450px)); padding: 0 32px 0 calc(var(--pad) + 2vw);   /* Sam, round fifteen: less space on the left */ display: flex; flex-direction: column; justify-content: center; background: linear-gradient(90deg, var(--paper) 0, var(--paper) calc(100% - 56px), rgba(244, 241, 233, 0)); box-sizing: border-box; }
.sx-journey .st-head h2 { font-size: clamp(36px, 3.25vw, 60px); line-height: 1.02; margin: 20px 0 24px; max-width: none; white-space: nowrap; }   /* and a bigger headline */
.sx-journey .st-head .lede { font-size: clamp(15px, 1.1vw, 19px); max-width: 22em; }
.sx-journey .st-row .site { width: min(44vw, 720px); }
.sx-journey .st-row .site .ph { height: 58vh; }
.st-count { position: absolute; right: var(--pad); bottom: calc(var(--pad) + 4px); font-family: var(--caps); letter-spacing: .2em; font-size: 13px; color: var(--ink2); }
.st-count b { color: var(--ink); font-weight: 500; font-size: 28px; letter-spacing: .04em; margin-right: 4px; }

/* Map: a drawn north with the four sites; the site you're on plays beside it */
.sx-map .st-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding: 84px 0 30px; box-sizing: border-box; overflow: visible; }
.st-map svg { width: 100%; height: min(74vh, 720px); }
.st-map .sea { fill: rgba(63, 106, 88, .12); }
.st-map .coast { fill: none; stroke: var(--ink); stroke-width: .25; }
.st-map .lake { fill: rgba(63, 106, 88, .18); stroke: var(--ink); stroke-width: .18; }
.st-map .ridge { fill: none; stroke: var(--ink2); stroke-width: .25; stroke-linejoin: round; }
.st-map .tree { fill: none; stroke: rgba(23, 22, 21, .35); stroke-width: .18; }
.st-map .city circle { fill: none; stroke: var(--ink); stroke-width: .3; }
.st-map text { font-family: var(--caps); font-size: 2.2px; letter-spacing: .12em; text-transform: uppercase; fill: var(--ink); }
.st-map text.t { fill: var(--ink2); font-size: 1.9px; }
.st-map .road { fill: none; stroke: rgba(23, 22, 21, .3); stroke-width: .22; stroke-dasharray: .9 .7; }
.st-map .pin rect { fill: var(--paper); stroke: var(--ink); stroke-width: .3; transition: fill .3s; }
.st-map .pin.on rect { fill: var(--red); stroke: var(--red); }
.st-map .pin.on .road { stroke: var(--red); stroke-width: .35; }
.st-map .pin:not(.on) text { opacity: .55; }
.st-right { position: relative; height: min(76vh, 760px); }
.st-right .site { position: absolute; inset: 0; margin: 0; transform: none !important; display: flex; flex-direction: column; }
.st-right .site .ph { aspect-ratio: auto; flex: 1; transform: none !important; }
.st-right .site .site-cap { opacity: 1 !important; transform: none !important; padding-top: 14px; }

@media (max-width: 760px) {
  .st-tabs { grid-template-columns: 1fr 1fr; gap: 6px 14px; }
  .st-screen { aspect-ratio: 4 / 5; }
  .st-row .site { width: 80vw; }
  .st-row .site .ph { height: 52vh; }
  .sx-journey .st-head { top: 70px; bottom: auto; right: 0; width: auto; padding: 0 var(--pad); background: none; display: block; }
  .sx-journey .st-head h2 { font-size: clamp(26px, 7.4vw, 34px); margin: 12px 0 0; }
  .sx-journey .st-head .lede { display: none; }
  .sx-journey .st-row { top: calc(70px + 118px); }
  .sx-journey .st-row .site { width: 80vw; }
  .sx-journey .st-row .site .ph { height: 40vh; }
  .sx-map .st-stage { grid-template-columns: 1fr; padding-top: 70px; }
  .st-map svg { height: 34vh; }
  .st-right { height: 46vh; }
}

/* Journey: no paper panel behind the headline any more; the cards fade out in a wide, soft ramp before they reach it */
.sx-journey .st-stage { --hw: calc(var(--pad) + 2vw + min(26vw, 450px)); }
.sx-journey .st-head { background: none !important; }
.st-clip { position: absolute; inset: 0; }
.sx-journey .st-clip { -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent calc(var(--hw) - 60px), rgba(0, 0, 0, .35) calc(var(--hw) + 30px), #000 calc(var(--hw) + 170px)); mask-image: linear-gradient(90deg, transparent 0, transparent calc(var(--hw) - 60px), rgba(0, 0, 0, .35) calc(var(--hw) + 30px), #000 calc(var(--hw) + 170px)); }
@media (max-width: 760px) { .sx-journey .st-clip { -webkit-mask-image: none; mask-image: none; } }
/* the three lines: the red half starts mid-line here ("a lake, a ridge"), not on a line of its own */
.sx-journey .st-head h2 em { display: inline; }
@media (max-width: 760px) {
  .sx-journey .st-head h2 { white-space: normal; }
  .sx-journey .st-head h2 br { display: none; }
  .sx-journey .st-row { top: calc(70px + 150px); }
}

/* ?sfilm=draft: the Higgsfield site films over the stand-in canvas */
.ph .st-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.st-films .st-row .ph canvas { visibility: hidden; }

/* Nov 24 (Sam): the space between the last site and Build with us was too big (about 470px of empty); now about half */
.sx-journey #stays.pg { padding-bottom: clamp(16px, 2vw, 28px); }
.sx-journey #stays + #build.pg { padding-top: clamp(56px, 5.5vw, 84px); }
