/* Punch Card for stampwell.app: the static pages and every page the web function serves. Colours, sizes and radius come from /tokens.css. */
:root { --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: light dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--textPrimary); font-family: var(--font); font-size: var(--font-body); line-height: 1.5; -webkit-text-size-adjust: 100%; }
main { max-width: 32rem; margin: 0 auto; padding: var(--space-s24) max(var(--space-s20), env(safe-area-inset-left)) var(--space-s32); display: grid; gap: var(--space-s16); }
main.wide { max-width: 44rem; }
main > * { margin: 0; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { font-size: var(--font-largeTitle); font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: var(--font-headline); font-weight: 800; margin-top: var(--space-s16); }
h3 { font-size: var(--font-headline); font-weight: 800; margin: 0; }
p { margin: 0; }
p, li, dt { color: var(--textSecondary); }
strong { color: var(--textPrimary); }
a { color: var(--brand); font-weight: 700; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: var(--radius-chip); }

.logo { display: inline-block; width: 11rem; color: var(--brand); }
.logo svg { display: block; width: 100%; height: auto; }
.lede { font-size: var(--font-headline); }
.eyebrow { font-size: var(--font-caption); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: var(--space-s20); display: grid; gap: var(--space-s12); }
.card > * { margin: 0; }

/* Fields: labels above, never placeholder-as-label. */
form { display: grid; gap: var(--space-s16); }
.field { display: grid; gap: var(--space-s8); }
label, legend { font-weight: 800; font-size: var(--font-label); color: var(--textPrimary); }
.hint { font-size: var(--font-caption); color: var(--textSecondary); }
input[type=text], input[type=tel], input[type=email], input[type=date], textarea {
  width: 100%; min-height: 3.25rem; padding: var(--space-s12) var(--space-s16); font: inherit; font-size: var(--font-body); color: var(--textPrimary);
  background: var(--surface); border: 2px solid var(--hairline); border-radius: var(--radius-field); }
input:focus, textarea:focus { outline: none; border-color: var(--brand); }
input:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brandTint); }
.prefixed { display: flex; align-items: stretch; border: 2px solid var(--hairline); border-radius: var(--radius-field); background: var(--surface); }
.prefixed:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brandTint); }
.prefixed span { display: flex; align-items: center; padding: 0 var(--space-s4) 0 var(--space-s16); font-weight: 800; color: var(--textSecondary); }
.prefixed input { border: 0; box-shadow: none; padding-left: var(--space-s8); }
.prefixed input:focus, .prefixed input:focus-visible { box-shadow: none; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-s8); }
legend { padding: 0; margin-bottom: var(--space-s8); }
.check { display: flex; gap: var(--space-s12); align-items: flex-start; font-weight: 400; font-size: var(--font-body); color: var(--textSecondary); cursor: pointer; }
.check input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0; accent-color: var(--brand); }
.stars .check { align-items: center; padding: var(--space-s12) var(--space-s16); border: 2px solid var(--hairline); border-radius: var(--radius-field); background: var(--surface); color: var(--textPrimary); font-weight: 700; }
.stars .check:has(input:checked) { border-color: var(--brand); background: var(--brandTint); }
.stars .glyph { flex: 1; font-size: var(--font-headline); letter-spacing: 0.1em; color: var(--warning); }

/* Buttons: brand pill for actions, tonal and outlined danger. */
button, .button {
  display: flex; align-items: center; justify-content: center; gap: var(--space-s8); width: 100%; min-height: 3.25rem; padding: var(--space-s12) var(--space-s24);
  font: inherit; font-weight: 800; font-size: var(--font-body); text-align: center; text-decoration: none; cursor: pointer;
  color: var(--onBrand); background: var(--brand); border: 0; border-radius: var(--radius-pill); transition: transform 0.12s ease; }
button:active, .button:active { transform: scale(0.97); }
button:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-pill); }
.button.tonal, button.tonal { background: var(--brandTint); color: var(--brand); }
.button.danger, button.danger { background: none; color: var(--danger); border: 2px solid currentColor; }
.wallet { display: grid; gap: var(--space-s12); }

