/* Carligraphy site. Warm paper and ink with one red car; the app's Laser lime (#C6F04A) appears only as a fill
   behind ink (#1C1F23) or as a foreground on dark grounds, never as text on light ones. Manrope, self-hosted
   (variable, Latin subset; OFL in fonts/OFL.txt): no third-party requests. Light and dark via
   prefers-color-scheme. Hover styles only where a mouse can hover. */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-2: #f0ece3;
  --text: #1c1f23;
  --muted: #55595f;
  --faint: #65696f;
  --line: rgba(28, 31, 35, 0.16);
  --rule: #1c1f23;
  --accent: #c6f04a;
  --on-accent: #1c1f23;
  --red: #c23b29;
  --car: #e8523f;
  --link: #1c1f23;
  --focus: #1c1f23;
  --mark: #1c1f23;
  --hud: #1c1f23;
  --on-hud: #faf7f0;
  --bezel-ring: transparent;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(28, 31, 35, 0.06), 0 10px 30px rgba(28, 31, 35, 0.08);
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1240px;
  --gap: clamp(72px, 10vw, 140px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1f23;
    --surface: #25292e;
    --surface-2: #22262b;
    --text: #f3efe6;
    --muted: #b4b8be;
    --faint: #a1a6ad;
    --line: rgba(255, 255, 255, 0.14);
    --rule: #f3efe6;
    --red: #ff8a76;
    --link: #f3efe6;
    --focus: #c6f04a;
    --mark: #c6f04a;
    --hud: #353a40;
    --on-hud: #f3efe6;
    --bezel-ring: rgba(255, 255, 255, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; /* no gray flash on tap; :active and :focus-visible give feedback */
}

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

@supports (overflow: clip) { body { overflow-x: clip; } } /* clip: no scroll container, nothing to drag */

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

button {
  font: inherit;
  touch-action: manipulation; /* no double-tap-zoom delay */
  user-select: none;          /* a long press on a control should not select its label */
  -webkit-user-select: none;
}

h1, h2, h3 { margin: 0 0 0.5em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(3.25rem, 11vw, 9.5rem); line-height: 0.94; letter-spacing: -0.055em; }
h2 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1; letter-spacing: -0.045em; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 600px) { .wrap { padding: 0 20px; } }

.no-js .js-only { display: none !important; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 10px;
}
.skip:focus { left: 8px; }

/* Header */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.035em; }
.brand .mark { width: 30px; height: 30px; flex: none; color: var(--mark); }
.nav { display: flex; align-items: center; gap: 8px 26px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 6px 0; }
.nav a[aria-current="page"] { color: var(--text); }
.nav .opt { display: none; }
@media (min-width: 860px) { .nav .opt { display: inline; } }
.pill { border: 1.5px solid var(--text); border-radius: 999px; padding: 6px 16px; font-weight: 700; font-size: 0.875rem; }
.nav .pill { color: var(--text); padding: 6px 16px; }
@media (max-width: 479px) { .pill { display: none; } }

/* Shared section rhythm and heads */
#main > section { padding-top: var(--gap); }
#main > section:first-child { padding-top: clamp(40px, 6vw, 64px); }
#main > section:last-child { padding-bottom: var(--gap); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: 32px; }
.section-head h2 { margin: 0; max-width: 640px; }
.intro { margin: 0; max-width: 480px; color: var(--muted); text-wrap: balance; }

/* Hero: the car signs the headline. Lime loops sweep through the letters (the marks sit behind the text in
   .title-art), the car drives in front (.title-front) and parks as the period. drift.js builds the path from the
   measured headline, so it fits every size. */
