/*
 * SURP website pages (how it works, earn, suburbs, early access, partners,
 * giveaway, support, legal, account and Stripe return pages).
 * Same world as the homepage (DESIGN.md, "the whole street's shed"):
 * white #ffffff, charcoal #16181a, one colour: mint #13ec80 (pegs, price
 * underlines, the sprayed band, checks; never a button fill). Bricolage 800
 * headings in sentence case, Martian Mono labels, system sans for reading.
 * Shared header, "Get SURP" driveway band, closed-door footer and phone bar.
 */
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Martian'; src: url('/fonts/martian-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Martian'; src: url('/fonts/martian-mono-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --white: #ffffff;
  --board: #f3f4f5;
  --hole: #c9ced3;
  --ink: #16181a;
  --ink-2: #474c52;
  --ink-3: #6b7178;
  --rule: #d5d9dd;
  --mint: #13ec80;
  --display: 'Bricolage', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Martian', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* Older names some pages still use */
  --muted: var(--ink-2);
  --faint: var(--ink-3);
  --line: var(--rule);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; caret-color: var(--ink);
}
::selection { background: var(--mint); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }

h1, h2, h3 { color: var(--ink); margin: 0 0 12px; font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(42px, 8.4vw, 84px); line-height: 0.95; }
h2 { font-size: clamp(30px, 5vw, 48px); line-height: 1; margin-top: 0; }
h3 { font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
p, li { color: var(--ink-2); }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 22px; }
li { margin: 4px 0; }
strong { color: var(--ink); }
code { font-family: var(--mono); font-size: 0.9em; background: var(--board); padding: 1px 6px; border-radius: 4px; }
.muted { color: var(--ink-3); font-size: 15px; }

/* ---- Shared header ---- */
.sh-top {
  max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 20px;
}
.sh-brand img { height: 40px; width: auto; display: block; }
.sh-nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 600; }
.sh-nav a { text-decoration: none; }
.sh-nav a:hover { text-decoration: underline; }
.sh-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 4px; }
.sh-nav .sh-link { display: none; }
@media (min-width: 860px) { .sh-nav .sh-link { display: inline; } }
.sh-nav .sh-web { font-weight: 700; background: var(--ink); color: var(--white); border-radius: 999px; padding: 10px 18px; }
.sh-nav .sh-web:hover { background: var(--ink-2); text-decoration: none; }
@media (max-width: 520px) { .sh-brand img { height: 34px; } .sh-nav .sh-web { font-size: 14px; padding: 9px 15px; } }
/* Phones: the page links sit on their own row under the logo and button */
@media (max-width: 859px) {
  .sh-top { flex-wrap: wrap; justify-content: flex-start; row-gap: 4px; padding-bottom: 6px; }
  .sh-nav { display: contents; }
  .sh-brand { order: 0; }
  .sh-nav .sh-web { order: 1; margin-left: auto; }
  .sh-top::after { content: ''; order: 2; flex-basis: 100%; height: 0; }
  .sh-nav .sh-link { display: inline; order: 3; font-size: 15px; margin-right: 20px; position: relative; padding: 6px 0; }
  .sh-nav .sh-link::after { content: ''; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }
}

/* ---- Page body ---- */
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 20px 40px; }

.hero { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 28px 0 56px; }
.hero h1 { order: 1; max-width: 15em; margin: 0 0 20px; }
.hero .hero-copy { order: 2; }
.hero .store-block { order: 3; margin: 0 0 22px; }
.hero .chips { order: 4; }
.hero .cta-row { order: 5; }
/* In a hero the app download leads; web links are the quiet second door. */
.hero .store-block ~ .cta-row .btn, .hero .cta-row .btn.btn-primary { background: var(--white); color: var(--ink); min-height: 46px; font-size: 15px; }
.hero-logo { display: none; }
.hero-copy { max-width: 34em; margin: 0 0 22px; font-size: 19px; line-height: 1.5; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--white);
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink);
}
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--ink); flex: none; }

