/* Bunting launch site. Tokens from docs/site/BRIEF.md. */

:root {
  color-scheme: light dark;
  --bg: #fff8ee;
  --bg-deep: #f6ebdd;
  --surface: #ffffff;
  --ink: #2b211c;
  --ink-muted: #5e5049;
  --line: #e7d8c6;
  --primary: #c2255c;
  --primary-hover: #a61e4d;
  --primary-soft: #fce4ec;
  --on-primary: #ffffff;
  --accent: #f2a541;
  --flag-mint: #7cc4a8;
  --flag-sky: #8fb8e8;
  --warning-soft: #fff1c2;
  --warning-border: #d9a400;
  --focus: #1d4ed8;
  --shadow-paper: 0 2px 4px rgb(60 30 10 / 0.06), 0 18px 40px rgb(60 30 10 / 0.12);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --section-gap: clamp(5rem, 12vw, 9rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1512;
    --bg-deep: #241d19;
    --surface: #2e2621;
    --ink: #f7eee5;
    --ink-muted: #c9b8aa;
    --line: #3e342d;
    --primary: #ff8ab3;
    --primary-hover: #ffa6c6;
    --primary-soft: #3d1e2a;
    --on-primary: #3a0618;
    --accent: #f6b85b;
    --flag-mint: #5fae90;
    --flag-sky: #6f9bd0;
    --warning-soft: #3a3014;
    --warning-border: #e0b84a;
    --focus: #8ab4ff;
    --shadow-paper: 0 2px 4px rgb(0 0 0 / 0.3), 0 18px 40px rgb(0 0 0 / 0.45);
  }
}