.error { padding: var(--space-s12) var(--space-s16); border-radius: var(--radius-field); background: var(--surface); border: 2px solid var(--danger); color: var(--danger); font-weight: 700; }
.notice { padding: var(--space-s12) var(--space-s16); border-radius: var(--radius-field); background: var(--accentSoft); color: var(--onAccentSoft); }
.notice strong { color: inherit; }
.code { font-size: var(--font-largeTitle); font-weight: 900; text-align: center; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.code strong { color: var(--brand); }

/* The stamp card: a mango ticket shaped like a business card (3.5 x 2), a notch on each side, holes punched through to the page.
   Holes come in rows from the shared hole grid and size to fit both the width and the height left for them. */
.ticket {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: var(--space-s12); aspect-ratio: 3.5 / 2; width: 100%; max-width: 30rem;
  padding: var(--space-s16) var(--space-s24); border-radius: var(--radius-card); background: var(--accent); color: var(--onAccent);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 12px, #000 13px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 12px, #000 13px) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 50%, transparent 12px, #000 13px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 12px, #000 13px) right / 51% 100% no-repeat; }
.ticket .top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-s8); }
.ticket .name { font-size: var(--font-headline); font-weight: 900; line-height: 1.2; }
.ticket .shop { font-size: var(--font-caption); font-weight: 800; color: var(--onAccent); opacity: 0.8; }
.ticket .count { font-size: var(--font-headline); font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket p, .ticket strong { color: var(--onAccent); }
.ticket .line { font-weight: 700; align-self: end; }
.holes { container-type: size; min-height: 2.5rem; display: grid; align-content: center; gap: var(--space-s8); }
.holes .row { display: flex; justify-content: center; gap: var(--space-s8); }
.hole { --d: min(calc((100cqw - (var(--cols) - 1) * var(--space-s8)) / var(--cols)), calc((100cqh - (var(--rows) - 1) * var(--space-s8)) / var(--rows)), 3.5rem);
  flex: none; width: var(--d); height: var(--d); border-radius: 50%; background: color-mix(in srgb, var(--onAccent) 14%, transparent); }
.hole.on { background: var(--brand); box-shadow: inset 0 0 0 calc(var(--d) * 0.12) var(--brand), inset 0 0 0 calc(var(--d) * 0.16) var(--accent); }
.hole.heart { border-radius: 0; background: none; color: color-mix(in srgb, var(--onAccent) 14%, transparent); display: grid; place-items: center; }
.hole.heart svg { width: 100%; height: 100%; display: block; }
.hole.heart.on { box-shadow: none; color: var(--brand); }
.banner { width: 100%; height: auto; border-radius: var(--radius-card); display: block; }
.qr { width: min(16rem, 100%); justify-self: center; background: #FFFFFF; padding: var(--space-s12); border-radius: var(--radius-field); }
.qr svg { display: block; width: 100%; height: auto; }
.center { text-align: center; }

dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-s8) var(--space-s16); margin: 0; }
dt { font-size: var(--font-label); }
dd { margin: 0; font-weight: 800; }

ul.links { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
ul.links li { padding: var(--space-s16) var(--space-s20); border-bottom: 1px solid var(--hairline); }
ul.links li:last-child { border-bottom: 0; }
ul.links a { display: block; text-decoration: none; }
ul.links span { font-size: var(--font-caption); color: var(--textSecondary); }
ul.links a + span { display: block; }
.map { height: 20rem; border-radius: var(--radius-card); border: 1px solid var(--hairline); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

footer { max-width: 32rem; margin: 0 auto; padding: var(--space-s24) var(--space-s20) var(--space-s32); font-size: var(--font-caption); color: var(--textSecondary); text-align: center; }
footer a { display: inline-flex; align-items: center; gap: var(--space-s8); font-weight: 800; text-decoration: none; }
footer svg { width: 1.75rem; height: 1.75rem; flex: none; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-s8) var(--space-s16); }
/* stampwell.app's own pages: home and legal. */
body.site { min-height: 100dvh; display: flex; flex-direction: column; }
body.site > main { flex: 1; width: 100%; }
.bar { width: 100%; max-width: 68rem; margin: 0 auto; padding: var(--space-s16) max(var(--space-s20), env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: var(--space-s16); }
.bar .logo { width: 9rem; }
.bar nav { display: flex; gap: var(--space-s20); }
.bar nav a { color: var(--textPrimary); text-decoration: none; font-size: var(--font-label); padding: var(--space-s8) 0; }
.bar nav a:hover { color: var(--brand); }

main.home { max-width: 68rem; padding-top: var(--space-s16); gap: var(--space-s48); }
.hero { display: grid; gap: var(--space-s32); align-items: center; padding-block: var(--space-s16) var(--space-s24); }
.hero h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); line-height: 1.02; letter-spacing: -0.02em; max-width: 14ch; color: var(--textPrimary); }
.hero .lede { margin-top: var(--space-s16); max-width: 34rem; }
.soon { display: inline-block; margin-top: var(--space-s24); padding: var(--space-s8) var(--space-s16); border-radius: var(--radius-pill); background: var(--brandTint); color: var(--brand); font-size: var(--font-label); font-weight: 700; }
.soon strong { color: inherit; font-weight: 900; margin-right: 0.3em; }
.hero .ticket { justify-self: center; transform: rotate(-3deg); box-shadow: none; filter: drop-shadow(0 18px 30px color-mix(in srgb, var(--onAccent) 18%, transparent)); }