.cta-row, .card-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.section .cta-row { margin-top: 26px; }
.card-cta { margin-top: 16px; }

/* Buttons: charcoal, never mint-filled */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 22px;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--white); color: var(--ink);
  font: 700 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), background 160ms var(--ease);
}
.btn:hover { transform: translateY(-1px); background: var(--board); }
.btn.btn-primary { background: var(--ink); color: var(--white); }
.btn.btn-primary:hover { background: var(--ink-2); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.card-cta .btn { min-height: 46px; padding: 0 18px; font-size: 15px; }

/* Sections sit on white or on the pegboard */
.section { padding: 56px 0; }
.section > h2 { max-width: 18em; }
.section > p { max-width: 40em; }
.section.bare { background: none; border: 0; padding: 0; box-shadow: none; clip-path: none; }

.grid { display: grid; gap: 28px 32px; grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Steps hang off a mint tape measure (how it works) */
.tape-steps { position: relative; padding-top: 30px; }
.tape-steps::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 30px; border: 3px solid var(--ink); border-radius: 6px;
  background-color: var(--mint);
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 100px), repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 20px);
  background-size: 100% 15px, 100% 8px; background-repeat: no-repeat;
}
.tape-steps .card { border-top: 0; padding-top: 18px; }
.tape-steps .card::before { content: ''; position: absolute; left: 0; top: -2px; width: 4px; height: 16px; background: var(--ink); border-radius: 0 0 2px 2px; }
.tape-steps + .tape-steps { margin-top: 36px; }
/* Narrower screens: the tape stands upright and each step hangs off its side */
@media (max-width: 1039px) {
  .tape-steps { grid-template-columns: 1fr; padding: 0 0 0 52px; gap: 22px; }
  .tape-steps::before { right: auto; bottom: 0; width: 30px; height: auto;
    background-image: repeating-linear-gradient(180deg, var(--ink) 0 2px, transparent 2px 100px), repeating-linear-gradient(180deg, var(--ink) 0 2px, transparent 2px 20px);
    background-size: 15px 100%, 8px 100%; }
  .tape-steps .card { padding-top: 0; }
  .tape-steps .card::before { left: -22px; top: 0.55em; width: 22px; height: 4px; border-radius: 0 2px 2px 0; }
  .tape-steps + .tape-steps { margin-top: 0; padding-top: 22px; }
  .tape-steps + .tape-steps::before { top: -4px; border-top-left-radius: 0; border-top-right-radius: 0; }
}

/* Facts sit under a 3px charcoal rule, like the homepage's fact rows */
.card { position: relative; border-top: 3px solid var(--ink); padding: 14px 0 0; }
.card h3 { margin-bottom: 8px; font-size: 24px; }
.card p { margin: 0; font-size: 16px; }
.card p + p { margin-top: 8px; }

.quote { border-top: 3px solid var(--ink); padding: 16px 0 0; margin: 26px 0; max-width: 40em; }
.quote p { font-size: 19px; color: var(--ink); }
.quote cite { font-style: normal; font-weight: 700; color: var(--ink-2); }

/* Forms (early access) */
.email-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.email-input {
  flex: 1 1 240px; min-height: 54px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 12px;
  font: 500 16px var(--sans); color: var(--ink); background: var(--white);
}
.email-input:focus { outline: none; box-shadow: 0 0 0 4px var(--mint); }
.email-row .btn { min-height: 54px; }
.form-error { display: none; margin-top: 8px; color: #b42318; font-size: 14px; font-weight: 600; }
.thankyou { display: none; margin-top: 16px; padding: 16px 18px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--white); }

