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

:root {
  color-scheme: light dark;

  /* Light: a market morning */
  --bg: #fbf6ec;
  --surface: #fffdf8;
  --surface-sunk: #f3ebda;
  --text: #1c2620;
  --text-muted: #4a564e;
  --green: #1f5a3d;
  --green-deep: #17472f;
  --on-green: #fffdf8;
  --green-soft: #dcebdf;
  --marigold: #ffb81c;
  --on-marigold: #241a00;
  --stripe: #fffdf8;
  --paper: #fffef9;
  --paper-edge: #e3d8c3;
  --pencil: #3b3f3a;
  --border: #7a6e58;
  --border-subtle: #e3d8c3;
  --focus: #b83d0b;
  --shadow-tint: 28 38 32;

  /* Bands: the awning and the closing section */
  --band: var(--green);
  --band-stripe: var(--stripe);
  --on-band: var(--on-green);

  --ink: #1c2620; /* text on the receipt and tags, light in both themes */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --display: "Fraunces", ui-serif, Georgia, serif;
  --body: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --gap: clamp(5rem, 12vw, 9rem);
  --stripe-w: 56px;
  --awning-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark: packing up under the string lights */
    --bg: #111914;
    --surface: #1a251e;
    --surface-sunk: #0c120e;
    --text: #f5eedf;
    --text-muted: #c2baa8;
    --green: #86d6a8;
    --green-deep: #a3e3be;
    --on-green: #0d2418;
    --green-soft: #1f3a2b;
    --marigold: #ffc233;
    --on-marigold: #241a00;
    --stripe: #183324;
    --paper: #f5eedf;
    --paper-edge: #c2baa8;
    --pencil: #f5eedf;
    --border: #8c9a90;
    --border-subtle: #2c3a31;
    --focus: #ffb547;
    --shadow-tint: 0 0 0;

    --band: #183324;
    --band-stripe: #0f2318;
    --on-band: #f5eedf;
  }
}

/* Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
  font-variation-settings: "opsz" 72;
}

h2 {
  font-size: clamp(2rem, 4vw + 0.75rem, 3.5rem);
  font-variation-settings: "opsz" 144;
  max-width: 18ch;
  text-wrap: balance;
}

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

p {
  margin: 0;
}

a {
  color: var(--green);
  text-underline-offset: 0.2em;
}

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

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  min-height: 44px;
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  font-weight: 800;
}

.skip-link:focus {
  top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.125rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  background: var(--green);
  color: var(--on-green);
  transition:
    background-color 200ms var(--ease),
    transform 200ms var(--ease);
}

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

.btn:active {
  transform: scale(0.97);
}

.btn-cta {
  min-height: 56px;
  padding: 0 1.75rem;
  background: var(--marigold);
  color: var(--on-marigold);
  font-size: 1.125rem;
  box-shadow: 0 10px 24px -10px rgb(var(--shadow-tint) / 0.45);
}

.btn-cta:hover {
  background: var(--marigold);
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-weight: 800;
  color: var(--green);
}

/* 0. Header */

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid transparent;
}

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

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

.mark {
  flex: none;
}

.wordmark {
  font-family: var(--display);
  font-weight: 750;
  font-size: 1.6rem;
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.02em;
  line-height: 1;
}

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

.nav-link {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
}

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

@media (min-width: 720px) {
  .site-header {
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: border-color 200ms var(--ease);
  }

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

  .nav-link {
    display: inline-flex;
  }

  .nav .btn {
    margin-left: 0.5rem;
  }
}

/* Awning (hero and closing) */

.awning {
  height: var(--awning-h);
  background: repeating-linear-gradient(
    90deg,
    var(--band) 0 var(--stripe-w),
    var(--band-stripe) var(--stripe-w) calc(var(--stripe-w) * 2)
  );
  /* One scallop per stripe hanging off the bottom edge. */
  --r: calc(var(--stripe-w) / 2);
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--r)) no-repeat,
    radial-gradient(circle var(--r) at 50% 0, #000 98%, transparent 100%) bottom left / var(--stripe-w) var(--r)
      repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--r)) no-repeat,
    radial-gradient(circle var(--r) at 50% 0, #000 98%, transparent 100%) bottom left / var(--stripe-w) var(--r)
      repeat-x;
}

