/* ==========================================================================
   Washboard launch site
   Tokens are the brief's (docs/site/BRIEF.md), which are the app's own ramps,
   so the embedded app looks native inside the page.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Surfaces and ink (light) */
  --bg: #f5f7f9;
  --bg-glow: #cdeeef;
  --surface: #ffffff;
  --surface-sunken: #eaeef2;
  --border: #d7dde5;
  --border-strong: #b3bcc8;
  --ink: #11161d;
  --ink-muted: #5c6878;
  --ink-subtle: #8792a1;
  --ink-on-accent: #ffffff;

  /* Accent (teal) */
  --accent: #0e7786;
  --accent-hover: #0a5f6c;
  --accent-soft: #cdeeef;
  --accent-text: #0a5f6c;
  --accent-ring: #15919f;
  --accent-bright: #6fcfd0;
  --accent-deep: #0a3139;

  /* States */
  --free: #1d8a4a;
  --free-soft: #d8f3e0;
  --free-text: #176f3c;
  --running: #0e7786;
  --running-soft: #cdeeef;
  --running-text: #0a5f6c;
  --done: #e3a212;
  --done-soft: #fdf0c9;
  --done-text: #9a6700;
  --done-pulse: #f6cd66;
  --overdue: #c93c3c;
  --overdue-soft: #fbe1e1;
  --overdue-text: #a52f2f;
  --received: #8792a1;
  --received-soft: #eaeef2;
  --received-text: #2b3442;

  /* Depth: ink-teal tinted, layered, low opacity */
  --shadow-tint: 16 36 48;
  --shadow-sm:
    0 1px 2px rgb(var(--shadow-tint) / 0.06),
    0 1px 1px rgb(var(--shadow-tint) / 0.04);
  --shadow-md:
    0 2px 4px rgb(var(--shadow-tint) / 0.06),
    0 10px 28px rgb(var(--shadow-tint) / 0.08);
  --shadow-lg:
    0 4px 10px rgb(var(--shadow-tint) / 0.08),
    0 24px 60px rgb(var(--shadow-tint) / 0.12);
  --shadow-accent: 0 6px 16px rgb(14 119 134 / 0.28);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  /* Type */
  --font-display: "Bricolage Grotesque", "Inter Tight", system-ui, sans-serif;
  --font-body:
    "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-mono:
    "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Layout */
  --content-max: 1200px;
  --gutter: 32px;
  --header-height: 64px;
  --tap-min: 44px;
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 5px var(--accent-ring);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e13;
    --bg-glow: #0a3139;
    --surface: #11161d;
    --surface-sunken: #1b222c;
    --border: #2b3442;
    --border-strong: #5c6878;
    --ink: #f5f7f9;
    --ink-muted: #b3bcc8;
    --ink-subtle: #8792a1;
    --ink-on-accent: #ffffff;

    --accent: #0e7786;
    --accent-hover: #15919f;
    --accent-soft: #0a3139;
    --accent-text: #6fcfd0;
    --accent-ring: #6fcfd0;

    --free-soft: #0e3d24;
    --free-text: #7fd6a0;
    --running-soft: #0a3139;
    --running-text: #6fcfd0;
    --done-soft: #3f2c00;
    --done-text: #f6cd66;
    --done-pulse: #9a6700;
    --overdue-soft: #4a1818;
    --overdue-text: #f09c9c;
    --received-soft: #1b222c;
    --received-text: #d7dde5;

    --shadow-tint: 0 0 0;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.5);
    --shadow-md: 0 2px 6px rgb(0 0 0 / 0.5), 0 12px 32px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 4px 12px rgb(0 0 0 / 0.5), 0 28px 70px rgb(0 0 0 / 0.5);
    --shadow-accent: 0 6px 18px rgb(21 145 159 / 0.35);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  font-family: var(--font-body);
  font-size: 100%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(
      1100px 360px at 50% -120px,
      var(--bg-glow),
      transparent 72%
    ),
    var(--bg);
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

/* Type */