/* Paper stays light in both themes, like a printed sheet on a dark table. */
.paper {
  --surface: #ffffff;
  --ink: #2b211c;
  --ink-muted: #5e5049;
  --line: #e7d8c6;
  --primary: #c2255c;
  --primary-soft: #fce4ec;
  --warning-soft: #fff1c2;
  --warning-border: #d9a400;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-paper);
  border-radius: 8px;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

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

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

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

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

a {
  color: var(--primary);
}

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

.defs {
  position: absolute;
  overflow: hidden;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus-visible {
  top: 10px;
}

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

main > section + section {
  margin-top: var(--section-gap);
}

main > .proof {
  margin-top: clamp(2rem, 5vw, 3rem);
}

/* ---------- Type ---------- */

.h2,
.hero__title,
.closing__title,
.h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero__title,
.closing__title {
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  line-height: 1.02;
}

.h2 {
  font-size: clamp(1.875rem, 4.2vw, 3.25rem);
  line-height: 1.08;
}

.h3 {
  font-size: 1.375rem;
  line-height: 1.25;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.intro {
  margin-top: 1rem;
  max-width: 52ch;
  color: var(--ink-muted);
}

.eyebrow {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.fine {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ---------- Controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 150ms var(--ease-out),
    transform 150ms var(--ease-out);
}

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

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

.btn--big {
  min-height: 52px;
  padding: 0 1.75rem;
  font-size: 1.0625rem;
}

.btn--tall {
  min-height: 56px;
}

.btn__arrow {
  display: inline-block;
  transition: transform 150ms var(--ease-out);
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 150ms var(--ease-out);
}

.text-link:hover {
  color: var(--primary-hover);
}

.text-link:active {
  transform: translateY(1px);
}

/* ---------- Logo and flags ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  border-radius: 8px;
  color: var(--ink);
}

.logo:hover {
  opacity: 0.85;
}

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

.logo svg {
  display: block;
  overflow: visible;
}

.logo__string {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
}

.logo__flags polygon {
  stroke-width: 1.5;
}

.logo__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  fill: var(--ink);
}

polygon.f-p,
polygon.f-a,
polygon.f-m,
polygon.f-s {
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.f-p {
  fill: var(--primary);
  stroke: var(--primary);
}

.f-a {
  fill: var(--accent);
  stroke: var(--accent);
}

.f-m {
  fill: var(--flag-mint);
  stroke: var(--flag-mint);
}

.f-s {
  fill: var(--flag-sky);
  stroke: var(--flag-sky);
}

.bunting {
  display: block;
  overflow: visible;
}

.bunting .string {
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.bunting .flag,
.bunting .flag polygon {
  transform-box: fill-box;
  transform-origin: 50% 0;
}

@media (prefers-reduced-motion: no-preference) {
  .bunting .flag polygon {
    animation: sway calc(5s + var(--i) * 0.23s) ease-in-out infinite alternate;
    animation-delay: calc(var(--i) * -0.83s);
  }

  .hero__bunting .flag {
    animation: drop 520ms var(--ease-bounce) backwards;
    animation-delay: calc(250ms + var(--i) * 40ms);
  }

  .js .closing:not(.is-in) .flag {
    opacity: 0;
  }

  .closing.is-in .flag {
    animation: drop 520ms var(--ease-bounce) backwards;
    animation-delay: calc(var(--i) * 30ms);
  }
}

@keyframes sway {
  from {
    transform: rotate(-2.5deg);
  }
  to {
    transform: rotate(2.5deg);
  }
}

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

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

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
}

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

/* ---------- 0. Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms var(--ease-out);
}

[data-scrolled] .site-header {
  border-bottom-color: var(--line);
}

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

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav__anchor a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 150ms var(--ease-out);
}

.site-nav__anchor a:hover {
  background: var(--bg-deep);
}

.site-nav__anchor a:active {
  transform: translateY(1px);
}

.btn--small {
  margin-left: 0.5rem;
  font-size: 0.9375rem;
}

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

/* ---------- Shaded bands with a scalloped tablecloth edge ---------- */

.band {
  position: relative;
  background: var(--bg-deep);
  padding-block: clamp(4rem, 9vw, 7rem);
}

.band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
  background: var(--bg-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E")
    0 0 / 24px 12px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E")
    0 0 / 24px 12px repeat-x;
}

/* ---------- 1. Hero ---------- */

.hero__grid {
  display: grid;
  gap: 2rem;
}

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

.hero__lead {
  margin-top: 1.5rem;
  max-width: 34ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 2rem;
}

.hero .fine {
  margin-top: 1.25rem;
}

.swash {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.swash__line {
  position: absolute;
  z-index: -1;
  left: -0.04em;
  bottom: -0.06em;
  width: calc(100% + 0.08em);
  height: 0.32em;
  overflow: visible;
}

.swash--bridge .swash__line {
  width: calc(100% + 0.3em);
}

.swash__line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__rise {
    animation: rise 600ms var(--ease-out) backwards;
    animation-delay: var(--d);
  }

  .swash__line path {
    animation: draw 600ms var(--ease-out) 300ms backwards;
  }

  .swash__line--2 path {
    animation-delay: 420ms;
  }
}

.hero__visual {
  position: relative;
  isolation: isolate;
}

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

.plane--back {
  z-index: 0;
  background: radial-gradient(60% 60% at 60% 40%, var(--primary-soft), transparent 70%);
}

.balloon-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.15;
}

.balloon-dot--1 {
  width: 120px;
  height: 140px;
  top: 14%;
  right: 4%;
}

.balloon-dot--2 {
  width: 80px;
  height: 92px;
  bottom: 12%;
  left: 6%;
}

.plane--sheet {
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 84px;
  transform: rotate(-3deg);
}

.plane--front {
  z-index: 2;
  pointer-events: none;
}

.hero__bunting {
  position: absolute;
  top: 0;
  left: -8%;
  width: 116%;
  height: 132px;
}

.price-tag {
  position: absolute;
  right: calc((100% - min(380px, 80%)) / 2 - 28px);
  bottom: 30%;
  display: grid;
  gap: 0.1rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  transform: rotate(4deg);
}

.price-tag__calc {
  color: var(--ink-muted);
}

.price-tag strong {
  font-size: 1.25rem;
  color: var(--primary);
}

.price-tag::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 5fr 6fr;
    align-items: center;
    gap: 3rem;
    min-height: calc(min(88vh, 860px) - 64px);
  }

  .hero__visual {
    min-height: 640px;
  }
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .plane--back,
    .plane--sheet,
    .plane--front {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root);
      animation-range: 0px 600px;
    }

    .plane--back {
      animation-name: parallax-back;
    }

    .plane--sheet {
      animation-name: parallax-sheet;
    }

    .plane--front {
      animation-name: parallax-front;
    }
  }
}

