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

:root {
  color-scheme: light dark;
  --paper: #f8f4ec;
  --paper-deep: #efe8da;
  --card: #fffdf8;
  --ink: #1d3a30;
  --ink-soft: #4b5f56;
  /* Brief value #6b766f is 4.3:1 on paper and 3.9:1 on paper-deep; darkened to pass AA on both. */
  --ink-faint: #5c675f;
  --line: #ddd3c1;
  --pine: #24493c;
  --pine-strong: #183328;
  --on-pine: #f8f4ec;
  --amber: #e9a23b;
  --amber-strong: #d48a1f;
  --on-amber: #23180a;
  --pencil: #8a5a12;
  --focus: #c26f00;
  --shadow-tint: 40 32 18;
  --open: #2f8a5b;
  --code-bg: var(--pine-strong);
  --code-border: transparent;
  --code-punct: #84a092;
  --on-pine-80: rgb(248 244 236 / 0.8);
  --on-pine-65: rgb(248 244 236 / 0.65);
  /* The closing band and footer. Dark mode swaps it for the deepest paper, not a lifted pine. */
  --band: var(--pine-strong);
  --on-band: var(--on-pine);

  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --shadow:
    0 1px 1px rgb(var(--shadow-tint) / 0.06),
    0 8px 16px -4px rgb(var(--shadow-tint) / 0.1),
    0 28px 48px -12px rgb(var(--shadow-tint) / 0.16);
  --shadow-soft:
    0 1px 1px rgb(var(--shadow-tint) / 0.05),
    0 4px 10px -4px rgb(var(--shadow-tint) / 0.08);
  --rhythm: clamp(4.5rem, 3rem + 6vw, 8rem);
  --gutter: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101b16;
    --paper-deep: #0b1410;
    --card: #17271f;
    --ink: #ece6d8;
    --ink-soft: #b9c2ba;
    --ink-faint: #8e9a92;
    --line: #2c3f35;
    /* Brief value #3f7a63 gives 3.7:1 under --on-pine; lifted to pass AA on the primary button. */
    --pine: #4c8a70;
    --pine-strong: #5a9a80;
    --on-pine: #0b1410;
    --amber: #f0b45a;
    --amber-strong: #f5c47a;
    --on-amber: #1f1407;
    --pencil: #f0b45a;
    --focus: #f5b24a;
    --shadow-tint: 0 0 0;
    --open: #5cc48c;
    --code-bg: #0b1410;
    --code-border: var(--line);
    --band: #0b1410;
    --on-band: #ece6d8;
    --on-pine-80: rgb(236 230 216 / 0.8);
    --on-pine-65: rgb(236 230 216 / 0.65);
  }
}

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

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

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

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

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

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.25rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  max-width: 22ch;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

p {
  margin: 0;
  max-width: 38rem;
}

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

a {
  color: inherit;
}

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

main:focus {
  outline: none;
}

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

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

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

.skip:focus {
  transform: none;
}

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

section {
  position: relative;
  overflow: clip;
  padding: var(--rhythm) 0;
}

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

.band-deep {
  background: var(--paper-deep);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--amber);
}

.section-sub {
  margin-top: 18px;
  color: var(--ink-soft);
}

