/* ---------- Design tokens ----------
   Carpet colours come from Bulgarian flat-weave kilims.
   Interface colours come from the factory's own machines:
   the orange squeegee blade and the blue brush discs. */
:root {
  --wool: #ece2cb;
  --madder: #9c2820;
  --indigo: #1c345c;
  --ochre: #d39830;
  --walnut: #2c1f1a;
  --sage: #567c6c;

  --blade: #f05a1a;
  --blade-dark: #c9440c;
  --brush: #1b5cc8;
  --steel: #c9ced3;

  --paper: #faf7ef;
  --ink: #1a1512;
  --ink-soft: #5b5048;

  --font-text: "Sofia Sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "Sofia Sans Extra Condensed", "Sofia Sans", "Arial Narrow", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--walnut);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.45;
}

/* ---------- Hero: the carpet ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: rgb(172, 157, 139); /* the dirty carpet photo's average, while it loads */
}

.hero__carpet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: opacity .35s ease;
}

/* A photo of the carpet as a still picture, upright on a tall hero, a quarter
   turn clockwise on a wide one (as the live hero and the stations lay it),
   cover-fitted.
   Touch devices and stages up to 760 px wide (the same query as STILL in
   main.js): no scrubbing, so the first screen is the dirty photo, dry - the
   picture station 1 starts from - from the first paint. It steps aside while
   the stations canvas shows.
   Without WebGL (.hero--static): the clean photo. */
@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .hero { container-type: size; }
  .hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100cqw;
    height: 100cqh;
    transform: translate(-50%, -50%);
    background: url("/img/carpet-dirty.webp") center / cover no-repeat;
  }
  .ride--live .ride__stage:not(.is-first) .hero:not(.hero--static)::before { visibility: hidden; }
}
.hero--static { container-type: size; }
.hero--static::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100cqw;
  height: 100cqh;
  transform: translate(-50%, -50%);
  background: url("/img/carpet-clean.webp") center / cover no-repeat;
}
@container (orientation: landscape) {
  .hero--static::before,
  .hero::before {
    width: 100cqh;
    height: 100cqw;
    transform: translate(-50%, -50%) rotate(90deg);
  }
}

.ride--live .hero__carpet {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Ccircle cx='18' cy='18' r='15' fill='none' stroke='white' stroke-width='2'/%3E%3Ccircle cx='18' cy='18' r='15.9' fill='none' stroke='%231a1512' stroke-opacity='.45' stroke-width='1'/%3E%3C/svg%3E") 18 18, crosshair;
}

/* ---------- The sewn-on label ---------- */
.label {
  position: absolute;
  left: clamp(12px, 4vw, 56px);
  bottom: clamp(12px, 5vh, 56px);
  width: min(470px, calc(100% - 24px));
  padding: 30px 30px 22px;
  background:
    repeating-linear-gradient(45deg, rgba(26, 21, 18, .022) 0 2px, transparent 2px 4px),
    var(--paper);
  border-radius: 5px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 22px 44px rgba(20, 10, 5, .38),
    0 3px 8px rgba(20, 10, 5, .32);
}

/* the stitching */
.label::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(156, 40, 32, .5);
  border-radius: 3px;
  pointer-events: none;
}

.label__eyebrow {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--madder);
}

.label__title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 5.4vw, 74px);
  line-height: .88;
  letter-spacing: -.005em;
  text-transform: uppercase;
  white-space: nowrap;
}

.price {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}

.price__figure {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 60px;
  line-height: .9;
  color: var(--madder);
  white-space: nowrap;
}

.price__unit {
  font-size: .5em;
  font-weight: 700;
  margin-left: 2px;
}

.price__note {
  font-size: 15.5px;
  line-height: 1.3;
  color: var(--ink-soft);
}

.call {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px 13px;
  background: var(--blade);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 3px 0 var(--blade-dark);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.call:hover { background: #f86a2c; }
.call:active { transform: translateY(3px); box-shadow: 0 0 0 var(--blade-dark); }
.call:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }

.call__verb {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.call__number {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
}

.label__small {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(26, 21, 18, .14);
  font-size: 16px;
  font-weight: 600;
}

.status__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--brush);
}

