/* snag.fm - one stylesheet, system fonts, no external requests.
   Colour tokens are checked for contrast in light and dark by web/tests/test_contrast.py. */
:root {
  color-scheme: light dark;
  --bg: #f5f4f0;
  --surface: #ffffff;
  --band: #ebe9e2;
  --text: #0f1419;
  --muted: #4f554e;
  --accent: #b83a28;
  --on-accent: #ffffff;
  --border: #7d8178;
  --focus: #b83a28;
  --tally: #e5483a;
  --rule: #d6d3c9;
  --bezel: #0f1419;
  --island: #05070a;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
  --wide: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #171e26;
    --band: #131a21;
    --text: #edeae3;
    --muted: #a9b1ba;
    --accent: #ff7a5c;
    --on-accent: #0f1419;
    --border: #6f7a86;
    --focus: #ff7a5c;
    --tally: #e5483a;
    --rule: #262f3a;
    --bezel: #2b343d;
    --island: #05070a;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .dot { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.35; } }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.125rem/1.6 var(--font);
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--focus);
  z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1rem; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
.wide > h2, .wide > p, .wide > .loop, .wide > pre, main .wrap > * { max-width: var(--measure); }
main .wrap { max-width: var(--wide); }

header.site { border-bottom: 1px solid var(--rule); }
header.site .wrap, footer.site .wrap { max-width: var(--wide); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { color: var(--text); display: inline-flex; padding: 0.25rem 0; }
.wordmark { display: block; }
header.site nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 1.1rem; }
header.site nav a { text-decoration: none; font-weight: 700; padding: 0.25rem 0; }
header.site nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 30rem) {
  header.site .wrap { flex-wrap: wrap; gap: 0; padding-bottom: 0.5rem; }
  header.site nav { width: 100%; justify-content: space-between; }
}

section { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.band { background: var(--band); }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(3rem, 11vw, 5.25rem); margin: 0 0 1.25rem; letter-spacing: -0.04em; line-height: 0.95; }
h2 { font-size: clamp(1.75rem, 5vw, 2.375rem); margin: 0 0 1.25rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }

.caught { color: var(--accent); white-space: nowrap; }
.lede { font-size: 1.3rem; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }

.status { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--muted); font-size: 1rem; }
.dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--tally); display: inline-block; }

/* the conversation in the hero: Snag left, you right */
.loop { list-style: none; padding: 0; margin: 2rem 0 1.5rem; display: grid; gap: 0.6rem; }
.loop li { max-width: 85%; padding: 0.65rem 0.95rem; border-radius: 1.1rem; background: var(--surface); border: 1px solid var(--rule); }
.loop .app { justify-self: start; border-bottom-left-radius: 0.3rem; }
.loop .you { justify-self: end; border-bottom-right-radius: 0.3rem; background: var(--band); }
.who { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }


.plain { padding-left: 1.25rem; }
.plain li { margin-bottom: 0.5rem; }

/* integrations: a grid of logo tiles, then a card for each destination */
.logos { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 1.25rem 0.75rem; }
.logos li { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; text-align: center; font-size: 0.9rem; line-height: 1.25; }
.logos img, .dests h3 img, .default h3 img, .cards h3 img { width: 3rem; height: 3rem; flex: none; }
.dests { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); margin: 1.5rem 0 1.25rem; }
.dests > li, .default { background: var(--surface); border: 1px solid var(--rule); border-radius: 1rem; padding: 1rem 1.1rem; }
.dests h3, .default h3, .cards h3 { display: flex; align-items: center; gap: 0.75rem; }
.dests h3 a { color: inherit; text-decoration: none; }
.dests h3 a:hover, .dests h3 a:focus-visible { text-decoration: underline; }
.dests dl, .default dl { margin: 0.5rem 0 0; font-size: 1rem; }
dt { font-weight: 700; margin-top: 0.6rem; }
dd { margin: 0; }

/* privacy and the short pages */
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }

