/* ==========================================================================
   How to Book a Scene (homepage). Spec: "Build a Scene: implementation notes", Oct 23 2026.
   The photography is the only colour. Ground white, ink type, hairline rules,
   no accent colour, square corners, no shadows.
   ========================================================================== */

.bs {
  --bs-ground: #FFFFFF;
  --bs-panel: #F6F6F4;
  --bs-ink: #16161A;
  --bs-grey: #6E6E72;
  --bs-faint: #A8A8AC;
  --bs-hair: rgba(22, 22, 26, 0.12);
  --bs-ease: cubic-bezier(.16, 1, .3, 1);
  --bs-serif: 'Instrument Serif', 'Times New Roman', serif;
  --bs-sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --bs-gutter: 80px;
  background: var(--bs-ground);
  color: var(--bs-ink);
  padding: 140px 0;
}
.bs *, .bs *::before, .bs *::after { border-radius: 0; box-shadow: none; }
.bs__inner { max-width: 1440px; margin: 0 auto; padding: 0 var(--bs-gutter); }

/* ---------- Type ---------- */
.bs__label {
  margin: 0;
  font-family: var(--bs-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bs-faint);
}
.bs__title {
  margin: 18px 0 0;
  font-family: var(--bs-serif);
  font-weight: 400;
  font-size: 96px;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--bs-ink);
}
.bs__intro {
  margin: 28px 0 0;
  max-width: 560px;
  font-family: var(--bs-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  color: var(--bs-grey);
}

/* ---------- Obsession picker ---------- */
.bs__obsessions { margin-top: 56px; display: grid; gap: 16px; }
.bs__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.bs__chip {
  appearance: none;
  border: 1px solid var(--bs-hair);
  background: var(--bs-ground);
  color: var(--bs-ink);
  padding: 13px 20px;
  font-family: var(--bs-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 500ms var(--bs-ease), color 500ms var(--bs-ease), border-color 500ms var(--bs-ease);
}
.bs__chip:hover { border-color: var(--bs-ink); }
.bs__chip[aria-pressed="true"] { background: var(--bs-ink); border-color: var(--bs-ink); color: var(--bs-ground); }

/* ---------- Split ---------- */
.bs__split {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 80px;
  align-items: start;
}

/* ---------- Stage steppers + progress rule ---------- */
.bs__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.bs__step {
  appearance: none;
  width: 100%;
  border: 0;
  background: none;
  padding: 0 0 18px;
  display: grid;
  justify-items: start;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--bs-faint);
  transition: color 600ms var(--bs-ease);
}
.bs__num {
  font-family: var(--bs-serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.bs__steplabel {
  font-family: var(--bs-sans);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.bs__step:hover,
.bs__step.is-reached { color: var(--bs-grey); }
.bs__step[aria-current="step"] { color: var(--bs-ink); }
.bs__rule { position: relative; height: 1px; background: var(--bs-hair); }
.bs__rule-fill {
  position: absolute;
  inset: 0;
  background: var(--bs-ink);
  transform-origin: left;
  transform: scaleX(var(--progress, 1));
  transition: transform 1000ms var(--bs-ease);
}

/* ---------- Stage text: all four stacked in one cell, one visible ---------- */
.bs__stages { display: grid; margin-top: 44px; }
.bs__stage { grid-area: 1 / 1; display: grid; gap: 18px; align-content: start; }
.bs__heading {
  margin: 0;
  font-family: var(--bs-serif);
  font-weight: 400;
  font-size: 52px;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--bs-ink);
}
.bs__body {
  margin: 0;
  max-width: 520px;
  font-family: var(--bs-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  color: var(--bs-grey);
}
.bs__example {
  margin: 6px 0 0;
  max-width: 520px;
  font-family: var(--bs-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--bs-ink);
}

/* ---------- Palette + sourced ---------- */
.bs__details { margin-top: 56px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 56px; padding-top: 28px; border-top: 1px solid var(--bs-hair); }
.bs__palette, .bs__vendors { display: grid; gap: 16px; align-content: start; transition: opacity 800ms var(--bs-ease); }
.bs__swatches { display: flex; gap: 8px; }
.bs__swatch { display: block; width: 34px; height: 34px; background: var(--sw); }
.bs__vendor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bs__vendor-list li {
  font-family: var(--bs-sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  color: var(--bs-ink);
}

/* ---------- Play ---------- */
.bs__play {
  appearance: none;
  margin-top: 44px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--bs-ink);
  background: var(--bs-ground);
  color: var(--bs-ink);
  padding: 15px 24px;
  font-family: var(--bs-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 500ms var(--bs-ease), color 500ms var(--bs-ease);
}
.bs__play:hover, .bs__play.is-playing { background: var(--bs-ink); color: var(--bs-ground); }
.bs__play-icon { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.bs__play.is-playing .bs__play-icon { width: 8px; height: 10px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }

/* ---------- Collage: six tiles hung in percentages ---------- */
.bs__collage { position: relative; height: 620px; background: var(--bs-ground); }
.bs__tile { position: absolute; margin: 0; overflow: hidden; background: var(--bs-panel); }
.bs__float { position: absolute; inset: 0; }
.bs__float picture, .bs__float img { display: block; width: 100%; height: 100%; }
.bs__float img { object-fit: cover; }

/* ---------- Closing ---------- */
.bs__close {
  margin-top: 96px;
  padding-top: 56px;
  border-top: 1px solid var(--bs-hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.bs__closing {
  margin: 0;
  font-family: var(--bs-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--bs-ink);
}
.bs__cta {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 34px;
  background: var(--bs-ink);
  border: 1px solid var(--bs-ink);
  color: var(--bs-ground);
  font-family: var(--bs-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 500ms var(--bs-ease), color 500ms var(--bs-ease);
}
.bs__cta:hover { background: var(--bs-ground); color: var(--bs-ink); }

/* ---------- Focus: the design has no outlines, so focus gets its own ---------- */
.bs button:focus-visible,
.bs a:focus-visible { outline: 1px solid var(--bs-ink); outline-offset: 4px; }

/* ==========================================================================
   Interactive states. Only applied once the script runs (.bs--live), so
   without JavaScript every photo and all four stages simply show.
   ========================================================================== */
.bs--live .bs__stage {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 500ms var(--bs-ease), transform 700ms var(--bs-ease), visibility 0s linear 500ms;
}
.bs--live .bs__stage.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 800ms var(--bs-ease) 120ms, transform 1000ms var(--bs-ease) 120ms, visibility 0s;
}

/* Per tile: revealed vs hidden. Transitions, never keyframes, so it reverses cleanly. */
.bs--live .bs__tile {
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  filter: grayscale(1);
  transition:
    opacity 1000ms var(--bs-ease),
    transform 1200ms var(--bs-ease),
    filter 1200ms ease;
}
.bs--live .bs__tile.is-on { opacity: 1; transform: translateY(0) scale(1); filter: none; }

/* Ambient drift on revealed tiles: an 11s float of +/-8px, offset per tile. */
.bs--live .bs__tile.is-on .bs__float { animation: bs-drift 11s ease-in-out infinite; animation-delay: calc(var(--i) * 800ms); }
@keyframes bs-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(5px, -8px, 0); }
  50% { transform: translate3d(-4px, -3px, 0); }
  75% { transform: translate3d(-7px, 6px, 0); }
}

/* Palette and vendors: dimmed until their stage, and they fade and lift into place. */
.bs--live .bs__palette.is-dim, .bs--live .bs__vendors.is-dim { opacity: 0.32; }
.bs--live .bs__swatch, .bs--live .bs__vendor-list li {
  transition: opacity 750ms var(--bs-ease), transform 750ms var(--bs-ease);
  transition-delay: calc(var(--j, 0) * 95ms);
}
.bs--live .is-swapping .bs__swatch, .bs--live .is-swapping .bs__vendor-list li { opacity: 0; transform: translateY(7px); transition-delay: 0ms; transition-duration: 250ms; }

/* ---------- Breakpoints ---------- */
@media (max-width: 1100px) {
  .bs { --bs-gutter: 48px; padding: 112px 0; }
  .bs__split { grid-template-columns: 1fr; gap: 56px; }
  .bs__collage { height: 460px; order: -1; }
  .bs__num { font-size: 34px; }
  .bs__title { font-size: 72px; }
}
@media (max-width: 640px) {
  .bs { --bs-gutter: 22px; padding: 88px 0; }
  .bs__title { font-size: 42px; }
  .bs__heading { font-size: 34px; }
  .bs__collage { height: 330px; }
  .bs__details { grid-template-columns: 1fr; gap: 32px; }
  .bs__chip { padding: 11px 14px; letter-spacing: 0.22em; }
  .bs__steplabel { font-size: 9px; letter-spacing: 0.22em; }
  .bs__close { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion: no transitions, no drift. Stage changes still work, instantly. */
@media (prefers-reduced-motion: reduce) {
  .bs *, .bs--live .bs__tile, .bs--live .bs__stage, .bs__rule-fill,
  .bs--live .bs__swatch, .bs--live .bs__vendor-list li { transition: none !important; }
  .bs--live .bs__tile.is-on .bs__float { animation: none; }
}