/* Comparison and steps */
.contrast { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 22px; }
@media (min-width: 760px) { .contrast { grid-template-columns: 1fr 1fr; } }
.contrast-card { border-radius: 12px; padding: 26px; border: 2.5px solid var(--ink); background: var(--white); }
.contrast-card h3 { margin: 0 0 14px; color: var(--ink-2); }
.contrast-card ul { list-style: none; padding: 0; margin: 0; }
.contrast-card li { margin: 10px 0; padding-left: 30px; position: relative; }
.contrast-card li::before { content: ''; position: absolute; left: 4px; top: 0.6em; width: 12px; height: 2.5px; background: var(--ink-3); }
.contrast-card.surp { border-width: 3px; box-shadow: 0 18px 24px -18px rgba(22, 24, 26, 0.5); }
.contrast-card.surp h3 { color: var(--ink); }
.contrast-card.surp li { color: var(--ink); }
.contrast-card.surp li::before { box-shadow: 0 0 0 2px var(--ink); }
.contrast-card.surp li::before { left: 2px; top: 0.35em; width: 14px; height: 14px; border-radius: 50%; background: var(--mint); }

.steps { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 26px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); } }
.steps > * { border-top: 4px solid var(--ink); padding-top: 14px; }
.step-num { display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 13px; background: var(--mint); padding: 2px 8px; border-radius: 4px; margin-bottom: 10px; }
.steps h3 { margin: 0 0 6px; }
.steps p { margin: 0; font-size: 16px; }

.faq { margin-top: 22px; max-width: 900px; border-top: 3px solid var(--ink); }
.faq details { border-bottom: 2px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17.5px; padding: 18px 36px 18px 2px; list-style: none; position: relative; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  background: linear-gradient(var(--ink), var(--ink)) center / 16px 2.8px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.8px 16px no-repeat;
  transition: transform 220ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 2px 20px; color: var(--ink-2); max-width: 44em; }

.launch-card { background: var(--white); border: 3px solid var(--ink); border-radius: 14px; padding: 34px 28px; box-shadow: 0 18px 24px -18px rgba(22, 24, 26, 0.5); }
.launch-card .btn.btn-primary { background: var(--ink); color: var(--white); }
.launch-card .on-dark .store-btn { background: var(--ink); color: var(--white); }
.launch-card .on-dark p { color: var(--ink-2); }

.founder-note { max-width: 40em; }

