/* Clearcoat launch site. Palette, type and layout follow docs/site/BRIEF.md. */

:root {
  color-scheme: light dark;

  /* Light */
  --bg: #f4f5f7;
  --bg-band: #eaecf0;
  --surface: #ffffff;
  --surface-sunken: #eef0f3;
  --ink: #0d1015;
  --ink-muted: #4a5361;
  --line: #d6dae1;
  --line-strong: #8a93a3;
  --accent: #0b57d0;
  --accent-hover: #0845a8;
  --on-accent: #ffffff;
  --accent-soft: #e2ebfb;
  --on-accent-soft: #0a4bb3;
  --foam: #8fd3ff;
  --success: #067647;
  --focus: #0b57d0;

  /* Hero and closing band, same in both themes */
  --night-0: #05070b;
  --night-1: #0b111c;
  --night-2: #142036;
  --night-ink: #f5f7fa;
  --night-muted: #b9c2d0;
  --night-line: rgb(255 255 255 / 0.12);
  --night-accent: #6ea8ff;
  --night-glow: rgb(110 168 255 / 0.35);

  --font-sans: Archivo, "SF Pro Display", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pad-x: clamp(1.25rem, 0.75rem + 2.5vw, 2.5rem);
  --pad-y: clamp(4.5rem, 3rem + 6vw, 9rem);
  --tile-shadow: 0 1px 2px rgb(13 16 21 / 0.05), 0 12px 32px -12px rgb(11 87 208 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e13;
    --bg-band: #10141b;
    --surface: #151a23;
    --surface-sunken: #0f131a;
    --ink: #eef1f5;
    --ink-muted: #a3adbb;
    --line: #262e3b;
    --line-strong: #6b7689;
    --accent: #6ea8ff;
    --accent-hover: #94bfff;
    --on-accent: #06101f;
    --accent-soft: #16253f;
    --on-accent-soft: #9cc4ff;
    --foam: #8fd3ff;
    --success: #5fd49a;
    --focus: #94bfff;
    --tile-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.5);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-variation-settings: "wdth" 100;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

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

a {
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:focus-visible {
  outline: none;
  border-radius: 0.375rem;
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--focus);
}

.night :focus-visible,
.site-header.on-hero :focus-visible,
.code-panel :focus-visible {
  box-shadow:
    0 0 0 2px var(--night-0),
    0 0 0 4px var(--night-accent);
}

.defs {
  position: absolute;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: 0.5rem;
}

.skip:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* Type */

.display {
  font-variation-settings: "wdth" 118;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

h1.display {
  font-size: clamp(2.6rem, 1.4rem + 5.2vw, 5.75rem);
}

h2.display {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
}

h3 {
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.25;
  font-variation-settings: "wdth" 106;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 38rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.mono-note,
.caption-muted {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.price,
.fig {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.wide-only {
  display: none;
}

@media (min-width: 60rem) {
  .wide-only {
    display: inline;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 550;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 200ms var(--ease),
    color 200ms var(--ease),
    border-color 200ms var(--ease),
    box-shadow 200ms var(--ease),
    transform 200ms var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 24px -10px rgb(11 87 208 / 0.6);
}

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

.night .btn-primary,
.on-hero .btn-primary {
  background: var(--night-accent);
  color: #06101f;
  box-shadow: 0 10px 30px -10px var(--night-glow);
}

.night .btn-primary:hover,
.on-hero .btn-primary:hover {
  background: #94bfff;
}

.btn-ghost {
  color: var(--night-ink);
  border-color: rgb(255 255 255 / 0.28);
  background: rgb(255 255 255 / 0.04);
}

.btn-ghost:hover {
  border-color: rgb(255 255 255 / 0.55);
  background: rgb(255 255 255 / 0.08);
}

.btn-large {
  min-height: 3.25rem;
  padding: 0.875rem 1.625rem;
  font-size: 1.0625rem;
}

.btn-compact {
  padding-inline: 1rem;
  font-size: 0.9375rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 4rem;
  margin-bottom: -4rem;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transition:
    background-color 300ms var(--ease),
    border-color 300ms var(--ease),
    color 300ms var(--ease);
}

.site-header.on-hero {
  background: color-mix(in srgb, var(--night-0) 35%, transparent);
  border-bottom-color: var(--night-line);
  color: var(--night-ink);
}

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

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

.on-hero .brand {
  color: var(--night-ink);
}

.wordmark {
  font-variation-settings: "wdth" 112;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 1.1875rem;
}

.header-nav {
  display: none;
  gap: 0.25rem;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.875rem;
  text-decoration: none;
  font-weight: 550;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  transition: color 200ms var(--ease);
}

.on-hero .header-nav a {
  color: var(--night-muted);
}

.header-nav a:hover {
  color: var(--accent);
}

.on-hero .header-nav a:hover {
  color: var(--night-ink);
}

@media (min-width: 64rem) {
  .header-nav {
    display: flex;
  }
}

/* Dark bands */

.night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--night-ink);
  background:
    radial-gradient(60% 70% at 72% 18%, var(--night-glow), transparent 70%),
    linear-gradient(180deg, var(--night-2) 0%, var(--night-1) 45%, var(--night-0) 100%);
}

.night .eyebrow {
  color: var(--night-accent);
}

.night .lead,
.night .mono-note {
  color: var(--night-muted);
}

/* Faint diagonal reflection, plus the one-time gloss sweep. */
.night::before,
.night::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.night::before {
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgb(255 255 255 / 0.035) 46%,
    transparent 54%
  );
}

.night::after {
  left: -40%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.06), transparent);
  transform: translateX(-100%) skewX(-18deg);
  opacity: 0;
}

/* Hero */

.hero {
  min-height: min(100svh, 56rem);
  padding-top: calc(4rem + clamp(2.5rem, 1rem + 5vw, 6rem));
  padding-bottom: clamp(3.5rem, 2rem + 4vw, 6rem);
  display: flex;
  align-items: center;
}

.hero-ghost {
  position: absolute;
  z-index: -1;
  right: -6%;
  top: 22%;
  width: min(70rem, 120vw);
  fill: var(--night-accent);
  opacity: 0.06;
  filter: blur(18px);
  will-change: transform;
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 1.5rem;
}

.hero-copy .eyebrow {
  margin-bottom: 0;
}

.hero-copy {
  container-type: inline-size;
}

/* The brief's size, capped so "Prices that fit" holds one line in the copy column. */
.hero h1.display {
  font-size: min(clamp(2.6rem, 1.4rem + 5.2vw, 5.75rem), 11.2cqi);
  text-wrap: pretty;
}

.sheen-text {
  background: linear-gradient(100deg, var(--foam) 0%, #ffffff 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .actions {
  margin-top: 0.5rem;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 50fr) minmax(0, 50fr);
  }
}

