/* Sixtop launch site. Palette and type from docs/site/BRIEF.md. */

:root {
  color-scheme: dark;
  --bg: #121214; /* warm charcoal, the room */
  --bg-deep: #0c0c0e; /* behind pinned sections and the footer */
  --surface: #1a1a1e; /* cards */
  --raised: #24242a; /* tiles, tablet bezel inner */
  --text: #ecebe7;
  --muted: #a3a19b;
  --border: #34343c;
  --border-strong: #4a4a54;
  --accent: #e8b45a; /* candle amber: buttons, the logo's clock hand, links */
  --on-accent: #1b1406;
  --focus: #ffd27a;
  --lamp: rgb(232 180 90 / 0.1); /* radial glow behind the hero tablet */

  --stage-available: #1f3a2e;
  --stage-available-text: #9fe3bf;
  --stage-seated: #1d3150;
  --stage-seated-text: #a9c9ff;
  --stage-mains: #352a52;
  --stage-mains-text: #cdb8ff;
  --stage-dessert: #4a2540;
  --stage-dessert-text: #ffb3dd;
  --stage-bill: #4a3a17;
  --stage-bill-text: #ffd98a;
  --warn: #ff8a4c;
  --warn-text: #1f0c02;

  --ghost-hover: rgb(255 255 255 / 0.06);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.35), 0 8px 24px rgb(232 180 90 / 0.04);
  --shadow-2:
    0 2px 6px rgb(0 0 0 / 0.35), 0 24px 60px rgb(0 0 0 / 0.35),
    0 12px 40px rgb(232 180 90 / 0.04);
  --shadow-3:
    0 4px 10px rgb(0 0 0 / 0.4), 0 36px 80px rgb(0 0 0 / 0.45),
    0 18px 48px rgb(232 180 90 / 0.06);
  --shadow-btn: 0 1px 2px rgb(0 0 0 / 0.35), 0 6px 18px rgb(232 180 90 / 0.18);

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --header-h: 64px;
  --gutter: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f3ef;
    --bg-deep: #ebe7df;
    --surface: #fbfaf7;
    --raised: #ffffff;
    --text: #1d1c1a;
    --muted: #5e5b55;
    --border: #dcd8cf;
    --border-strong: #b9b4a8;
    --accent: #9a5b00;
    --on-accent: #ffffff;
    --focus: #0b5bd3;
    --lamp: rgb(232 180 90 / 0.22);

    --stage-available: #dff3e7;
    --stage-available-text: #14532d;
    --stage-seated: #dce8fb;
    --stage-seated-text: #163a75;
    --stage-mains: #ebe3fb;
    --stage-mains-text: #45277f;
    --stage-dessert: #fbe1ef;
    --stage-dessert-text: #7a1d55;
    --stage-bill: #fbefd2;
    --stage-bill-text: #6b4700;
    --warn: #c2410c;
    --warn-text: #ffffff;

    --ghost-hover: rgb(40 30 10 / 0.05);
    --shadow-1: 0 1px 2px rgb(60 40 10 / 0.08), 0 8px 24px rgb(60 40 10 / 0.06);
    --shadow-2: 0 2px 6px rgb(60 40 10 / 0.1), 0 24px 60px rgb(60 40 10 / 0.14);
    --shadow-3:
      0 4px 10px rgb(60 40 10 / 0.12), 0 36px 80px rgb(60 40 10 / 0.2);
    --shadow-btn:
      0 1px 2px rgb(60 40 10 / 0.16), 0 6px 18px rgb(154 91 0 / 0.22);
  }
}

@property --rx {
  syntax: "<angle>";
  inherits: false;
  initial-value: 14deg;
}

@property --ry {
  syntax: "<angle>";
  inherits: false;
  initial-value: -18deg;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 900px) {
  body {
    font-size: 1.125rem;
  }
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease);
}

.skip:focus-visible {
  transform: none;
}

.label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  max-width: 60ch;
  margin-top: 20px;
  color: var(--muted);
}

.band {
  padding-block: 112px;
}

.band--deep {
  background: var(--bg-deep);
}

