/* Sea Dogs scroll tour. Engine and layout from web-motion templates/scroll-chapters.html (chapters-engine 2026-10-31.4).
   Added: a cleaning wipe (vacuum / pressure wash / rag / polish) at each stop before its camera move. */
.tour { --bg: var(--navy); --ink: var(--cream); --muted: rgba(240,235,224,.78); --accent: var(--gold);
  --ease-out: cubic-bezier(.2,.7,.2,1); --art-top: 68px;
  position: relative; height: 600vh; padding: 0; background: var(--bg); }
.tour .stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.tour .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tour .stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;   /* scrim behind the cards */
  background: linear-gradient(90deg, rgba(8,18,31,.62) 0%, rgba(8,18,31,.18) 38%, transparent 55%); }

.skip-tour { position: absolute; left: 16px; top: 76px; z-index: 300; padding: .5rem 1rem; border-radius: 4px;
  background: var(--navy); color: var(--cream); text-decoration: none; font-size: .85rem;
  transform: translateY(calc(-100% - 90px)); transition: transform .2s var(--ease-out, ease); }   /* fully above the nav until focused */
.skip-tour:focus { transform: none; outline: 2px solid var(--gold); }

.tour .stop { position: absolute; z-index: 2; left: 5vw; top: 54%; width: min(430px, 38vw);
  padding: 26px 28px; border-radius: 14px;
  background: rgba(8,18,31,.74); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 50px rgba(8,18,31,.35);
  opacity: 0; visibility: hidden; transform: translate(0, calc(-50% + 32px)); pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .45s var(--ease-out), visibility 0s .3s; }
.tour .stop.on { opacity: var(--fade, 1); visibility: visible; transform: translate(0, calc(-50% - (1 - var(--fade, 1)) * 18px));
  pointer-events: auto; transition: opacity .45s var(--ease-out), transform .55s var(--ease-out), visibility 0s; }
.tour .stop.fading { transition: none; }
.tour .offers { display: grid; gap: 10px; margin-top: 14px; }
.tour .offer { padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  opacity: 0; transform: translateY(18px); transition: opacity .2s, transform .2s; }
.tour .stop.on .offer { opacity: 1; transform: none; transition: opacity .45s var(--ease-out), transform .55s var(--ease-out);
  transition-delay: calc(180ms + var(--i, 0) * 110ms); }
.tour .offer h3 { font-family: var(--font-b); font-size: 1rem; font-weight: 600; line-height: 1.25; color: var(--white);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tour .offer h3 small { font-size: .8rem; font-weight: 600; color: var(--gold); letter-spacing: .04em; }
.tour .offer p { font-size: .9rem; margin-top: 2px; color: var(--muted); line-height: 1.5; }
.tour .stop .n { font: 600 .74rem/1 var(--font-b); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.tour .stop h2 { font-size: clamp(2.2rem, 3.6vw, 3.2rem); margin: 10px 0 6px; }
.tour .stop > p { color: var(--muted); }
.tour .cue { margin-top: 14px; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.tour .cue::after { content: " \2193"; }
.tour .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.tour .actions a { padding: .8rem 1.3rem; font-size: .9rem; }

.tour .stop.intro { width: min(560px, 44vw); }
.tour .stop.intro .eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.tour .stop.intro h1 { font-size: clamp(3.2rem, 6.4vw, 6rem); margin: 10px 0 12px; animation: none; }
.tour .stop.intro p { font-size: 1.05rem; }

.tour .rail { position: absolute; z-index: 2; right: 3vw; top: 50%; transform: translateY(-50%);
  display: grid; gap: 10px; list-style: none; padding: 0; transition: opacity .3s var(--ease-out); }
.tour .rail button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  box-sizing: border-box; width: 100%; min-width: 44px; min-height: 44px; font-size: .75rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--white); text-shadow: 0 1px 6px rgba(8,18,31,.7); }
.tour .rail button::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--white); opacity: .85;
  box-shadow: 0 0 0 2px rgba(8,18,31,.8), 0 1px 6px rgba(8,18,31,.5); transition: transform .2s var(--ease-out), opacity .2s; }   /* reads on the white hull */
.tour .rail button[aria-current="step"]::after { opacity: 1; transform: scale(1.4); background: var(--accent); }
.tour .rail button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tour .rail span { opacity: 0; transition: opacity .2s; }
.tour .rail button:hover span, .tour .rail button:focus-visible span { opacity: 1; }
.tour.at-intro .rail { opacity: 0; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* portrait: picture on top, card underneath */
/* portrait phones (template layout, chapters-engine 2026-10-31.4): the picture fills the top 70% under the header
   and fades into navy; the card is a glass sheet over the bottom (the engine's fit() trims offers to stay under 40%) */
@media (max-aspect-ratio: 4/5) {
  .tour .stage canvas { top: var(--art-top, 0px); height: calc(100% - var(--art-top, 0px)); }
  .tour.tight .offer:nth-child(n+3), .tour.tight .cue, .tour.tighter .offer p { display: none; }
  .tour .stage::after { background: linear-gradient(180deg, transparent calc(var(--art-end, 70%) - 140px),
    rgba(8,18,31,.85) calc(var(--art-end, 70%) - 20px), var(--bg) var(--art-end, 70%)); }
  .tour .stop { left: 12px; right: 12px; width: auto; top: auto; bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateY(28px); padding: 16px 18px; background: rgba(13,28,48,.78);
    backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); }
  .tour .stop.on { transform: translateY(calc((1 - var(--fade, 1)) * -18px)); }
  .tour .stop.intro { width: auto; }
  .tour .stop h2 { font-size: 2rem; }
  .tour .stop.intro h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .tour .rail { right: 4px; top: calc(var(--art-top, 0px) + 8px); transform: none; gap: 0; }
  .tour .rail button { width: auto; min-width: 44px; min-height: 44px; justify-content: center; }
  .tour .rail span { display: none; }
}

/* reduced motion: no pin, each stop shows its settled picture(s) above the card */
.tour.still { height: auto; }
.tour.still .stage { position: static; height: auto; overflow: visible; display: grid; gap: 48px; padding: 110px 24px 48px; }
.tour.still canvas, .tour.still .stage::after, .tour.still .rail { display: none; }
.tour.still .offer { opacity: 1; transform: none; }
.tour.still .cue { display: none; }
.tour.still .stop { position: static; opacity: 1; visibility: visible; transform: none; width: auto; max-width: 720px; margin: 0 auto; pointer-events: auto; }
.tour.still .stop img { display: block; width: 100%; height: auto; border-radius: 10px; margin-bottom: 12px; }