/* The size switch */

.switch-card {
  position: relative;
  padding: clamp(1rem, 0.6rem + 1.5vw, 1.75rem);
  border-radius: 1.5rem;
  border: 1px solid var(--night-line);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), transparent 40%),
    color-mix(in srgb, var(--night-1) 70%, transparent);
  box-shadow: 0 40px 80px -20px rgb(0 0 0 / 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.size-switch {
  margin: 0;
  padding: 0.25rem;
  border: 1px solid var(--night-line);
  border-radius: 999px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgb(0 0 0 / 0.3);
}

.size-switch label {
  position: relative;
  display: block;
}

.size-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.size-switch span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 999px;
  font-weight: 550;
  color: var(--night-muted);
  transition:
    background-color 300ms var(--ease),
    color 300ms var(--ease),
    box-shadow 300ms var(--ease);
}

.size-switch label:hover span {
  color: var(--night-ink);
}

.size-switch input:checked + span {
  background: var(--night-accent);
  color: #06101f;
  box-shadow: 0 6px 18px -6px var(--night-glow);
}

.size-switch input:focus-visible + span {
  box-shadow:
    0 0 0 2px var(--night-0),
    0 0 0 4px var(--night-accent);
}

.vehicle {
  padding: 1.25rem 0 0.75rem;
  text-align: center;
}

.vehicle-art {
  width: 100%;
  max-width: 16rem;
  height: 100px;
  margin-inline: auto;
  overflow: visible;
}

