/* Turnabout launch site. See docs/site/BRIEF.md. */

:root {
  color-scheme: light dark;
  --paper: #fbf6ec; /* page */
  --surface: #fffdf8; /* cards, chart sheet */
  --sunken: #f3ebdc; /* wells, progress tracks, alt sections */
  --fridge: #eceae4; /* the fridge-door panel behind the hero chart */
  --line: #e6dac6;
  --line-strong: #cbbba3;
  --ink: #2b2420;
  --ink-muted: #6b5d52;
  --primary: #b0482a; /* terracotta: CTAs, links, filled effort dots */
  --primary-hover: #983b20;
  --on-primary: #ffffff;
  --success: #2f6b2a; /* "All done" */
  --focus: #2457c5;
  --person-coral: #c23b2a;
  --person-amber: #9a5200;
  --person-teal: #0f6f68;
  --person-indigo: #4338ca;
  --on-person: #ffffff;
  --shadow-sm: 0 1px 2px rgb(74 52 30 / 0.08), 0 1px 1px rgb(74 52 30 / 0.04);
  --shadow-md: 0 4px 12px rgb(74 52 30 / 0.1), 0 1px 3px rgb(74 52 30 / 0.06);
  --shadow-lg: 0 18px 40px rgb(74 52 30 / 0.16), 0 3px 8px rgb(74 52 30 / 0.07);
  --shadow-magnet: 0 2px 0 rgb(0 0 0 / 0.18), 0 6px 10px rgb(74 52 30 / 0.22);

  --note: #fff3b0;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, sans-serif;
  --font-marker: "Caveat", cursive;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: 1.25rem;
  --section-pad: clamp(4.5rem, 10vw, 9rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1917;
    --surface: #28221f;
    --sunken: #161311;
    --fridge: #232020;
    --line: #3b332e;
    --line-strong: #5a4f47;
    --ink: #f4ede4;
    --ink-muted: #b8aca0;
    --primary: #f29d6c;
    --primary-hover: #f6b38c;
    --on-primary: #1c1917;
    --success: #8fd18a;
    --focus: #8ab4ff;
    --person-coral: #ff917f;
    --person-amber: #f9bd3f;
    --person-teal: #4fd1bd;
    --person-indigo: #a9b5fb;
    --on-person: #1f1a17;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 12px rgb(0 0 0 / 0.45), 0 1px 3px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 18px 40px rgb(0 0 0 / 0.55), 0 3px 8px rgb(0 0 0 / 0.3);
    --shadow-magnet: 0 2px 0 rgb(0 0 0 / 0.5), 0 6px 10px rgb(0 0 0 / 0.5);
    --note: #4a4220;
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 2rem;
  }
}

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

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

html {
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

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

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

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

p {
  max-width: 38rem;
}

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

svg {
  flex: none;
}

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

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

[hidden] {
  display: none !important;
}

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

main:focus {
  outline: none;
}

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

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

.skip:focus {
  top: 0.75rem;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

h3 {
  text-wrap: balance;
}

.eyebrow {
  margin-bottom: 0.875rem;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(2rem, 3.5vw + 1rem, 3.5rem);
}

.lead {
  max-width: 36rem;
  margin-top: 1.25rem;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

.marker {
  font-family: var(--font-marker);
  font-weight: 600;
  line-height: 1.1;
}

.band {
  padding-block: var(--section-pad);
  background: var(--paper);
}

.sunken {
  background: var(--sunken);
}

.icon,
.icon-sm {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon {
  color: var(--primary);
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 120ms ease;
}

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

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

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

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

.btn-outline:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.btn-lg {
  min-height: 52px;
  padding-inline: 1.5rem;
  font-size: 1.0625rem;
}

.btn-block {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 800;
  text-underline-offset: 0.2em;
}

.text-link:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

.text-link:active {
  opacity: 0.8;
}

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

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

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

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

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

.brand:hover .wordmark {
  color: var(--primary);
}

.brand:active {
  opacity: 0.8;
}

.wordmark {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: color 160ms ease;
}

.primary-nav {
  display: none;
}

.primary-nav ul {
  display: flex;
  gap: 0.25rem;
}

.primary-nav a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 0.75rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.primary-nav a:hover,
.footer-links a:hover {
  background: var(--sunken);
  color: var(--primary);
}

.primary-nav a:active,
.footer-links a:active {
  opacity: 0.8;
}

.header-cta .short {
  display: none;
}

@media (max-width: 399.98px) {
  .header-cta .long {
    display: none;
  }

  .header-cta .short {
    display: inline;
  }
}

@media (min-width: 900px) {
  .primary-nav {
    display: block;
  }
}

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

.hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section-pad);
  background: var(--paper);
}

.hero-grid {
  display: grid;
  gap: 3rem;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw + 1rem, 6rem);
}

.hero-sub {
  max-width: 30rem;
  margin-top: 1.5rem;
  color: var(--ink-muted);
  font-size: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (max-width: 479.98px) {
  .hero-actions .btn {
    width: 100%;
  }
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    min-height: min(52rem, 92svh);
  }

  .hero-copy {
    grid-column: span 5;
  }

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

/* The fridge door */

.fridge {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(0.75rem, 3vw, 2.5rem) 4.5rem;
  border-radius: 28px;
  background:
    repeating-linear-gradient(
      90deg,
      rgb(0 0 0 / 0.03) 0 1px,
      transparent 1px 4px
    ),
    linear-gradient(180deg, rgb(255 255 255 / 0.25), transparent 30%),
    var(--fridge);
  box-shadow:
    inset 0 10px 14px -10px rgb(0 0 0 / 0.18),
    inset 0 0 0 1px rgb(0 0 0 / 0.04);
}

.sheet-holder {
  position: relative;
  perspective: 1200px;
}

.sheet {
  --tx: 0deg;
  --ty: 0deg;
  padding: 1.25rem;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  rotate: -1.5deg;
  transform: rotateX(var(--ty)) rotateY(var(--tx));
  transition: transform 500ms var(--ease-out);
}

.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sheet-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pill-muted {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.cards {
  display: grid;
  gap: 0.875rem;
}

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

.pcard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 0.875rem 0.875rem 1.125rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--pc);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.pcard-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pname {
  font-size: 1.0625rem;
  font-weight: 800;
}

.chip {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pc);
  color: var(--on-person);
  font-size: 0.9375rem;
  font-weight: 800;
}

.badge {
  margin-left: auto;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--success);
  color: var(--on-primary);
  font-size: 0.8125rem;
  font-weight: 800;
  white-space: nowrap;
}