.home h2 { font-size: var(--font-title); font-weight: 900; margin: 0 0 var(--space-s16); }
.steps ol { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: var(--space-s16); }
.steps li { counter-increment: step; display: grid; gap: var(--space-s4); padding: var(--space-s20); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: var(--space-s8); border-radius: 50%; background: var(--accent); color: var(--onAccent); font-weight: 900; }
.steps h3 { color: var(--textPrimary); }

.pricing > h2 + p { margin-top: calc(-1 * var(--space-s8)); }
.plans { display: grid; gap: var(--space-s16); margin-top: var(--space-s20); }
.plan { display: grid; align-content: start; gap: var(--space-s4); padding: var(--space-s20); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
.plan h3 { font-size: var(--font-label); text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand); }
.plan .price { color: var(--textSecondary); }
.plan .price strong { font-size: var(--font-largeTitle); font-weight: 900; font-variant-numeric: tabular-nums; }
.plan .year { font-size: var(--font-caption); }
.plan ul { list-style: none; padding: var(--space-s12) 0 0; margin: var(--space-s8) 0 0; border-top: 1px solid var(--hairline); display: grid; gap: var(--space-s8); font-size: var(--font-label); }
.plan li { padding-left: 1.4em; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 0.8em; height: 0.8em; border-radius: 50%; background: var(--accent); }
.fine { margin-top: var(--space-s20); font-size: var(--font-caption); }

@media (min-width: 40rem) {
  .steps ol { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 56rem) {
  .hero { grid-template-columns: 1.1fr 1fr; padding-block: var(--space-s48); }
  .plans { grid-template-columns: repeat(4, 1fr); }
}

main.doc { max-width: 44rem; gap: var(--space-s12); }
.doc h1 { margin-top: var(--space-s16); }
.doc .meta { font-size: var(--font-caption); font-weight: 700; }
.doc section { display: grid; gap: var(--space-s12); scroll-margin-top: var(--space-s16); }
.doc h2 { margin-top: var(--space-s24); }
.doc h3 { font-size: var(--font-body); color: var(--textPrimary); margin-top: var(--space-s8); }
.doc ul { margin: 0; padding-left: 1.25rem; display: grid; gap: var(--space-s8); }
.doc ul ul { margin-top: var(--space-s8); }
.toc { margin-top: var(--space-s16); padding: var(--space-s16) var(--space-s20); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
.toc h2 { margin: 0 0 var(--space-s8); font-size: var(--font-label); text-transform: uppercase; letter-spacing: 0.1em; color: var(--textSecondary); }
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2 12rem; column-gap: var(--space-s24); }
.toc li { padding: var(--space-s4) 0; break-inside: avoid; }
.toc a { font-weight: 700; text-decoration: none; font-size: var(--font-label); }
.doc table { width: 100%; border-collapse: collapse; font-size: var(--font-label); }
.doc th, .doc td { text-align: left; vertical-align: top; padding: var(--space-s12) var(--space-s8); border-bottom: 1px solid var(--hairline); color: var(--textSecondary); }
.doc th { color: var(--textPrimary); font-weight: 800; }

.foot { width: 100%; max-width: 68rem; margin: var(--space-s48) auto 0; padding: var(--space-s24) max(var(--space-s20), env(safe-area-inset-left)) var(--space-s32); border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: var(--space-s12) var(--space-s24); justify-content: space-between; font-size: var(--font-caption); color: var(--textSecondary); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--space-s8) var(--space-s20); }
.foot a { font-weight: 700; text-decoration: none; }

@media (prefers-reduced-motion: reduce) { button, .button { transition: none; } }