.status__text { transition: opacity .25s ease; }
.status__text.is-swapping { opacity: 0; }
.status[data-phase="struggling"] .status__dot,
.status[data-phase="scrubbing"] .status__dot { background: var(--ink-soft); }
.status[data-phase="invite"] .status__dot { background: var(--blade); }

.hero--static .status,
.hero--static .hero__carpet { display: none; }

/* the scroll cue: a quiet chevron in the gap under the label, first screen only */
.hero__cue { display: none; }
.ride--live .hero__cue {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(12px, 5vh, 56px) / 2);
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 0 -7px -7px;
  border-right: 2px solid rgba(250, 247, 239, .9);
  border-bottom: 2px solid rgba(250, 247, 239, .9);
  filter: drop-shadow(0 1px 2px rgba(20, 10, 5, .45));
  transform: rotate(45deg);
  pointer-events: none;
  animation: cue 2.4s ease-in-out infinite;
  transition: opacity .3s ease, visibility 0s linear 0s;
}
.ride--live .ride__stage.is-scrolled .hero__cue {
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
@keyframes cue {
  0%, 100% { translate: 0 -3px; opacity: .55; }
  50% { translate: 0 3px; opacity: .95; }
}

/* ---------- Hero navigation ---------- */
.hero__nav {
  position: absolute;
  top: clamp(12px, 3vh, 28px);
  left: clamp(12px, 3vw, 28px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 24px);
}

.hero__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(250, 247, 239, .94);
  color: var(--ink);
  font: 700 14px/1 var(--font-text);
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(20, 10, 5, .3);
}

.hero__nav a:hover { background: #fff; }
.hero__nav a:focus-visible { outline: 3px solid var(--blade); outline-offset: 2px; }

/* ---------- Phones ---------- */
@media (max-width: 560px) {
  .label { padding: 24px 22px 18px; }
  .label__eyebrow { font-size: 11px; letter-spacing: .06em; margin-bottom: 10px; }
  .label__title { font-size: clamp(44px, 14.2vw, 60px); margin-bottom: 14px; }
  .price { gap: 12px; margin-bottom: 14px; }
  .price__figure { font-size: 50px; }
  .price__note { font-size: 14.5px; }
  .call { padding: 13px 16px 11px; }
  .call__verb { font-size: 14px; }
  .call__number { font-size: 32px; }
  .label__small { font-size: 12.5px; }
  .status { font-size: 15px; margin-top: 12px; padding-top: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .call, .status__text { transition: none; }
}

@media (max-width: 560px) {
  .hero__nav a[href="#price"] { display: none; }
}

/* ---------- Shared: focus, bands, headings, teeth ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }

.band--walnut :is(a, button, input):focus-visible,
.footer :is(a, button):focus-visible { outline-color: var(--ochre); }

.band {
  padding: clamp(56px, 9vw, 120px) clamp(16px, 6vw, 96px);
}

.band--paper { background: var(--paper); color: var(--ink); }
.band--walnut { background: var(--walnut); color: var(--wool); }

.band__inner { max-width: 1100px; margin: 0 auto; }

.band__title {
  margin: 0 0 clamp(24px, 4vw, 44px);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 6vw, 76px);
  line-height: .9;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

/* A kilim saw-tooth border: stepped triangles in madder on paper. */
.teeth {
  height: 14px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14' fill='%239c2820'%3E%3Crect x='12' y='0' width='4' height='2'/%3E%3Crect x='10' y='2' width='8' height='2'/%3E%3Crect x='8' y='4' width='12' height='2'/%3E%3Crect x='6' y='6' width='16' height='2'/%3E%3Crect x='4' y='8' width='20' height='2'/%3E%3Crect x='2' y='10' width='24' height='2'/%3E%3Crect x='0' y='12' width='28' height='2'/%3E%3C/svg%3E") repeat-x 0 100% / 28px 14px;
}

/* ---------- Shared: cards (the label look, in normal flow) ---------- */
.card {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  background:
    repeating-linear-gradient(45deg, rgba(26, 21, 18, .022) 0 2px, transparent 2px 4px),
    var(--paper);
  color: var(--ink);
  border-radius: 5px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 14px 30px rgba(20, 10, 5, .2),
    0 2px 6px rgba(20, 10, 5, .22);
}

.card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(156, 40, 32, .5);
  border-radius: 3px;
  pointer-events: none;
}

.textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ochre);
  font-size: 17px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.band--paper .textlink { color: var(--madder); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--wool);
  border-radius: 4px;
  color: var(--wool);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color .12s ease, color .12s ease;
}