@keyframes parallax-back {
  to {
    transform: translateY(40px);
  }
}

@keyframes parallax-sheet {
  from {
    transform: translateY(0) rotate(-3deg);
  }
  to {
    transform: translateY(-30px) rotate(-1deg);
  }
}

@keyframes parallax-front {
  to {
    transform: translateY(-60px);
  }
}

@media (max-width: 899.98px) {
  .hero__grid {
    padding-top: 0;
  }

  .hero__visual {
    order: -1;
    height: 300px;
    margin-inline: calc(-1 * var(--pad));
    overflow: hidden;
  }

  .hero__visual::after {
    content: "";
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg));
  }

  .plane--sheet {
    padding-top: 48px;
  }

  .hero__sheet {
    width: 260px;
    font-size: 8.5px;
  }

  .hero__bunting {
    left: 0;
    width: 100%;
    height: 96px;
  }

  .price-tag {
    display: none;
  }

  .hero__actions .btn,
  .hero__actions .text-link {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- The paper plan sheet (hero and section 4) ---------- */

.sheet {
  width: min(380px, 80%);
  aspect-ratio: 210 / 297;
  padding: 2.2em 2.2em 2em;
  display: flex;
  flex-direction: column;
  gap: 0.85em;
  font-size: 11.5px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.sheet p {
  margin: 0;
}

.sheet__venue {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--ink-muted);
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--line);
}

.sheet__title {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: max(18px, 1.9em);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.sheet__balloon {
  width: 0.7em;
  height: 1.05em;
  color: var(--primary);
}

.sheet__party {
  display: grid;
  gap: 0.1em;
}

.sheet__child {
  font-size: 1.3em;
}

.sheet__label {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.25em !important;
}

.sheet__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.sheet__chips span {
  padding: 0.15em 0.75em;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--line);
}

.sheet__row {
  display: flex;
  justify-content: space-between;
  gap: 1em;
}

.sheet__allergy {
  position: relative;
  padding: 0.6em 0.8em;
  border-radius: 6px;
  background: var(--warning-soft);
  border: 2px solid var(--warning-border);
}

.sheet__total {
  margin-top: auto !important;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.6em;
  border-top: 2px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: max(18px, 1.6em);
}

.sheet__total strong {
  color: var(--primary);
  font-weight: 600;
}

.sheet--large {
  width: 460px;
  max-width: 100%;
  font-size: 13.5px;
  gap: 0.75em;
}

.sheet__price .sheet__row {
  font-size: 0.95em;
}

.sheet__time,
.sheet__price .sheet__label {
  position: relative;
}

/* Numbered dots where the callouts' leader lines land. */
.pin {
  position: absolute;
  left: -1.85em;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 1.45em;
  height: 1.45em;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8em;
  font-weight: 700;
  line-height: 1;
}

.sheet__allergy .pin {
  left: calc(-1.85em - 2px);
}

.sheet__total {
  position: relative;
}

.sheet__total .pin {
  font-family: var(--font-body);
  font-size: 10.8px;
}

/* ---------- 2. Proof strip ---------- */

.proof__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 0;
  font-weight: 600;
  color: var(--ink-muted);
  text-align: center;
}

.proof__list li {
  display: inline-flex;
  align-items: center;
}

.proof__list li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-inline: 0.85rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 3. How it adds up ---------- */

.how__grid {
  margin-top: 3rem;
}

.tape {
  width: 340px;
}

.tape__bunting {
  width: 100%;
  height: auto;
  margin-bottom: -40px;
  position: relative;
  z-index: 1;
}

.receipt {
  position: relative;
  padding: 2.75rem 1.25rem 1.5rem;
  border-radius: 4px 4px 8px 8px;
}

.receipt__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.receipt__table caption {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 0.75rem;
}

.receipt__table th,
.receipt__table td {
  padding: 0.4rem 0;
  vertical-align: top;
  text-align: left;
}

.receipt__table tbody th {
  font-weight: 600;
  padding-right: 0.5rem;
}

