:root {
  color-scheme: light;

  --bg: #E8ECEA;
  --bg-alt: #DCE2DF;
  --ink: #0F1D2A;
  --muted: #3C4B57;
  --rule: #0F1D2A;
  --rule-strong: #0F1D2A;
  --door-border: #0F1D2A;
  --accent: #E4572E;
  --on-accent: #0F1D2A;
  --on-photo: #E8ECEA;
  --photo-fallback: #0F1D2A;
  --door-eyebrow: #E8ECEA;
  --door-eyebrow-weight: 400;
  --grade: saturate(.7) contrast(1.06);

  --scrim-door: linear-gradient(to top, rgba(15, 29, 42, .92) 0%, rgba(15, 29, 42, .45) 38%, rgba(15, 29, 42, 0) 62%);
  --scrim-band: linear-gradient(to top, rgba(15, 29, 42, .92) 0%, rgba(15, 29, 42, .66) 50%, rgba(15, 29, 42, .3) 100%);
  --scrim-book: linear-gradient(to bottom, rgba(15, 29, 42, .84) 0%, rgba(15, 29, 42, .78) 50%, rgba(15, 29, 42, .22) 56%, rgba(15, 29, 42, .88) 66%, rgba(15, 29, 42, .92) 100%);
  --scrim-book-m: linear-gradient(to bottom, rgba(15, 29, 42, .84) 0%, rgba(15, 29, 42, .78) 50%, rgba(15, 29, 42, .26) 56%, rgba(15, 29, 42, .88) 64%, rgba(15, 29, 42, .92) 100%);

  --card-shadow: 0 -28px 56px rgba(15, 29, 42, .22);
  --card-shadow-m: 0 -20px 40px rgba(15, 29, 42, .22);
  --section-edge: transparent;

  --intro: var(--ink);
  --gauge: var(--ink);
  --card-time: var(--ink);
  --card-line: var(--ink);
  --card-eyebrow-m: var(--muted);
  --guide-tour: var(--muted);
  --btn-hover-bg: #E8ECEA;

  --row-go-bg: var(--accent);
  --row-go-fg: var(--on-accent);
  --row-hover-bg: var(--ink);
  --row-hover-fg: var(--bg);
  --row-hover-go-bg: var(--accent);
  --row-hover-go-fg: var(--on-accent);

  --tab-top: #F79A45;           /* Book button: sunlit orange at the top… */
  --tab-bottom: var(--accent);  /* …into the brand orange */
  --tab-fg: var(--on-accent);
  --tab-lip: #B03E1C;           /* the pressable edge under the button */
  --tab-glow: rgba(228, 87, 46, .38);
  --bar-bg: var(--ink);
  --bar-fg: var(--bg);
  --bar-stripe: 6px solid var(--accent);
  --bar-weight: 400;

  --ease-tide: cubic-bezier(.65, 0, .35, 1);
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);

  /* Day plate (see DECISIONS.md: sun hues and sea colours are a recorded exception) */
  --sun-dawn: #F2B84B;
  --sun-morning: #F08A2E;
  --sun-noon: var(--accent);
  --sun-dusk: #C7352B;
  --sun-ball: #F08A2E;          /* the volleyball sun: one colour through the whole day */
  --plate-sea: #1E93A8;
  --wave-sea: #1E93A8;
  --wave-deep: #13667A;
  --wave-crest: #5DB8C8;
  --wave-foam: #F4F7F6;
  --plate-on-sea: #0F1D2A;
  --sun-rim: var(--ink);
  --seam: rgba(15, 29, 42, .85);

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: max(clamp(24px, 5.56vw, 80px), calc((100% - 1280px) / 2));
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0B1620;
  --bg-alt: #112231;
  --ink: #E6ECEA;
  --muted: #93A4AE;
  --rule: rgba(230, 236, 234, .20);
  --rule-strong: rgba(230, 236, 234, .35);
  --door-border: rgba(230, 236, 234, .28);
  --accent: #F0643A;
  --on-accent: #0B1620;
  --on-photo: #E6ECEA;
  --photo-fallback: #0B1620;
  --door-eyebrow: #F4F7F6;
  --door-eyebrow-weight: 700;
  --grade: saturate(.6) contrast(1.1) brightness(.9);

  --scrim-door: linear-gradient(to top, rgba(11, 22, 32, .95) 0%, rgba(11, 22, 32, .5) 38%, rgba(11, 22, 32, .05) 62%);
  --scrim-band: linear-gradient(to top, rgba(11, 22, 32, .95) 0%, rgba(11, 22, 32, .7) 50%, rgba(11, 22, 32, .34) 100%);
  --scrim-book: linear-gradient(to bottom, rgba(11, 22, 32, .86) 0%, rgba(11, 22, 32, .8) 50%, rgba(11, 22, 32, .26) 56%, rgba(11, 22, 32, .92) 66%, rgba(11, 22, 32, .95) 100%);
  --scrim-book-m: linear-gradient(to bottom, rgba(11, 22, 32, .88) 0%, rgba(11, 22, 32, .8) 50%, rgba(11, 22, 32, .3) 56%, rgba(11, 22, 32, .92) 64%, rgba(11, 22, 32, .95) 100%);

  --card-shadow: 0 -28px 56px rgba(0, 0, 0, .5);
  --card-shadow-m: 0 -20px 40px rgba(0, 0, 0, .5);
  --section-edge: rgba(230, 236, 234, .20);

  --intro: var(--muted);
  --gauge: rgba(230, 236, 234, .5);
  --card-time: var(--accent);
  --card-line: var(--muted);
  --card-eyebrow-m: var(--accent);
  --guide-tour: var(--accent);
  --btn-hover-bg: #E6ECEA;

  --row-go-bg: var(--accent);
  --row-go-fg: var(--on-accent);
  --row-hover-bg: var(--accent);
  --row-hover-fg: var(--on-accent);
  --row-hover-go-bg: var(--on-accent);
  --row-hover-go-fg: var(--accent);

  --tab-top: #FFA15E;
  --tab-bottom: var(--accent);
  --tab-fg: var(--on-accent);
  --tab-lip: #A83F22;
  --tab-glow: rgba(240, 100, 58, .45);
  --bar-bg: var(--accent);
  --bar-fg: var(--on-accent);
  --bar-stripe: 0 solid transparent;
  --bar-weight: 500;

  --plate-sea: #04141B;
  --wave-sea: #1A7F93;
  --wave-deep: #0E4F5E;
  --wave-crest: #3FA2B4;
  --wave-foam: #E6ECEA;
  --plate-on-sea: #C8FFF2;
  --sun-rim: #C8FFF2;
  --seam: rgba(200, 255, 242, .9);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p, figure, blockquote, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

