/* Tentpole launch site. Tokens follow docs/site/BRIEF.md (shared with the app's docs/DESIGN.md). */

:root {
  /* surfaces (shared with the app) */
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-sunken: #efebe4;
  --border: #e2ddd4;
  --border-strong: #cbc4b8;
  --text: #1f1c18;
  --text-muted: #6b645a;

  /* the one festive accent: tent-stripe vermilion */
  --accent: #e0431f;
  --accent-hover: #c23816;
  --accent-soft: #fde7df;
  --on-accent: #ffffff;
  --focus: #2f6fe4;

  /* status colours, used exactly as the app uses them */
  --ok: #1f8a54;
  --ok-soft: #dcf2e6;
  --low: #b7791f;
  --low-soft: #fbefd7;
  --full: #4b5bb7;
  --full-soft: #e3e6f8;
  --over: #c62f3b;
  --over-soft: #fadfe1;

  /* site-only */
  --stripe: #fbf3e6;
  --paper: #fffdf8;
  --ink: #23201b;
  --shadow-1: 0 1px 2px rgb(60 40 20 / 0.06), 0 2px 6px rgb(60 40 20 / 0.06);
  --shadow-2: 0 2px 4px rgb(60 40 20 / 0.06), 0 12px 32px rgb(60 40 20 / 0.12);
  --shadow-3:
    0 4px 8px rgb(60 40 20 / 0.08), 0 30px 60px -10px rgb(60 40 20 / 0.22);

  /* derived, for AA contrast of small text on light surfaces */
  --accent-ink: var(--accent-hover);
  --btn: var(--accent-hover);
  --btn-hover: #a52e11;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --max: 1160px;
  --pad: clamp(20px, 5vw, 48px);
  --gap-section: clamp(96px, 12vw, 160px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --surface: #1e1b17;
    --surface-sunken: #121009;
    --border: #312d27;
    --border-strong: #4a443b;
    --text: #f3efe8;
    --text-muted: #a69e91;

    --accent: #ff6a43;
    --accent-hover: #ff8563;
    --accent-soft: #3a1d14;
    --on-accent: #1a0c07;
    --focus: #6f9cff;

    --ok: #4cc786;
    --ok-soft: #12301f;
    --low: #e8ab4a;
    --low-soft: #352712;
    --full: #8e9bf0;
    --full-soft: #1f2445;
    --over: #f0606b;
    --over-soft: #3d1519;

    --stripe: #2a211a;
    --paper: #f4efe6;
    --ink: #23201b;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 2px 4px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.5);
    --shadow-3:
      0 4px 8px rgb(0 0 0 / 0.45), 0 30px 60px -10px rgb(0 0 0 / 0.65);

    --accent-ink: var(--accent);
    --btn: var(--accent);
    --btn-hover: var(--accent-hover);
  }
}

/* status text: the strong colour pulled toward --text so badge text passes AA on its soft background */
:root {
  --ok-ink: color-mix(in oklab, var(--ok) 72%, var(--text));
  --low-ink: color-mix(in oklab, var(--low) 58%, var(--text));
  --full-ink: color-mix(in oklab, var(--full) 80%, var(--text));
  --over-ink: color-mix(in oklab, var(--over) 82%, var(--text));
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 720px) {
  body {
    font-size: 1.0625rem;
    line-height: 1.6;
  }
}

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

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

a {
  color: inherit;
}

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

main:focus {
  outline: none;
}

.num {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.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;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-2);
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms var(--ease);
}

.skip:focus {
  transform: translateY(76px);
}

.wrap {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 14px;
}

.section-title,
.hero__title,
.closing__title,
.problem__line,
.isnt__title,
.card-title,
.board__month,
.daycard__num,
.how__num,
.paper__title,
.logo__word {
  font-family: var(--font-display);
  font-variation-settings:
    "SOFT" 50,
    "WONK" 0;
}

.section-title {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 8px;
}

/* ---------- valance ---------- */