.receipt__table tbody td:nth-child(2) {
  color: var(--ink-muted);
  padding-right: 0.5rem;
  white-space: nowrap;
}

.receipt__table td:last-child {
  text-align: right;
  white-space: nowrap;
}

.receipt__table tfoot th,
.receipt__table tfoot td {
  padding-top: 0.9rem;
  border-top: 2px dashed var(--line);
  vertical-align: baseline;
}

.receipt__table tfoot th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
}

.receipt__total {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.slip {
  position: relative;
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 4px;
  background: var(--warning-soft);
  border: 2px solid var(--warning-border);
  color: var(--ink);
  font-weight: 600;
  transform: rotate(-1.5deg);
}

.slip::before {
  content: "⚠ Allergy";
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* The staple. */
.slip::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 22px;
  height: 4px;
  margin-left: -11px;
  border-radius: 2px;
  background: #8a7d74;
}

.step {
  display: grid;
  gap: 0.6rem;
  align-content: center;
}

.step > p {
  max-width: 40ch;
  color: var(--ink-muted);
}

.step__n {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.75rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  border: 2px solid var(--primary);
  font-size: 1rem;
  vertical-align: 0.15em;
  transition:
    background-color 260ms var(--ease-out),
    color 260ms var(--ease-out);
}

.frag {
  margin-top: 0.5rem;
  padding: 1rem 1.1rem;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.frag p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.frag__line small {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.frag__line + .frag__line {
  margin-top: 0.4rem;
}

.frag__run {
  margin-top: 0.75rem !important;
  padding-top: 0.6rem;
  border-top: 2px dashed var(--line);
  font-weight: 600;
}

.frag__run strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary);
}

.frag .slip {
  margin-top: 0.25rem;
}

@media (max-width: 899.98px) {
  .how {
    padding-top: 0;
  }

  .how__phone-bunting {
    width: 100%;
    height: 90px;
    margin-bottom: 2rem;
  }

  .how__tape-col {
    display: none;
  }

  .steps {
    display: grid;
    gap: 1.25rem;
  }

  .step {
    padding: 1.25rem;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
  }

  .step .frag {
    box-shadow: none;
    border: 1px solid #e7d8c6;
  }
}

@media (min-width: 900px) {
  .how__phone-bunting,
  .frag {
    display: none;
  }

  .how__grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: clamp(3rem, 7vw, 6rem);
  }

  .how__tape-col {
    position: sticky;
    top: 96px;
    align-self: start;
  }

  .step {
    min-height: 60vh;
  }

  .step:first-child {
    min-height: 40vh;
    align-content: start;
  }

  /* Colour, not opacity, marks the active step so the body text keeps its 6.6:1 contrast. */
  .how[data-step] .step h3 {
    color: var(--ink-muted);
    transition: color 260ms var(--ease-out);
  }

  .how[data-step] .step__n {
    background: transparent;
    color: var(--primary);
  }

  .how[data-step="1"] .step[data-step-n="1"] h3,
  .how[data-step="2"] .step[data-step-n="2"] h3,
  .how[data-step="3"] .step[data-step-n="3"] h3,
  .how[data-step="4"] .step[data-step-n="4"] h3,
  .how[data-step="5"] .step[data-step-n="5"] h3 {
    color: var(--ink);
  }

  .how[data-step="1"] .step[data-step-n="1"] .step__n,
  .how[data-step="2"] .step[data-step-n="2"] .step__n,
  .how[data-step="3"] .step[data-step-n="3"] .step__n,
  .how[data-step="4"] .step[data-step-n="4"] .step__n,
  .how[data-step="5"] .step[data-step-n="5"] .step__n {
    background: var(--primary);
    color: var(--on-primary);
  }

  /* Lines and flags wait for their step; main.js only sets data-step when motion is allowed. */
  .how[data-step] .tape [data-at] {
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity 260ms var(--ease-out),
      transform 260ms var(--ease-out);
  }

  .how[data-step] .tape .flag[data-at] {
    transform: translateY(-20px);
    transition:
      opacity 260ms var(--ease-out),
      transform 420ms var(--ease-bounce);
  }

  .how[data-step] .tape .slip[data-at] {
    transform: translateY(-8px) rotate(-1.5deg);
  }

  .how[data-step="1"] .tape [data-at="1"],
  .how[data-step="2"] .tape :is([data-at="1"], [data-at="2"]),
  .how[data-step="3"] .tape :is([data-at="1"], [data-at="2"], [data-at="3"]),
  .how[data-step="4"] .tape :is([data-at="1"], [data-at="2"], [data-at="3"], [data-at="4"]),
  .how[data-step="5"] .tape [data-at] {
    opacity: 1;
    transform: none;
  }

  .how[data-step="5"] .tape .slip[data-at] {
    transform: rotate(-1.5deg);
  }
}