.awning-up {
  -webkit-mask:
    linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--r)) no-repeat,
    radial-gradient(circle var(--r) at 50% 100%, #000 98%, transparent 100%) top left / var(--stripe-w) var(--r)
      repeat-x;
  mask:
    linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--r)) no-repeat,
    radial-gradient(circle var(--r) at 50% 100%, #000 98%, transparent 100%) top left / var(--stripe-w) var(--r)
      repeat-x;
}

@media (max-width: 599.98px) {
  :root {
    --stripe-w: 40px;
    --awning-h: 48px;
  }
}

/* 1. Hero */

.hero {
  overflow-x: clip;
  padding-bottom: var(--gap);
}

.hero-grid {
  display: grid;
  gap: 3.5rem;
  padding-top: clamp(2rem, 5vw, 4rem);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 55fr 45fr;
    align-items: center;
    gap: 2rem;
  }
}

.hero-title {
  font-size: clamp(2.75rem, 7.5vw + 0.5rem, 6.25rem);
  font-weight: 750;
  font-variation-settings:
    "opsz" 144,
    "SOFT" 100,
    "WONK" 1;
  margin-bottom: 1.5rem;
}

/* Inline blocks, so the phrases share a row when they fit and the stagger can still move them. */
.hero-title .line {
  display: inline-block;
}

/* In the 55% column the four authored lines set whole, one per row. */
@media (min-width: 960px) {
  .hero-title {
    font-size: clamp(2.75rem, 4.8vw, 5rem);
  }

  .hero-title .line {
    display: block;
    white-space: nowrap;
  }
}

.tin {
  position: relative;
  display: inline-block;
  font-style: italic;
  font-variation-settings:
    "opsz" 144,
    "SOFT" 100,
    "WONK" 1;
}

.squiggle {
  position: absolute;
  left: 0;
  bottom: -0.12em;
  width: 100%;
  height: 0.18em;
  overflow: visible;
}

.squiggle path {
  fill: none;
  stroke: var(--marigold);
  stroke-width: 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.hero-sub {
  max-width: 34ch;
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-bottom: 1.5rem;
}

.down-link .arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.down-link:hover .arrow {
  transform: translateY(2px);
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  color: var(--text-muted);
}

@media (min-width: 480px) {
  .ticks {
    font-size: 0.9375rem;
  }
}

.ticks li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tick {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 479.98px) {
  .hero-actions,
  .closing-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .closing-actions .btn {
    width: 100%;
  }

  .down-link {
    justify-content: center;
  }
}

/* The table scene */

.scene {
  position: relative;
  height: 640px;
  max-width: 520px;
  width: 100%;
  margin-inline: auto;
}

.plane {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.cloth {
  position: absolute;
  left: 0;
  top: 40px;
  width: 78%;
  height: 520px;
  border-radius: 28px;
  background-color: var(--surface);
  background-image:
    repeating-linear-gradient(
      0deg,
      color-mix(in srgb, var(--green-soft) 40%, transparent) 0 22px,
      transparent 22px 44px
    ),
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--green-soft) 40%, transparent) 0 22px,
      transparent 22px 44px
    );
  box-shadow:
    0 30px 60px -20px rgb(var(--shadow-tint) / 0.25),
    0 8px 16px rgb(var(--shadow-tint) / 0.08);
  transform: rotate(-2deg);
}

.phone {
  position: absolute;
  right: 4%;
  top: 10px;
  width: 300px;
  height: 600px;
  border: 10px solid #1c2620;
  border-radius: 40px;
  background: #1c2620;
  overflow: hidden;
  transform: rotate(3deg);
  box-shadow: 0 40px 70px -30px rgb(var(--shadow-tint) / 0.5);
}

.phone-screen {
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--bg);
}

/* The tally mock: the app's look, in tokens */

.mock {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-variant-numeric: tabular-nums;
}