.small-print {
  margin-top: 18px;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

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

.btn-pine {
  background: var(--pine);
  color: var(--on-pine);
}

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

.btn-amber {
  background: var(--amber);
  color: var(--on-amber);
}

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

.btn-large {
  min-height: 52px;
  padding: 0 28px;
}

.btn-xl {
  min-height: 56px;
  padding: 0 32px;
  font-size: 1.0625rem;
}

.btn .arrow {
  display: inline-block;
  transition: transform 180ms var(--ease-out);
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  transition: text-decoration-color 160ms ease;
}

.text-link:hover {
  text-decoration-color: var(--amber-strong);
}

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

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

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

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

.site-header.scrolled::after {
  opacity: 1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

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

.mark {
  flex: none;
}

.mark rect {
  fill: var(--pine);
}

.mark path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 3;
  stroke-linecap: round;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1;
  /* Sits the baseline on the mark's horizontal bar (y = 18 of 32). */
  transform: translateY(2px);
}

.header-nav {
  display: none;
}

.header-nav ul {
  display: flex;
  gap: 4px;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

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

.header-nav a:active {
  background: var(--line);
}

.btn-small .long {
  display: none;
}

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

  .btn-small .long {
    display: inline;
  }

  .btn-small .short {
    display: none;
  }
}

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

.hero {
  padding: clamp(2.5rem, 1rem + 5vw, 4rem) 0 0;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  z-index: 1;
}

.hero-inner > * {
  min-width: 0;
}

.hero-copy h1 {
  max-width: 13ch;
}

.lede {
  margin-top: 24px;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 32px;
}

.hero-grid {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(
    ellipse 60% 55% at 60% 65%,
    #000 20%,
    transparent 75%
  );
  mask-image: radial-gradient(
    ellipse 60% 55% at 60% 65%,
    #000 20%,
    transparent 75%
  );
  pointer-events: none;
}

.slip-holder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slip-parallax {
  width: 100%;
  max-width: 360px;
}

.slip {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  padding: 26px 24px 24px;
  background-color: var(--card);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    color-mix(in srgb, var(--line) 55%, transparent) 31px,
    color-mix(in srgb, var(--line) 55%, transparent) 32px
  );
  border-radius: 20px;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotate(-2deg) rotateX(var(--tilt-y))
    rotateY(var(--tilt-x));
  transition: transform 450ms var(--ease-out);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.slip.tilting {
  transition: transform 120ms linear;
}

.slip::before {
  /* The perforation, 56 px from the top. */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 56px;
  border-top: 2px dashed var(--line);
}

.tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 96px;
  height: 28px;
  margin-left: -48px;
  background: var(--amber);
  opacity: 0.55;
  transform: rotate(4deg);
  clip-path: polygon(
    5% 0,
    95% 0,
    100% 17%,
    95% 33%,
    100% 50%,
    95% 67%,
    100% 83%,
    95% 100%,
    5% 100%,
    0 83%,
    5% 67%,
    0 50%,
    5% 33%,
    0 17%
  );
}

.slip-head {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.slip-biz {
  margin-top: 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
}

.slip-rule {
  margin: 10px 0;
  border: 0;
  border-top: 1px dashed var(--ink-faint);
  opacity: 0.6;
}

.slip-rows li {
  display: grid;
  grid-template-columns: 1fr auto 5.6em;
  gap: 8px;
  padding: 3px 0;
}

.slip-rows li span:nth-child(2) {
  color: var(--ink-soft);
}

.slip-rows li span:last-child {
  text-align: right;
}

.slip-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
}

.slip-total-label {
  padding-top: 8px;
}

.slip-total-figures {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.slip-total-price {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0 6px;
}

.slip-time {
  padding-right: 6px;
  color: var(--ink-soft);
}

.pencil {
  position: absolute;
  top: -7px;
  left: -14px;
  width: calc(100% + 24px);
  height: 50px;
  overflow: visible;
  pointer-events: none;
}

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

.slip-note {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.slip-button {
  display: block;
  margin-top: 16px;
  padding: 10px 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--on-amber);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9375rem;
  text-align: center;
}

.ruler {
  display: block;
  color: var(--on-amber);
}

.ruler-body {
  fill: var(--amber);
}

.ruler path {
  stroke: currentColor;
  stroke-width: 1.5;
}

.ruler-nums text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 10px;
  text-anchor: middle;
}

/* Phones: a flat strip below the slip, bleeding to both edges (the section clips it). */
.ruler-parallax {
  position: relative;
  z-index: 2;
  flex: none;
  width: 100vw;
  margin-top: 48px;
}