/* ---------- 4. The plan sheet ---------- */

.plan__body {
  margin-top: 1rem;
  max-width: 48ch;
  color: var(--ink-muted);
}

.plan__grid {
  display: grid;
  gap: 2rem;
}

.plan__sheet-wrap {
  display: flex;
  justify-content: center;
}

.callouts {
  display: grid;
  gap: 1rem;
  counter-reset: callout;
}

.callout {
  counter-increment: callout;
}

.callout__text {
  display: block;
}

.leader {
  display: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9375rem;
}

.action-chip svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 899.98px) {
  .sheet--large {
    width: 100%;
    max-width: 340px;
    font-size: 10.5px;
    padding-left: 2.6em;
  }

  .callouts {
    order: 3;
  }

  .callout {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: 0.75rem;
  }

  .callout::before {
    content: counter(callout);
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-top: 0.1rem;
    border-radius: 50%;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 700;
    font-size: 0.875rem;
  }

  .plan__actions {
    order: 4;
  }
}

@media (min-width: 900px) {
  .plan__grid {
    grid-template-columns: minmax(0, 1fr) 460px;
    grid-template-areas:
      "copy copy"
      "notes sheet"
      "actions .";
    column-gap: 3rem;
    row-gap: 0;
  }

  .plan__copy {
    grid-area: copy;
    margin-bottom: 3rem;
  }

  .plan__sheet-wrap {
    grid-area: sheet;
  }

  /* The callouts lie over both columns so each leader line can reach its dot. */
  .callouts {
    grid-row: 2 / span 2;
    grid-column: 1 / -1;
    align-self: stretch;
    position: relative;
    z-index: 1;
    display: block;
    pointer-events: none;
  }

  .callout {
    position: absolute;
    left: 0;
    right: calc(460px - var(--x));
    top: var(--y);
    display: flex;
    align-items: center;
    gap: 1rem;
    translate: 0 -50%;
  }

  /* Where each numbered dot sits on the 460 px sheet. */
  .callout--1 {
    --y: 159px;
    --x: 11px;
  }

  .callout--2 {
    --y: 360px;
    --x: 11px;
  }

  .callout--3 {
    --y: 602px;
    --x: 11px;
  }

  .callout__text {
    flex: 0 1 19rem;
    pointer-events: auto;
  }

  .leader {
    display: block;
    flex: 1 1 2rem;
    height: 2px;
    overflow: visible;
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 9px);
    mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 9px);
  }

  .leader line {
    stroke: var(--ink-muted);
    stroke-width: 1.5;
    stroke-dasharray: 1;
  }

  .plan__actions {
    grid-area: actions;
    align-self: end;
    padding-top: 2rem;
  }
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  /* The callouts reveal with the sheet, which has a real box for main.js to observe. */
  .js .plan__grid:not(:has(.plan__sheet-wrap.is-in)) .callout__text {
    opacity: 0;
  }

  .js .plan__grid:not(:has(.plan__sheet-wrap.is-in)) .leader line {
    stroke-dashoffset: 1;
  }

  .plan__grid:has(.plan__sheet-wrap.is-in) .leader line {
    animation: draw 500ms var(--ease-out) backwards;
    animation-delay: calc(300ms + var(--k) * 120ms);
  }

  .plan__grid:has(.plan__sheet-wrap.is-in) .callout__text {
    animation: fade 400ms var(--ease-out) backwards;
    animation-delay: calc(700ms + var(--k) * 120ms);
  }
}

/* ---------- 5. For the venue ---------- */

