/* Roomwise launch site. Palette, type and rules from docs/site/BRIEF.md. */

:root {
  --paper: #f5f1ea;
  --paper-raised: #fffdf9;
  --paper-sunken: #ece5d9;
  --line: #e1d8ca;
  --line-strong: #c9bdab;
  --ink: #22201c;
  --ink-muted: #675f54;
  --pine: #1f6b52;
  --pine-hover: #185a45;
  --pine-press: #124636;
  --pine-soft: #e0eee7;
  --on-pine: #ffffff;
  --kraft: #c8925a;
  --kraft-soft: #f1e2cf;
  --focus: #1f6b52;
  --shadow-tint: 34 32 28;

  --font-display: "Source Serif 4", "Iowan Old Style", Charter, Georgia, serif;
  --font-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgb(var(--shadow-tint) / 0.06), 0 8px 24px -8px rgb(var(--shadow-tint) / 0.14);
  --shadow-lift:
    0 1px 2px rgb(var(--shadow-tint) / 0.06), 0 12px 32px -10px rgb(var(--shadow-tint) / 0.2),
    0 32px 64px -24px rgb(var(--shadow-tint) / 0.18);
  --header-h: 64px;
  --gutter: 24px;
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Close band, light scheme. */
  --close-bg: var(--pine);
  --close-ink: var(--on-pine);
  --close-btn-bg: var(--on-pine);
  --close-btn-ink: var(--pine);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161412;
    --paper-raised: #211e1a;
    --paper-sunken: #1b1916;
    --line: #36312b;
    --line-strong: #4f483f;
    --ink: #f2ede5;
    --ink-muted: #aca295;
    --pine: #5cc49b;
    --pine-hover: #78d3ae;
    --pine-press: #4aae87;
    --pine-soft: #1d382d;
    --on-pine: #0e2219;
    --kraft: #d9a46c;
    --kraft-soft: #3a2e21;
    --focus: #78d3ae;
    --shadow-tint: 0 0 0;

    --close-bg: var(--pine-soft);
    --close-ink: var(--ink);
    --close-btn-bg: var(--pine);
    --close-btn-ink: var(--on-pine);
  }
}

/* Base */

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

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

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

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.875rem, 3vw + 1rem, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

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

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

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--pine);
  color: var(--on-pine);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

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

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

/* Buttons and links */

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

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

.btn-primary {
  background: var(--pine);
  color: var(--on-pine);
  box-shadow: 0 1px 2px rgb(var(--shadow-tint) / 0.1);
}

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

.btn-primary:active {
  background: var(--pine-press);
}

.btn-small {
  font-size: 0.9375rem;
  padding: 0 16px;
}

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

.btn-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease-out);
}

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

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

.btn-secondary:hover {
  background: var(--paper-raised);
  border-color: var(--pine);
}

.btn-secondary:active {
  background: var(--pine-soft);
}

.btn-inverted {
  background: var(--close-btn-bg);
  color: var(--close-btn-ink);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
}

.btn-inverted:hover {
  background: color-mix(in srgb, var(--close-btn-bg) 90%, var(--close-btn-ink));
}

.btn-inverted:active {
  background: color-mix(in srgb, var(--close-btn-bg) 80%, var(--close-btn-ink));
}

.close .btn-inverted:focus-visible {
  outline-color: var(--close-ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--pine);
}

.text-link:active {
  color: var(--pine);
}

/* Logo */

.logo-tile {
  fill: var(--pine);
}

.logo-house {
  fill: none;
  stroke: var(--on-pine);
  stroke-width: 2.25;
  stroke-linejoin: round;
}

.logo-tick {
  fill: none;
  stroke: var(--on-pine);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 0. Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
  transition: opacity 200ms ease;
}

.js .site-header:not(.is-scrolled)::after {
  opacity: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

.brand .logo {
  transition: transform 200ms var(--ease-out);
}

.brand:hover .logo {
  transform: rotate(-4deg);
}

.brand:active .logo {
  transform: scale(0.94);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

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

.nav-text a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
}

.nav-text a:hover {
  color: var(--ink);
  background: var(--paper-sunken);
}

.nav-text a:active {
  color: var(--pine);
}

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

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

/* 1. Hero */

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: center;
  min-height: min(860px, 100svh - var(--header-h));
  padding-block: 48px 64px;
}

.hero-copy {
  grid-column: 1 / span 6;
}

.hero-visual {
  grid-column: 7 / span 6;
}