@media (min-width: 960px) {
  .hero {
    padding-bottom: 0;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    min-height: min(88vh, 860px);
    padding-bottom: 96px;
  }

  .hero-grid {
    width: 55%;
  }

  .slip-parallax {
    max-width: 380px;
  }

  /* The slip sits at the bottom of the hero so the tilted ruler clears the copy on its left. */
  .slip-holder {
    align-self: end;
  }

  /* Lifted so the ruler crosses the slip's bottom edge, not the button on it. */
  .slip-parallax {
    margin-bottom: 40px;
  }

  /* Anchored to the slip so it always crosses the slip's bottom-left corner, in front of it. */
  .ruler-parallax {
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 180vw;
    margin: 0 0 0 -90vw;
    transform: rotate(-4deg);
  }
}

/* Load sequence (only when JavaScript runs and motion is allowed). */
@keyframes write-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

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

.motion .slip-rows li {
  animation: write-in 260ms var(--ease-out) both;
  animation-delay: calc(350ms + var(--i) * 110ms);
}

.motion .pencil path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 600ms ease-in-out 1680ms forwards;
}

/* ---------- 2. Calls ---------- */

.calls-inner {
  display: grid;
  gap: 40px;
}

.bubbles {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 26rem;
}

.bubble {
  position: relative;
  align-self: flex-start;
  max-width: 88%;
  padding: 12px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  box-shadow: var(--shadow-soft);
}

.bubble::after {
  content: "";
  position: absolute;
  left: -6px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  background: var(--card);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 14px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.bubble:nth-child(2) {
  margin-left: 12%;
}

.bubble:nth-child(3) {
  margin-left: 4%;
}

.calls-copy {
  max-width: 32rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

@media (min-width: 960px) {
  .calls-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "head head" "bubbles copy";
    align-items: center;
    column-gap: 64px;
  }

  .calls-head {
    grid-area: head;
  }

  .bubbles {
    grid-area: bubbles;
  }

  .calls-copy {
    grid-area: copy;
  }
}

/* ---------- Reveal on enter ---------- */

.motion .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 420ms var(--ease-out),
    transform 420ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger, 140ms));
}

.motion .in .reveal,
.motion .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 3. How it works ---------- */

.steps-wrap {
  position: relative;
  margin-top: 56px;
}

.steps {
  display: grid;
  gap: 48px;
}

.connector {
  position: absolute;
  top: 2rem;
  bottom: 0;
  left: 1.1rem;
  border-left: 2px dashed var(--line);
  transform-origin: top;
}

.how .reveal {
  --stagger: 450ms;
}

.motion .how .connector {
  transform: scaleY(0);
  transition: transform 900ms linear;
}

.motion .how .in .connector {
  transform: none;
}

.step {
  position: relative;
  padding-left: 3.25rem;
}

.numeral {
  position: absolute;
  left: 0;
  top: -0.6rem;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--amber);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  background: var(--paper);
  padding-bottom: 6px;
}

.illus {
  aspect-ratio: 16 / 10;
  margin: 0 0 20px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  font-size: 0.875rem;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-soft);
}

.mini-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.mini-job strong {
  display: block;
  font-size: 0.9375rem;
}

.mini-job .mono {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.stepper {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 2px;
  font-family: var(--font-mono);
}

.stepper span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

.stepper b {
  min-width: 1.6em;
  text-align: center;
  font-weight: 500;
}

.illus-estimate {
  align-items: flex-start;
  gap: 4px;
}

.illus-estimate .big {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.2;
}

.est-time {
  color: var(--ink-soft);
}

.scale {
  position: relative;
  width: 100%;
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--line);
}

.scale-bar {
  position: absolute;
  left: 52%;
  width: 34%;
  top: 0;
  bottom: 0;
  background: var(--amber);
}

.scale-mark {
  position: absolute;
  top: -6px;
  width: 2px;
  height: 16px;
  background: var(--ink);
}

.scale-mark.low {
  left: 52%;
}

.scale-mark.high {
  left: 86%;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.6875rem;
  color: var(--ink-faint);
}