.heading {
  font-family: var(--font-display);
  font-size: clamp(30px, 24px + 1.6vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.heading--centred {
  text-align: center;
  margin-inline: auto;
  max-width: 24ch;
}

.lead {
  font-size: clamp(20px, 19px + 0.2vw, 22px);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 56ch;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.94em;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Buttons: hover darkens and lifts, focus rings, active presses
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.btn--primary {
  background: var(--accent);
  color: var(--ink-on-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--surface-sunken);
  border-color: var(--ink-subtle);
}

.btn--danger {
  background: var(--overdue-soft);
  color: var(--overdue-text);
}

.btn:active {
  transform: scale(0.97);
  box-shadow: none;
}

.btn:focus-visible {
  box-shadow: var(--focus-ring);
}

.btn--pill {
  border-radius: var(--radius-pill);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--lg {
  min-height: 52px;
  padding-inline: 24px;
}

.btn--xl {
  min-height: 56px;
  padding-inline: 24px;
  font-size: 18px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-min);
  padding-inline: 4px;
  border-radius: var(--radius-sm);
}

.lockup .logo {
  width: 32px;
  height: 32px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

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

.header__nav {
  display: flex;
  gap: 4px;
  margin-right: 12px;
}

.header__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
  transition:
    color 160ms var(--ease-out),
    background-color 160ms var(--ease-out);
}

.header__nav a:hover {
  color: var(--ink);
  background: var(--surface-sunken);
}

.header__cta {
  font-size: 15px;
  padding-inline: 18px;
}

.header__cta-short {
  display: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  max-width: var(--content-max);
  min-height: min(100svh, 860px);
  margin: 0 auto;
  padding: 64px var(--gutter) 96px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.logo--hero {
  margin-bottom: 4px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 20px + 2.8vw, 60px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero__line {
  display: block;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.hero__note {
  font-size: 15px;
  color: var(--ink-muted);
}

/* The live floor: a tablet lying on the counter */

.hero__floor {
  position: relative;
  padding: 0 16px 16px 0;
}

.hero__floor::before {
  content: "";
  position: absolute;
  inset: 24px 0 0 24px;
  border-radius: var(--radius-xl);
  background: var(--surface-sunken);
}

.floor {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translate(var(--shift-x, 0px), var(--shift-y, 0px));
  transition: transform 200ms var(--ease-out);
  will-change: transform;
}

.floor__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.floor__title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.floor__summary {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.floor__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  /* The floor rises in as one block, so no card can be left at opacity 0 */
  animation: card-in 420ms var(--ease-out) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Machine card, drawn as the app draws it
   ========================================================================== */

.mcard {
  --stripe: var(--border);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 176px;
  padding: 20px 16px 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    background-color 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

.mcard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--stripe);
}

.mcard__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mcard__title {
  white-space: nowrap;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.mcard__figure {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mcard__eyebrow {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.mcard__time {
  font-family: var(--font-mono);
  font-size: clamp(32px, 26px + 1vw, 44px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.mcard__done-for {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--done-text);
  font-variant-numeric: tabular-nums;
}

.mcard__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.mcard .btn,
.illo .btn {
  pointer-events: none;
}

.mcard--free {
  --stripe: var(--free);
}

.mcard--running {
  --stripe: var(--running);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--running-soft) 55%, var(--surface)),
    var(--surface) 60%
  );
}

.mcard--done {
  --stripe: var(--done);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--done-soft) 70%, var(--surface)),
    var(--surface) 70%
  );
  animation: done-pulse 2400ms var(--ease-in-out) infinite;
}

@keyframes done-pulse {
  0% {
    box-shadow:
      var(--shadow-sm),
      0 0 0 0 var(--done-pulse);
  }
  60%,
  100% {
    box-shadow:
      var(--shadow-sm),
      0 0 0 14px transparent;
  }
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
}

.progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-ring), var(--running));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: width 320ms linear;
}

/* Status pill */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--received-soft);
  color: var(--received-text);
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: currentColor;
}

.pill--free {
  background: var(--free-soft);
  color: var(--free-text);
}

.pill--running,
.pill--washing {
  background: var(--running-soft);
  color: var(--running-text);
}