.vehicle-art path,
.vehicle-art circle {
  fill: none;
  stroke: var(--night-accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.vehicle-art .ground {
  stroke: var(--night-line);
}

.vehicle-art .window {
  stroke-opacity: 0.45;
}

.vehicle-art .roof {
  stroke: var(--foam);
  stroke-width: 2;
  stroke-opacity: 0.8;
  filter: drop-shadow(0 0 4px rgb(143 211 255 / 0.6));
}

.vehicle-art .wheels circle {
  fill: var(--night-1);
}

.vehicle-art .v {
  opacity: 0;
  transition: opacity 300ms var(--ease);
}

.vehicle[data-size="car"] .v-car,
.vehicle[data-size="suv"] .v-suv,
.vehicle[data-size="truck"] .v-truck {
  opacity: 1;
}

.vehicle-desc {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--night-muted);
}

.menu {
  display: grid;
  gap: 0.25rem;
  border-top: 1px solid var(--night-line);
  padding-top: 0.75rem;
}

.menu li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "pkg price"
    "dur price";
  align-items: center;
  column-gap: 1rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.875rem;
}

.menu .pkg {
  grid-area: pkg;
  font-weight: 550;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.menu .dur {
  grid-area: dur;
  font-size: 0.875rem;
  color: var(--night-muted);
}

.menu .price {
  grid-area: price;
  font-weight: 500;
  font-size: 1.25rem;
  transition: text-shadow 450ms var(--ease);
}

.menu .price.glow,
.slip .price.glow {
  text-shadow:
    0 0 12px rgb(143 211 255 / 0.9),
    0 0 2px rgb(143 211 255 / 0.8);
}

.menu .popular {
  background: rgb(110 168 255 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(110 168 255 / 0.25);
}

.pill {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--night-accent);
  color: #06101f;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero .caption {
  margin-top: 1rem;
  text-align: center;
}

@media (min-width: 60rem) {
  .hero .caption {
    text-align: left;
  }
}

/* Proof strip */

.proof {
  border-block: 1px solid var(--line);
  padding-block: 2rem;
}

.proof-list {
  display: grid;
  gap: 0.75rem;
}

.proof-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.proof .fig {
  font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  min-width: 1.5ch;
}

@media (min-width: 30rem) {
  .proof-list {
    grid-template-columns: repeat(6, 1fr);
    row-gap: 1.5rem;
  }
  .proof-list li {
    grid-column: span 2;
    flex-direction: column;
    gap: 0.375rem;
  }
  .proof-list li:nth-child(n + 4) {
    grid-column: span 3;
  }
}

@media (min-width: 48rem) {
  .proof-list {
    grid-template-columns: repeat(5, 1fr);
  }
  .proof-list li,
  .proof-list li:nth-child(n + 4) {
    grid-column: auto;
  }
}

/* Sections */

.section {
  padding-block: var(--pad-y);
}

.band {
  background: var(--bg-band);
}

.section-head {
  display: grid;
  gap: 1.25rem;
  max-width: 48rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.section-head .eyebrow {
  margin-bottom: 0;
}

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

/* How it works: the rail */

.rail-wrap {
  position: relative;
}

.rail {
  --rail-gap: 2.5rem;
  display: grid;
  gap: var(--rail-gap);
}

.step {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding-left: 3.5rem;
}

.step p {
  color: var(--ink-muted);
  max-width: 24rem;
}

.ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  z-index: 1;
}

/* One segment per gap, from this ring's centre to the next ring's centre. */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 1.25rem;
  bottom: -3.75rem;
  width: 1px;
  background: var(--line-strong);
  transform-origin: top;
}

.tile {
  aspect-ratio: 4 / 3;
  max-width: 22rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--tile-shadow);
}

.mini-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.1875rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.8125rem;
  font-weight: 550;
  width: min(100%, 13rem);
  text-align: center;
}

.mini-seg span {
  padding: 0.375rem 0;
  border-radius: 999px;
  color: var(--ink-muted);
}

.mini-seg .on {
  background: var(--accent);
  color: var(--on-accent);
}