@media (max-width: 759px) {
  .band {
    padding-block: 72px;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 180ms var(--ease),
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    filter 180ms var(--ease);
}

.btn--primary {
  background-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

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

.btn--compact {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

.btn--large {
  min-height: 56px;
  padding: 0 32px;
  font-size: 1.0625rem;
}

/* ---------- Logo ---------- */

.logo {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--text);
  overflow: visible;
}

.logo--footer {
  width: 40px;
  height: 40px;
}

.logo--closing {
  width: 56px;
  height: 56px;
}

.logo__minute {
  transform-box: view-box;
  transform-origin: 16px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ---------- Header ---------- */

.header-sentinel {
  position: absolute;
  top: 24px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition:
    background-color 220ms var(--ease),
    border-color 220ms var(--ease);
}

.site-header.is-scrolled {
  background-color: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__text {
  display: none;
}

.site-nav__text a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 160ms var(--ease);
}

.site-nav__text a:hover {
  background-color: var(--ghost-hover);
}

.site-nav li:last-child {
  margin-left: 8px;
}

@media (min-width: 760px) {
  .site-nav__text {
    display: block;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 72px;
  overflow: clip;
  view-timeline: --hero block;
}

.hero__inner {
  display: grid;
  gap: 56px;
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.hero__title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.75rem, 1.6rem + 5.2vw, 6rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.hero__title em {
  font-style: italic;
}

.hero__line {
  display: block;
}

.hero__line:first-child {
  white-space: nowrap;
}

@media (max-width: 639px) {
  .tablet--hero .mini__bar {
    justify-content: flex-start;
  }
}

.hero__sub {
  max-width: 60ch;
  margin-top: 24px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__reassure {
  margin-top: 18px;
  font-size: 0.875rem;
  color: var(--muted);
}

@media (max-width: 759px) {
  .actions {
    flex-direction: column;
  }

  .actions .btn {
    width: 100%;
  }
}

@media (min-width: 760px) {
  .hero__line:nth-child(2),
  .hero__line:nth-child(3) {
    display: inline-block;
  }
}

@media (min-width: 1024px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: 92svh;
    padding-bottom: 48px;
  }

  .hero__inner {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: 40px;
  }

  .hero__title {
    font-size: clamp(3.5rem, 5.2vw, 5rem);
    white-space: nowrap;
  }

  .hero__line:nth-child(2),
  .hero__line:nth-child(3) {
    display: inline-block;
  }
}

/* The scene: lamp, tablet, lifted waitlist card, toast. */

.hero__visual {
  position: relative;
  min-width: 0;
}

.scene {
  position: relative;
  padding-bottom: 40px;
}

.scene__lamp {
  position: absolute;
  inset: -30% -40% -30% -30%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 45% at 68% 30%, var(--lamp), transparent 70%),
    radial-gradient(
      ellipse 35% 25% at 20% 85%,
      color-mix(in srgb, var(--lamp) 55%, transparent),
      transparent 70%
    );
}

.scene__rig {
  position: relative;
  z-index: 1;
  transition: translate 600ms var(--ease);
  translate: var(--px, 0px) var(--py, 0px);
}

.scene__settle {
  perspective: 1600px;
}

.scene__card {
  position: relative;
  z-index: 3;
  margin: -40px 12px 0;
  transition: translate 600ms var(--ease);
  translate: var(--cx, 0px) var(--cy, 0px);
}

.scene__toast {
  display: none;
}

/* Phone: the tablet lies flat, wider than the column, cropped at its right edge. */
.tablet--hero {
  width: 160%;
}

.tablet--hero .mini__wait {
  display: none;
}

.tablet--hero .mini__body {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .tablet--hero {
    width: 100%;
  }

  .tablet--hero .mini__wait {
    display: flex;
  }

  .tablet--hero .mini__body {
    grid-template-columns: 2fr 1fr;
  }

  .scene__card {
    width: 46%;
    margin: -96px 0 0 -12px;
  }
}

@media (min-width: 1024px) {
  .scene {
    padding: 48px 0 72px 32px;
  }

  .tablet--hero {
    width: 100%;
    transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(2deg);
    transform-style: preserve-3d;
  }

  .tablet--hero .mini__wait {
    display: flex;
  }

  .tablet--hero .mini__body {
    grid-template-columns: 2fr 1fr;
  }

  .scene__card {
    position: absolute;
    left: -2%;
    bottom: 0;
    width: max-content;
    margin: 0;
  }

  .scene__toast {
    position: absolute;
    top: 8px;
    right: 2%;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-2);
    font-size: 0.875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }

  .scene__toast-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
  }
}

/* The lifted waitlist card. */
.wcard {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 16px;
  padding: 20px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-3);
  font-variant-numeric: tabular-nums;
  transition: opacity 300ms var(--ease);
}

.wcard__who {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1;
}

.wcard__name {
  font-weight: 600;
  font-size: 1.125rem;
}

.wcard__party {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--raised);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
}