.pill--done {
  background: var(--done-soft);
  color: var(--done-text);
}

/* ==========================================================================
   Bands and sections
   ========================================================================== */

.band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* 2. Why */

.why {
  padding: 96px var(--gutter);
}

.why__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.why__text {
  max-width: 60ch;
  font-size: clamp(18px, 17px + 0.3vw, 20px);
  color: var(--ink-muted);
}

.why__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
  max-width: 60ch;
}

.why__list li {
  position: relative;
  padding-left: 26px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
}

.why__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

/* 3. How it works */

.how {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 112px var(--gutter);
}

.steps {
  --stagger: 80ms;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.step__number {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.step__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

/* Illustrations: the app's components, drawn small */

.illo {
  position: relative;
  display: grid;
  place-items: center;
  height: 160px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.illo > * {
  grid-area: 1 / 1;
}

.illo--swap .illo__after {
  opacity: 0;
  transition: opacity 400ms var(--ease-in-out);
}

.illo--swap .illo__before {
  opacity: 1;
  transition: opacity 400ms var(--ease-in-out);
}

.steps.is-visible .step:first-child .illo__after {
  opacity: 1;
  transition-delay: 1100ms;
}

.steps.is-visible .step:first-child .illo__before {
  opacity: 0;
  transition-delay: 1100ms;
}

.step:first-child:hover .illo__after {
  opacity: 1;
  transition-delay: 0ms;
}

.step:first-child:hover .illo__before {
  opacity: 0;
  transition-delay: 0ms;
}

.mcard--mini {
  width: 200px;
  min-height: 0;
  gap: 8px;
  padding: 14px 12px 12px;
  animation: none;
}

.mcard--mini .mcard__title {
  font-size: 16px;
}

.mcard--mini .mcard__time {
  font-size: 30px;
}

.mcard--mini .btn {
  min-height: 40px;
  font-size: 15px;
}

.form-slice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 232px;
}

.form-slice__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
}

.field__input {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.price-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tcard {
  --stripe: var(--running);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 232px;
  padding: 12px 12px 12px 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transform: scale(0.84);
}

.tcard::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--stripe);
}

.tcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tcard__number {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.tcard__name {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.tcard__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.tcard__total {
  font-size: 19px;
  color: var(--ink);
}

.tcard__due {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
}

.tcard__actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.tcard__actions .btn {
  flex: 1 1 auto;
  min-height: 40px;
  padding-inline: 12px;
  font-size: 15px;
}

/* 4. Features */

.features {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px var(--gutter) 112px;
}

.features__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 60ch;
}

.features__grid {
  --stagger: 60ms;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    transform 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tile__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile__title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

/* 5. The real app */

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px var(--gutter) 112px;
}

.app__line {
  max-width: 60ch;
  text-align: center;
  font-size: clamp(18px, 17px + 0.3vw, 20px);
  color: var(--ink-muted);
}

.tablet {
  width: 100%;
  max-width: 1100px;
  margin-top: 28px;
  padding: 12px;
  border-radius: var(--radius-xl);
  background: var(--ink);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  .tablet {
    background: var(--surface-sunken);
  }
}

.tablet__screen {
  display: block;
  width: 100%;
  height: 700px;
  border: 0;
  border-radius: calc(var(--radius-xl) - 12px);
  background: var(--bg);
}

.app__actions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 1100px;
}

/* 6. Counter facts */

.facts {
  padding: 96px var(--gutter);
}

.facts__inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  max-width: var(--content-max);
  margin: 0 auto;
}

.facts__grid {
  --stagger: 60ms;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 20px;
  border-left: 2px solid var(--accent-soft);
}