.mini-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.mini-slip {
  width: min(100%, 14rem);
  display: grid;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.mini-slip span {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.mini-slip b,
.mini-slip i {
  font-weight: 500;
  font-style: normal;
}

.mini-slip .ok {
  color: var(--success);
}

.mini-slip .tot {
  border-top: 1px dashed var(--line-strong);
  padding-top: 0.5rem;
}

.bubble {
  max-width: 15rem;
  padding: 0.875rem 1rem;
  border-radius: 1.125rem 1.125rem 1.125rem 0.25rem;
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
}

@media (min-width: 56rem) {
  .rail {
    --rail-gap: clamp(1.5rem, 1rem + 2vw, 3rem);
    grid-template-columns: repeat(3, 1fr);
  }
  .step {
    padding-left: 0;
    padding-top: 4rem;
  }
  .step:not(:last-child)::after {
    left: 1.25rem;
    top: 1.25rem;
    bottom: auto;
    height: 1px;
    width: calc(100% + var(--rail-gap));
    transform-origin: left;
  }
}

/* The slip, step by step */

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

.slip-steps {
  display: grid;
  gap: 1.75rem;
  counter-reset: slip;
}

.slip-steps li {
  display: grid;
  gap: 0.5rem;
  max-width: 30rem;
}

.slip-steps h3 {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  font-variation-settings: "wdth" 115;
  font-weight: 750;
  letter-spacing: -0.02em;
}

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

.slip {
  --perf: 8px;
  position: relative;
  max-width: 30rem;
  padding: 2.25rem clamp(1.25rem, 1rem + 1vw, 2rem) 1.75rem;
  border-radius: 1.25rem;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  -webkit-mask:
    radial-gradient(circle at 50% 0, transparent 5px, #000 5.5px) top / 18px 12px repeat-x,
    linear-gradient(#000, #000) 0 12px / 100% calc(100% - 12px) no-repeat;
  mask:
    radial-gradient(circle at 50% 0, transparent 5px, #000 5.5px) top / 18px 12px repeat-x,
    linear-gradient(#000, #000) 0 12px / 100% calc(100% - 12px) no-repeat;
}

/* The mask clips box-shadow, so the ticket's shadow lives on its wrapper. */
.slip-wrap {
  filter: drop-shadow(0 18px 30px rgb(11 87 208 / 0.16)) drop-shadow(0 1px 1px rgb(13 16 21 / 0.08));
}

.slip-title {
  font-weight: 500;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed var(--line-strong);
}

.slip .sl {
  overflow-wrap: anywhere;
  transition:
    opacity 400ms var(--ease),
    transform 400ms var(--ease),
    display 400ms allow-discrete;
}

.slip .total {
  font-weight: 500;
  margin-top: 0.5rem;
}

.slip .gap {
  margin-top: 0.75rem;
}

.included {
  color: var(--success);
  font-weight: 500;
}

.slip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.fake-btn {
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-sans);
  font-weight: 550;
  font-size: 0.8125rem;
}

.fake-btn:first-child {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.slip-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

@media (min-width: 64rem) {
  .slip-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .slip-steps {
    gap: 0;
  }
  .slip-steps li {
    min-height: 70vh;
    align-content: center;
  }
  .slip-steps li:first-child {
    align-content: start;
    min-height: 60vh;
  }
  .slip-wrap {
    position: sticky;
    top: calc(4rem + 8vh);
  }
  .slip-steps li {
    transition: opacity 400ms var(--ease);
  }
  .stepping .slip-steps li:not(.current) {
    opacity: 0.4;
  }
  .stepping .slip .sl:not(.shown) {
    display: none;
  }
  @starting-style {
    .stepping .slip .sl.shown {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}

/* Features: the bento */

.bento {
  display: grid;
  gap: 1rem;
}

.card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--tile-shadow);
  overflow: hidden;
  transition:
    transform 300ms var(--ease),
    box-shadow 300ms var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--foam), var(--accent));
  opacity: 0;
  transition: opacity 300ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow:
      0 1px 2px rgb(13 16 21 / 0.05),
      0 20px 40px -14px rgb(11 87 208 / 0.2);
  }
  .card:hover::before {
    opacity: 1;
  }
}

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

.card > svg,
.card > .chips,
.card > .strike-line,
.card > .week {
  margin-top: 0.75rem;
}

.ba {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 0.875rem;
  overflow: hidden;
  margin-top: 0.5rem;
  background: var(--surface-sunken);
  touch-action: pan-y;
}

.ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba .after {
  clip-path: inset(0 0 0 var(--pos));
}

.ba-label {
  position: absolute;
  top: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgb(5 7 11 / 0.6);
  color: #f5f7fa;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  pointer-events: none;
}

.ba-before {
  left: 0.75rem;
}

.ba-after {
  right: 0.75rem;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 8px rgb(0 0 0 / 0.35);
  pointer-events: none;
}

.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.35);
  transition: box-shadow 200ms var(--ease);
}

.ba-knob path {
  fill: none;
  stroke: #0d1015;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ba input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.ba:has(input:focus-visible) .ba-knob {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--focus);
}

.chips {
  display: grid;
  gap: 0.5rem;
}

.chips span {
  display: flex;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  font-weight: 550;
  font-size: 0.9375rem;
}

.chips b {
  font-family: var(--font-mono);
  font-weight: 500;
}

.chips .on {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--on-accent-soft);
}