.wcard__note,
.wcard__wait {
  grid-column: 1;
  font-size: 0.875rem;
  color: var(--muted);
}

.wcard__note {
  font-style: italic;
}

.wcard__est {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- Tablet and the Floor miniature ---------- */

.tablet {
  padding: 14px;
  border-radius: 28px;
  background: var(--raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-3);
}

.tablet__screen {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg);
  container-type: inline-size;
  transition: opacity 300ms var(--ease);
}

.scene.is-resetting .tablet__screen,
.scene.is-resetting .wcard {
  opacity: 0;
}

.mini {
  display: flex;
  flex-direction: column;
  gap: 2.2cqi;
  padding: 2.2cqi;
  font-family: var(--font-text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  user-select: none;
}

@media (min-width: 640px) {
  .tablet--hero .tablet__screen,
  .tablet--flat .tablet__screen {
    aspect-ratio: 4 / 3;
  }
}

.mini__bar {
  display: flex;
  justify-content: center;
}

.mini__nav {
  display: inline-flex;
  gap: 0.4cqi;
  padding: 0.5cqi;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: max(9px, 1.5cqi);
  font-weight: 600;
  color: var(--muted);
}

.mini__nav span {
  padding: 0.5cqi 1.8cqi;
  border-radius: 999px;
}

.mini__nav .is-on {
  background: var(--accent);
  color: var(--on-accent);
}

.mini__body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2cqi;
  min-height: 0;
}

.mini__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.7cqi;
  align-content: start;
}

.cell {
  aspect-ratio: 1;
  border: 1px dashed color-mix(in srgb, var(--border-strong) 70%, transparent);
  border-radius: 1.1cqi;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 7%;
  border: 1px solid color-mix(in srgb, var(--tile-text) 18%, transparent);
  border-radius: 1.1cqi;
  background-color: var(--tile-bg);
  color: var(--tile-text);
  container-type: inline-size;
  transition:
    background-color 320ms var(--ease),
    color 320ms var(--ease);
}

.tile--available {
  --tile-bg: var(--stage-available);
  --tile-text: var(--stage-available-text);
}
.tile--seated {
  --tile-bg: var(--stage-seated);
  --tile-text: var(--stage-seated-text);
}
.tile--mains {
  --tile-bg: var(--stage-mains);
  --tile-text: var(--stage-mains-text);
}
.tile--dessert {
  --tile-bg: var(--stage-dessert);
  --tile-text: var(--stage-dessert-text);
}
.tile--bill {
  --tile-bg: var(--stage-bill);
  --tile-text: var(--stage-bill-text);
}

.tile__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px;
}

.tile__name {
  font-weight: 600;
  font-size: 21cqi;
  letter-spacing: -0.01em;
}

.tile__seats {
  font-size: 15cqi;
  opacity: 0.82;
}

.tile__stage {
  font-size: 15cqi;
  font-weight: 600;
}