.btn-ghost:hover { background: var(--wool); color: var(--walnut); }

/* ---------- 2. Stations: static mode (default) ---------- */
.stations { background: var(--paper); color: var(--ink); }

.stations__intro,
.stations__stage {
  padding-left: max(clamp(16px, 6vw, 96px), calc((100% - 1100px) / 2));
  padding-right: max(clamp(16px, 6vw, 96px), calc((100% - 1100px) / 2));
}

.stations__intro { padding-top: clamp(56px, 9vw, 120px); }

.stations__stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-bottom: clamp(56px, 9vw, 120px);
}

/* the steps wrapper does not box the cards here: they stay items of the grid */
.stations__steps { display: contents; }

/* live mode only: the canvas, the accordion's tabs and photos, the closing block */
.stations__canvas,
.station__tab,
.station__photo,
.finale { display: none; }

.station__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.station__num {
  flex: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 64px;
  line-height: .9;
  color: var(--madder);
}

.station__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 4vw, 44px);
  line-height: .95;
  text-transform: uppercase;
}

.station__body {
  margin: 0 0 16px;
  font-size: 16.5px;
}

.station__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
}

.station__chip {
  display: inline-block;
  padding: 7px 14px 6px;
  border-radius: 999px;
  background: var(--wool);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.station__counter {
  display: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  color: var(--madder);
}

.station .call { margin-top: 16px; }

@media (min-width: 900px) {
  .stations__stage { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ---------- 1-2. Live mode: one pinned stage for the hero and the stations ----------
   The ride is the scroll track: 24vh for the first screen, 150vh per station.
   Its stage stays pinned; the hero canvas lies over the stations canvas and
   main.js hides it once the stations take over the same carpet. */
.ride--live { height: calc(24vh + 6 * 150vh + 100vh); }

.ride--live .ride__stage {
  container-type: inline-size; /* the accordion sizes itself on the stage's width (cqw) */
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: rgb(172, 157, 139); /* the dirty carpet photo's average, while it loads */
}

.ride--live .hero,
.ride--live .stations,
.ride--live .stations__stage {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  padding: 0;
}

/* the hero lies on top; only what it shows takes the pointer */
.ride--live .hero { z-index: 2; background: transparent; pointer-events: none; }
.ride--live .hero > * { pointer-events: auto; }
.ride--live .hero__carpet.is-away,
.ride--live .ride__stage.is-first .stations__canvas { visibility: hidden; }

/* the heading stays for screen readers, not as a band across the carpet */
.ride--live .stations__intro {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ride--live .stations__canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* the hero's label and quick-nav: on the first screen only */
.ride--live .label,
.ride--live .hero__nav {
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear 0s;
}

.ride--live .ride__stage:not(.is-first) .label,
.ride--live .ride__stage:not(.is-first) .hero__nav {
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}

/* A hidden call button must not count as on screen for the call bar. The label
   is the big one, so it keeps its button until it has faded out and then moves
   it outside the stage's clip. Station 6's own button belongs to the list; here
   the closing block (.finale) carries the call. */
.ride--live .label .call { transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, translate 0s linear 0s; }
.ride--live .ride__stage:not(.is-first) .label .call { translate: -300vw 0; transition-delay: 0s, 0s, 0s, .3s; }
.ride--live .station .call { display: none; }

/* ---------- The accordion: the six stations as one sideways strip ----------
   Each .station is a panel: a tab (numeral and short name) and, beside it, the
   content. The panel on show grows to take the remaining width; the content has
   the expanded width at all times and is clipped, so its text never reflows
   while a panel opens or closes. stations-scroll.js sets is-active / is-done
   and the active panel's progress --t (0..1). */
.ride--live .stations__steps {
  --steps-w: min(1180px, 100cqw - 48px);
  --steps-pad: 12px;
  --tab-w: 64px;
  --open-w: calc(var(--steps-w) - 2 * var(--steps-pad) - 5 * var(--tab-w));
  --ease-open: cubic-bezier(.22, .61, .36, 1);
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 2;
  display: flex;
  width: var(--steps-w);
  height: var(--steps-h, 164px);
  padding: var(--steps-pad);
  background:
    repeating-linear-gradient(45deg, rgba(26, 21, 18, .022) 0 2px, transparent 2px 4px),
    var(--paper);
  border-radius: 5px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 16px 34px rgba(20, 10, 5, .3),
    0 3px 8px rgba(20, 10, 5, .26);
  transform: translateX(-50%);
  transition: opacity .35s ease, transform .45s var(--ease-open), visibility 0s linear 0s;
}

/* the stitching */
.ride--live .stations__steps::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed rgba(156, 40, 32, .5);
  border-radius: 3px;
  pointer-events: none;
}

/* off stage on the first screen; slides in with station 1 */
.ride--live .ride__stage.is-first .stations__steps {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, -28px);
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}

.ride--live .station {
  position: relative;
  flex: 0 0 var(--tab-w);
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: none;
  border-radius: 0;
  box-shadow: none;
  transition: flex-grow .45s var(--ease-open);
}
.ride--live .station + .station { border-left: 1px solid rgba(26, 21, 18, .16); }
.ride--live .station.is-active { flex-grow: 1; }
.ride--live .station::before { content: none; }

/* progress: a 3px bar along the panel's bottom edge */
.ride--live .station::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(var(--madder), var(--madder)) 0 0 / calc(var(--fill, 0) * 100%) 100% no-repeat;
}
.ride--live .station.is-done { --fill: 1; }
.ride--live .station.is-active { --fill: var(--t, 0); }
.ride--live .station.is-active::after { background-color: rgba(26, 21, 18, .1); }

/* the tab */
.ride--live .station__tab {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: var(--tab-w);
  margin: 0;
  padding: 9px 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  cursor: pointer;
  transition: background-color .15s ease;
}
.ride--live .station__tab:hover { background: rgba(156, 40, 32, .07); }
.ride--live .station__tab:focus-visible { outline: 3px solid var(--indigo); outline-offset: -4px; }
.ride--live .station.is-active .station__tab { background: transparent; cursor: default; }
.ride--live .station.is-done .station__tab { color: var(--ink); }

.station__tab-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 34px;
  line-height: .9;
  transition: font-size .45s var(--ease-open), color .3s ease;
}
.ride--live .station.is-done .station__tab-num,
.ride--live .station.is-active .station__tab-num { color: var(--madder); }
.ride--live .station.is-active .station__tab-num { font-size: 64px; }