.pts,
.earned {
  color: var(--ink-muted);
  font-size: 1rem;
  font-weight: 600;
}

.earned {
  margin-top: auto;
}

.bar,
.track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sunken);
}

.bar span,
.track .fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--pc);
  transition: width 320ms var(--ease-out);
}

.rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.rows label {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-size: 1rem;
  cursor: pointer;
}

.rows input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.dots {
  display: inline-flex;
  flex: none;
  gap: 3px;
}

.dots i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.dots i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--primary);
  scale: 0;
}

.dots[data-e="1"] i:nth-child(-n + 1)::after,
.dots[data-e="2"] i:nth-child(-n + 2)::after,
.dots[data-e="3"] i:nth-child(-n + 3)::after,
.dots[data-e="4"] i:nth-child(-n + 4)::after,
.dots[data-e="5"] i:nth-child(-n + 5)::after {
  scale: 1;
}

.more {
  display: none;
  margin-top: 0.875rem;
  color: var(--ink-muted);
  font-size: 1rem;
  font-weight: 600;
}

.magnet {
  position: absolute;
  top: -7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      rgb(255 255 255 / 0.75) 0 2px,
      transparent 4px
    ),
    var(--mc);
  box-shadow: var(--shadow-magnet);
}

.magnet-l {
  left: 14px;
}

.magnet-r {
  right: 14px;
  top: -14px;
}

.sticky-note {
  position: absolute;
  right: clamp(0.75rem, 3vw, 2rem);
  bottom: 0.75rem;
  max-width: 11rem;
  padding: 0.75rem 0.875rem;
  background: var(--note);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  font-size: 1.5rem;
  rotate: 3deg;
}

@media (max-width: 719.98px) {
  .sheet {
    rotate: 0deg;
    transform: none;
  }

  .pcard.extra {
    display: none;
  }

  .more {
    display: block;
    max-width: calc(100% - 10rem);
  }

  .fridge {
    padding-bottom: 3.75rem;
  }

  .sticky-note {
    right: 0.5rem;
    bottom: 0.5rem;
    font-size: 1.375rem;
  }
}

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

.steps {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.step h3 {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step-n {
  color: color-mix(in srgb, var(--primary) 25%, transparent);
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
}

.illo {
  display: flex;
  min-height: 9.5rem;
  padding: 1rem;
  border-radius: 14px;
  background: var(--sunken);
}

.illo-people {
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.mini-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
  font-weight: 800;
}

.mini-person small {
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.levels {
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.levels li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.mini-card {
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  border-left: 6px solid var(--pc);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.tick {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--primary);
}

.tick::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid var(--on-primary);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}

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

  .step:nth-child(1) {
    rotate: -0.6deg;
  }

  .step:nth-child(2) {
    rotate: 0.5deg;
  }

  .step:nth-child(3) {
    rotate: -0.4deg;
  }
}

/* ---------- Why it's fair ---------- */

.fair-track {
  margin-top: 3rem;
}

.stage-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 120ms ease;
}

.icon-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}