.venue__intro {
  max-width: 56ch;
}

.cards {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

.card {
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(60 30 10 / 0.05), 0 8px 24px rgb(60 30 10 / 0.06);
  transition:
    transform 150ms var(--ease-out),
    box-shadow 150ms var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgb(60 30 10 / 0.07), 0 16px 36px rgb(60 30 10 / 0.12);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--primary-soft);
}

.card__icon svg {
  width: 40px;
  height: 40px;
  padding: 6px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card p {
  margin-top: 0.5rem;
  color: var(--ink-muted);
}

.venue__note {
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

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

@media (prefers-reduced-motion: no-preference) {
  .js .cards:not(.is-in) .card {
    opacity: 0;
  }

  .cards.is-in .card {
    animation: rise-16 420ms var(--ease-out) backwards;
    animation-delay: calc(var(--k) * 80ms);
  }
}

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

/* ---------- 6. Try it ---------- */

.try__grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-content: start;
}

.prompts li {
  display: inline-flex;
  flex-direction: column;
  padding: 0.6rem 0.9rem;
  border-radius: 6px 14px 14px 6px;
  border: 1px dashed var(--ink-muted);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.prompts__tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.device {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-paper);
}

.device__frame {
  display: block;
  width: 100%;
  border: 0;
  background: #ffffff;
}

.try__note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

@media (min-width: 720px) {
  .try__grid {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 2rem;
  }

  .prompts {
    flex-direction: column;
    flex-wrap: nowrap;
    padding-top: 3.5rem;
  }

  .device {
    width: 100%;
    max-width: 1040px;
    border-radius: 20px;
    border: 1px solid var(--line);
  }

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

  .device__dots {
    position: absolute;
    left: 16px;
    display: flex;
    gap: 7px;
  }

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

  .device__address {
    padding: 0.15rem 1.25rem;
    border-radius: 999px;
    background: var(--bg);
    font-size: 0.8125rem;
    color: var(--ink-muted);
  }

  .device__frame {
    height: 720px;
  }

  .try__full {
    display: none;
  }
}

@media (max-width: 719.98px) {
  .device {
    width: 300px;
    height: 600px;
    margin-inline: auto;
    border: 8px solid var(--ink);
    border-radius: 36px;
  }

  .device__bar {
    display: none;
  }

  .device__frame {
    height: 100%;
  }

  .try__full {
    display: flex;
    width: 100%;
    margin-top: 1.5rem;
  }
}

/* ---------- Generic reveal (sheet in section 4, the device frame) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal=""] {
    transition:
      opacity 500ms var(--ease-out),
      transform 500ms var(--ease-out);
  }

  .js [data-reveal=""]:not(.is-in) {
    opacity: 0;
    transform: translateY(24px);
  }

  .js .device[data-reveal=""] {
    transition-duration: 400ms;
  }

  .js .device[data-reveal=""]:not(.is-in) {
    transform: scale(0.96);
  }
}

/* ---------- 7. Closing ---------- */

.closing {
  text-align: center;
}

.closing__bunting {
  width: 100%;
  height: clamp(80px, 12vw, 140px);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.closing__inner {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
}

.closing__title {
  max-width: 12ch;
}

.closing .lead {
  max-width: 40ch;
}

.closing__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 1.5rem;
  margin-top: 0.75rem;
}

@media (max-width: 719.98px) {
  .closing__actions {
    flex-direction: column;
    width: 100%;
  }

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

/* ---------- 8. Footer ---------- */

.site-footer {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--line);
  padding-block: 32px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}

.site-footer__brand p,
.site-footer__made {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.site-footer__links {
  display: grid;
  gap: 0.25rem;
  justify-items: end;
}

.site-footer__links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-underline-offset: 4px;
}

.site-footer__links a:hover {
  color: var(--primary-hover);
}

.site-footer__links a:active {
  transform: translateY(1px);
}

@media (max-width: 719.98px) {
  .site-footer__inner {
    flex-direction: column;
  }

  .site-footer__links {
    justify-items: start;
  }
}

/* ---------- Reduced motion: everything in its final state ---------- */

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

  html {
    scroll-behavior: auto;
  }
}