.mock-header {
  padding: 1.75rem 1rem 0.75rem;
  background: var(--band);
  color: var(--on-band);
  font-weight: 800;
  font-size: 1.05rem;
}

.mock-money {
  display: flex;
  flex-direction: column;
  margin: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: var(--green);
  color: var(--on-green);
}

.mock-total {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.mock-count {
  font-weight: 600;
  font-size: 0.9rem;
}

.mock-pay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0.75rem 0.75rem;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-sunk);
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
}

.mock-pay span {
  padding: 0.45rem 0;
  border-radius: 999px;
}

.mock-pay .is-on {
  background: var(--marigold);
  color: var(--on-marigold);
}

.mock-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0 0.75rem 0.75rem;
}

.mock-tile {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-height: 108px;
  padding: 0.75rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 10px -6px rgb(var(--shadow-tint) / 0.3);
}

.mock-name {
  font-weight: 800;
  font-size: 1.05rem;
}

.mock-price {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--green);
}

.mock-meta {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mock-tile.is-out {
  background: var(--surface-sunk);
  opacity: 0.7;
}

.mock-tile.is-out .mock-price {
  color: var(--text-muted);
}

.mock-chip {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--text-muted);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 800;
}

.mock-tile.is-pulsing {
  animation: pulse 360ms var(--spring);
}

@keyframes pulse {
  50% {
    transform: scale(1.04);
  }
}

/* Price tags and coin */

.tag {
  position: absolute;
  width: 128px;
  height: 56px;
}

.tag-jam {
  left: 8%;
  top: 470px;
  transform: rotate(-8deg);
}

.tag-honey {
  left: 26%;
  top: 545px;
  transform: rotate(6deg);
}

.tag-paper {
  display: grid;
  place-items: center;
  height: 100%;
  padding-left: 14px;
  background:
    radial-gradient(circle 5px at 12px 50%, var(--surface-sunk) 98%, transparent) no-repeat,
    var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  white-space: nowrap;
  text-align: center;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 50%);
  filter: drop-shadow(0 6px 8px rgb(var(--shadow-tint) / 0.25));
}

.tag-string {
  position: absolute;
  right: calc(100% - 14px);
  top: 4px;
  width: 40px;
  height: 30px;
  overflow: visible;
}