.icon-btn[aria-disabled="true"]:hover {
  background: var(--surface);
  color: var(--ink);
}

.icon-btn[aria-disabled="true"]:active {
  transform: none;
}

.week-pill {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--sunken);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.week-dates {
  white-space: nowrap;
}

/* Below 480 px the pill breaks into "Week N of 4" over the dates. The colon
   stays in the live region for screen readers but is not drawn. */
@media (max-width: 479.98px) {
  .week-sep {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .week-dates {
    display: block;
    font-weight: 600;
  }
}

.progress {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1rem;
}

.progress li {
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line);
}

.progress li[aria-current] {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.fcols {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.fcol {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.fhead h3 {
  font-size: 1.125rem;
  font-weight: 800;
}

.fhead small {
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.mags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem 0.5rem 0.625rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-magnet);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

.mag-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pc);
}

.mag.big {
  padding-block: 0.625rem;
  box-shadow:
    0 0 0 2.5px var(--primary),
    var(--shadow-magnet);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ftotal {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  max-width: none;
}

.ftotal .track {
  flex: 1;
  height: 12px;
}

.ftotal .fill {
  width: 0;
  transition-duration: 520ms;
}

.ftotal .n {
  min-width: 2ch;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  text-align: right;
}

.final-note {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: 0.75rem;
  opacity: 0;
  transition: opacity 300ms ease;
}

.final-note .marker {
  max-width: none;
  margin-top: 2.25rem;
  color: var(--primary);
  font-size: 2rem;
  rotate: -3deg;
}

.arrow path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 700ms var(--ease-out) 150ms;
}

.stage.is-final .final-note {
  opacity: 1;
}

.stage.is-final .arrow path {
  stroke-dashoffset: 0;
}

.fair-outro {
  margin-top: 2rem;
  color: var(--ink-muted);
  font-size: 1.0625rem;
}

.table-wrap {
  margin-top: 2.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 1rem;
}

caption {
  padding: 1rem 1.25rem 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: left;
}

th,
td {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

tfoot th,
tfoot td {
  font-weight: 800;
}

@media (min-width: 960px) {
  .fcols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .mags {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    min-height: 10.5rem;
  }

  .fair.is-pinned .fair-track {
    height: 400vh;
  }

  .fair.is-pinned .stage {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    height: 100svh;
    padding-top: 4rem;
  }

  .final-note {
    margin-top: -0.5rem;
  }
}

/* ---------- Features ---------- */

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

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  padding: 1.75rem;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.tile h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tile > p {
  color: var(--ink-muted);
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: auto auto;
  }

  .tile {
    grid-column: span 2;
  }

  .tile-big {
    grid-column: span 4;
    grid-row: span 2;
  }
}

.allow {
  position: relative;
  margin-top: auto;
  padding: 5.5rem 0 0;
}

.acard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: min(78%, 20rem);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

/* Theo's card sits behind, up and to the right: chip and name on one row,
   then "Unpaid" and the amount, all clear of Maya's card. */
.acard-back {
  position: absolute;
  top: -0.375rem;
  right: 0;
  left: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  width: min(54%, 15rem);
  padding: 0.625rem 1rem;
  box-shadow: var(--shadow-md);
  rotate: 2deg;
}

.acard-back .pcard-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.acard-back .a-amt {
  justify-self: end;
  font-size: 1.875rem;
  line-height: 1;
}

.acard .pcard-head {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
}

.a-label {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.a-amt {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.btn-fake {
  margin-top: 0.75rem;
  pointer-events: none;
}

.a-pay {
  margin-top: 1rem;
}

.a-row {
  width: 100%;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

.fan {
  position: relative;
  display: grid;
  place-items: center;
  height: 10rem;
  margin-top: auto;
}

.fan span {
  grid-area: 1 / 1;
  display: flex;
  align-items: flex-start;
  width: 8.5rem;
  height: 6.5rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
  font-weight: 800;
}

.fan span:nth-child(1) {
  rotate: -4deg;
  translate: -1.25rem -1.5rem;
}

.fan span:nth-child(2) {
  translate: 0 0;
}

.fan span:nth-child(3) {
  rotate: 4deg;
  translate: 1.25rem 1.5rem;
}

.doc {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding: 1rem;
  border-radius: 14px;
  background: var(--sunken);
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
  margin-top: 3rem;
}

.points li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 1rem;
}

.points p {
  color: var(--ink-muted);
}

.points b {
  color: var(--ink);
}

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

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

.browser,
.poster-wrap {
  margin-top: 3rem;
}

.browser-frame {
  max-width: 64rem;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

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

.bdots {
  position: absolute;
  left: 1rem;
  display: flex;
  gap: 6px;
}

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

.address {
  padding: 0.125rem 1rem;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.browser-slot iframe {
  display: block;
  width: 100%;
  height: 44rem;
  border: 0;
  background: var(--paper);
}

.fullscreen {
  max-width: 64rem;
  margin: 1rem auto 0;
  text-align: center;
}

.poster-wrap {
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  max-width: 24rem;
  margin-inline: auto;
}

.poster {
  display: block;
  width: 100%;
  border-radius: 36px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease;
}

.poster:hover {
  transform: translateY(-2px);
}

.poster:active {
  transform: scale(0.99);
}

.phone {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 8px solid var(--ink);
  border-radius: 36px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}

.phone-screen {
  display: block;
  padding: 2.5rem 1rem 3rem;
}

.setup {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.setup-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.setup-text {
  color: var(--ink-muted);
  font-size: 1rem;
}

.setup-step {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1rem;
  font-weight: 800;
}

.setup-n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.875rem;
}

.tabbar {
  display: flex;
  justify-content: space-around;
  gap: 0.25rem;
  padding: 0.75rem 0.25rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.6875rem;
  font-weight: 800;
}

.tabbar .on {
  color: var(--primary);
}

/* ---------- Questions ---------- */

.faq {
  display: grid;
  gap: 0.75rem;
  align-items: start;
  margin-top: 2.5rem;
}

@media (min-width: 900px) {
  .faq {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
  }
}

details {
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  transition: color 160ms ease;
}

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

summary:hover {
  color: var(--primary);
}

summary:active {
  opacity: 0.85;
}

.plus {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--primary);
  transition: rotate 200ms var(--ease-out);
}

.plus::before,
.plus::after {
  content: "";
  position: absolute;
  inset: 8px 0;
  border-radius: 2px;
  background: currentColor;
}

.plus::after {
  rotate: 90deg;
}

details[open] .plus {
  rotate: 45deg;
}

details p {
  padding: 0 1.25rem 1.25rem;
  color: var(--ink-muted);
}

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

.closing {
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 12vw, 10rem);
  background: var(--primary);
  color: var(--on-primary);
  text-align: center;
}

.closing-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.closing h2 {
  font-size: clamp(2.75rem, 7vw + 1rem, 6rem);
}

.closing p {
  font-size: 1.25rem;
}

.btn-inverse {
  min-height: 52px;
  margin-top: 0.75rem;
  padding-inline: 1.75rem;
  background: var(--on-primary);
  color: var(--primary);
  font-size: 1.125rem;
}

.btn-inverse:hover {
  background: color-mix(in srgb, var(--on-primary) 88%, var(--primary));
}

.closing :focus-visible {
  outline-color: var(--on-primary);
}

.cmag {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      rgb(255 255 255 / 0.75) 0 2.5px,
      transparent 5px
    ),
    var(--mc);
  box-shadow: var(--shadow-magnet);
}

.cm1 {
  top: -8px;
  left: 6%;
}

.cm2 {
  top: 28px;
  left: -8px;
}

.cm3 {
  bottom: -8px;
  right: 8%;
}

.cm4 {
  bottom: 30px;
  right: -8px;
}

@media (max-width: 719.98px) {
  .cm2,
  .cm4 {
    display: none;
  }
}

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

.site-footer {
  padding-block: 3rem 2rem;
  background: var(--paper);
}

.footer-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-line {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.75rem;
}

.footer-small {
  margin-top: 1.5rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

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

  .footer-links {
    margin-left: 0;
  }
}

/* ---------- Motion (none of this runs under reduced motion) ---------- */

.reveal {
  opacity: 0;
  translate: 0 24px;
  transition:
    opacity 600ms var(--ease-out),
    translate 600ms var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

.step.reveal .dots i::after {
  transition: scale 220ms var(--ease-spring) calc(var(--k, 0) * 40ms + 300ms);
}

.step.reveal:not(.is-in) .dots i::after {
  scale: 0;
}

.badge.pop {
  animation: pop 200ms var(--ease-spring);
}

@keyframes pop {
  from {
    scale: 0.6;
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 var(--rise, 16px);
  }
}

@keyframes drop {
  0% {
    opacity: 0;
    scale: 1.15;
    translate: 0 -10px;
  }
  60% {
    opacity: 1;
    scale: 1.15;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sheet-holder {
    animation: rise 320ms var(--ease-out) both;
  }

  .pcard {
    --rise: 8px;
    animation: rise 420ms var(--ease-spring) both;
  }

  .pcard:nth-child(1) {
    animation-delay: 260ms;
  }

  .pcard:nth-child(2) {
    animation-delay: 320ms;
  }

  .pcard:nth-child(3) {
    animation-delay: 380ms;
  }

  .pcard:nth-child(4) {
    animation-delay: 440ms;
  }

  .magnet {
    animation: drop 360ms var(--ease-spring) 720ms both;
  }

  .magnet-r {
    animation-delay: 780ms;
  }
}

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

  .sheet {
    transform: none;
  }
}