.est-note {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* Grows with the message so the whole text always shows; the bubble sits bottom-right like a sent text. */
.illus-text {
  aspect-ratio: auto;
  min-height: 0;
  background: var(--paper);
  justify-content: flex-end;
  align-items: flex-end;
}

.pine-bubble {
  position: relative;
  max-width: 92%;
  margin: 0 6px 0 0;
  padding: 10px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--pine);
  color: var(--on-pine);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* Beats `.step p`, which would otherwise paint the message in --ink-soft on pine. */
.step .pine-bubble {
  color: var(--on-pine);
}

/* The tail, mirrored from .bubble to the bottom-right. */
.pine-bubble::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 0;
  width: 14px;
  height: 14px;
  background: var(--pine);
  border-bottom-right-radius: 14px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

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

  .connector {
    top: 2rem;
    left: 2.5rem;
    right: calc((100% - 80px) / 3);
    bottom: auto;
    border-left: 0;
    border-top: 2px dashed var(--line);
    transform-origin: left;
  }

  .motion .how .connector {
    transform: scaleX(0);
  }

  /* Each step shares the same four rows, so the three illustrations end level
     and the headings under them line up whatever each card holds. */
  .step {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
    row-gap: 0;
    padding-left: 0;
  }

  .numeral {
    position: static;
    display: inline-block;
    justify-self: start;
    margin-bottom: 16px;
    padding-right: 10px;
  }

  .illus {
    aspect-ratio: auto;
    min-height: 13.5rem;
    font-size: 0.8125rem;
  }

  .pine-bubble {
    font-size: 0.6875rem;
  }
}

@media (min-width: 1120px) {
  .pine-bubble {
    font-size: 0.75rem;
  }
}

/* ---------- 4. Features bento ---------- */

.bento {
  display: grid;
  gap: 16px;
  margin-top: 48px;
}

.features .reveal {
  --stagger: 60ms;
}

.tile {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

@media (hover: hover) and (pointer: fine) {
  .tile {
    transition:
      box-shadow 200ms ease,
      transform 200ms ease,
      opacity 420ms var(--ease-out);
  }

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

  .motion .tile.reveal {
    transition:
      box-shadow 200ms ease,
      transform 420ms var(--ease-out),
      opacity 420ms var(--ease-out);
  }

  .motion .tile.reveal.in:hover {
    transform: translateY(-2px);
  }
}

.icon {
  width: 28px;
  height: 28px;
}

.icon .i-pine {
  fill: var(--pine);
}

.icon .i-amber {
  fill: var(--amber);
}

.icon .i-line,
.icon .i-amber-line,
.icon .i-pine-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .i-line {
  stroke: var(--on-pine);
}

.icon .i-amber-line {
  stroke: var(--amber);
  stroke-width: 3;
}

.icon .i-pine-line {
  stroke: var(--pine);
  stroke-width: 2.5;
}

.mini-panel {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
}

.mini-panel div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}

.mini-panel .mini-total {
  border-bottom: 0;
  padding-top: 12px;
  font-weight: 500;
  font-size: 1.125rem;
}

.mini-panel .mini-row {
  align-items: center;
}

.mini-row > span:first-child {
  flex: 1;
}

/* Steppers are decorative and only shown once the tile is wide enough; until then the "× n" carries the count. */
.mini-row .stepper {
  display: none;
  font-size: 0.875rem;
}

.mini-row > span:last-child {
  min-width: 5.5em;
  text-align: right;
}

.mini-meta {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.mini-total span:last-child {
  background: linear-gradient(
    transparent 55%,
    color-mix(in srgb, var(--amber) 45%, transparent) 55%
  );
}

.open-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 600;
  font-size: 0.875rem;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--open);
}