/* Store buttons (same as the homepage) */
.store-block { margin-top: 22px; }
.store-block p { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-2); }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px 0 16px;
  background: var(--ink); color: var(--white); text-decoration: none; border-radius: 12px; font-weight: 700;
  box-shadow: 0 8px 16px -10px rgba(22, 24, 26, 0.7); transition: transform 160ms var(--ease);
}
.store-btn:hover { transform: translateY(-2px); }
.store-btn::before { content: ''; width: 22px; height: 22px; flex: none; background: currentColor; -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.store-btn[data-store="app_store"] { --glyph: url('/brand/apple.svg'); }
.store-btn[data-store="google_play"] { --glyph: url('/brand/play.svg'); }
.store-btn small { display: block; font-size: 11.5px; opacity: 0.82; font-weight: 500; }
.store-btn strong { display: block; font-size: 17px; color: inherit; line-height: 1.1; }
.on-dark .store-btn { background: var(--white); color: var(--ink); }
.on-dark p { color: #c9cdd2; }

/* ---- Legal and help documents (Read) ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 20px 0 40px; }
.doc h1 { font-size: clamp(36px, 6vw, 60px); margin-bottom: 10px; }
.doc h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; margin-top: 40px; line-height: 1.15; }
.doc h3 { font-size: 19px; margin-top: 26px; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; }
.doc a { color: var(--ink); font-weight: 600; text-decoration-color: var(--mint); text-decoration-thickness: 3px; }
.terms-list { padding-left: 22px; display: grid; gap: 10px; max-width: 820px; }
.terms-list ul { margin: 8px 0 0 18px; display: grid; gap: 4px; }

/* ---- Stripe return pages ---- */
.return-page { min-height: 70vh; display: grid; place-items: center; padding: 40px 20px; }
.return-page .card { max-width: 460px; text-align: center; padding: 34px 28px; border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 0 14px 18px -14px rgba(22, 24, 26, 0.55); }
.return-page .card h1 { font-size: 34px; }
.return-page .card .btn { margin-top: 12px; }

/* ---- Get SURP driveway band (every page) ---- */
.getband { background: var(--ink); color: var(--white); margin-top: 24px; }
.getband-in { max-width: 1240px; margin: 0 auto; padding: 52px 20px; display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) { .getband-in { grid-template-columns: 1fr auto; } }
.getband h2 { color: var(--white); margin: 0; }
.getband p { color: #c9cdd2; margin: 10px 0 0; max-width: 32em; }
.getband .store-row { margin-top: 20px; }
.getband .store-btn { background: var(--white); color: var(--ink); }
.getband .qr { display: none; }
@media (min-width: 900px) {
  .getband .qr { display: grid; grid-template-columns: 104px 200px; gap: 16px; align-items: center; padding: 14px; background: var(--white); border-radius: 16px; color: var(--ink); }
  .getband .qr img { width: 104px; height: 104px; display: block; }
  .getband .qr p { color: var(--ink-2); margin: 0; font-size: 14px; }
  .getband .qr strong { display: block; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; margin-bottom: 4px; }
}

/* ---- Footer: the door shuts ---- */
.sh-foot { background: var(--ink); color: #f4f5f6; }
.sh-foot::before {
  content: ''; display: block; height: 120px; border-bottom: 20px solid var(--ink); border-top: 12px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(22, 24, 26, 0.06), transparent 10%, transparent 90%, rgba(22, 24, 26, 0.06)),
    repeating-linear-gradient(180deg, #ffffff 0 30px, #eef0f2 30px 33px, #c9ced3 33px 35px, #ffffff 35px 36px);
}
.sh-foot-in { max-width: 1240px; margin: 0 auto; padding: 44px 20px 120px; display: grid; gap: 30px; }
@media (min-width: 900px) { .sh-foot-in { grid-template-columns: 1fr 1.4fr; padding-bottom: 56px; } }
.sh-foot .logo-rev { height: 44px; width: auto; display: block; }
.sh-foot p { color: #c9cdd2; margin: 14px 0 0; max-width: 28em; }
.sh-foot nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; font-size: 15px; align-content: start; }
@media (min-width: 640px) { .sh-foot nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sh-foot nav a { color: #f4f5f6; }
.sh-foot .fine { grid-column: 1 / -1; font-family: var(--mono); font-size: 11.5px; color: #a9afb6; border-top: 1px solid #3a3f45; padding-top: 18px; margin: 0; max-width: none; }

/* ---- Phone bar ---- */
.stickybar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
  display: none; align-items: center; gap: 12px; background: var(--white); border: 3px solid var(--ink); border-radius: 16px;
  padding: 8px 8px 8px 14px; box-shadow: 0 14px 26px -12px rgba(22, 24, 26, 0.5); text-decoration: none;
  transform: translateY(150%); transition: transform 320ms var(--ease);
}
.stickybar.is-on { transform: none; }
@media (prefers-reduced-motion: reduce) { .stickybar { transition: none; } }
.getband .qr.is-flash { animation: flash 900ms var(--ease); }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(19, 236, 128, 0); } 30% { box-shadow: 0 0 0 8px rgba(19, 236, 128, 0.9); } }
@media (prefers-reduced-motion: reduce) { .getband .qr.is-flash { animation: none; } }
.stickybar span { flex: 1; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.stickybar b { background: var(--ink); color: var(--white); border-radius: 12px; padding: 13px 18px; font-size: 15.5px; }
@media (max-width: 859px) { .stickybar { display: flex; } body { padding-bottom: 80px; } }

@media (max-width: 640px) {
  .wrap { padding: 4px 16px 32px; }
  .hero { padding: 16px 0 40px; }
  .hero-copy { font-size: 17px; }
  .chips .chip:nth-child(n+3) { display: none; }
  .cta-row .btn { width: 100%; }
  .section { padding: 44px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .store-btn, .faq summary::after { transition: none; }
  .btn:hover, .store-btn:hover { transform: none; }
}