.eyebrow {
  margin-bottom: 20px;
  color: var(--pine);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.5rem, 6vw + 1rem, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-sub {
  max-width: 34em;
  margin-top: 24px;
  color: var(--ink-muted);
  font-size: 1.1875rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 36px;
}

.fine-print {
  margin-top: 16px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

/* Hero visual: quote sheet behind, phone in front. */

.hero-stage {
  position: relative;
  width: 600px;
  max-width: 100%;
  height: 640px;
  margin-inline: auto;
}

.plane {
  position: absolute;
  transition: transform 500ms var(--ease-out);
}

.plane-sheet {
  top: 24px;
  right: 0;
  transform: translate(calc(var(--mx, 0) * -6px), calc(var(--my, 0) * -6px));
}

.plane-phone {
  left: 0;
  bottom: 0;
  z-index: 1;
  transform: translate(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -12px));
}

.sheet {
  width: 420px;
  padding: 28px 28px 24px;
  border-radius: 10px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.hero-sheet {
  rotate: -2deg;
}

.sheet-head {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.sheet-company {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.sheet-rows {
  margin-top: 12px;
}

.sheet-rows li,
.sheet-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.sheet-rows .sheet-more {
  color: var(--ink-muted);
  opacity: 0.8;
  border-bottom: 0;
}

.sheet-totals {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-strong);
}

.sheet-totals dt {
  color: var(--ink-muted);
}

.sheet-totals > .sheet-total {
  align-items: baseline;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
  border-bottom: 0;
}

.sheet-total dt {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
}

.sheet-total dd {
  color: var(--pine);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.phone {
  position: relative;
  width: 240px;
  height: 480px;
  border: 8px solid var(--ink);
  border-radius: 36px;
  background: var(--paper);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.hero-phone {
  rotate: 3deg;
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--paper);
}

.hero-phone .phone-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 12px 0;
  font-size: 0.75rem;
}

.mini-top {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  background: var(--paper-sunken);
}

.mini-tab {
  flex: 1;
  padding: 4px;
  border-radius: 6px;
  text-align: center;
  color: var(--ink-muted);
  font-weight: 600;
}

.mini-tab.is-on {
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(var(--shadow-tint) / 0.1);
}

.mini-card {
  padding: 12px 10px 6px;
  border-radius: 12px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
}

.mini-room {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.mini-name {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  line-height: 1.25;
}

.mini-name small {
  color: var(--ink-muted);
  font-weight: 400;
  font-size: 0.6875rem;
}

.mini-stepper {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mini-stepper i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-style: normal;
  color: var(--ink-muted);
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--pine);
  color: var(--on-pine);
  font-weight: 600;
}

.mini-bar {
  margin-top: auto;
  margin-inline: -12px;
  padding: 14px 12px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper-raised);
  text-align: center;
  font-size: 0.875rem;
}

.mini-bar strong {
  color: var(--pine);
}

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

  .hero-phone {
    animation: rise-24 500ms var(--ease-out) 120ms both;
  }

  @supports (animation-timeline: view()) {
    .plane-scroll-fast {
      animation: phone-ahead linear both;
      animation-timeline: view();
      animation-range: cover 50% cover 100%;
    }
  }
}

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

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

@keyframes phone-ahead {
  to {
    transform: translateY(-40px);
  }
}

@media (max-width: 899px) {
  .hero-grid {
    min-height: 0;
    padding-block: 40px 48px;
    row-gap: 40px;
  }

  .hero-copy,
  .hero-visual {
    grid-column: 1 / -1;
  }

  .hero-stage {
    width: 420px;
    max-width: none;
    height: 590px;
    zoom: 0.82;
  }

  .plane {
    transform: none;
  }

  .plane-sheet {
    top: 0;
    left: 0;
    right: auto;
  }

  .hero-sheet {
    width: 330px;
    rotate: none;
  }

  .plane-phone {
    left: auto;
    right: 0;
  }

  .hero-phone {
    rotate: none;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .hero-stage {
    max-width: none;
    zoom: 0.72;
  }
}

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

  .hero-stage {
    zoom: 0.66;
  }
}

/* 2. Quiet band */

.quiet {
  background: var(--paper-sunken);
  padding-block: 96px;
}

.quiet-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.quiet-copy {
  grid-column: 2 / span 10;
  max-width: 40em;
}

.quiet-copy p {
  margin-top: 20px;
}

.quiet-copy p:not(.quiet-turn) {
  color: var(--ink-muted);
}

.quiet .quiet-turn {
  margin-top: 28px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--ink);
}

@media (max-width: 899px) {
  .quiet {
    padding-block: 64px;
  }

  .quiet-copy {
    grid-column: 1 / -1;
  }
}

/* 3. Load-out */

.loadout {
  padding-block: 112px 96px;
}

.loadout-head {
  max-width: 40em;
}

.lead {
  margin-top: 20px;
  color: var(--ink-muted);
  font-size: 1.1875rem;
}

.stage {
  display: grid;
  gap: 24px;
  margin-top: 56px;
}

/* Static story (no JS, or reduced motion): cards in a grid, final panel after them. */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.step-card {
  height: 100%;
  padding: 24px;
  border-radius: 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: opacity 300ms ease;
}