.tile__time {
  margin-top: auto;
  font-size: 22cqi;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tile__long {
  display: none;
  align-self: flex-start;
  margin-top: 2cqi;
  padding: 0 5%;
  border-radius: 999px;
  background: var(--warn);
  color: var(--warn-text);
  font-size: 11cqi;
  font-weight: 600;
  white-space: nowrap;
}

.tile--long {
  border-color: var(--warn);
  box-shadow: 0 0 0 2px var(--warn);
}

.tile--long .tile__long {
  display: block;
}

.tile.is-next {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mini__wait {
  display: flex;
  flex-direction: column;
  gap: 1.2cqi;
  padding: 1.6cqi;
  border: 1px solid var(--border);
  border-radius: 1.6cqi;
  background: var(--surface);
  align-self: start;
}

.mini__wait-head {
  display: flex;
  align-items: center;
  gap: 1cqi;
  font-size: max(8px, 1.3cqi);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mini__pill {
  padding: 0 0.9cqi;
  border-radius: 999px;
  background: var(--raised);
  color: var(--text);
  letter-spacing: 0;
}

.mini__rows {
  display: flex;
  flex-direction: column;
  gap: 1cqi;
}

.wl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3cqi 1cqi;
  padding: 1.2cqi;
  border-radius: 1.2cqi;
  background: var(--raised);
  font-size: max(8px, 1.35cqi);
}

.wl__name {
  font-weight: 600;
}

.wl__party {
  justify-self: end;
  color: var(--muted);
}

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

.wl__est {
  justify-self: end;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.wl--none .wl__est {
  color: var(--warn);
}

.mini__empty {
  padding: 3cqi 1cqi;
  font-size: max(8px, 1.35cqi);
  color: var(--muted);
  text-align: center;
}

/* The Today miniature. */
.today {
  display: flex;
  flex-direction: column;
  gap: 2.4cqi;
  padding: 1cqi 2cqi;
}

.today__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6cqi;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.8cqi;
  padding: 2.2cqi;
  border: 1px solid var(--border);
  border-radius: 1.8cqi;
  background: var(--surface);
}

.stat__label {
  font-size: max(9px, 1.5cqi);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat__value {
  font-family: var(--font-display);
  font-size: 6.5cqi;
  line-height: 1;
  letter-spacing: -0.025em;
}

.today__sizes {
  padding: 2cqi;
  border: 1px solid var(--border);
  border-radius: 1.8cqi;
  background: var(--surface);
}

.today__head {
  margin-bottom: 1.2cqi;
  font-size: max(9px, 1.5cqi);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.today__sizes dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2cqi;
}

.today__sizes dl div {
  display: flex;
  justify-content: space-between;
  padding: 1.2cqi 1.6cqi;
  border-radius: 1.2cqi;
  background: var(--raised);
  font-size: max(10px, 1.9cqi);
}

.today__turns {
  padding: 2cqi;
  border: 1px solid var(--border);
  border-radius: 1.8cqi;
  background: var(--surface);
}

.today__turns ul {
  display: flex;
  flex-direction: column;
  gap: 0.8cqi;
}

.today__turns li {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  padding: 1cqi 1.6cqi;
  border-radius: 1.2cqi;
  background: var(--raised);
  font-size: max(10px, 1.7cqi);
}

.today__turns li span:first-of-type {
  color: var(--muted);
}

@media (max-width: 1023px) {
  .beat--today .today__turns {
    display: none;
  }
}

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

.today__sizes dd {
  font-weight: 600;
}

/* ---------- The five stages ---------- */

.stages {
  padding-block: 72px;
  overflow-x: clip;
}

@media (max-width: 759px) {
  .stages {
    padding-block: 56px;
  }
}

.flow {
  --g: 16px;
  --rail: 26px;
  position: relative;
  margin-top: 48px;
}

.flow__list {
  display: grid;
  gap: var(--g);
}

.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--tile-text) 20%, transparent);
  background-color: var(--tile-bg);
  color: var(--tile-text);
}

.stages[data-view="in"] .stage-card {
  transition: background-color 360ms var(--ease) calc(var(--i) * 120ms);
}

.stage-card--available {
  --tile-bg: var(--stage-available);
  --tile-text: var(--stage-available-text);
}
.stage-card--seated {
  --tile-bg: var(--stage-seated);
  --tile-text: var(--stage-seated-text);
}
.stage-card--mains {
  --tile-bg: var(--stage-mains);
  --tile-text: var(--stage-mains-text);
}
.stage-card--dessert {
  --tile-bg: var(--stage-dessert);
  --tile-text: var(--stage-dessert-text);
}
.stage-card--bill {
  --tile-bg: var(--stage-bill);
  --tile-text: var(--stage-bill-text);
}

.stages[data-view="wait"] .stage-card {
  background-color: var(--surface);
}

.stage-card__word {
  font-family: var(--font-text);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.stage-card__desc {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text);
}

.stage-card__limit {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stage-card__skip {
  font-size: 0.875rem;
  color: var(--muted);
}

/* The rail: a node per card, a line between the first and last node, chevrons between
   nodes, and an amber dot that travels the line once and stops on Bill. */
.stage-card::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--border-strong);
}

.flow__track {
  position: absolute;
  background: var(--border-strong);
}

.flow__runner {
  position: absolute;
  inset: 0;
}

.flow__dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}

.flow__skip {
  display: none;
}

/* Phone: a vertical list, the rail down the left edge; every card the same height so the
   nodes sit at even steps. */