a { color: inherit; }
a, button { touch-action: manipulation; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  text-transform: none;
  letter-spacing: normal;
}

.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus-visible { transform: none; }

@media (width <= 860px) { .d-only { display: none !important; } }
@media (width > 860px) { .m-only { display: none !important; } }

.display {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: .86;
  word-spacing: .12em;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--grade);
}

.rule-top { position: relative; }
.rule-top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--rule);
  transform-origin: left center;
}
.rule-top--strong::before { background: var(--rule-strong); }

/* Button icons: stroked SVGs in currentColor, one set per section (see ICONS in main.js).
   On hover each one acts out its meaning; on press it tucks in. */
.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 80%;
  transition: transform .24s var(--ease-out);
}
a:active .ico { transform: translateY(1px) scale(.92); transition-duration: .08s; }
@media (hover: hover) and (pointer: fine) {
  a:hover:not(:active) .ico--wave { transform: rotate(-10deg) translateX(1px); }    /* the wave leans in */
  a:hover:not(:active) .ico--sunrise { transform: translateY(-2px); }                /* the sun lifts */
  a:hover:not(:active) .ico--board { transform: rotate(-14deg); }                   /* the board tips into the wave */
  a:hover:not(:active) .ico--cliff { transform: translateX(2px); }                  /* a step along the edge */
  a:hover:not(:active) .ico--dawn,
  a:hover:not(:active) .ico--morning,
  a:hover:not(:active) .ico--noon { transform: translateY(-2px); }                  /* the sun climbs */
  a:hover:not(:active) .ico--sunset { transform: translateY(2px); }                 /* sinks, and points down to #book */
  a:hover:not(:active) .ico--ticket { transform: rotate(-8deg) translateX(2px); }   /* the ticket slides out */
}
@media (prefers-reduced-motion: reduce) {
  .ico { transition: none; }
  a:hover .ico, a:active .ico { transform: none !important; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 14px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s var(--ease-tide), color .25s var(--ease-tide), transform .15s var(--ease-tide);
}
@media (hover: hover) {
  .btn:hover { background: var(--btn-hover-bg); color: var(--on-accent); }
}
.btn:active { transform: translateY(1px); }

.wordmark {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: .78;
  color: var(--ink);
}
.wordmark__mask {
  display: block;
  overflow: hidden;
  padding-block: .08em;
  margin-block: -.08em;
}
.wordmark__text { display: inline-block; }

/* Hero */

.hero {
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 56px;
  gap: 18px;
}

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.wordmark--hero { font-size: clamp(104px, 12.22vw, 176px); }

/* Surf strip (between wordmark and intro) */
.hero__top--surf { gap: 0; }
.surf {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  margin: 0 28px;
  pointer-events: none;
}
.surf__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.surf__line { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.surf__board { fill: var(--accent); }
.surf__rider { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.surf__ink { fill: var(--ink); }
.surf__wake { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* The big wave that washes the hero surfer down the screen (built by playWave() in main.js) */
.surf-wave { position: fixed; inset: 0; z-index: 120; pointer-events: none; overflow: hidden; }
.surf-wave svg { display: block; width: 100%; height: 100%; }
.surf-wave__deep { fill: var(--wave-deep); }
.surf-wave__body { fill: var(--wave-sea); }
.surf-wave__crest { fill: var(--wave-crest); }
.surf-wave__foam { fill: none; stroke: var(--wave-foam); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.surf-wave__spray { fill: var(--wave-foam); }
.surf-wave__burst { fill: #F4F7F6; stroke: #0F1D2A; stroke-width: 2; stroke-linejoin: round; }
.surf-wave__yell {
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  font-weight: 900;
  font-stretch: 62%;
  letter-spacing: .01em;
  fill: var(--accent);
  stroke: #0F1D2A;
  stroke-width: .75;
  paint-order: stroke;
}

/* Footer strip (above the place line) */
.surf--footer { flex: none; align-self: flex-end; width: 340px; height: 88px; margin: 0; }

/* Mid widths: the gap is too narrow, so the strip becomes a band under the row */
@media (861px <= width < 1180px) {
  .hero__top--surf { position: relative; gap: 40px; padding-bottom: 84px; }
  .hero .surf { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; margin: 0; }
}

.hero__intro {
  max-width: 360px;
  margin-bottom: 4px;
  text-align: right;
  font-size: 19px;
  line-height: 1.4;
  color: var(--intro);
  text-wrap: pretty;
}

/* Scroll cue: three chevrons light up orange top to bottom, a flash travelling down the page */
.scroll-cue {
  position: relative;
  justify-self: center;
  align-self: center;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--ink);
}
.scroll-cue__svg { width: 26px; height: 37px; overflow: visible; }
.scroll-cue__chev {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  opacity: .55;
}
/* Once scrolled past or tapped, the cue fades out for the rest of the visit */
.scroll-cue.is-eaten {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.scroll-cue__chev:first-child { opacity: 1; stroke: var(--accent); }
@media (hover: hover) {
  .scroll-cue:hover .scroll-cue__chev { opacity: 1; }
}

/* Shown only if the scripts fail; main.js replaces it */
.fallback-tours {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  width: 100%;
  font: 500 15px/1.3 var(--font-mono);
}
.fallback-tours a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  text-decoration: none;
}

/* Tour doors / bands */

.doors {
  display: flex;
  gap: 10px;
  min-height: 0;
}

.door {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--door-border);
  background: var(--photo-fallback);
  color: var(--on-photo);
  transition: flex-grow .7s var(--ease-tide);
}
.doors.has-active .door { flex-grow: .7; }
.doors.has-active .door.is-active { flex-grow: 2.2; }

.door__media { position: absolute; inset: 0; }
.door__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-door);
}

.door__label {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.door__heading { font: inherit; }

.door__toggle {
  appearance: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}
.door__toggle:focus-visible { outline-offset: 6px; }

.door__titles { display: block; min-width: 0; }

.door__eyebrow {
  display: block;
  color: var(--door-eyebrow);
  font-weight: var(--door-eyebrow-weight);
}

.door__title {
  display: block;
  margin-top: 8px;
  font-size: clamp(44px, 4.72vw, 68px);
  line-height: .88;
}

.door__plus { display: none; }

.door__details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: opacity .45s var(--ease-tide), grid-template-rows .7s var(--ease-tide);
}
.door__details-inner { min-height: 0; overflow: hidden; }
.door.is-active .door__details {
  grid-template-rows: 1fr;
  opacity: 1;
}

.door__desc {
  margin-top: 16px;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.45;
  text-wrap: pretty;
}

.door__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 16px 0 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

@media (hover: none) {
  .door__toggle { cursor: pointer; }
}

/* Day intro + tide curve */

.day-intro {
  min-height: 480px;
  padding: 88px var(--gutter) 0;
}

.day-intro__title {
  font-size: clamp(72px, 7.78vw, 112px);
}

.tide {
  position: relative;
  height: 150px;
  margin-top: 34px;
}

.tide__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tide__mid {
  stroke: var(--ink);
  stroke-opacity: .25;
  stroke-width: 1;
  stroke-dasharray: 2 6;
  vector-effect: non-scaling-stroke;
}

.tide__curve {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.tide__dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
}

.tide__label {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .125em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

.tide__times {
  position: relative;
  height: 1.4em;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tide__times span {
  position: absolute;
  left: var(--x);
  transform: translateX(calc(var(--x) * -1));
}

/* Day plate: replaces the static tide when JS runs (initDayPlate in main.js).
   Sky register, sea register (looping caustics video under the tide line), hour axis.
   The sun is a volleyball that travels to each moment; light mode = Prism pool water and a
   sun with RGB fringes, dark mode = Abyss water and a glowing sun with plankton sparks. */

.js .nojs-only { display: none !important; }
html:not(.js) .js-only { display: none !important; }

.day-intro:has(.plate) { padding-bottom: 32px; }

/* Desktop: the section becomes a scroll track and the chart pins to the screen while the
   scroll moves the sun from 06:30 to 19:30 (main.js: fromScroll). Short or touch screens scroll normally. */
@media (min-width: 861px) and (min-height: 640px) and (hover: hover) and (pointer: fine) {
  .js .day-intro {
    --day-track: 180vh;
    height: calc(100vh + var(--day-track));
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  .js .day-intro__pin {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px 0 24px;
  }
}

.plate {
  --sky: 112px;
  --sea: 150px;
  --axis: 24px;
  --halo: var(--sun-ball);
  position: relative;
  height: calc(var(--sky) + var(--sea) + var(--axis));
  margin-top: 28px;
  touch-action: manipulation;
}
.plate__svg {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.plate__sea,
.plate__video {
  position: absolute;
  left: 0;
  top: var(--sky);
  width: 100%;
  height: var(--sea);
  pointer-events: none;
}
.plate__sea { background: var(--plate-sea); }
.plate__video { object-fit: cover; transition: opacity 150ms ease; }
.plate__video.is-swapping { opacity: 0; }

.sky-path {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: .35;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 0 7;
  transition: opacity 200ms var(--ease-out);
}
/* The trail belongs to the ball: hidden with it, faded out as it sets */
.plate:not(.sun-on) .sky-path,
.plate.sun-setting .sky-path { opacity: 0; transition: opacity 150ms var(--ease-out); }
.axis__rule, .axis__tick { stroke: var(--ink); stroke-width: 1; }
.axis__tick--minor { stroke-opacity: .45; }
.water__line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.readout {
  font: 500 11px var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.plate.is-paused .flow,
.plate.is-off .flow,
.plate:not(.sun-on) .sun .flow { animation-play-state: paused; }

/* The sun: four moment shapes and hues */
.sun__disc {
  fill: var(--sun-ball);
  stroke: var(--sun-rim);
  stroke-width: 1.25;
  transition: fill 380ms ease;
}
.sun__band { fill: var(--bg); opacity: 0; transition: opacity 300ms ease; }
.sun__ray {
  stroke: var(--sun-ball);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 0 50%;
  transform: scaleX(.3);
  transition:
    opacity 300ms ease calc(var(--i) * 15ms),
    transform 380ms var(--ease-in-out) calc(var(--i) * 15ms),
    stroke 380ms ease;
}
.sun__glyph {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 380ms var(--ease-in-out), filter 160ms ease;
}

.plate[data-sun="dawn"] .sun__glyph { transform: scale(1.5); }
.plate[data-sun="dawn"] .sun__band { opacity: 1; }
.plate[data-sun="morning"] .sun__ray:nth-of-type(even) { opacity: 1; transform: scaleX(.55); }
.plate[data-sun="noon"] .sun__glyph { transform: scale(.92); }
.plate[data-sun="noon"] .sun__ray { opacity: 1; transform: scaleX(.55); }
.plate[data-sun="noon"] .sun__ray:nth-of-type(even) { transform: scaleX(1); }
.plate[data-sun="dusk"] .sun__glyph { transform: scale(1.6, 1.15); }

/* Volleyball seams, slowly spinning */
.sun__ball path {
  fill: none;
  stroke: var(--seam);
  stroke-width: 1.1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.sun__seams {
  transform-box: fill-box;
  transform-origin: center;
  animation: plate-spin 10s linear infinite;
}
@keyframes plate-spin { to { transform: rotate(360deg); } }

/* Light (Prism pool): cyan / magenta fringes drift apart and back behind the disc */
.sun__halo, .sun__sparks { display: none; }
.sun__fringe--a { fill: #1FB8D0; transform: translate(-1.7px, -.9px); animation: plate-disperse-a 3s ease-in-out infinite alternate; }
.sun__fringe--b { fill: #E0407A; transform: translate(1.7px, .9px); animation: plate-disperse-b 3s ease-in-out infinite alternate; }
@keyframes plate-disperse-a { from { transform: translate(-.9px, -.5px); } to { transform: translate(-2.5px, -1.3px); } }
@keyframes plate-disperse-b { from { transform: translate(.9px, .5px); } to { transform: translate(2.5px, 1.3px); } }

/* Dark (Abyss): halo pulses on the water's 4s beat, plankton sparks twinkle */
:root[data-theme="dark"] .sun__fringe { display: none; }
:root[data-theme="dark"] .sun__halo,
:root[data-theme="dark"] .sun__sparks { display: inline; }
.halo-stop { stop-color: var(--halo); }
.halo-stop--0 { stop-opacity: .6; }
.halo-stop--1 { stop-opacity: .22; }
.halo-stop--2 { stop-opacity: 0; }
.sun__halo {
  fill: url(#plate-halo-grad);
  transform-box: fill-box;
  transform-origin: center;
  animation: plate-glow 2s ease-in-out infinite alternate;
}
@keyframes plate-glow {
  from { opacity: .5; transform: scale(.86); }
  to { opacity: 1; transform: scale(1.06); }
}
.sun__sparks circle { fill: #C8FFF2; opacity: .7; animation: plate-twinkle 2.6s ease-in-out infinite; }
.sun__sparks circle:nth-child(2) { animation-duration: 3.3s; animation-delay: -1.1s; }
.sun__sparks circle:nth-child(3) { animation-duration: 2.1s; animation-delay: -.6s; }
@keyframes plate-twinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Morph: a light blur while the glyph changes; first appearance skips the morph */
.plate.is-morphing .sun__glyph { filter: blur(1.5px); }
.plate.sun-instant .sun__glyph,
.plate.sun-instant .sun__disc,
.plate.sun-instant .sun__ray,
.plate.sun-instant .sun__band { transition: none; }

/* Appear 200ms, disappear 150ms. 06:30 rises out of the sea (500ms); the phone loop sinks it again. */
.sun__body {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.readout {
  opacity: 0;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.plate.sun-on .sun__body {
  opacity: 1;
  transform: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.plate.sun-on .readout { opacity: 1; transition: opacity 200ms var(--ease-out); }
.plate.sun-on.sun-setting .readout { opacity: 0; transition: opacity 150ms var(--ease-out); }
/* Once the ball dives under the water its time label goes with it */
.plate.sun-on.is-under .readout--sky { opacity: 0; transition: opacity 150ms var(--ease-out); }
.plate.sun-rise .sun__body { transform: translateY(var(--rise, 20px)); transition: none; }
.plate.sun-on.sun-setting .sun__body {
  opacity: 0;
  transform: translateY(var(--rise, 20px));
  transition: opacity 350ms ease 150ms, transform 500ms var(--ease-in-out);
}
.plate.sun-on.sun-rising .sun__body { transition: opacity 200ms var(--ease-out), transform 500ms var(--ease-out); }

/* Stations: the four moments as buttons under the axis */
.stations {
  position: relative;
  height: 72px;
  margin-top: 4px;
}
.station {
  position: absolute;
  top: 0;
  left: calc(var(--x) * 1%);
  transform: translateX(calc(var(--x) * -1%));
  appearance: none;
  display: grid;
  gap: 0;
  min-height: 44px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.station:active { transform: translateX(calc(var(--x) * -1%)) scale(.97); }
.station__time {
  font: 500 12px/1.2 var(--font-mono);
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.station__rule {
  height: 3px;
  margin: 9px 0 10px;
  border-radius: 2px;
  background: transparent;
  transition: background-color 150ms ease;
}
.station__name {
  font: 12px/1.2 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 150ms ease;
}
.station.is-active .station__rule { background: var(--accent); }
.station.is-active .station__name { color: var(--ink); }

.plate-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}
.plate-hint {
  margin: 0;
  font: 12px/1.4 var(--font-mono);
  color: var(--muted);
}
.flow-toggle {
  appearance: none;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: 12px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: transform 160ms var(--ease-out);
}
.flow-toggle:active { transform: scale(.97); }
.plate-hint--coarse { display: none; }
@media (hover: none), (width <= 860px) {
  .plate-hint--fine { display: none; }
  .plate-hint--coarse { display: inline; }
}
@media (hover: hover) and (pointer: fine) {
  .plate { cursor: crosshair; }
}

@media (width <= 860px) {
  .plate { --sky: 76px; --sea: 84px; --axis: 20px; margin-top: 20px; }
  .station__name { display: none; }
  .station__rule { margin-bottom: 0; }
  .station { padding: 6px 2px; min-width: 44px; }
  .stations { height: 48px; }
  .readout { font-size: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Reveal: the waterline draws itself once; stations fade in 120ms apart */
  .water__line {
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.6s var(--ease-soft);
  }
  .plate.is-in .water__line { stroke-dashoffset: 0; }
  .plate__sea, .plate__video, .axis {
    opacity: 0;
    transition: opacity 1s var(--ease-soft) .4s;
  }
  .station { opacity: 0; }
  .station { transition: opacity .6s var(--ease-soft) calc(.35s + var(--i) * 120ms), transform 160ms var(--ease-out) 0s; }
  .plate.is-in .plate__sea,
  .plate.is-in .plate__video,
  .plate.is-in .axis,
  .plate.is-in ~ .stations .station { opacity: 1; }
  .plate.is-in .plate__video { transition: opacity 300ms ease; }
  .plate.is-in .plate__video.is-swapping { opacity: 0; transition-duration: 150ms; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-toggle { visibility: hidden; }
  .plate.is-morphing .sun__glyph { filter: none; }
}

/* Day cards */

/* flow-root keeps the last card's dwell margin inside the stack */
.day-stack { position: relative; display: flow-root; }

/* Each card holds fully in view for --card-dwell of scroll before the next one slides over it */
.card {
  --card-dwell: 70vh;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  margin-bottom: var(--card-dwell);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  border-top: 1px solid var(--section-edge);
  box-shadow: var(--card-shadow);
}
.card:nth-child(even) { background: var(--bg-alt); }
.card:last-child { margin-bottom: 0; }   /* nothing slides over the last card, so no pause gap after it */
.card:nth-child(even) .card__media { order: 2; }

.card__media {
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.card__media .photo {
  position: absolute;
  inset: 0;
}

.card__text {
  min-width: 0;
  min-height: 0;
  padding: clamp(24px, 5.3vh, 48px) clamp(32px, 5vw, 72px) clamp(32px, 8vh, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.card__num {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(160px, min(22.2vw, 35.5vh), 320px);
  line-height: .78;
  letter-spacing: 0;
  color: color-mix(in srgb, var(--ink) 14%, transparent);
}

.card__time {
  margin-top: 44px;          /* clears the fixed theme switch and Book button */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  color: var(--card-time);
}
.card__clock {
  position: relative;
  font: 700 clamp(28px, 2.6vw, 36px)/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.card__colon { color: var(--accent); }
.card__clock::after {           /* light line that sweeps under the time on arrival */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  opacity: 0;
}
.card__clock-label {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.gauge {
  position: relative;
  height: 1px;
  margin-bottom: 36px;
}
.gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gauge);
  transform-origin: left center;
}
.gauge i {
  position: absolute;
  left: var(--tick, 0%);
  top: -6px;
  width: 2px;
  height: 13px;
  background: var(--accent);
}

.card__eyebrow { color: var(--muted); }

.card__title {
  margin: 14px 0 18px;
  font-size: clamp(56px, min(6.67vw, 10.7vh), 96px);
}

.card__line {
  max-width: 34ch;
  font-size: 20px;
  line-height: 1.5;
  color: var(--card-line);
  text-wrap: pretty;
}

.card__book {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  min-height: 44px;
  margin-top: 28px;
  border: 1px solid var(--rule-strong);
  font: 500 13px/1.2 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.card__book-text {
  display: block;
  align-self: center;
  min-width: 0;
  padding: 8px 16px;
}
.card__book-go {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--on-accent);
  white-space: nowrap;
  transition: background-color .25s var(--ease-tide);
}
@media (hover: hover) {
  .card__book:hover .card__book-go { background: var(--ink); color: var(--bg); }
}
.card__book:active { transform: translateY(1px); }

/* People */

.people {
  position: relative;
  padding: 96px var(--gutter) 104px;
  background: var(--bg);
  border-top: 1px solid var(--section-edge);
}

.people__title { font-size: clamp(64px, 7.22vw, 104px); margin-bottom: 40px; }

.note {
  margin: 16px 0 36px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--muted);
}

.guides {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 48px;
}

.guide {
  position: relative;
  min-width: 0;
  padding-top: 28px;
}
.guide + .guide::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -24px;
  width: 1px;
  background: var(--rule);
}

.guide__media {
  aspect-ratio: 1;
  overflow: hidden;
}

.guide__name {
  margin-top: 18px;
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: .9;
}

.guide__tour {
  margin-top: 8px;
  color: var(--guide-tour);
}

.guide__quote {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-strong);
}
.guide__quote p {
  font-size: 17px;
  line-height: 1.5;
  text-wrap: pretty;
}

.guide__guest {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.swipe-hint {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Book */

.book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 760px;
}

.book__panel {
  position: relative;
  overflow: hidden;
  background: var(--photo-fallback);
  color: var(--on-photo);
}

.book__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.book__media .photo {
  position: absolute;
  inset: 0;
}
.book__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-book);
}

.book__content {
  position: relative;
  height: 100%;
  padding: 72px clamp(32px, 5.56vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}

.book__title {
  font-weight: 900;
  font-size: clamp(104px, 13.9vw, 200px);
  line-height: .8;
}

.book__line {
  max-width: 30ch;
  font-size: 20px;
  line-height: 1.5;
  text-wrap: pretty;
}

.book__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.book__ask { padding: 10px 0; opacity: .85; }
.book__links a {
  display: inline-block;
  padding: 10px 0;
  color: var(--on-photo);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
@media (hover: hover) {
  .book__links a:hover { text-decoration-thickness: 2px; }
}

.book__side {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-left: 1px solid var(--rule);
}

.book__rows {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.know {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  margin: 0;
  padding: 28px 48px 32px;
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
}
.know dt {
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.know dd {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.45;
  text-wrap: pretty;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(min-content, 1.5fr) .7fr 1fr 1.1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 48px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color .3s var(--ease-tide), color .3s var(--ease-tide);
}
.row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--rule);
  transform-origin: left center;
}
.row:first-child::before { display: none; }
.row:focus-visible { outline-offset: -3px; }

.row__name { display: block; min-width: 0; }
.row__eyebrow { display: block; font-size: 11px; }

.row__title {
  display: block;
  margin-top: 6px;
  font-size: clamp(34px, 3.61vw, 52px);
  line-height: .9;
}

.row__level {
  display: block;
  margin-top: 8px;
  font: 12px/1.4 var(--font-mono);
  color: var(--muted);
}
@media (hover: hover) {
  .row:hover .row__level { color: inherit; }
}

.row__cell,
.row__meta {
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.row__cell > span,
.row__meta > span { white-space: nowrap; }

.row__go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 18px;
  background: var(--row-go-bg);
  color: var(--row-go-fg);
  font: 500 14px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .3s var(--ease-tide), color .3s var(--ease-tide);
}

@media (hover: hover) {
  .row:hover { background: var(--row-hover-bg); color: var(--row-hover-fg); }
  .row:hover .row__go { background: var(--row-hover-go-bg); color: var(--row-hover-go-fg); }
}

/* Footer */

.footer {
  min-height: 240px;
  padding: 48px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.wordmark--footer { font-size: clamp(88px, 8.33vw, 120px); }

.footer__links {
  display: flex;
  gap: 8px;
}
.footer__links a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transition: transform .16s var(--ease-out);
}
.footer__links a:active { transform: scale(.94); }
.footer__icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s ease;
}
.footer__icon-dot { fill: var(--muted); stroke: none; transition: fill .2s ease; }
@media (hover: hover) {
  .footer__links a:hover .footer__icon { stroke: var(--ink); }
  .footer__links a:hover .footer__icon-dot { fill: var(--ink); }
}

.footer__end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  text-align: right;
}

.footer__place {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--muted);
}

/* Theme switch (follows the scroll; ring = scroll progress) */

.theme-fab {
  position: fixed;
  z-index: 60;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s var(--ease-out);
}
.theme-fab:active { transform: scale(.94); }
.theme-fab--hero { display: none; }
.theme-fab:focus-visible { outline-offset: 3px; }

.theme-fab__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.theme-fab__track { fill: none; stroke: var(--ink); stroke-width: 1; }
.theme-fab__progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.theme-fab__icon {
  width: 24px;
  height: 24px;
  overflow: visible;
}
.theme-fab__core,
.theme-fab__cut,
.theme-fab__rays {
  transform-box: view-box;
  transform-origin: 12px 12px;
}
.theme-fab__core {
  fill: var(--ink);
  transform: scale(.6);
  transition: transform .45s var(--ease-out);
}
.theme-fab__cut {
  transition: transform .45s var(--ease-out);
}
.theme-fab__rays {
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  transition: transform .45s var(--ease-out), opacity .25s ease;
}

:root[data-theme="dark"] .theme-fab__core { transform: scale(1); }
:root[data-theme="dark"] .theme-fab__cut { transform: translate(-7px, 4px); }
:root[data-theme="dark"] .theme-fab__rays { transform: rotate(-90deg) scale(.5); opacity: 0; }

@media (hover: hover) and (pointer: fine) {
  .theme-fab:hover .theme-fab__rays { transform: rotate(22.5deg); }
  :root[data-theme="dark"] .theme-fab:hover .theme-fab__cut { transform: translate(-6px, 3px); }
}

/* Theme swap: circular reveal from the button (View Transitions) */
.is-theme-swap *,
.is-theme-swap *::before,
.is-theme-swap *::after { transition: none !important; }
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .theme-fab__core, .theme-fab__cut, .theme-fab__rays { transition: opacity .2s ease; }
  :root[data-theme="dark"] .theme-fab__rays { transform: none; }
}

/* Persistent book controls */

/* Desktop Book button: top right, beside the theme switch. When it arrives the switch slides
   left first, then the button unrolls into the corner; leaving reverses the order.
   It reads as a physical key: an orange gradient on a darker 4px lip, lifting a hair on hover
   and sinking onto the lip on press. 56px tall, centred on the 48px theme switch. */
.book-tab {
  position: fixed;
  z-index: 50;
  top: 12px;
  right: 16px;
  width: 116px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--tab-top), var(--tab-bottom) 70%);
  color: var(--tab-fg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    0 4px 0 var(--tab-lip),
    0 10px 22px -6px var(--tab-glow);
  font: 600 13px/1 var(--font-mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  /* negative insets keep the lip and glow outside the clip while shown */
  clip-path: inset(-24px -24px -24px -24px);
  transition:
    clip-path .5s var(--ease-tide) .16s,
    transform .16s var(--ease-out),
    box-shadow .16s var(--ease-out),
    filter .2s ease,
    visibility 0s;
}
.book-tab .ico { width: 20px; height: 20px; stroke-width: 2.2; }
.book-tab:focus-visible { outline-offset: 6px; outline-color: var(--ink); }
.book-tab:active {
  transform: translateY(3px) scale(.98);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, .18),
    0 1px 0 var(--tab-lip),
    0 4px 10px -4px var(--tab-glow);
  filter: brightness(.96);
  transition-duration: .08s;
}
.book-tab[data-hidden] {
  visibility: hidden;
  pointer-events: none;
  clip-path: inset(-24px -24px -24px calc(100% + 24px));
  transition: clip-path .35s var(--ease-tide), visibility 0s linear .35s;
}
@media (hover: hover) and (pointer: fine) {
  .book-tab:hover:not(:active) {
    transform: translateY(-1px);
    filter: brightness(1.06) saturate(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .5),
      0 5px 0 var(--tab-lip),
      0 14px 28px -6px var(--tab-glow);
  }
}
@media (width > 860px) {
  .theme-fab--float { transition: transform .16s var(--ease-out), translate .5s var(--ease-tide) .22s; }
  .theme-fab--float[data-shifted] {
    translate: -128px 0;
    transition: transform .16s var(--ease-out), translate .5s var(--ease-tide);
  }
}
@media (prefers-reduced-motion: reduce) {
  .book-tab, .book-tab[data-hidden],
  .theme-fab--float, .theme-fab--float[data-shifted] { transition: none; }
  .book-tab:active { transform: none; }
}

.book-bar { display: none; }

/* Phone */

@media (width <= 860px) {
  body { font-size: 15px; }

  .eyebrow { font-size: 11px; }

  .btn { font-size: 13px; padding: 0 22px; gap: 10px; }

  .hero {
    min-height: 560px;
    padding: 14px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .hero__top {
    display: block;
    padding: 4px;
  }
  .hero .surf { display: block; height: 96px; margin: 6px 0 0; }
  .surf--footer { align-self: stretch; width: 100%; height: 80px; }
  .wordmark--hero { font-size: min(92px, calc((100vw - 32px) / 4.3)); line-height: .8; }
  .hero__intro {
    max-width: 30ch;
    margin: 12px 0 0;
    text-align: left;
    font-size: 15px;
  }
  .scroll-cue { flex: none; align-self: center; }

  .doors {
    flex: 1;
    flex-direction: column;
    gap: 6px;
  }
  .door { transition-duration: .6s; }
  .doors.has-active .door { flex-grow: .42; }
  .doors.has-active .door.is-active { flex-grow: 2.6; }

  .door__media::after { background: var(--scrim-band); }

  .door__label {
    left: 14px;
    right: 14px;
    bottom: 12px;
  }
  .door__toggle {
    min-height: 48px;
    cursor: pointer;
  }
  .door__title {
    margin-top: 6px;
    font-size: 40px;
    line-height: .9;
  }
  .doors.has-active .door:not(.is-active) .door__eyebrow { display: none; }
  .doors.has-active .door:not(.is-active) .door__title { margin-top: 0; }

  .door__plus {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid color-mix(in srgb, var(--on-photo) 60%, transparent);
    font: 400 26px/1 var(--font-mono);
  }
  .door__plus > span {
    display: block;
    transition: transform .45s var(--ease-tide);
  }
  .door.is-active .door__plus > span { transform: rotate(45deg); }

  .door__details {
    visibility: hidden;
    transition: opacity .45s var(--ease-tide), grid-template-rows .6s var(--ease-tide), visibility 0s linear .6s;
  }
  .door.is-active .door__details {
    visibility: visible;
    transition: opacity .45s var(--ease-tide) .15s, grid-template-rows .6s var(--ease-tide), visibility 0s;
  }
  .door__desc { margin-top: 10px; font-size: 15px; }
  .door__meta { gap: 4px 16px; margin: 12px 0 14px; font-size: 12px; letter-spacing: 0; }

  .day-intro {
    min-height: 360px;
    padding: 56px 16px 40px;
  }
  .day-intro__title { font-size: 72px; }
  .tide { height: 70px; margin-top: 26px; }
  .tide__mid, .tide__label { display: none; }
  .tide__dot { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }

  .card {
    grid-template-columns: 1fr;
    grid-template-rows: 52% minmax(0, 1fr);
    box-shadow: var(--card-shadow-m);
  }
  .card:nth-child(even) .card__media { order: 0; }
  .card__text {
    padding: 22px 16px 88px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    justify-content: stretch;
  }
  .card__top { display: contents; }
  .card__time, .gauge { display: none; }
  .card__num {
    font-size: min(112px, 13.3svh);
    letter-spacing: 0;
  }
  .card__eyebrow { color: var(--card-eyebrow-m); }
  .card__title {
    margin: 10px 0 12px;
    font-size: min(48px, 5.7svh);
    line-height: .88;
  }
  .card__line { font-size: 16px; }
  .card__book { margin-top: 12px; font-size: 12px; letter-spacing: .04em; }
  .card__book--all .card__book-text { display: none; }
  .card__book-text { padding: 6px 12px; }
  .card__book-go { padding: 0 12px; }

  .people { padding: 56px 16px 64px; }
  .people__title { font-size: 60px; margin-bottom: 24px; }
  .note { margin: 12px 0 20px; font-size: 11px; letter-spacing: 0; }

  .guides {
    display: flex;
    gap: 12px;
    margin: 0 -16px;
    padding: 18px 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .guides::-webkit-scrollbar { display: none; }
  .guides:focus-visible { outline-offset: -2px; }

  .guide {
    flex: none;
    width: min(304px, 78vw);
    padding: 0;
    scroll-snap-align: start;
  }
  .guide + .guide::after { display: none; }
  .guide__name { margin-top: 14px; font-size: 30px; }
  .guide__tour { margin-top: 6px; }
  .guide__quote { margin-top: 14px; padding-top: 10px; }
  .guide__quote p { font-size: 15px; }
  .guide__guest { margin-top: 8px; font-size: 12px; }

  .book {
    display: block;
    min-height: 0;
    padding: 0 16px 24px;
  }
  .book__panel {
    height: 420px;
    margin: 0 -16px 24px;
  }
  .book__media::after { background: var(--scrim-book-m); }
  .book__content { padding: 40px 16px 24px; gap: 24px; }
  .book__title { font-size: min(104px, 26vw); }
  .book__line { max-width: none; font-size: 16px; }
  .book__links { gap: 0 22px; margin-top: 4px; font-size: 12px; }
  .book__links a { padding: 13px 0; }

  .book__side { display: block; border-left: 0; }
  .book__rows { display: block; }
  .know {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px -16px 0;
    padding: 24px 16px;
  }
  .know dt { font-size: 11px; }
  .know dd { font-size: 15px; }
  .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 104px;
    padding: 16px 4px;
  }
  .row:first-child::before { display: block; }
  .row:last-child { border-bottom: 1px solid var(--rule); }
  .row__title { margin-top: 4px; font-size: 34px; }
  .row__level { margin-top: 6px; }
  .row__meta {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
  }
  .row__meta > span { display: block; }
  .row__next { margin-top: 2px; }
  .row__go { font-size: 12px; padding: 12px; gap: 8px; }

  .footer {
    min-height: 300px;
    padding: 40px 16px calc(72px + env(safe-area-inset-bottom));
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
  }
  .wordmark--footer { font-size: min(88px, calc((100vw - 32px) / 4.3)); line-height: .8; }
  .footer__links { margin-left: -10px; }
  .footer__end {
    align-items: flex-start;
    gap: 4px;
    text-align: left;
  }
  .footer__place { font-size: 12px; }

  .book-tab { display: none; }

  .theme-fab--float {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    width: 44px;
    height: 44px;
    transition: transform .2s var(--ease-out), opacity .2s var(--ease-out), visibility 0s;
  }
  .theme-fab--float[data-hidden] {
    transform: scale(.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .15s var(--ease-out), opacity .15s var(--ease-out), visibility 0s linear .15s;
  }
  .hero__top { position: relative; }
  .theme-fab--hero {
    display: grid;
    position: absolute;
    top: auto;
    right: 4px;
    bottom: -4px;
    width: 44px;
    height: 44px;
  }

  .book-bar {
    position: fixed;
    z-index: 50;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    height: 56px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bar-bg);
    color: var(--bar-fg);
    border-left: var(--bar-stripe);
    font: var(--bar-weight) 13px/1 var(--font-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform .3s var(--ease-soft), opacity .3s var(--ease-soft), visibility 0s;
  }
  .book-bar[data-hidden] {
    transform: translateY(24px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .3s var(--ease-soft), opacity .3s var(--ease-soft), visibility 0s linear .3s;
  }
  .book-bar:focus-visible { outline-color: var(--bar-fg); outline-offset: -5px; }
}

@media (width <= 860px) and (height <= 700px) {
  .card { grid-template-rows: 46% minmax(0, 1fr); }
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Day card clock: invisible until the card pins, then pulses in */
  .js .card__time:not(.is-lit) { opacity: 0; }
  .card__time.is-lit .card__clock {
    transform-origin: 100% 60%;
    animation: clock-pulse .6s var(--ease-soft) both, clock-flash .7s ease both;
  }
  .card__time.is-lit .card__clock::after { animation: clock-sweep .9s var(--ease-tide) .1s both; }
  .card__time.is-lit .card__clock-label { animation: clock-label .5s var(--ease-soft) .2s both; }
  :root[data-theme="dark"] .card__time.is-lit .card__clock {
    animation: clock-pulse-glow 1.1s var(--ease-soft) both, clock-flare 1.1s ease-out both;
  }
  :root[data-theme="dark"] .card__time.is-lit .card__colon { animation: clock-flare 1.1s ease-out both; }

  .js .wordmark--hero .wordmark__text { animation: wt-rise .8s var(--ease-soft) both; }
  .js .hero__intro { animation: wt-drift .6s var(--ease-soft) .15s both; }
  .js .hero .surf { animation: wt-drift .6s var(--ease-soft) .3s both; }
  .js .door { animation: wt-unmask .9s var(--ease-soft) both; animation-delay: calc(250ms + var(--i, 0) * 90ms); }
  .js .scroll-cue { animation: wt-drift .6s var(--ease-soft) .7s both; }
  .scroll-cue__chev,
  .scroll-cue__chev:first-child {
    opacity: .55;
    stroke: currentColor;
    animation: cue-flash 1.8s var(--ease-tide) infinite;
  }
  .scroll-cue__chev:nth-child(2) { animation-delay: .2s; }
  .scroll-cue__chev:nth-child(3) { animation-delay: .4s; }
  @media (hover: hover) {
    .scroll-cue:hover .scroll-cue__chev { animation-duration: 1.1s; }
  }

  /* Gone once used: a short fade with a small drift down */
  .scroll-cue.is-eaten {
    transform: translateY(6px);
    transition: opacity .45s var(--ease-soft), transform .45s var(--ease-soft), visibility 0s linear .45s;
  }

  .js [data-reveal="img"] {
    clip-path: inset(100% 0 0 0);
    transition: clip-path .9s var(--ease-soft);
  }
  .js [data-reveal="img"].is-in { clip-path: inset(0 0 0 0); }

  .js [data-reveal="fade"] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s var(--ease-soft) var(--d, .25s), transform .6s var(--ease-soft) var(--d, .25s);
  }
  .js [data-reveal="fade"].is-in { opacity: 1; transform: none; }

  .js [data-reveal="lines"]:not(.is-split) { visibility: hidden; }
  .split-line {
    display: block;
    overflow: hidden;
    padding-block: .06em;
    margin-block: -.06em;
  }
  .split-line > span {
    display: block;
    transform: translateY(110%);
    transition: transform .7s var(--ease-soft);
    transition-delay: calc(var(--l, 0) * 80ms);
  }
  .is-in > .split-line > span { transform: none; }

  .js [data-reveal="rule"]::before,
  .js .gauge::before {
    transform: scaleX(0);
    transition: transform .8s var(--ease-soft);
  }
  .js [data-reveal="rule"].is-in::before,
  .js .gauge.is-in::before { transform: none; }
  .js .gauge i { opacity: 0; transition: opacity .5s var(--ease-soft) .7s; }
  .js .gauge.is-in i { opacity: 1; }

  .js .tide__curve {
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.6s var(--ease-soft);
  }
  .js .tide.is-in .tide__curve { stroke-dashoffset: 0; }
  .js .tide__dot,
  .js .tide__label {
    opacity: 0;
    transition: opacity .6s var(--ease-soft);
    transition-delay: calc(.35s + var(--i, 0) * 120ms);
  }
  .js .tide.is-in .tide__dot,
  .js .tide.is-in .tide__label { opacity: 1; }

  .parallax { transform: scale(1.1); }
  .parallax.is-driven {
    transform: translateY(calc((.5 - var(--p, .5)) * 8%)) scale(1.1);
    will-change: transform;
  }
  @supports (animation-timeline: view()) {
    .parallax {
      animation: wt-parallax linear both;
      animation-timeline: view();
    }
  }
}

@keyframes wt-rise { from { transform: translateY(100%); } }
@keyframes clock-pulse {
  0% { transform: scale(.82); opacity: 0; }
  45% { transform: scale(1.07); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes clock-flash { 0%, 55% { color: var(--accent); } 100% { color: var(--card-time); } }
@keyframes clock-sweep {
  0% { transform: scaleX(0); opacity: 1; }
  45% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes clock-label { from { opacity: 0; transform: translateY(6px); } }
@keyframes clock-flare { 0%, 22% { color: #FFFFFF; } 100% { color: var(--accent); } }
@keyframes clock-pulse-glow {
  0% { transform: scale(.82); opacity: 0; filter: drop-shadow(0 0 0 transparent); }
  30% { filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 18px var(--accent)); }
  45% { transform: scale(1.07); opacity: 1; }
  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 0 transparent); }
}
@keyframes cue-flash {
  0%, 55%, 100% { opacity: .55; stroke: currentColor; transform: translateY(0); }
  18% { opacity: 1; stroke: var(--accent); transform: translateY(2px); }
}

@keyframes wt-drift { from { opacity: 0; transform: translateY(16px); } }
@keyframes wt-unmask { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes wt-parallax {
  from { transform: translateY(4%) scale(1.1); }
  to { transform: translateY(-4%) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation: none !important;
  }
}