.step-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tick {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 999px;
  background: var(--pine-soft);
  fill: none;
  stroke: var(--pine);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tick path {
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 450ms var(--ease-out) 100ms;
}

.items li,
.subtotal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.items li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}

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

.subtotal {
  margin-top: 12px;
  font-weight: 600;
}

.subtotal .num {
  color: var(--pine);
}

.step-note {
  margin-top: 12px;
  color: var(--pine);
  font-size: 1rem;
  font-weight: 500;
}

.running {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.truck-panel {
  max-width: 640px;
  margin-inline: auto;
  padding: 28px;
  border-radius: 20px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}

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

.truck-label span {
  display: inline-block;
}

.truck {
  display: block;
  width: 100%;
  height: auto;
  margin-block: 8px 20px;
}

.truck-ground {
  stroke: var(--line);
  stroke-width: 2;
  stroke-linecap: round;
}

.truck-body {
  transition: transform 700ms var(--spring);
}

.cargo {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: right bottom;
  transform: scaleX(0.92);
  transition:
    opacity 700ms ease,
    transform 700ms var(--spring);
}

.cargo.is-current {
  opacity: 1;
  transform: none;
}

.cargo-box,
.cab-body {
  fill: var(--paper);
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-linejoin: round;
}

.cargo-fill {
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 600ms var(--spring);
}

.box-fill {
  fill: var(--kraft);
}

.box-edge {
  fill: none;
  stroke: var(--kraft-soft);
  stroke-width: 1;
}

.cab-window {
  fill: var(--paper-sunken);
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.wheel {
  fill: var(--ink);
  stroke: var(--paper-raised);
  stroke-width: 4;
}

.figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.figures > div {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--paper-sunken);
}

.figures dt {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.figures dd {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.figures .fig-quote {
  background: var(--pine-soft);
}

.figures .fig-quote dd {
  color: var(--pine);
  font-size: 1.875rem;
}

.footnote {
  max-width: 48em;
  margin-top: 40px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

/* Scroll story: only when JS runs and motion is allowed. */

.motion .running {
  display: none;
}

.motion .step-card {
  opacity: 0.55;
}

.motion .step.is-active .step-card {
  opacity: 1;
}

.motion .step:not(.is-active) .tick path {
  stroke-dashoffset: 24;
}

@media (min-width: 900px) {
  .motion .stage {
    grid-template-columns: 45fr 55fr;
    gap: 48px;
    align-items: start;
  }

  .motion .steps {
    display: block;
  }

  .motion .step {
    display: flex;
    align-items: center;
    min-height: 70vh;
  }

  .motion .step-card {
    width: 100%;
  }

  .motion .panel-wrap {
    position: sticky;
    top: 96px;
    grid-row: 1;
    grid-column: 2;
  }
}

@media (max-width: 899px) {
  .loadout {
    padding-block: 72px 64px;
  }

  .stage {
    margin-top: 40px;
  }

  .truck-panel {
    padding: 20px;
  }

  .figures dd {
    font-size: 1.25rem;
  }

  .figures .fig-quote dd {
    font-size: 1.5rem;
  }

  .motion .stage {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .motion .panel-wrap {
    position: sticky;
    top: var(--header-h);
    z-index: 5;
    order: -1;
    margin-inline: calc(var(--gutter) * -1);
    padding: 8px 16px;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .motion .truck-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 184px;
    padding: 10px 14px 12px;
    border-radius: 16px;
  }

  .motion .truck-label {
    font-size: 0.75rem;
  }

  .motion .truck {
    width: auto;
    height: 76px;
    margin: 2px auto 6px;
  }

  .motion .figures {
    grid-template-columns: 1.1fr 1fr 0.8fr 1.3fr;
    gap: 4px;
  }

  .motion .figures > div {
    padding: 4px 5px;
    border-radius: 8px;
  }

  .motion .figures dt {
    font-size: 0.6875rem;
  }

  .motion .figures dd,
  .motion .figures .fig-quote dd {
    font-size: 0.875rem;
  }

  .motion .steps {
    display: block;
    padding-top: 24px;
  }

  .motion .step {
    display: flex;
    align-items: center;
    min-height: calc((100svh - 264px) * 0.8);
  }

  .motion .step-card {
    width: 100%;
  }
}

/* 4. Features */

.features {
  padding-block: 96px;
}

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
}

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

.tile-wide {
  grid-column: span 4;
}

.tile-narrow,
.tile-medium {
  grid-column: span 2;
}

.tile-full {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--pine-soft);
  border-color: transparent;
}

.tile-full p {
  max-width: 44em;
  margin-top: 8px;
  color: var(--ink);
}

.tile > :last-child:not(p, h3) {
  margin-top: auto;
}

.tile-full > :last-child {
  margin-top: 0;
}

.demo-stepper,
.demo-row,
.demo-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.demo-stepper {
  max-width: 420px;
  font-size: 1.0625rem;
}

.demo-stepper .mini-name small {
  font-size: 0.875rem;
}

.demo-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.demo-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  font-size: 1.25rem;
  transition: transform 140ms ease;
}

.demo-badge {
  position: relative;
  min-width: 36px;
  height: 30px;
  font-size: 1rem;
}

.demo-badge .n-from,
.demo-badge .n-to {
  grid-area: 1 / 1;
  transition: opacity 120ms ease;
}

.demo-badge .n-to {
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tile-wide:hover .demo-plus {
    transform: scale(0.92);
  }

  .tile-wide:hover .demo-badge {
    animation: spring 420ms var(--spring) 80ms;
  }

  .tile-wide:hover .n-from {
    opacity: 0;
    transition-delay: 80ms;
  }

  .tile-wide:hover .n-to {
    opacity: 1;
    transition-delay: 80ms;
  }
}

@keyframes spring {
  50% {
    transform: scale(1.15);
  }
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pills li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--pine-soft);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
}

.demo-row span:first-child {
  font-weight: 600;
}

.demo-row .num {
  color: var(--ink-muted);
}

.demo-field {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.demo-field-label {
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.demo-field-input {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px transparent;
  font-weight: 600;
}

.demo-field-input small {
  color: var(--ink-muted);
  font-weight: 400;
}

.thumb {
  height: 170px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper-sunken);
  padding: 16px 0 0;
  display: flex;
  justify-content: center;
}

.thumb-sheet {
  zoom: 0.5;
  box-shadow: var(--shadow);
  rotate: -2deg;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.facts li {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--paper-raised);
  font-weight: 600;
  white-space: nowrap;
}

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

  .bento {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tile,
  .tile-wide,
  .tile-narrow,
  .tile-medium {
    grid-column: 1 / -1;
    padding: 24px;
  }

  .tile-full {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* 5. See it */

.see {
  padding-block: 96px 112px;
}

.see-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: center;
}

.see-copy {
  grid-column: 1 / span 5;
}

.see-copy > p {
  margin-top: 20px;
  color: var(--ink-muted);
}

.how-list {
  margin-block: 24px 32px;
  counter-reset: how;
  font-size: 1rem;
}

.how-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  counter-increment: how;
}

.how-list li::before {
  content: counter(how) ".";
  min-width: 1.25em;
  color: var(--pine);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.see-device {
  grid-column: 6 / span 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.app-phone {
  width: 390px;
  height: 780px;
  border-radius: 44px;
}

.app-screen {
  border-radius: 36px;
  background: var(--paper-sunken);
}

.app-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.app-fallback a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.app-screen iframe {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.device-caption {
  color: var(--ink-muted);
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 899px) {
  .see {
    padding-block: 72px 80px;
  }

  .see-copy,
  .see-device {
    grid-column: 1 / -1;
  }

  .see-device {
    margin-top: 40px;
  }

  .app-phone {
    width: min(390px, 100%);
    height: 680px;
  }
}

/* 6. Close */

.close {
  position: relative;
  overflow: hidden;
  padding-block: 128px;
  background: var(--close-bg);
  color: var(--close-ink);
  text-align: center;
}

.close-truck {
  position: absolute;
  right: -160px;
  bottom: 24px;
  width: 760px;
  height: auto;
  opacity: 0.2;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  pointer-events: none;
}

.close-truck pattern path {
  stroke-width: 1;
}

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

.close-inner > p:first-of-type {
  margin-block: 16px 32px;
  font-size: 1.1875rem;
}

.close-small {
  margin-top: 16px;
  font-size: 0.875rem;
  opacity: 0.85;
}

@media (max-width: 899px) {
  .close {
    padding-block: 80px;
  }

  .close-truck {
    width: 520px;
    right: -200px;
  }
}

/* 7. Footer */

.site-footer {
  padding-block: 48px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 34em;
}

.footer-brand .logo {
  flex: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.footer-links a:hover {
  background: var(--paper-sunken);
}

.footer-links a:active {
  color: var(--pine);
}

.footer-base {
  margin-top: 32px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

/* Entry fades, only when JS runs and motion is allowed. */

.motion .reveal {
  transition:
    opacity 600ms ease calc(var(--i, 0) * 60ms),
    transform 600ms var(--ease-out) calc(var(--i, 0) * 60ms);
}

.motion .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(12px);
}

.motion .tile.reveal:not(.is-in) {
  transform: translateY(16px);
}

.motion .close-truck {
  transition: transform 900ms var(--ease-out);
}

.motion .close:not(.is-in) .close-truck {
  transform: translateX(40px);
}

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

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