@media (max-width: 899px) {
  .flow__list {
    padding-left: var(--rail);
  }

  .stage-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    gap: 4px 12px;
    height: 120px;
    padding: 14px 18px;
  }

  .stage-card__word {
    grid-area: 1 / 1;
  }

  .stage-card__limit {
    grid-area: 1 / 2;
    align-self: center;
    margin: 0;
    padding: 0;
  }

  .stage-card__desc,
  .stage-card__skip {
    grid-column: 1 / -1;
  }

  .stage-card::before {
    left: calc(-1 * var(--rail));
    top: calc(50% - 6px);
  }

  .flow__track {
    left: 5px;
    top: 60px;
    bottom: 60px;
    width: 2px;
  }

  .flow__runner {
    transform: translateY(100%);
  }

  .flow__dot {
    left: -5px;
    top: -6px;
  }

  .stages[data-view="wait"] .flow__runner {
    transform: none;
  }

  .stages[data-view="in"] .flow__runner {
    animation: run-down 2.4s var(--ease) 0.6s both;
  }
}

@keyframes run-down {
  from {
    transform: none;
  }
  to {
    transform: translateY(100%);
  }
}

/* Desktop: a row, the rail above the cards. Card width w = (100% - 4g) / 5, so the
   centres sit at w/2 + i(w + g). */
@media (min-width: 900px) {
  .flow {
    padding-top: 72px;
  }

  .flow__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .stage-card::before {
    top: calc(-1 * var(--rail) - 6px);
    left: calc(50% - 6px);
  }

  .stage-card:not(:last-child)::after {
    content: "";
    position: absolute;
    top: calc(-1 * var(--rail) - 4px);
    right: calc(-1 * var(--g) / 2 - 5px);
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--muted);
    border-right: 2px solid var(--muted);
    transform: rotate(45deg);
  }

  .stage-card__skip {
    display: none;
  }

  .flow__track {
    top: calc(72px - var(--rail) - 1px);
    left: calc((100% - 4 * var(--g)) / 10);
    width: calc(4 * ((100% - 4 * var(--g)) / 5 + var(--g)));
    height: 2px;
  }

  .flow__runner {
    transform: translateX(100%);
  }

  .flow__dot {
    top: -5px;
    left: -6px;
  }

  .stages[data-view="wait"] .flow__runner {
    transform: none;
  }

  .stages[data-view="in"] .flow__runner {
    animation: run-across 2.4s var(--ease) 0.6s both;
  }

  .flow__skip {
    position: absolute;
    display: block;
    top: 18px;
    left: calc(
      (100% - 4 * var(--g)) / 10 + 2 * ((100% - 4 * var(--g)) / 5 + var(--g))
    );
    width: calc(2 * ((100% - 4 * var(--g)) / 5 + var(--g)));
    height: calc(72px - var(--rail) - 26px);
    border: 1.5px dashed var(--border-strong);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
  }

  .flow__skip::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
  }

  .flow__skip span {
    position: absolute;
    top: -11px;
    left: 50%;
    padding: 0 10px;
    transform: translateX(-50%);
    background: var(--bg-deep);
    font-size: 0.8125rem;
    line-height: 20px;
    color: var(--muted);
    white-space: nowrap;
  }
}

@keyframes run-across {
  from {
    transform: none;
  }
  to {
    transform: translateX(100%);
  }
}

.stages__note {
  max-width: 60ch;
  margin-top: 32px;
  color: var(--muted);
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  gap: 48px;
  margin-top: 56px;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

.vignette {
  display: grid;
  place-items: center;
  height: 200px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, var(--lamp), transparent 70%),
    var(--surface);
  overflow: hidden;
}

.step__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--accent);
}

.step__title {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.625rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.step__copy {
  max-width: 60ch;
  margin-top: 10px;
  color: var(--muted);
}

/* Vignette one: a table drops into its cell. */
.vgrid {
  display: grid;
  grid-template-columns: repeat(4, 56px);
  gap: 8px;
}

.vcell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 56px;
  padding: 6px 7px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.vcell--table {
  border: 1px solid color-mix(in srgb, var(--tile-text) 20%, transparent);
  background: var(--tile-bg);
  color: var(--tile-text);
  opacity: 0.55;
}

.vcell b {
  font-size: 0.875rem;
  font-weight: 600;
}

.vcell--target {
  padding: 0;
  border-color: var(--accent);
}

.vcell--drop {
  position: absolute;
  inset: -1px;
  opacity: 1;
  box-shadow: var(--shadow-1);
}

[data-view="wait"] .vcell--drop {
  opacity: 0;
  transform: translateY(-12px);
}

[data-view="in"] .vcell--drop {
  transition:
    opacity 300ms var(--ease) 300ms,
    transform 600ms cubic-bezier(0.3, 1.4, 0.5, 1) 300ms;
}

/* Vignette two: one tile cycling through the meal. */
.vtile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 124px;
  height: 124px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--tile-text) 20%, transparent);
  background-color: var(--tile-bg);
  color: var(--tile-text);
  box-shadow: var(--shadow-2);
  transition:
    background-color 320ms var(--ease),
    color 320ms var(--ease);
}