.station__short {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity .2s ease;
}
.ride--live .station.is-active .station__short { opacity: 0; }

/* the content, at the expanded width whatever the panel's width */
.ride--live .station__inner {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tab-w);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "head foot photo"
    "body body photo";
  align-items: center;
  gap: 8px 16px;
  width: calc(var(--open-w) - var(--tab-w));
  padding: 12px 16px 12px 4px;
  opacity: 0;
  transition: opacity .15s ease;
}
.ride--live .station.is-active .station__inner { opacity: 1; transition: opacity .35s ease .14s; }
.ride--live .station__text { display: contents; }

.ride--live .station__head { grid-area: head; margin: 0; }
.ride--live .station__head .station__num {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ride--live .station__title { font-size: 24px; line-height: 1; white-space: nowrap; }

.ride--live .station__body {
  grid-area: body;
  align-self: start;
  margin: 0;
  font-size: 16px;
  line-height: 1.38;
}

.ride--live .station__foot { grid-area: foot; }
.ride--live .station__chip { padding: 4px 11px 3px; font-size: 12.5px; }
.ride--live .station__counter { display: inline-block; font-size: 24px; }

.ride--live .station__photo {
  grid-area: photo;
  display: block;
  width: 150px;
  height: 112px;
  object-fit: cover;
  border-radius: 3px;
}

/* tablets: narrower tabs and a smaller photo; the longest step texts run to
   four lines here, so the strip is taller */
@media (min-width: 1000px) and (max-width: 1199px) {
  .ride--live .stations__steps { --tab-w: 54px; --steps-h: 186px; }
  .ride--live .station__photo { width: 120px; height: 90px; }
}

/* ---------- The closing block over the packed carpet (end of station 6) ----------
   stations-scroll.js sets --f 0..1 and is-shown while --f > 0. It sits on the
   grey workshop floor below the floor lettering, so light text on a soft dark
   wash, and the orange call button. While it is shown the call bar steps
   aside, because its .call is on screen (call-bar.js). */
.ride--live .finale.is-shown {
  position: absolute;
  top: 80%;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px 36px;
  width: min(900px, calc(100% - 48px));
  padding: 22px 40px;
  color: var(--paper);
  text-shadow: 0 1px 3px rgba(20, 10, 5, .55);
  background: radial-gradient(closest-side, rgba(26, 21, 18, .5), rgba(26, 21, 18, .32) 62%, rgba(26, 21, 18, 0));
  opacity: var(--f);
  transform: translate(-50%, calc(-50% + (1 - var(--f)) * 16px));
}

.finale__price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.finale__figure {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 56px;
  line-height: .9;
  white-space: nowrap;
}

.finale__note,
.finale__small { font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap; }

.finale .call {
  flex: none;
  gap: 18px;
  padding: 16px 24px 14px;
  text-shadow: none;
}
.finale .call__number { font-size: 44px; }

.finale__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
}