.struck {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.struck li {
  text-decoration: line-through;
  text-decoration-color: var(--pencil);
  text-decoration-thickness: 2px;
}

.mini-gallery {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mini-gallery span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 8px;
  max-height: 64px;
}

.mini-gallery svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.g-pine {
  background: var(--pine);
  stroke: var(--amber);
}

.g-amber {
  background: var(--amber);
  stroke: var(--on-amber);
}

.g-deep {
  background: var(--paper-deep);
  stroke: var(--ink);
}

.g-line {
  background: var(--line);
  stroke: var(--ink);
}

.tags,
.labels {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags li,
.labels li {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.tags li {
  background: var(--paper-deep);
  border: 1px solid var(--line);
}

.labels li {
  border: 1px solid var(--pine);
  color: var(--ink);
}

.mini-page {
  margin-top: auto;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 104px;
  aspect-ratio: 210 / 297;
  padding: 14px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.mini-page span {
  height: 2px;
  background: var(--line);
}

.mini-page span:first-child {
  width: 60%;
  height: 4px;
  background: var(--pine);
}

.mini-page b {
  margin-top: auto;
  font-size: 0.5625rem;
  font-weight: 500;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pine);
  color: var(--on-pine);
  font-size: 0.875rem;
  font-weight: 600;
}

.chip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.6;
}

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

  .tile-a {
    grid-column: span 2;
  }

  .mini-row .stepper {
    display: inline-flex;
  }

  .mini-qty {
    display: none;
  }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
  }

  .tile {
    grid-column: span 2;
  }

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

  /* Fill the tall tile with the panel so no blank band is left above it. */
  .tile-a .mini-panel {
    margin-top: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    font-size: 1rem;
  }

  .tile-a .mini-panel .mini-total {
    font-size: 1.5rem;
  }

  .tile-g,
  .tile-h {
    grid-column: span 3;
  }
}

/* ---------- 5. Demo ---------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.tab {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.tab:hover {
  border-color: var(--pine);
}

.tab:active {
  background: var(--paper-deep);
}

.tab[aria-selected="true"] {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--on-pine);
}

.tab[aria-selected="true"]:hover {
  background: var(--pine-strong);
}

.stage {
  position: relative;
  margin-top: 28px;
}

.frame {
  /* Phones and tablets: the frame is a phone. */
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  border: 10px solid var(--ink);
  border-radius: 40px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}

.chrome {
  display: none;
}

.frame-view {
  height: 680px;
  overflow: hidden;
}

.frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--paper);
  transition: opacity 90ms ease;
}

.frame.fading iframe {
  opacity: 0.4;
}

.phone-slot {
  display: none;
}