.vtile__name {
  font-weight: 600;
  font-size: 1.125rem;
}

.vtile__name span {
  font-weight: 400;
  opacity: 0.82;
}

.vtile__stage {
  font-weight: 600;
  font-size: 1.0625rem;
}

/* Vignette three: the estimate types in. */
.vrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(260px, 84%);
  padding: 16px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--raised);
  box-shadow: var(--shadow-2);
}

.vrow__who {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.vrow__who b {
  color: var(--text);
  font-weight: 600;
}

.vrow__est {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--accent);
  white-space: nowrap;
}

[data-view="wait"] .vrow__est span {
  opacity: 0;
}

[data-view="in"] .vrow__est span {
  transition: opacity 60ms linear calc(500ms + var(--c) * 90ms);
}

/* Steps rise on first view. */
.step[data-view="wait"],
.card[data-view="wait"] {
  opacity: 0;
  translate: 0 16px;
}

.step[data-view="in"] {
  transition:
    opacity 600ms var(--ease) calc(var(--i) * 100ms),
    translate 600ms var(--ease) calc(var(--i) * 100ms);
}

/* ---------- A Friday, scrolled ---------- */

.friday {
  padding-block: 112px;
  background: var(--bg);
}

.friday__clock,
.friday__progress,
.friday__steps {
  display: none;
}

.friday__beats {
  display: flex;
  flex-direction: column;
  gap: 72px;
  margin-top: 48px;
}

.beat {
  display: grid;
  gap: 24px;
}