.finale__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  font-size: 16px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.finale__link:hover { color: var(--wool); }
.finale__link:focus-visible { outline-color: var(--paper); }

/* ---------- Phones and tablets upright: the accordion docks at the bottom ----------
   Below 1000px the strip across the top has no room for the longer step texts,
   so the accordion becomes a row of tabs with the text underneath, docked above
   the call bar. */
@media (max-width: 999px) {
  .ride--live .stations__steps {
    --steps-w: calc(100cqw - 16px);
    --steps-pad: 8px;
    --tab-w: 36px;
    top: auto;
    bottom: calc(66px + env(safe-area-inset-bottom));
    align-items: flex-start;
    --steps-h: 226px; /* room for seven lines: the longest step texts need them at 16px */
    height: var(--steps-h);
    overflow: hidden;
    transition: opacity .35s ease, transform .45s var(--ease-open), height .3s ease, visibility 0s linear 0s;
  }
  /* the closing block needs the room: while it is shown the accordion keeps only
     its row of tabs */
  .ride--live .ride__stage:has(.finale.is-shown) .stations__steps { height: 60px; }
  .ride--live .ride__stage:has(.finale.is-shown) .station.is-active .station__text { opacity: 0; transition: opacity .15s ease; }
  .ride--live .stations__steps::before { inset: 4px; }
  .ride--live .ride__stage.is-first .stations__steps { transform: translate(-50%, 28px); }

  /* a row of tabs; the panel is not the positioning box here, so the text and
     the progress bar sit in the box below the row */
  .ride--live .station {
    position: static;
    display: flex;
    height: 44px;
  }
  .ride--live .station__tab {
    position: static;
    flex: none;
    justify-content: center;
    height: 100%;
    padding: 0;
  }
  .station__tab-num { font-size: 26px; }
  .ride--live .station.is-active .station__tab-num { font-size: 32px; }
  .ride--live .station__short {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .ride--live .station__inner { display: contents; }
  .ride--live .station__head,
  .ride--live .station__text {
    opacity: 0;
    transition: opacity .15s ease;
  }
  .ride--live .station.is-active .station__head,
  .ride--live .station.is-active .station__text { opacity: 1; transition: opacity .35s ease .14s; }

  .ride--live .station__head {
    display: flex;
    align-items: center;
    flex: none;
    width: calc(var(--open-w) - var(--tab-w));
    height: 100%;
    padding: 0 4px 0 0;
  }
  .ride--live .station__title { font-size: 19px; line-height: .95; white-space: normal; }

  .ride--live .station__text {
    position: absolute;
    top: 62px;
    left: 14px;
    right: 14px;
    display: block;
  }
  .ride--live .station__body { font-size: 16px; line-height: 1.32; }
  .ride--live .station__foot { margin-top: 2px; }
  .ride--live .station__chip,
  .ride--live .station__photo { display: none; }
  .ride--live .station__counter { font-size: 22px; }

  .ride--live .station::after { display: none; }
  .ride--live .station.is-active::after { display: block; }

  /* stacked, between the floor lettering and the accordion's row of tabs */
  .ride--live .finale.is-shown {
    top: auto;
    bottom: max(22%, calc(66px + 60px + 14px + env(safe-area-inset-bottom)));
    flex-direction: column;
    gap: 8px;
    width: min(520px, calc(100% - 24px));
    padding: 8px 12px;
    text-align: center;
    transform: translate(-50%, calc((1 - var(--f)) * 16px));
  }
  .finale__price { flex-direction: row; align-items: center; gap: 12px; text-align: left; }
  .finale__figure { font-size: 44px; }
  .finale__note { font-size: 14px; white-space: normal; }
  .finale .call { align-self: stretch; padding: 12px 18px 10px; }
  .finale .call__number { font-size: 32px; }
  .finale__meta { flex-flow: row wrap; justify-content: center; align-items: center; column-gap: .3em; }
  .finale__small { font-size: 13px; }
  .finale__small + .finale__small::before { content: "· "; }
  .finale__link { flex-basis: 100%; justify-content: center; min-height: 34px; font-size: 15px; }
}

/* no call bar from 720px up: the accordion sits lower, and the text needs fewer lines */
@media (min-width: 720px) and (max-width: 999px) {
  .ride--live .stations__steps {
    --tab-w: 44px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    --steps-h: 150px;
  }
  .ride--live .station__title { white-space: nowrap; }
  .ride--live .finale.is-shown { bottom: max(30%, calc(16px + 134px + 14px + env(safe-area-inset-bottom))); }
}

/* ---------- 3. Price estimator ---------- */
.est { padding: clamp(24px, 4vw, 44px); }

.rates { display: grid; gap: 6px; margin: 0 0 22px; }
.rates p { margin: 0; font-size: 17px; }
.rates__fig {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7em;
  line-height: 1;
  color: var(--madder);
  white-space: nowrap;
}

.est__form { display: grid; gap: 26px; margin: 0 0 20px; padding-top: 22px; border-top: 1px solid rgba(26, 21, 18, .14); }
.est__form[hidden] { display: none; }

.est__group { min-width: 0; margin: 0; padding: 0; border: 0; }

.est__legend {
  margin: 0 0 10px;
  padding: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--madder);
}