/* Only where the phone frame exists: wide screens with JS. */
.demo-hint {
  display: none;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

@media (min-width: 960px) {
  .js .demo-hint {
    display: block;
  }
}

.demo-open {
  margin-top: 28px;
  text-align: center;
  max-width: none;
}

@media (min-width: 960px) {
  .stage {
    padding-right: 264px;
    padding-bottom: 48px;
  }

  .frame {
    max-width: none;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 20px;
  }

  .chrome {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 40px;
    padding: 0 16px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
  }

  .dots {
    display: flex;
    gap: 6px;
  }

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

  .address {
    flex: 1;
    max-width: 22rem;
    margin: 0 auto;
    padding: 3px 14px;
    border-radius: 999px;
    background: var(--paper-deep);
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-align: center;
  }

  .frame-view {
    height: 720px;
  }

  /* Render the site at a desktop width and scale it down, so the frame shows the
     real two-column job menu with its estimate, the way the phone beside it is scaled. */
  .frame iframe {
    width: calc(100% / 0.74);
    height: calc(720px / 0.74);
    transform: scale(0.74);
    transform-origin: 0 0;
  }

  .phone-slot {
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: 300px;
    height: 620px;
    border: 10px solid var(--ink);
    border-radius: 40px;
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
  }

  .phone-slot:empty {
    display: none;
  }

  /* Render at a real phone viewport and scale down: 280 / 390 = 0.718, 600 / 0.718 ≈ 836. */
  .phone-slot iframe {
    display: block;
    width: 390px;
    height: 836px;
    border: 0;
    transform: scale(0.718);
    transform-origin: 0 0;
  }

  .motion .phone-slot.reveal {
    transform: translateY(24px);
    transition:
      opacity 600ms var(--ease-out),
      transform 600ms var(--ease-out);
  }

  .motion .phone-slot.reveal.in {
    transform: none;
  }
}

/* ---------- 6. Make it yours ---------- */

.adopt-inner {
  display: grid;
  gap: 48px;
  min-width: 0;
}

.adopt-copy > p:not(.eyebrow):not(.small-print) {
  margin-top: 22px;
  color: var(--ink-soft);
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.checklist li {
  position: relative;
  padding-left: 34px;
  font-weight: 600;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--amber)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16 7.8' fill='none' stroke='%2323180a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 22px no-repeat;
}

.code-card {
  margin: 0;
  min-width: 0;
  align-self: center;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  color: #b9c2ba;
}

.code-tab {
  display: inline-block;
  margin: 14px 0 0 18px;
  padding: 4px 12px;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid var(--amber);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #b9c2ba;
  background: rgb(255 255 255 / 0.06);
}

.code-card pre {
  margin: 0;
  padding: 20px 22px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
  border-radius: 0 0 20px 20px;
}

.code-card .k {
  color: #b9c2ba;
}

.code-card .p {
  color: var(--code-punct);
}

.code-card .s {
  position: relative;
  color: #e9a23b;
}

@media (prefers-color-scheme: dark) {
  .code-card .s {
    color: var(--amber);
  }
}

.code-card .s::before {
  content: "";
  position: absolute;
  inset: 1px -3px;
  border-radius: 3px;
  background: #e9a23b;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}

@keyframes sweep {
  0% {
    opacity: 0.32;
    transform: scaleX(0);
  }
  55% {
    opacity: 0.32;
    transform: scaleX(1);
  }
  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

.motion .code-card.reveal {
  opacity: 1;
  transform: none;
}

.motion .code-card.in .s::before {
  animation: sweep 640ms ease-out both;
  animation-delay: calc(200ms + var(--i) * 120ms);
}

@media (min-width: 960px) {
  .adopt-inner {
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
  }
}

/* ---------- 7. FAQ ---------- */

.answers {
  display: grid;
  gap: 32px 56px;
  margin: 48px 0 0;
}

.answers dt {
  font-weight: 700;
  font-size: 1.125rem;
}

.answers dd {
  margin: 6px 0 0;
  max-width: 34rem;
  color: var(--ink-soft);
}

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

/* ---------- 8. Closing band ---------- */

.closing {
  background: var(--band);
  color: var(--on-band);
  border-top: 1px solid var(--line);
  padding: clamp(5rem, 4rem + 5vw, 9rem) 0;
  text-align: center;
}

.closing-ruler {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0.4;
}

.closing-ruler .ruler {
  height: 16px;
}

.closing-inner {
  max-width: calc(44rem + 2 * var(--gutter));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing h2 {
  font-size: clamp(2.3rem, 1.5rem + 3.5vw, 4.25rem);
  max-width: none;
}

.closing-sub {
  margin-top: 20px;
  font-size: 1.125rem;
  color: var(--on-pine-80);
}

.closing .btn {
  margin-top: 36px;
}

.closing-wink {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--on-pine-65);
}

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

/* ---------- 9. Footer ---------- */

.site-footer {
  background: var(--band);
  color: var(--on-band);
}

.footer-inner {
  display: grid;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
  border-top: 1px solid color-mix(in srgb, var(--on-band) 15%, transparent);
}

.logo-footer {
  color: var(--on-band);
}

.logo-footer .mark rect {
  fill: var(--pine);
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--on-pine-80);
}

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

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 8px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--on-band) 35%, transparent);
  text-underline-offset: 4px;
  transition: text-decoration-color 160ms ease;
}

.site-footer a:hover {
  text-decoration-color: var(--amber);
}

.site-footer a:active {
  opacity: 0.75;
}

.site-footer :focus-visible {
  outline-color: var(--amber);
}

@media (min-width: 860px) {
  .footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
  }

  .site-footer p {
    justify-self: center;
    text-align: center;
  }
}

/* ---------- Phones ---------- */

@media (max-width: 479px) {
  .cta-row .btn,
  .closing .btn {
    width: 100%;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .text-link {
    justify-content: center;
  }
}

/* ---------- Reduced motion: every element in its final state ---------- */

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

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

  .reveal,
  .connector,
  .phone-slot,
  .slip-rows li {
    opacity: 1 !important;
    transform: none !important;
  }

  .slip {
    transform: rotate(-2deg) !important;
  }

  .pencil path {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }

  .tile:hover {
    transform: none;
  }
}