.beat__clock {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.beat__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.beat__line {
  max-width: 60ch;
  margin-top: 12px;
  color: var(--muted);
}

.tablet--flat {
  box-shadow: var(--shadow-2);
}

.callout {
  position: absolute;
  left: 100%;
  top: 28%;
  display: flex;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.callout__line {
  width: 14cqi;
  height: 2px;
  background: var(--warn);
}

.callout__text {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warn);
  color: var(--warn-text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Phone and narrow tablets: each beat shows only its part of the board. */
@media (max-width: 1023px) {
  .friday {
    padding-block: 72px;
  }

  .beat__board .tablet {
    padding: 10px;
    border-radius: 22px;
  }

  .beat__board .mini__bar {
    display: none;
  }

  .beat__board .mini__body {
    grid-template-columns: 1fr;
  }

  .beat:not(.beat--wait) .mini__wait {
    display: none;
  }

  .beat .mini__grid .cell:not(.is-crop) {
    display: none;
  }

  .beat[data-beat-index="1"] .mini__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2cqi;
  }

  .beat[data-beat-index="2"] .mini__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5cqi;
  }

  .beat--wait .mini__grid {
    display: none;
  }

  .beat--wait .mini__wait {
    gap: 2.5cqi;
    padding: 4cqi;
    border-radius: 4cqi;
  }

  .beat--wait .mini__wait-head,
  .beat--wait .wl,
  .beat--wait .mini__empty {
    font-size: 0.875rem;
  }

  .beat--wait .wl {
    padding: 3cqi 4cqi;
    border-radius: 3cqi;
    gap: 1cqi 3cqi;
  }

  .beat--today .today {
    padding: 2cqi;
    gap: 4cqi;
  }

  .beat--today .stat {
    padding: 3cqi;
    gap: 2cqi;
    border-radius: 3cqi;
  }

  .beat--today .stat__label,
  .beat--today .today__head {
    font-size: 0.6875rem;
  }

  .beat--today .stat__value {
    font-size: clamp(1.5rem, 7cqi, 2.5rem);
  }

  .beat--today .today__sizes {
    padding: 4cqi;
    border-radius: 3cqi;
  }

  .beat--today .today__sizes dl {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5cqi;
  }

  .beat--today .today__sizes dl div {
    padding: 2.5cqi 3.5cqi;
    border-radius: 2.5cqi;
    font-size: 0.9375rem;
  }
}

@media (min-width: 1024px) {
  .beat {
    grid-template-columns: 4fr 8fr;
    align-items: center;
    gap: 48px;
  }
}

/* Desktop with motion: pin the stage and scroll through four beats. */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .js .friday {
    position: relative;
    height: 360vh;
    padding: 0;
    background: var(--bg-deep);
  }

  .js .friday__title {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .js .friday__stage {
    position: sticky;
    top: 0;
    height: 100svh;
    display: flex;
    align-items: center;
  }

  .js .friday__frame {
    position: relative;
    padding-left: calc(var(--gutter) + 36px);
  }

  .js .friday__progress {
    position: absolute;
    left: var(--gutter);
    top: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 2px;
    height: min(60svh, 440px);
    translate: 0 -50%;
    background: var(--border);
  }

  .js .friday__fill {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform-origin: top;
    transform: scaleY(calc((var(--beat, 1) - 1) / 3));
    transition: transform 320ms var(--ease);
  }

  .js .friday__tick {
    position: relative;
    width: 10px;
    height: 10px;
    margin-left: -4px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 2px solid var(--border-strong);
  }

  .js .beat {
    align-items: start;
  }

  .js .friday__clock {
    position: absolute;
    top: 0;
    left: calc(var(--gutter) + 36px);
    z-index: 2;
    display: flex;
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 1;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
  }

  .roll {
    display: inline-block;
    height: 1em;
    overflow: hidden;
  }

  .roll__strip {
    display: flex;
    flex-direction: column;
    transform: translateY(calc(var(--n) * -1em));
    transition: transform 280ms var(--ease);
  }

  .roll__strip span {
    height: 1em;
    line-height: 1;
  }

  .js .friday__beats {
    display: grid;
    margin: 0;
  }

  .js .beat {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 160ms var(--ease),
      visibility 0s linear 160ms;
  }

  .js .beat__caption {
    padding-top: clamp(5rem, 10vw, 8rem);
  }

  .js .beat__clock {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .js .friday[data-beat="1"] .beat[data-beat-index="1"],
  .js .friday[data-beat="2"] .beat[data-beat-index="2"],
  .js .friday[data-beat="3"] .beat[data-beat-index="3"],
  .js .friday[data-beat="4"] .beat[data-beat-index="4"] {
    opacity: 1;
    visibility: visible;
    transition:
      opacity 240ms var(--ease) 160ms,
      visibility 0s;
  }

  .js .friday[data-beat="2"] .friday__tick:nth-of-type(2),
  .js .friday[data-beat="3"] .friday__tick:nth-of-type(-n + 3),
  .js .friday[data-beat="4"] .friday__tick {
    border-color: var(--accent);
    background: var(--accent);
  }

  .js .friday__tick:first-of-type {
    border-color: var(--accent);
    background: var(--accent);
  }

  .js .friday[data-beat="1"] {
    --beat: 1;
  }
  .js .friday[data-beat="2"] {
    --beat: 2;
  }
  .js .friday[data-beat="3"] {
    --beat: 3;
  }
  .js .friday[data-beat="4"] {
    --beat: 4;
  }

  .js .friday__steps {
    display: block;
    margin-top: -100svh;
  }

  .js .friday__step {
    display: block;
    height: 90vh;
  }
}

/* ---------- The details ---------- */

.bento {
  display: grid;
  gap: 16px;
  margin-top: 56px;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card--7,
  .card--5,
  .card--12 {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .card--7 {
    grid-column: span 7;
  }
  .card--5 {
    grid-column: span 5;
  }
  .card--4 {
    grid-column: span 4;
  }
  .card--12 {
    grid-column: 1 / -1;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  color: var(--muted);
  transition:
    border-color 200ms var(--ease),
    transform 200ms var(--ease);
}

.card[data-view="in"] {
  transition:
    opacity 600ms var(--ease) calc(var(--i) * 60ms),
    translate 600ms var(--ease) calc(var(--i) * 60ms),
    transform 200ms var(--ease),
    border-color 200ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
  }
}

.card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card--7,
.card--5 {
  gap: 28px;
}

@media (min-width: 900px) {
  .card--slim {
    flex-direction: row;
    align-items: baseline;
    gap: 40px;
  }

  .card--slim .card__title {
    flex: none;
  }
}

.bars {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}

.bars__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bars__row {
  display: grid;
  grid-template-columns: 1.25rem auto 3rem;
  justify-content: start;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
}

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

.bars__bar {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--stage-seated),
    var(--stage-seated-text)
  );
  width: calc(var(--w) * clamp(8rem, 22vw, 16rem));
  transform-origin: left;
  transition: transform 500ms var(--ease);
}

[data-view="wait"] .bars__bar {
  transform: scaleX(0);
}

.bars__val {
  color: var(--text);
  font-weight: 600;
}

.bars__arrow {
  width: 40px;
  height: 16px;
  color: var(--accent);
}

.bars__quote {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 1.8vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--accent);
  white-space: nowrap;
}