.strike-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.75rem;
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.strike-line s {
  color: var(--ink-muted);
}

.strike-line b {
  color: var(--success);
  font-weight: 500;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.375rem;
}

.week span {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 2.75rem;
  border-radius: 0.5rem;
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
}

.week .closed {
  background: var(--surface-sunken);
  color: var(--ink-muted);
  opacity: 0.7;
}

.week .closed::after {
  content: "";
  position: absolute;
  inset: 20%;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    var(--ink-muted) calc(50% - 1px),
    var(--ink-muted) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

.icon-lock,
.icon-theme {
  width: 3rem;
  height: 3rem;
  box-sizing: content-box;
}

.icon-lock rect,
.icon-lock path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-theme .theme-ring {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.icon-theme .theme-dot {
  fill: var(--accent);
}

@media (min-width: 40rem) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
  }
  .card {
    grid-column: span 3;
  }
  .card-ba {
    grid-column: span 6;
  }
  .card-theme {
    grid-column: span 6;
  }
}

@media (min-width: 64rem) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
  }
  .card-ba {
    grid-column: span 7;
    grid-row: span 2;
  }
  .card-size,
  .card-twice {
    grid-column: span 5;
  }
  .card-dates,
  .card-private,
  .card-theme {
    grid-column: span 4;
  }
}

/* See it live */

.frame {
  max-width: 68rem;
  margin-inline: auto;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow:
    0 2px 4px rgb(13 16 21 / 0.06),
    0 30px 60px -20px rgb(13 16 21 / 0.3),
    0 60px 120px -40px rgb(11 87 208 / 0.3);
}

.chrome {
  position: relative;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1rem;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
}

.dots {
  position: absolute;
  left: 1rem;
  display: none;
  gap: 6px;
}

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

.address {
  padding: 0.25rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.frame iframe {
  display: block;
  width: 100%;
  height: min(78svh, 40rem);
  border: 0;
  background: var(--bg);
}

.live-cta {
  margin-top: 2rem;
  display: grid;
  justify-items: center;
  gap: 0.875rem;
  text-align: center;
}

@media (min-width: 40rem) {
  .dots {
    display: flex;
  }
  .frame iframe {
    height: 38rem;
  }
}

@media (min-width: 64rem) {
  .frame iframe {
    height: 44rem;
  }
}

/* Adopt it */

.adopt-grid {
  display: grid;
  gap: 3rem;
  align-items: start;
}

.adopt-copy h2 {
  margin-bottom: 2.5rem;
}

.adopt-steps {
  display: grid;
  gap: 2rem;
  counter-reset: adopt;
}

.adopt-steps li {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding-left: 3.5rem;
  counter-increment: adopt;
}

.adopt-steps li::before {
  content: counter(adopt);
  position: absolute;
  left: 0;
  top: -0.25rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--accent);
}

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

.adopt-steps code {
  color: var(--ink);
  background: var(--surface-sunken);
  padding: 0.0625rem 0.375rem;
  border-radius: 0.375rem;
  overflow-wrap: anywhere;
}

.code-panel {
  position: relative;
  min-width: 0;
  border-radius: 1.25rem;
  background: var(--night-1);
  border: 1px solid var(--night-line);
  color: var(--night-ink);
  box-shadow: 0 30px 60px -24px rgb(5 7 11 / 0.55);
  overflow: hidden;
}