.seg, .est__chips, .est__fields { display: flex; flex-wrap: wrap; gap: 8px; }
.est__fields { gap: 16px; margin-top: 16px; }

.seg__opt { position: relative; display: block; }

.seg__opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg__opt span,
.chip {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--madder);
  border-radius: 4px;
  background: transparent;
  color: var(--madder);
  font: 700 16px/1.15 var(--font-text);
  transition: background-color .12s ease, color .12s ease;
}

.chip { cursor: pointer; border-style: dashed; white-space: nowrap; }
.seg__opt input:checked + span,
.chip[aria-pressed="true"] { background: var(--madder); color: var(--wool); border-style: solid; }
.seg__opt input:focus-visible + span { outline: 3px solid var(--indigo); outline-offset: 3px; }

.field { display: grid; gap: 4px; font-size: 15px; font-weight: 800; }

.field input {
  width: 140px;
  max-width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid var(--ink-soft);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: 700 19px/1 var(--font-text);
}

.est__result {
  padding-top: 20px;
  border-top: 2px dashed rgba(156, 40, 32, .4);
}

.est__result p { margin: 0; }
.est__weight { font-size: 19px; font-weight: 700; }

.est__price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 10vw, 96px);
  line-height: .95;
  color: var(--madder);
  overflow-wrap: break-word;
}

.est__unit { font-size: 15px; color: var(--ink-soft); }
.est__result .est__alt { margin-top: 10px; font-size: 17px; font-weight: 600; }

.est__note { margin: 0 0 20px; max-width: 62ch; font-size: 16px; color: var(--ink-soft); }
.est .call { max-width: 440px; }