.hero { position: relative; overflow-x: clip; text-align: center; }
.hero h1 { position: relative; z-index: 1; margin: 0; }
.js .hero h1 { margin-bottom: 0.45em; }                 /* the loops dip a little under the words */
.hero h1 .base { display: inline-block; width: 0; height: 0; vertical-align: baseline; } /* the baseline, for drift.js */
.hero.is-signing h1 .dot { color: transparent; }        /* the car is the period */
.title-art, .title-front { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.title-art { z-index: 0; }
.title-front { z-index: 2; }
.title-art .marks { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; }
.lede { margin: 26px auto 0; max-width: 560px; font-size: clamp(1.125rem, 2vw, 1.25rem); line-height: 1.5; color: var(--muted); text-wrap: balance; }
.js .hero .lede { margin-top: 0; }
.cta { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cta p { margin: 0; }
.cta .note { font-size: 0.875rem; }                   /* caption under the badge, like the footer byline */
/* Apple's badge, unmodified and never animated: at least 40 px tall (52 here), a quarter of its height clear all round */
.store-badge { --badge-h: 58px; display: block; width: max-content; margin-inline: auto; line-height: 0; border-radius: 10px; }
.store-badge img { display: block; height: var(--badge-h); width: calc(var(--badge-h) * 2.9916); } /* the artwork's 119.664:40 */
@media (max-width: 479px) { .store-badge { --badge-h: 54px; } }
.store-badge:focus-visible { border-radius: 12px; outline-offset: 4px; }
.note { color: var(--faint); font-size: 0.9375rem; }
/* A small QR beside the badge for desktop visitors, who can't install from a computer. Phones and tablets tap the bare
   badge, and lazy loading means they never fetch the file. At exactly 2 px a module (41 with the quiet zone) the code's
   ink is 66 px, so the badge matches it and the two read as one line; the gap keeps the badge's clear space. The SVG has
   no background: ink on the paper in light, a white plate in dark, because a QR needs dark modules on a light ground. */
.store-qr { display: none; }
@media (min-width: 860px) and (hover: hover) and (pointer: fine) {
  .store-pair { display: flex; align-items: center; justify-content: center; gap: 17px; }
  .store-pair .store-badge { --badge-h: 66px; margin: 0; }
  .store-qr { display: block; width: 82px; height: 82px; border-radius: 8px; }
}
@media (min-width: 860px) and (hover: hover) and (pointer: fine) and (prefers-color-scheme: dark) {
  .store-qr { background: #fff; }
}

/* Phone fan under the button: five screens in a minimal frame, whole, tilted out from the center one. The wrapper
   clips only sideways, so the tilted phones and their shadows can spill below; the list's top padding leaves room
   for the hover lift. */
.fan-wrap { position: relative; isolation: isolate; margin-top: calc(clamp(36px, 5vw, 60px) - 22px); overflow: hidden; }
/* Skid marks behind the phones: low on the left, up and out to the upper right. At least 1000 px wide and centered,
   so a phone shows the middle of the sweep behind its three phones. */
.streak-fan { top: 0; left: 50%; width: max(100%, 1000px); transform: translateX(-50%); }
.streak-fan path { stroke-width: 6; }
@supports (overflow: clip) { .fan-wrap { overflow: visible; overflow-x: clip; } }
.fan { --w: clamp(130px, 14.5vw, 204px); list-style: none; margin: 0 auto; padding: 30px 0 96px; display: flex; justify-content: center; align-items: flex-start; }
.fan li {
  flex: none; width: var(--w); margin: 0 calc(var(--w) * -0.07); padding: 6px; border-radius: calc(var(--w) * 0.15);
  background: #121417; box-shadow: 0 0 0 1px var(--bezel-ring), 0 2px 4px rgba(18, 20, 23, 0.10), 0 32px 60px -14px rgba(18, 20, 23, 0.35);
  transform: translateY(var(--y)) rotate(var(--r)); transform-origin: 50% 100%;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fan li:nth-child(2), .fan li:nth-child(4) { z-index: 1; }
.fan li:nth-child(3) { z-index: 2; }
.fan img { display: block; width: 100%; height: auto; border-radius: calc(var(--w) * 0.125); }
@media (max-width: 700px) {
  .fan { --w: 34vw; }
  .fan li:first-child, .fan li:last-child { display: none; }
  .fan li { margin: 0 -3vw; }
}

/* Take the wheel (sits closer to the phones above it than other sections do to theirs) */
#main > #drive { padding-top: clamp(24px, 4vw, 56px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.drive .intro { margin-top: 18px; }
.chips button {
  width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--text); background: transparent; color: var(--text);
}
.chips svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.chips button:active { transform: scale(0.97); }

.lot {
  position: relative; height: clamp(400px, 52vw, 620px); border-radius: 36px; overflow: hidden;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  touch-action: pan-y;          /* a finger scrolls past the lot until Drive is on */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.lot.is-driving { touch-action: none; box-shadow: inset 0 0 0 2px var(--text); }
.lot-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lot-shape { fill: none; stroke: var(--text); stroke-opacity: 0.4; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0.1 13; }
.lot-covered { fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.lot-marks { fill: none; stroke: var(--text); stroke-opacity: 0.85; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.hud {
  position: absolute; top: 22px; left: 22px; display: inline-flex; align-items: center; gap: 12px;
  background: var(--hud); color: var(--on-hud); border-radius: 999px; padding: 7px 18px 7px 8px;
}
.hud svg { display: block; }
.hud-track { fill: none; stroke: currentColor; stroke-opacity: 0.2; stroke-width: 4; }
.hud-ring { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.hud-pct { font-family: var(--mono); font-size: 0.9375rem; min-width: 42px; }
.hud-status { font-size: 0.875rem; font-weight: 600; opacity: 0.75; }
.lot-actions { position: absolute; top: 22px; right: 22px; display: flex; align-items: center; gap: 8px; }
.lot-clear {
  min-height: 44px; padding: 0 12px; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 4px;
}
.drive-toggle {
  display: none; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--text); color: var(--bg); font-weight: 700; font-size: 0.9375rem;
}
.drive-toggle[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.drive-toggle:active { transform: scale(0.97); }
.for-touch { display: none; }
@media (any-pointer: coarse) { .drive-toggle { display: inline-flex; align-items: center; } }
@media (hover: none) and (pointer: coarse) { .for-mouse { display: none; } .for-touch { display: inline; } }
@media (max-width: 600px) {
  .lot { border-radius: 28px; }
  .hud { top: 14px; left: 14px; }
  .lot-actions { top: auto; bottom: 14px; left: 14px; right: 14px; justify-content: space-between; }
}

/* Shapes: one row that scrolls forever (drift.js doubles the row and adds .is-running; without it the row scrolls by hand) */
.marquee {
  margin-top: 36px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee:not(.is-running) { overflow-x: auto; }
.gallery { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 14px; width: max-content; }
.marquee:not(.is-running) .gallery { padding: 0 32px 4px; }
.marquee.is-running .gallery { animation: marquee 50s linear infinite; }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } } /* one set plus one gap */
.gallery li { flex: none; width: 168px; border-radius: 24px; padding: 16px 16px 12px; background: var(--surface); }
.gallery svg { display: block; width: 100%; aspect-ratio: 1 / 1; fill: none; stroke: var(--text); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.gallery p { margin: 8px 0 0; text-align: center; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.gallery .today { background: var(--accent); }
.gallery .today svg { stroke: #1c1f23; }
.gallery .today p { color: #1c1f23; }
@media (max-width: 600px) {
  .gallery li { width: 124px; border-radius: 18px; padding: 10px 10px 8px; }
  .gallery p { font-size: 0.6875rem; }
}

/* Skid streaks: faint tire marks sweeping in from the page edges, behind the content (drift.js draws each one as it
   comes into view; the second track follows a beat later). Their sections are positioned and isolated so a streak
   can sit under the text without slipping under the page. */
#drive, #shapes, #places, .price-section, .closing { position: relative; isolation: isolate; overflow-x: clip; }
.streak { position: absolute; z-index: -1; pointer-events: none; height: auto; color: var(--text); overflow: visible; }
.streak path { fill: none; stroke-width: 5; stroke-linecap: round; }
.js .streak path { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(0.3, 0.1, 0.2, 1); }
.js .streak path + path { transition-delay: 0.08s; }
.js .streak.is-drawn path { stroke-dashoffset: 0; }
.streak-shapes { top: 16px; right: -40px; width: min(760px, 105vw); }
.streak-places { top: 28px; left: -40px; width: min(900px, 115vw); }
.streak-price { top: 70px; right: -40px; width: min(640px, 95vw); }
.streak-donut { top: -78px; left: 50%; width: 220px; margin-left: -110px; color: var(--accent); } /* centered on the mark */
.closing .wrap { position: relative; }

/* Places: one row of tinted cards (a swipeable row on phones) */
.places { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.place { border-radius: 26px; padding: 12px 12px 16px; background: color-mix(in srgb, var(--tint) 20%, transparent); color: var(--text); }
.place img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 18px; }
.place h3 { margin: 14px 4px 0; font-size: 1.125rem; letter-spacing: -0.02em; }
.parking-lot { --tint: #8f8d88; }
.crop-circles { --tint: #e0b13a; }
.zen-garden { --tint: #cdb58a; }
.zamboni { --tint: #74b3dc; }
.cake-boss { --tint: #ec8fa7; }
@media (max-width: 860px) {
  .places {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 32px -20px 0; padding: 0 20px 8px; scroll-padding: 0 20px;
  }
  .place { scroll-snap-align: start; }
}

/* Price */
.price { margin-top: 40px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.price-card { border-radius: 30px; padding: 36px; background: var(--surface); }
.price-card h3 { margin: 0; font-size: 1.125rem; }
.amount { margin: 10px 0 30px; font-size: clamp(2.75rem, 5vw, 3.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.045em; }
.amount span { font-size: 1rem; font-weight: 600; letter-spacing: 0; opacity: 0.65; }
.price-card ul { list-style: none; margin: 0; padding: 0; }
.price-card li + li { margin-top: 14px; }
.price-card:not(.full) li { color: var(--muted); }
.price-card.full { background: var(--text); color: var(--bg); box-shadow: none; }

/* Closing call to action (the App Store badge again, as in the hero) */
.closing { text-align: center; }
.closing-mark { display: block; width: 64px; height: 64px; margin: 0 auto 48px; color: var(--mark); }
.closing h2 { margin: 0 auto; max-width: 12em; }
.closing .note { margin: 16px 0 32px; }

/* Prose pages (privacy, support, 404) */
.prose { max-width: 760px; padding-top: 16px; padding-bottom: 72px; }
.prose h1 { font-size: clamp(2.5rem, 7vw, 3.75rem); line-height: 1; letter-spacing: -0.05em; }
.prose h2 { font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1.2; margin-top: 1.8em; }
.prose h3 { font-size: 1.125rem; margin-top: 1.4em; margin-bottom: 0.3em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose .meta { color: var(--muted); }
.callout { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; box-shadow: inset 0 0 0 1px var(--line); margin: 24px 0; }
.callout p:last-child { margin-bottom: 0; }
details { background: var(--surface); border-radius: 16px; padding: 14px 18px; margin: 10px 0; box-shadow: inset 0 0 0 1px var(--line); }
summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 0.5em; }
details p:last-child, details ul:last-child { margin-bottom: 0; }
.email { user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
kbd { font-family: inherit; font-size: 0.9em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--faint); font-size: 0.875rem; }
.site-footer .wrap { display: grid; gap: 18px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr; } }
.site-footer p { margin: 0 0 0.4em; }
.site-footer strong { color: var(--text); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
@media (min-width: 760px) { .footer-links { justify-content: flex-end; } }

/* Hover only where a mouse can hover (a tap would leave these stuck on a phone). */
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--red); text-decoration-thickness: 2px; }
  .nav a:hover { color: var(--text); }
  .nav .pill:hover { background: var(--text); color: var(--bg); }
  .brand:hover { color: var(--text); }
  .chips button:hover { background: var(--surface-2); }
  .chips button[aria-pressed="true"]:hover { background: var(--text); }
  .lot { cursor: crosshair; }
  .lot-clear:hover { color: var(--text); }
  .fan li:hover { transform: translateY(calc(var(--y) - 14px)) rotate(var(--r)); }
  .marquee:hover .gallery { animation-play-state: paused; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