/* sign-up */
.signup { background: var(--surface); border: 1px solid var(--rule); border-radius: 1rem; padding: 1.25rem; margin-top: 1.5rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.95rem; }
input[type="email"], input[type="text"], textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
}
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 1rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--accent); }
.trap { position: absolute; left: -100vw; width: 1px; height: 1px; overflow: hidden; }
button {
  font: inherit;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
}
button:hover { text-decoration: underline; }

footer.site { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; color: var(--muted); font-size: 1rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
footer.site p { margin: 0; }
footer.site .legal { flex-basis: 100%; font-size: 0.85rem; margin-top: 0.75rem; }


/* sales pages: text beside a screen, galleries of screens */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
@media (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr) auto; gap: 3.5rem; }
  .split.flip { grid-template-columns: auto minmax(0, 1fr); }
  .split.flip > :first-child { order: 2; }
}
.split > div > :last-child { margin-bottom: 0; }
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 1.25rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.gallery > li { display: flex; }
.device { margin: 0 auto; text-align: center; }
.device img { display: block; width: 100%; height: auto; object-fit: contain; }
.device.phone { width: 15rem; max-width: 100%; }
.device.phone img { aspect-ratio: 284 / 600; }
.gallery .device.phone { width: 11.5rem; }
.device.iphone { width: 15rem; max-width: 100%; }
.device.iphone picture { display: block; position: relative; background: var(--bezel); padding: 0.5rem; border-radius: 2.5rem; }
.device.iphone img { aspect-ratio: 402 / 874; border-radius: 2rem; }
.device.iphone picture::before { content: ""; position: absolute; top: calc(0.5rem + 1.2%); left: 50%; transform: translateX(-50%); width: 28%; aspect-ratio: 126 / 37; border-radius: 999px; background: var(--island); }
.gallery .device.iphone { width: 11.5rem; }
.device.carplay { width: 33.75rem; max-width: 100%; }
.device.carplay img { aspect-ratio: 540 / 280; }
.gallery .device.carplay { width: 20.5rem; }
.device figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; line-height: 1.4; }
@media (max-width: 30rem) { .gallery .device.phone, .gallery .device.iphone { width: 9.5rem; } }

.eyebrow { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.6rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text); vertical-align: 0.15em; }

/* calls to action */
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 1.75rem 0 0; }
.btn { display: inline-block; font-weight: 700; text-decoration: none; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 0.7rem 1.5rem; }
.btn:hover { text-decoration: underline; }
.btn.ghost { color: var(--text); background: transparent; border: 2px solid var(--text); padding: calc(0.7rem - 2px) calc(1.5rem - 2px); }
.badge { display: inline-block; padding: 0.75rem; line-height: 0; }
.badge img { height: 3rem; width: auto; }
.qr { width: 9rem; height: 9rem; background: var(--surface); padding: 0.5rem; border: 1px solid var(--rule); border-radius: 0.75rem; }

/* cards: verbs, plans, examples */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin: 1.5rem 0; padding: 0; list-style: none; }
.cards > li { background: var(--surface); border: 1px solid var(--rule); border-radius: 1rem; padding: 1rem 1.1rem; }
.cards h3 { font-size: 1.1rem; }
.cards p { margin: 0; }
.say { font-style: italic; }
.cards.tools { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.cards code { overflow-wrap: anywhere; }

/* pricing */
.plans { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
.plans caption { text-align: left; margin-bottom: 0.5rem; }
.plans th, .plans td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.plans thead th { font-size: 1.15rem; border-bottom: 2px solid var(--text); }
.plans tbody th { font-weight: 400; }
.plans td { width: 30%; }
.price { font-size: 2rem; font-weight: 700; line-height: 1.1; display: block; }

/* code and payload examples */
pre { background: var(--surface); border: 1px solid var(--rule); border-radius: 0.75rem; padding: 1rem; overflow-x: auto; font-size: 0.9rem; line-height: 1.5; margin: 0 0 1rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
.faq h3 { margin-top: 1.75rem; }