.valance {
  height: 28px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0 24px,
    var(--stripe) 24px 48px
  );
  -webkit-mask:
    linear-gradient(#000, #000) top / 100% 14px no-repeat,
    radial-gradient(circle at 24px 0, #000 24px, transparent 24.5px) 0 14px /
      48px 14px repeat-x;
  mask:
    linear-gradient(#000, #000) top / 100% 14px no-repeat,
    radial-gradient(circle at 24px 0, #000 24px, transparent 24.5px) 0 14px /
      48px 14px repeat-x;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    color 160ms var(--ease);
}

.btn--primary {
  background: var(--btn);
  color: var(--on-accent);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.18) inset,
    0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent);
}

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

.btn--primary:active {
  box-shadow: none;
}

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

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

.btn--outline {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}

.btn--outline:hover {
  background: var(--surface);
  border-color: var(--text-muted);
}

.btn--outline:active,
.btn--ghost:active {
  background: var(--surface-sunken);
}

.btn--lg {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 1.0625rem;
}

.arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* ---------- header ---------- */

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

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

.logo__mark {
  width: 32px;
  height: 32px;
}

.logo__word {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

@media (max-width: 719.98px) {
  .nav-how {
    display: none;
  }
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  gap: 48px;
  padding-top: clamp(32px, 6vw, 72px);
}

.hero__title {
  font-size: clamp(2.6rem, 1.6rem + 5vw, 5.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero__title em {
  white-space: nowrap;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero__sub {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 34ch;
  margin-bottom: 30px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.hero__note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 719.98px) {
  .hero__sub {
    font-size: 1.125rem;
  }

  .hero__ctas {
    flex-direction: column;
  }

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

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: 56px;
  }
}

/* the hero board: a recreation of the app's Calendar screen */

.board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-3);
  padding: clamp(12px, 2.4vw, 24px);
}

@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .board {
    transform: perspective(1600px) rotateY(-8deg) rotateX(4deg);
  }
}

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

.board__month {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.board__nav {
  display: flex;
  gap: 6px;
}

.chev,
.pill {
  display: inline-grid;
  place-items: center;
  height: 28px;
  min-width: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1;
}

.pill {
  padding: 0 10px;
  font-size: 0.75rem;
  font-weight: 500;
}

.select-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.select-pill::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.cal-wd {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding-bottom: 2px;
}

.cal-cell {
  position: relative;
  aspect-ratio: 1 / 0.86;
  min-height: 48px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cal-cell.is-out {
  opacity: 0.4;
  background: var(--surface-sunken);
}

.cal-date {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.cal-cell .badge {
  align-self: flex-end;
}

.cal-dots {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  gap: 3px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot--del {
  background: var(--accent);
}

.dot--pick {
  background: var(--text-muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 719.98px) {
  .cal {
    gap: 4px;
  }

  .cal-cell {
    padding: 4px;
    border-radius: 8px;
    min-height: 44px;
  }

  .cal-cell .badge {
    font-size: 0.6875rem;
    padding: 1px 4px;
  }

  .cal-dots {
    display: none;
  }

  .select-pill {
    margin-left: 0;
  }
}

/* status badges, as in the app */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition:
    background-color 300ms var(--ease),
    color 300ms var(--ease);
}

.badge--ok {
  background: var(--ok-soft);
  color: var(--ok-ink);
}

.badge--low {
  background: var(--low-soft);
  color: var(--low-ink);
}

.badge--full {
  background: var(--full-soft);
  color: var(--full-ink);
}

.badge--over {
  background: var(--over-soft);
  color: var(--over-ink);
}

/* hero motion */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes badge-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--full) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--full) 0%, transparent);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .hero__copy {
    animation: fade-up 600ms var(--ease) both;
  }

  .js .board {
    animation: fade-in 600ms var(--ease) 150ms both;
  }

  .js .cal-cell .badge {
    animation: badge-in 320ms var(--ease) calc(450ms + var(--d) * 25ms) both;
  }

  .js .cal-cell.is-pulse {
    animation: ring 1.2s var(--ease) 1.1s 1;
  }
}

/* ---------- fade-ups (only hidden once main.js has run) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms var(--ease) var(--stagger, 0ms),
    transform 600ms var(--ease) var(--stagger, 0ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 2. problem line ---------- */

.problem {
  margin-top: var(--gap-section);
  text-align: center;
}

.problem__line {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
  margin: 0 auto 24px;
  text-wrap: balance;
}

.problem__body {
  max-width: 56ch;
  margin-inline: auto;
  color: var(--text-muted);
}

/* ---------- 3. One Saturday ---------- */

.saturday {
  margin-top: var(--gap-section);
}

.sat-steps {
  display: grid;
  gap: 20px;
}

.sat-step {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.sat-step__title {
  font-family: var(--font-display);
  font-variation-settings:
    "SOFT" 50,
    "WONK" 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.sat-step__n {
  color: var(--text-muted);
  font-weight: 500;
}

.sat-step__copy p {
  color: var(--text-muted);
  max-width: 46ch;
}

.sat-step__copy .sat-step__aside {
  margin-top: 14px;
  font-size: 0.9375rem;
  color: var(--text);
  padding-left: 12px;
  border-left: 2px solid var(--border-strong);
}

.sat-step__visual {
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .sat-step {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .sat-step[data-step-block="4"] .sat-step__visual {
    grid-template-columns: 1fr;
  }
}

.scene {
  display: none;
}

/* the day card */

.daycard {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}

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

.daycard__item {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.daycard__count {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 14px;
}

.daycard__num {
  font-size: 3.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.daycard--big .daycard__num {
  font-size: 5rem;
}

.daycard__count > .badge,
.daycard__count > .swap:not(.daycard__num) {
  order: 2;
}

.daycard__free {
  order: 1;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* the stock bar: 200 slots, one segment per order; the right 30% is headroom for the over-booking ghost */

.bar {
  padding-right: 30%;
}

.bar__track {
  position: relative;
  display: flex;
  height: 16px;
  border-radius: 999px;
  background: var(--surface-sunken);
  box-shadow: inset 0 0 0 1px var(--border);
}

.seg {
  display: block;
  height: 100%;
  flex: none;
}

.seg--a {
  background: color-mix(in oklab, var(--text) 82%, var(--surface));
  border-radius: 999px 0 0 999px;
}

.seg--b {
  background: color-mix(in oklab, var(--text) 55%, var(--surface));
  box-shadow: inset 2px 0 0 var(--surface);
}

.seg--c {
  background: color-mix(in oklab, var(--text) 32%, var(--surface));
  box-shadow: inset 2px 0 0 var(--surface);
  border-radius: 0 999px 999px 0;
}

.seg-ghost {
  position: absolute;
  left: calc(100% + 3px);
  top: 0;
  width: 40%;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: repeating-linear-gradient(
    45deg,
    var(--over) 0 4px,
    color-mix(in srgb, var(--over) 25%, transparent) 4px 8px
  );
  opacity: 0;
}

.seg-ghost.is-on {
  opacity: 1;
}

.bar__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.bar__labels li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.sw--a {
  background: color-mix(in oklab, var(--text) 82%, var(--surface));
}

.sw--b {
  background: color-mix(in oklab, var(--text) 55%, var(--surface));
}

.sw--c {
  background: color-mix(in oklab, var(--text) 32%, var(--surface));
}

.sw--ghost {
  background: repeating-linear-gradient(
    45deg,
    var(--over) 0 2px,
    transparent 2px 4px
  );
  box-shadow: inset 0 0 0 1px var(--over);
}

/* the order form card */

.formcard {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  display: grid;
  gap: 12px;
}

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

.field {
  display: grid;
  gap: 4px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.field__input {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.9375rem;
  min-height: 38px;
}

.oline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-sunken);
  font-size: 0.9375rem;
}

.oline__item {
  flex: 1;
  min-width: 0;
}

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

.oline__qty {
  min-width: 3.5em;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  text-align: right;
  font-weight: 600;
}

.struck {
  color: var(--text-muted);
  font-weight: 400;
  margin-right: 4px;
}

.hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: -4px;
}

.hint--ok {
  color: var(--ok-ink);
}

.hint .hint--over,
.hint.hint--over {
  color: var(--over-ink);
  font-weight: 600;
}

.conflict {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--over-soft);
  color: var(--over-ink);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.save {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--btn);
  color: var(--on-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: opacity 300ms var(--ease);
}

.save.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* the sticky scroll scene: desktop, with JavaScript, and only when motion is welcome */

@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .js .sat-layout {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 64px;
  }

  .js .sat-steps {
    gap: 0;
  }

  .js .sat-step {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .js .sat-step__visual {
    display: none;
  }

  .js .sat-step__copy {
    opacity: 0.32;
    transition: opacity 300ms var(--ease);
  }

  .js .saturday[data-step="1"] [data-step-block="1"] .sat-step__copy,
  .js .saturday[data-step="2"] [data-step-block="2"] .sat-step__copy,
  .js .saturday[data-step="3"] [data-step-block="3"] .sat-step__copy,
  .js .saturday[data-step="4"] [data-step-block="4"] .sat-step__copy {
    opacity: 1;
  }

  .js .scene {
    display: block;
  }

  .js .scene__sticky {
    position: sticky;
    top: 12vh;
    display: grid;
    gap: 18px;
  }

  .js .scene .daycard,
  .js .scene .formcard {
    padding: 22px 26px;
  }
}

.scene .daycard {
  background: var(--surface);
  box-shadow: var(--shadow-3);
  padding: 28px;
}

/* crossfading values: every step's value is stacked in one cell; the active one rises in */

.swap {
  display: inline-grid;
}

.swap > * {
  grid-area: 1 / 1;
  justify-self: start;
  opacity: 0;
  transform: translateY(0.45em);
  transition:
    opacity 300ms var(--ease),
    transform 300ms var(--ease);
}

.saturday[data-step="1"] .swap > [data-s~="1"],
.saturday[data-step="2"] .swap > [data-s~="2"],
.saturday[data-step="3"] .swap > [data-s~="3"],
.saturday[data-step="4"] .swap > [data-s~="4"] {
  opacity: 1;
  transform: none;
}

.daycard__count .swap {
  align-self: center;
}

.daycard__count .daycard__num.swap {
  align-self: auto;
}

.scene .seg {
  width: 0;
  transition: width 400ms var(--ease);
}

.saturday:is([data-step="1"], [data-step="2"], [data-step="3"], [data-step="4"])
  .scene
  .seg--a {
  width: 60%;
}

.saturday:is([data-step="2"], [data-step="3"], [data-step="4"]) .scene .seg--b {
  width: 25%;
}

.saturday:is([data-step="3"], [data-step="4"]) .scene .seg--c {
  width: 15%;
}

.scene .seg-ghost,
.scene .lab,
.scene__conflict {
  transition: opacity 300ms var(--ease);
}

.scene .lab {
  opacity: 0;
}

.saturday:is([data-step="1"], [data-step="2"], [data-step="3"], [data-step="4"])
  .scene
  .lab--a,
.saturday:is([data-step="2"], [data-step="3"], [data-step="4"]) .scene .lab--b,
.saturday:is([data-step="3"], [data-step="4"]) .scene .lab--c,
.saturday[data-step="4"] .scene .lab--ghost,
.saturday[data-step="4"] .scene .seg-ghost {
  opacity: 1;
}

.scene__conflict {
  opacity: 0;
}

.saturday[data-step="4"] .scene__conflict {
  opacity: 1;
}

.saturday[data-step="4"] .scene__save {
  opacity: 0.4;
  cursor: not-allowed;
}

@keyframes flash-over {
  0%,
  45% {
    background-color: var(--over-soft);
    color: var(--over-ink);
  }
}

.saturday[data-step="4"] .scene .badge--flash {
  animation: flash-over 1.2s var(--ease) 1;
}

/* ---------- 4. How it works ---------- */

.how {
  margin-top: var(--gap-section);
}

.how__cols {
  display: grid;
  gap: 48px;
}

@media (min-width: 840px) {
  .how__cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
  }
}

.how__col {
  display: flex;
  flex-direction: column;
}

.how__col > p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.how__num {
  font-size: 4rem;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  margin-bottom: 14px;
}

@media (forced-colors: active) {
  .how__num {
    -webkit-text-stroke: 0;
    color: CanvasText;
  }
}

.vignette {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  display: grid;
  gap: 8px;
}

.mini-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mini-eyebrow:not(:first-child) {
  margin-top: 6px;
}

.inv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.inv-row:last-child {
  border-bottom: 0;
}

.inv-row .num {
  font-weight: 600;
}

.vignette--paper {
  background: var(--paper);
  color: var(--ink);
  border-color: transparent;
  box-shadow: var(--shadow-2);
}

.tiny-sheet__head {
  font-weight: 600;
  font-size: 0.875rem;
  padding-bottom: 8px;
  border-bottom: 1px solid rgb(35 32 27 / 0.2);
}

.tiny-sheet__row {
  font-size: 0.875rem;
}

.tiny-sheet__row .mono {
  display: inline-block;
  min-width: 3.2em;
}

/* ---------- 5. Bento ---------- */

.features {
  margin-top: var(--gap-section);
}

.bento {
  display: grid;
  gap: 16px;
}

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

  .bento__card--7,
  .bento__card--5 {
    grid-column: span 2;
  }
}

@media (min-width: 1040px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
  }

  .bento__card--7 {
    grid-column: span 7;
  }

  .bento__card--5 {
    grid-column: span 5;
  }

  .bento__card--4 {
    grid-column: span 4;
  }

  .bento__card--6 {
    grid-column: span 6;
  }
}

.bento__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.bento__card > p {
  color: var(--text-muted);
  margin-bottom: 22px;
}

.js .bento__card.reveal.is-in {
  transition:
    opacity 600ms var(--ease),
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.bento__card:hover {
  box-shadow: var(--shadow-2);
}

@media (prefers-reduced-motion: no-preference) {
  .bento__card:hover,
  .js .bento__card.reveal.is-in:hover {
    transform: translateY(-2px);
  }
}

.bento__card--7,
.bento__card--5 {
  min-height: 340px;
}

.viz {
  margin-top: auto;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  gap: 8px;
  min-width: 0;
}

.viz .select-pill {
  margin-left: 0;
  justify-self: start;
}

.strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.strip__cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  min-height: 52px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 0;
}

.strip__cell .badge {
  align-self: flex-end;
  padding: 1px 5px;
  font-size: 0.6875rem;
}

@media (max-width: 719.98px) {
  .bento__card {
    padding: 20px;
  }

  .viz {
    padding: 12px;
  }

  .strip {
    gap: 4px;
  }

  .strip__cell {
    padding: 4px 3px;
    min-height: 46px;
  }

  .strip__cell .badge {
    padding: 1px 3px;
    font-size: 0.625rem;
  }
}

.viz--stack {
  gap: 10px;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.mini-table th {
  text-align: right;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.6875rem;
  padding: 0 0 6px 6px;
}

.mini-table th:first-child,
.mini-table td:first-child {
  text-align: left;
  padding-left: 0;
}

.mini-table td {
  text-align: right;
  padding: 6px 0 6px 6px;
  border-top: 1px solid var(--border);
}

.viz--backup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.fake-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 600;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.file-chip::before {
  content: "";
  width: 10px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.viz--phone {
  place-items: center;
  padding-block: 20px;
}

.phone {
  width: 120px;
  height: 240px;
  border: 2px solid var(--border-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone__screen {
  flex: 1;
  padding: 18px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.phone__month {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.6875rem;
}

.phone__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.phone__cell {
  --cell-soft: var(--ok-soft);
  --cell-dot: var(--ok);
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--cell-soft);
}

.phone__cell::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cell-dot);
}

.phone__cell--low {
  --cell-soft: var(--low-soft);
  --cell-dot: var(--low);
}

.phone__cell--full {
  --cell-soft: var(--full-soft);
  --cell-dot: var(--full);
}

.phone__tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  padding: 6px 2px 8px;
  font-size: 0.4375rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.phone__tabs .is-active {
  color: var(--accent);
}

/* ---------- 6. Sheets ---------- */

.sheets {
  margin-top: var(--gap-section);
  background: var(--surface-sunken);
  padding-block: clamp(64px, 9vw, 120px);
}

.sheets__inner {
  display: grid;
  gap: 56px;
  align-items: center;
}

.sheets__copy > p:last-child {
  color: var(--text-muted);
  margin-top: 18px;
  max-width: 44ch;
}

@media (min-width: 960px) {
  .sheets__inner {
    grid-template-columns: 5fr 7fr;
  }
}

.paper-stack {
  position: relative;
  max-width: 520px;
  margin-inline: auto;
}

.paper {
  aspect-ratio: 8.5 / 11;
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  box-shadow: var(--shadow-3);
}

.paper--back {
  position: absolute;
  inset: 0;
  transform: rotate(3deg);
  box-shadow: var(--shadow-2);
}

.paper--front {
  position: relative;
  padding: clamp(18px, 5%, 40px);
  font-size: 0.8125rem;
  line-height: 1.45;
  transform: rotate(-2deg);
  transition: transform 700ms cubic-bezier(0.3, 0, 0, 1.2);
}

@media (prefers-reduced-motion: no-preference) {
  .js .paper-stack:not(.is-in) .paper--front {
    transform: translateY(24px) rotate(-4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .paper--front {
    transition: none;
  }
}

.paper__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(35 32 27 / 0.25);
  margin-bottom: 16px;
}

.paper__title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.paper__date {
  font-weight: 500;
}

.paper__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(35 32 27 / 0.65);
  margin-bottom: 4px;
}

.paper__load {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.paper__load td {
  padding: 3px 0;
  border-bottom: 1px dotted rgb(35 32 27 / 0.3);
}

.paper__load td.mono {
  text-align: right;
}

.stop {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgb(35 32 27 / 0.2);
}

.stop__num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e0431f;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
}

.stop__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stop__title {
  font-weight: 600;
}

.stop__notes {
  font-style: italic;
}

.stop__sign {
  margin-top: 8px;
  color: rgb(35 32 27 / 0.7);
}

@media (max-width: 719.98px) {
  .paper--back {
    display: none;
  }

  .paper--front {
    transform: rotate(-1deg);
    font-size: 0.75rem;
  }

  @media (prefers-reduced-motion: no-preference) {
    .js .paper-stack:not(.is-in) .paper--front {
      transform: translateY(24px) rotate(-3deg);
    }
  }
}

/* ---------- 7. Live app ---------- */

.live {
  margin-top: var(--gap-section);
}

.live__body {
  color: var(--text-muted);
  margin-top: 16px;
}

.live__note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.browser {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.browser__bar {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
}

.browser__dots {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 6px;
}

.browser__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.browser__addr {
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

@media (max-width: 719.98px) {
  .browser iframe {
    height: 640px;
  }
}

.live__cta {
  margin-top: 28px;
  text-align: center;
}

/* ---------- 8. What it isn't ---------- */

.isnt {
  margin-top: var(--gap-section);
}

.isnt__title {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.isnt__intro {
  color: var(--text-muted);
  margin: 8px 0 28px;
}

.isnt__list {
  display: grid;
  gap: 16px 48px;
}

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

.isnt__list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-muted);
}

.isnt__list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

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

/* ---------- 9. Closing ---------- */

.closing {
  margin-top: var(--gap-section);
}

.closing__wall {
  max-width: var(--max);
  margin: 0 var(--pad);
  padding: clamp(72px, 10vw, 128px) var(--pad);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 1256px) {
  .closing__wall {
    margin-inline: auto;
  }
}

.closing__title {
  font-size: clamp(2.2rem, 1.4rem + 4vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 18px;
}

.closing__line {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 34ch;
  margin-bottom: 32px;
}

.closing__note {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- 10. Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-block: 40px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.site-footer__mark {
  width: 20px;
  height: 20px;
}

.site-footer__right {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--accent-ink);
}

@media (max-width: 719.98px) {
  .site-footer,
  .site-footer__right {
    flex-direction: column;
    text-align: center;
  }

  .site-footer__right {
    gap: 4px;
  }
}