/* ---------- 4. How to order ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.steps__item { padding: 22px 24px 24px; font-size: 16.5px; }

.steps__num {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 72px;
  line-height: .85;
  color: var(--madder);
}

.order-note { margin: 0 0 clamp(28px, 4vw, 44px); font-size: 17px; font-weight: 800; }

.rules {
  --rule-line: rgba(236, 226, 203, .55);
  margin: 0 0 24px;
  padding: clamp(20px, 3vw, 32px);
  border: 2px dashed var(--rule-line);
  border-radius: 5px;
}

.band--paper .rules { --rule-line: rgba(156, 40, 32, .55); }

.rules__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  text-transform: uppercase;
}

.rules__list { display: grid; gap: 8px; margin: 0; padding-left: 1.2em; font-size: 15.5px; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 5. About ---------- */
.about { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.about > * { min-width: 0; }
.about__text p { margin: 0; max-width: 60ch; font-size: 18px; line-height: 1.55; }

.about__photos { margin: 0; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.gallery .frame:first-child { grid-column: 1 / -1; }

.frame {
  min-width: 0;
  padding: 8px;
  background: #fffdf8;
  border: 2px dashed rgba(156, 40, 32, .6);
  border-radius: 3px;
  box-shadow: 0 6px 16px rgba(20, 10, 5, .14);
}

.frame img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

.about__caption {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: .02em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--madder);
}

@media (min-width: 900px) {
  .about { grid-template-columns: 1fr 1fr; }
}

/* ---------- 6. Contact ---------- */
.contact__phone {
  display: inline-block;
  margin: 0 0 clamp(16px, 2.5vw, 28px);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 14vw, 170px);
  line-height: .9;
  letter-spacing: .01em;
  white-space: nowrap;
  color: var(--wool);
  text-decoration: none;
}

.contact__phone:hover { color: var(--ochre); }

.contact__invite { margin: 0 0 28px; max-width: 34ch; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.3; }

.contact__facts { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 0 0 28px; max-width: 760px; }
.contact__facts dt { margin: 0 0 4px; font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ochre); }
.contact__facts dd { margin: 0; font-size: 19px; }
.contact__facts address { font-style: normal; }

@media (min-width: 700px) {
  .contact__facts { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ---------- 7. Footer ---------- */
.footer {
  padding: 28px clamp(16px, 6vw, 96px);
  background: #1d1411;
  color: var(--wool);
  font-size: 15.5px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.footer__copy { margin: 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0; list-style: none; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--wool); text-underline-offset: 3px; }

/* ---------- Call bar (small screens) ---------- */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 18px calc(10px + env(safe-area-inset-bottom));
  background: var(--blade);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 -4px 16px rgba(20, 10, 5, .3);
  transition: transform .25s ease, visibility 0s;
}

.callbar .call__number { font-size: 32px; }
.callbar:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }

.callbar.is-hidden {
  transform: translateY(100%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}

@media (max-width: 719.98px) {
  .callbar { display: flex; }
  .footer { padding-bottom: calc(28px + 72px + env(safe-area-inset-bottom)); }
}

/* ---------- How to order page ---------- */
.op-top {
  padding: 12px clamp(16px, 6vw, 96px) 0;
  background: var(--paper);
}

.op-top__inner { max-width: 1100px; margin: 0 auto; }

.backlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--madder);
  font-weight: 800;
  text-underline-offset: 4px;
}

.band--tight { padding-top: clamp(16px, 3vw, 32px); }
.band__sub {
  margin: clamp(28px, 4vw, 44px) 0 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  text-transform: uppercase;
}
.op-rates { max-width: 640px; margin-bottom: 24px; }
.op-call { max-width: 440px; }

/* ---------- Narrow phones ---------- */
@media (max-width: 400px) {
  .card::before { inset: 6px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .frame:first-child { grid-column: auto; }
}

/* ---------- Reduced motion for everything added above ---------- */
@media (prefers-reduced-motion: reduce) {
  .seg__opt span,
  .chip,
  .btn-ghost,
  .callbar,
  .callbar.is-hidden { transition: none; }

}