.code-panel::after {
  content: "";
  position: absolute;
  top: 2.75rem;
  right: 0;
  bottom: 0;
  width: 2.5rem;
  background: linear-gradient(90deg, transparent, var(--night-1));
  pointer-events: none;
}

.code-tab {
  display: inline-block;
  margin: 0.625rem 0 0 0.75rem;
  padding: 0.375rem 0.875rem;
  border-radius: 0.625rem 0.625rem 0 0;
  background: var(--night-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--night-muted);
}

.code-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--night-line);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.02), transparent);
}

.code-scroll pre {
  margin: 0;
  padding: 1.25rem 2.5rem 1.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  white-space: pre;
  tab-size: 2;
}

.code-scroll code {
  font-size: inherit;
}

.k {
  color: var(--night-ink);
}

.s {
  color: #9fe0b8;
}

.n {
  color: #ffc98a;
}

.c {
  color: var(--night-muted);
}

.code-scroll code {
  color: var(--night-muted);
}

.pc {
  background-image: linear-gradient(var(--foam), var(--foam));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
}

@media (min-width: 64rem) {
  .adopt-grid {
    grid-template-columns: 5fr 7fr;
    gap: clamp(2rem, 1rem + 3vw, 4rem);
  }
}

/* Closing band */

.closing {
  padding-block: var(--pad-y);
  background:
    radial-gradient(60% 70% at 28% 82%, var(--night-glow), transparent 70%),
    linear-gradient(0deg, var(--night-2) 0%, var(--night-1) 45%, var(--night-0) 100%);
}

.closing-inner {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.closing h2.display {
  font-size: calc(clamp(2.6rem, 1.4rem + 5.2vw, 5.75rem) * 0.8);
  max-width: 16ch;
}

.closing-ghost {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -2%;
  width: min(80rem, 140vw);
  transform: translateX(-50%);
  opacity: 0.08;
}

.closing-ghost {
  fill: none;
  stroke: var(--night-accent);
  stroke-width: 0.5;
  stroke-linejoin: round;
}

/* Footer */

.footer {
  padding-block: 3rem 2rem;
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

.footer-brand {
  display: grid;
  gap: 0.75rem;
}

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

.footer .wordmark {
  font-size: 1.375rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 550;
}

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

.footer-fine {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

@media (min-width: 48rem) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .footer-nav {
    justify-content: flex-end;
    max-width: 32rem;
  }
}

/* Motion. Everything below runs only with JavaScript on and motion allowed. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 600ms var(--ease),
      transform 600ms var(--ease);
  }

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

  .js .step:not(:last-child)::after {
    transform: scaleY(0);
    transition: transform 450ms var(--ease) 200ms;
  }

  .js .step:nth-child(2)::after {
    transition-delay: 650ms;
  }

  @media (min-width: 56rem) {
    .js .step:not(:last-child)::after {
      transform: scaleX(0);
    }
  }

  .js .rail-wrap.in .step:not(:last-child)::after {
    transform: none;
  }

  .js .frame.reveal {
    transform: translateY(24px) scale(0.98);
  }

  .js .frame.reveal.in {
    transform: none;
  }

  .js .hero::after,
  .js .closing.in::after {
    animation: sweep 1.4s var(--ease) 300ms 1 both;
  }

  .js .code-panel.in .pc {
    animation: underline 1.2s var(--ease) both;
  }

  .js .code-panel.in .pc2 {
    animation-delay: 0.35s;
  }

  .js .code-panel.in .pc3 {
    animation-delay: 0.7s;
  }
}

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

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

  .hero-ghost {
    transform: none !important;
  }
}

@keyframes sweep {
  0% {
    opacity: 1;
    transform: translateX(0) skewX(-18deg);
  }
  100% {
    opacity: 1;
    transform: translateX(650%) skewX(-18deg);
  }
}

@keyframes underline {
  0% {
    background-size: 0% 2px;
    background-position: 0 100%;
  }
  40%,
  60% {
    background-size: 100% 2px;
    background-position: 0 100%;
  }
  61% {
    background-position: 100% 100%;
  }
  100% {
    background-size: 0% 2px;
    background-position: 100% 100%;
  }
}