.fact__figure {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.fact__caption {
  font-size: 15px;
  color: var(--ink-muted);
}

/* 7. Close */

.close {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 160px var(--gutter);
  text-align: center;
  background: radial-gradient(
    900px 320px at 50% 120%,
    var(--bg-glow),
    transparent 72%
  );
}

.close__line {
  max-width: 48ch;
  font-size: clamp(18px, 17px + 0.3vw, 20px);
  color: var(--ink-muted);
}

.close .btn {
  margin-top: 12px;
}

/* Footer */

.footer {
  padding: 24px var(--gutter);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Reveal on scroll: fade in and rise 12px, once
   ========================================================================== */

[data-reveal],
[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 420ms var(--ease-out),
    transform 420ms var(--ease-out);
}

[data-reveal="long"] {
  transform: translateY(16px);
  transition-duration: 520ms;
}

[data-reveal].is-visible,
[data-reveal-group].is-visible > * {
  opacity: 1;
  transform: none;
}

[data-reveal-group].is-visible > :nth-child(2) {
  transition-delay: var(--stagger, 60ms);
}
[data-reveal-group].is-visible > :nth-child(3) {
  transition-delay: calc(var(--stagger, 60ms) * 2);
}
[data-reveal-group].is-visible > :nth-child(4) {
  transition-delay: calc(var(--stagger, 60ms) * 3);
}
[data-reveal-group].is-visible > :nth-child(5) {
  transition-delay: calc(var(--stagger, 60ms) * 4);
}
[data-reveal-group].is-visible > :nth-child(6) {
  transition-delay: calc(var(--stagger, 60ms) * 5);
}

.why__list {
  --stagger: 90ms;
}

/* The tile's own hover transition must survive the reveal rules */
.features__grid.is-visible > .tile {
  transition:
    opacity 420ms var(--ease-out),
    transform 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

/* ==========================================================================
   Tablet (below 1024px): two-up features, tighter hero
   ========================================================================== */

@media (max-width: 1023px) {
  .features__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 56px;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  .facts__inner {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Phone (below 760px)
   ========================================================================== */

@media (max-width: 759px) {
  :root {
    --gutter: 16px;
  }

  .header {
    gap: 12px;
  }

  .header__nav {
    display: none;
  }

  .header__cta-long {
    display: none;
  }

  .header__cta-short {
    display: inline;
  }

  .hero {
    padding: 40px var(--gutter) 72px;
    gap: 44px;
  }

  .hero__title {
    letter-spacing: -0.02em;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__floor {
    padding: 0 12px 12px 0;
  }

  .hero__floor::before {
    inset: 16px 0 0 16px;
  }

  .floor {
    padding: 16px;
  }

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

  .mcard--phone-hidden {
    display: none;
  }

  .mcard {
    min-height: 150px;
  }

  .mcard__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .mcard__time {
    font-size: 32px;
  }

  .why,
  .facts {
    padding: 72px var(--gutter);
  }

  .how,
  .features {
    padding-top: 72px;
    padding-bottom: 72px;
    gap: 36px;
  }

  .features {
    padding-top: 0;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .app {
    padding: 0 0 72px;
  }

  .app__line,
  .app .heading {
    padding-inline: var(--gutter);
  }

  .tablet {
    margin-inline: var(--gutter);
    width: calc(100% - 2 * var(--gutter));
    padding: 8px;
  }

  .tablet__screen {
    height: 720px;
    border-radius: calc(var(--radius-xl) - 8px);
  }

  .app__actions {
    justify-content: center;
    padding-inline: var(--gutter);
  }

  .app__actions .btn {
    width: 100%;
  }

  .facts__grid {
    gap: 28px 24px;
  }

  .fact__figure {
    font-size: 44px;
  }

  .close {
    padding: 96px var(--gutter);
  }

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

/* Hero headline tracking tightens once it passes 48px */
@media (min-width: 460px) {
  .hero__title {
    letter-spacing: -0.03em;
  }
}

/* ==========================================================================
   Reduced motion: everything visible, nothing slides, the numbers still tick
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    animation: none !important;
  }

  [data-reveal],
  [data-reveal-group] > * {
    opacity: 1;
    transform: none;
  }

  .mcard--done {
    box-shadow:
      var(--shadow-sm),
      0 0 0 2px var(--done);
  }

  .illo--swap .illo__after {
    opacity: 1;
  }

  .illo--swap .illo__before {
    opacity: 0;
  }
}

.close .btn.is-visible {
  transition:
    opacity 420ms var(--ease-out),
    background-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}