@media (max-width: 479px) {
  .bars {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bars__arrow {
    transform: rotate(90deg);
  }
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}

.choices li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--raised);
  color: var(--muted);
}

.choices b {
  color: var(--text);
  font-weight: 600;
}

.choices .is-picked {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ---------- Try it ---------- */

.tablet--try {
  max-width: 1120px;
  margin: 48px auto 0;
}

.try__screen {
  height: 640px;
  container-type: normal;
}

.try__screen iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
  background: var(--bg);
}

.try__screen.is-scaled iframe {
  width: 1024px;
  height: 768px;
  transform-origin: 0 0;
  transform: scale(var(--scale));
}

.try__screen.is-scaled {
  height: calc(768px * var(--scale));
}

.try__after {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  text-align: center;
}

.try__note {
  font-size: 0.9375rem;
  color: var(--muted);
}

@media (max-width: 759px) {
  .tablet--try {
    padding: 8px;
    border-radius: 20px;
  }

  .tablet--try .tablet__screen {
    border-radius: 13px;
  }
}

/* ---------- FAQ ---------- */

.faq__inner {
  max-width: calc(760px + 2 * var(--gutter));
}

.faq .h2 {
  margin: 0 0 32px;
}

.faq details {
  border-top: 1px solid var(--border);
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 48px 14px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  background: var(--accent);
  transition: transform 180ms var(--ease);
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::before {
  transform: rotate(45deg);
}

.faq details[open] summary::after {
  transform: rotate(135deg);
}

.faq details p {
  max-width: 60ch;
  padding: 0 48px 22px 0;
  color: var(--muted);
}

/* ---------- Closing ---------- */

.closing {
  position: relative;
  padding-block: 160px;
  overflow: clip;
  text-align: center;
}

.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 50% 60% at 50% 50%,
    var(--lamp),
    transparent 70%
  );
  pointer-events: none;
}

.closing__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing__title {
  margin-top: 28px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.25rem, 1.5rem + 3.6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.closing__line {
  max-width: 60ch;
  margin: 20px 0 36px;
  color: var(--muted);
}

[data-view="wait"] .logo__minute {
  transform: rotate(-90deg);
}

[data-view="in"] .logo__minute {
  transition: transform 600ms var(--ease) 200ms;
}

@media (max-width: 759px) {
  .closing {
    padding-block: 96px;
  }

  .closing .btn {
    width: 100%;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: 28px;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

@media (min-width: 760px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Motion (only when the visitor allows it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .tile--long {
    animation: tile-long 2.4s ease-in-out infinite;
  }

  .rise {
    animation: rise 900ms var(--ease) both;
    animation-delay: calc(var(--i) * 80ms);
  }

  .scene__settle {
    animation: settle 900ms var(--ease) 80ms both;
  }

  .scene__float {
    animation: arrive 700ms var(--ease) 280ms both;
  }

  .scene__toast {
    animation: arrive 700ms var(--ease) 360ms both;
  }

  @supports (animation-timeline: view()) {
    @media (min-width: 1024px) {
      .tablet--hero {
        animation: untilt linear both;
        animation-timeline: --hero;
        animation-range: exit 0% exit 60%;
      }

      .scene__float {
        animation:
          arrive 700ms var(--ease) 280ms both,
          drift linear both;
        animation-timeline: auto, --hero;
        animation-range:
          normal,
          exit 0% exit 60%;
      }
    }
  }
}

@keyframes tile-long {
  50% {
    box-shadow:
      0 0 0 2px var(--warn),
      0 0 0 6px color-mix(in srgb, var(--warn) 25%, transparent);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: perspective(1600px) rotateX(8deg) translateY(16px);
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

@keyframes untilt {
  to {
    --rx: 6deg;
    --ry: -8deg;
  }
}

@keyframes drift {
  to {
    translate: 0 -40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