.tag-string path {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.coin {
  position: absolute;
  right: 0;
  top: 330px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, #ffb81c 55%, #d48f00);
  box-shadow:
    inset 0 0 0 3px #e5a10f,
    inset 0 0 0 5px #ffd25e,
    0 6px 10px rgb(var(--shadow-tint) / 0.25);
  color: #7a5200;
  font-weight: 800;
  font-size: 0.95rem;
  text-shadow: 0 1px 0 #ffe7a3;
}

@media (max-width: 599.98px) {
  .scene {
    height: 620px;
    max-width: 340px;
  }

  .cloth {
    width: 88%;
    height: 470px;
  }

  .phone {
    right: 50%;
    width: 260px;
    height: 520px;
    margin-right: -130px;
  }

  .mock-total {
    font-size: 2.25rem;
  }

  .mock-tile {
    min-height: 92px;
  }

  /* Below the tile grid, over the phone's bottom bezel and the cloth edge. */
  .tag-jam {
    left: 0;
    top: 515px;
  }

  .tag-honey {
    left: 30%;
    top: 555px;
  }

  .coin {
    right: 4px;
    top: 300px;
  }
}

/* Sections */

.section {
  padding-bottom: var(--gap);
}

.section h2 {
  margin-bottom: 2.5rem;
}

/* 2. How it works */

.steps {
  display: grid;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.marks {
  width: 80px;
  height: 48px;
  margin-bottom: 1rem;
  overflow: visible;
}

.marks path,
.gate path {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.step h3 {
  margin-bottom: 0.6rem;
}

.step p {
  color: var(--text-muted);
  max-width: 34ch;
}

/* 3. The receipt */

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

.receipt-copy > p {
  max-width: 38ch;
  margin-bottom: 2rem;
}

.points {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 800;
}

.points li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.points svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.receipt-stage {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  padding-top: 4px;
}

.receipt-slot {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #1c2620;
  box-shadow: 0 6px 10px -4px rgb(0 0 0 / 0.35);
}

.receipt {
  width: min(100%, 340px);
  margin: -6px auto 0;
  transform: rotate(1deg);
  transform-origin: top center;
  filter: drop-shadow(0 18px 24px rgb(var(--shadow-tint) / 0.22));
}

.receipt-paper {
  position: relative;
  padding: 1.75rem 1.25rem 2.5rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  /* Zig-zag torn bottom edge. */
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) bottom / 16px 10px repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) bottom / 16px 10px repeat-x;
}

.receipt-paper a,
.receipt-paper :focus-visible {
  outline-color: #b83d0b;
}

.r-head {
  text-align: center;
  margin-bottom: 1rem;
}

.r-brand {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.r-rule {
  border-top: 2px dashed var(--paper-edge);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.r-takings {
  margin: 0;
  border-top: 2px dashed var(--paper-edge);
  padding-top: 0.75rem;
}

.r-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.r-row dd {
  margin: 0;
  font-weight: 800;
}

.r-strong {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}

.r-strong dd {
  font-size: 1.35rem;
  letter-spacing: 0;
}

.r-split {
  padding-left: 0.75rem;
  margin-top: 0.35rem;
}

.r-bar {
  flex-basis: 100%;
  height: 4px;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f5a3d var(--share), #e3d8c3 0);
}

.r-units {
  font-weight: 600;
}

.r-label {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.r-best {
  list-style: none;
  margin: 0;
  padding: 0;
}

.r-best li {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto 4.5rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
}

.r-best li > :last-child {
  text-align: right;
  font-weight: 800;
}

.r-rank {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 800;
  border: 1.5px solid #c2baa8;
}

.r-rank-top {
  background: #ffb81c;
  border-color: #ffb81c;
  color: #241a00;
}

.r-table {
  width: 100%;
  border-collapse: collapse;
}

.r-table th,
.r-table td {
  padding: 0.15rem 0;
  text-align: right;
}

.r-table th:first-child {
  text-align: left;
}

.r-table thead th {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.r-table tbody th {
  font-weight: 600;
}

.r-thanks {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  margin-top: 1rem;
  padding-top: 1rem;
}

@media (max-width: 399.98px) {
  .receipt-paper {
    font-size: 0.875rem;
    padding-inline: 1rem;
  }

  .r-best li {
    grid-template-columns: 1.6rem 1fr auto 4rem;
  }
}

@media (min-width: 840px) {
  .receipt-grid {
    grid-template-columns: 1fr 360px;
    gap: 4rem;
    align-items: start;
  }

  .receipt-copy {
    padding-top: 2rem;
  }
}

/* 4. Features */

.cards {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}

@media (min-width: 600px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  /* The lead card spans two columns and two rows, so six cards fill a 3 × 3 grid with no gap. */
  .card-wide {
    grid-column: span 2;
    grid-row: span 2;
    padding: 2.5rem;
  }

  .card-wide h3 {
    font-size: 2rem;
  }

  .card-wide p {
    font-size: 1.25rem;
  }

  .card-wide .signal {
    gap: 14px;
    height: 132px;
    padding: 1.75rem 2rem;
  }

  .card-wide .signal span {
    width: 24px;
    border-width: 3px;
  }

  .card-wide .signal span:nth-child(1) {
    height: 44px;
  }

  .card-wide .signal span:nth-child(2) {
    height: 88px;
  }

  .card-wide .signal span:nth-child(3) {
    height: 132px;
  }
}

.card {
  padding: 1.75rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 1px 2px rgb(var(--shadow-tint) / 0.06),
    0 12px 28px -16px rgb(var(--shadow-tint) / 0.28);
  transition:
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.card h3 {
  margin: 1rem 0 0.5rem;
}

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

.card-wide {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.icon {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
}

.signal {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 72px;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: var(--surface-sunk);
  box-sizing: content-box;
}

.signal span {
  width: 14px;
  border-radius: 4px;
  border: 2.5px solid var(--green);
}

.signal span:nth-child(1) {
  height: 24px;
}

.signal span:nth-child(2) {
  height: 46px;
}

.signal span:nth-child(3) {
  height: 70px;
}

.signal .on {
  background: var(--green);
}

@media (max-width: 599.98px) {
  .card-wide {
    flex-direction: column;
    align-items: flex-start;
  }
}

.cards-note {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
  color: var(--text-muted);
}

/* 5. Try it */

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

@media (min-width: 960px) {
  .try-grid {
    grid-template-columns: 40fr 60fr;
    align-items: center;
  }
}

.try-copy > p {
  max-width: 40ch;
  margin-bottom: 1.75rem;
}

.checklist {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  font-weight: 800;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Tally-mark bullets: one pencil stroke per step. */
.checklist li::before {
  content: "";
  flex: none;
  width: 2.25rem;
  height: 1.5rem;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--pencil) 0 3px, transparent 3px 8px) left center no-repeat;
}

.checklist li:nth-child(1)::before {
  background-size: 3px 100%;
}

.checklist li:nth-child(2)::before {
  background-size: 11px 100%;
}

.checklist li:nth-child(3)::before {
  background-size: 19px 100%;
}

.checklist li:nth-child(4)::before {
  background-size: 27px 100%;
}

.try-panel {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding: clamp(1.25rem, 4vw, 3rem) clamp(0.75rem, 3vw, 3rem);
  border-radius: 32px;
  background: var(--green-soft);
}

.frame {
  position: relative;
  width: min(100%, 414px);
  aspect-ratio: 414 / 804;
  padding: 12px;
  border-radius: 48px;
  background: #1c2620;
  box-shadow: 0 40px 80px -40px rgb(var(--shadow-tint) / 0.55);
}

.frame::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 20px;
  left: 50%;
  width: 72px;
  height: 8px;
  margin-left: -36px;
  border-radius: 999px;
  background: #33403a;
}

.frame-screen {
  position: relative;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg);
}

.mock-fallback {
  position: absolute;
  inset: 0;
}

.frame iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 479.98px) {
  .frame {
    width: min(100%, 360px);
    aspect-ratio: 9 / 18;
    padding: 10px;
    border-radius: 40px;
  }

  .frame-screen {
    border-radius: 30px;
  }
}

/* 6. Questions */

.faq-wrap {
  max-width: calc(44rem + 2 * clamp(1.25rem, 5vw, 3rem));
}

.faq {
  border-top: 1px solid var(--border-subtle);
}

.faq details {
  border-bottom: 1px solid var(--border-subtle);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.75rem 0;
  font-weight: 800;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--surface-sunk);
  color: var(--green);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 200ms var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 1.25rem;
  color: var(--text-muted);
  max-width: 60ch;
}

/* 7. Closing */

.closing {
  position: relative;
  overflow-x: clip;
  /* The green starts under the awning, so its upturned scallops show against the page. */
  background: linear-gradient(var(--band), var(--band)) bottom / 100% calc(100% - var(--awning-h)) no-repeat;
  color: var(--on-band);
  padding-bottom: var(--gap);
  --focus: #ffb547;
}

.closing-inner {
  padding-top: clamp(3rem, 8vw, 6rem);
}

.closing a:not(.btn) {
  color: var(--on-band);
}

.closing h2 {
  font-size: clamp(2.5rem, 5.5vw + 0.75rem, 4.5rem);
  max-width: 16ch;
  margin-bottom: 1.5rem;
}

.closing p {
  max-width: 42ch;
  font-size: 1.25rem;
  margin-bottom: 2.25rem;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
}

.gate {
  width: 96px;
  height: 48px;
  overflow: visible;
}

.closing .gate path {
  stroke: var(--on-band);
}

@media (max-width: 479.98px) {
  .gate {
    align-self: center;
  }
}

/* 8. Footer */

.site-footer {
  padding-block: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
}

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

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.logo-footer .wordmark {
  font-size: 2.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  list-style: none;
  margin: 0 0 0 -0.75rem;
  padding: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
  font-weight: 800;
}

/* Motion: start states only under .js, which main.js adds unless reduced motion is asked for. */

@media (prefers-reduced-motion: no-preference) {
  .js .hero .awning {
    animation: awning-drop 600ms var(--spring) both;
  }

  .js .hero-title .line {
    animation: rise 700ms var(--ease) both;
    animation-delay: calc(150ms + var(--d, 0ms));
  }

  .js .hero-title .line:nth-child(2) {
    --d: 80ms;
  }

  .js .hero-title .line:nth-child(3) {
    --d: 160ms;
  }

  .js .hero-title .line:nth-child(4) {
    --d: 240ms;
  }

  .js .phone {
    animation: settle 900ms var(--ease) 200ms both;
  }

  @supports (animation-timeline: scroll()) {
    .js .front-drift {
      animation: drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }

  /* Steps: marks draw stroke by stroke, then the step fades up. */
  .js .steps .marks path {
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 180ms var(--ease);
    transition-delay: calc(var(--i) * 300ms);
  }

  .js .steps .step-body {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 400ms var(--ease),
      transform 400ms var(--ease);
    transition-delay: calc(var(--n) * 300ms);
  }

  .js .steps.is-in .marks path {
    stroke-dashoffset: 0;
  }

  .js .steps.is-in .step-body {
    opacity: 1;
    transform: none;
  }

  /* The receipt prints. */
  .js .receipt-paper [data-line] {
    opacity: 0;
    transition: opacity 300ms var(--ease);
  }

  .js .receipt-paper [data-line].is-in,
  .js .is-printed .receipt-paper [data-line] {
    opacity: 1;
  }

  @media (min-width: 840px) {
    /* The receipt's full height sets the grid, so no empty page sits under the copy.
       The shorter copy column holds beside the receipt while it prints. */
    .js .receipt-copy,
    .js .receipt-stage {
      position: sticky;
      top: 6rem;
    }

    /* The receipt's header is out of the printer from the start, clear of the slot. */
    .js .receipt-paper {
      clip-path: inset(0 0 calc((1 - var(--progress, 0)) * 82%) 0);
      transform: translateY(calc(var(--progress, 0) * 12px - 12px));
    }
  }

  @media (max-width: 839.98px) {
    .js .receipt-paper {
      clip-path: inset(0 0 100% 0);
      transform: translateY(-40px);
      transition:
        clip-path 1200ms var(--ease),
        transform 1200ms var(--ease);
    }

    .js .receipt-paper [data-line] {
      transition-delay: calc(var(--i, 0) * 70ms);
    }

    .js .is-printed .receipt-paper {
      clip-path: inset(0);
      transform: none;
    }
  }

  /* Feature cards */
  .js .cards .card {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 500ms var(--ease),
      transform 500ms var(--ease),
      box-shadow 200ms var(--ease);
    transition-delay: calc(var(--i) * 60ms), calc(var(--i) * 60ms), 0ms;
  }

  .js .cards.is-in .card {
    opacity: 1;
    transform: none;
  }

  @media (hover: hover) and (pointer: fine) {
    .js .cards.is-in .card:hover {
      transform: translateY(-3px);
      transition-delay: 0ms;
      box-shadow:
        0 2px 4px rgb(var(--shadow-tint) / 0.08),
        0 22px 40px -18px rgb(var(--shadow-tint) / 0.4);
    }

    .js .card:hover .icon path {
      animation: draw 700ms var(--ease);
    }
  }

  /* Try it */
  .js .frame {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 700ms var(--ease),
      transform 700ms var(--ease);
  }

  .js .frame.is-in {
    opacity: 1;
    transform: none;
  }

  /* Closing gate mark */
  .js .gate path {
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 180ms var(--ease);
    transition-delay: calc(var(--i) * 300ms);
  }

  .js .gate.is-in path {
    stroke-dashoffset: 0;
  }
}

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

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

@keyframes awning-drop {
  from {
    transform: translateY(-100%);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.4em);
  }
}

@keyframes settle {
  from {
    transform: rotate(6deg);
  }
}

@keyframes drift {
  to {
    transform: translateY(-30px);
  }
}

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