/* Snap2Tap — one stylesheet for marketing, dashboard and the customer scan page. */
:root {
  --bg: #EDF0F3; --surface: #FFFFFF; --ink: #15212C; --muted: #586674; --line: #D4DBE2;
  --accent: #E8561A; --accent-ink: #FFFFFF; --accent-soft: #FDE6DA;
  --ok: #1E8757; --ok-soft: #DDF2E7; --warn: #A8420F; --warn-soft: #FBE9DF; --danger: #B42318;
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E151C; --surface: #161F28; --ink: #E7ECF1; --muted: #95A3B0; --line: #26323E;
    --accent: #FF7337; --accent-ink: #1A0B03; --accent-soft: #3A1F12;
    --ok: #43C48A; --ok-soft: #14301F; --warn: #FF9A6B; --warn-soft: #3A2116; --danger: #FF7B6E;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); font-size: 0.86em; font-variant-numeric: tabular-nums; }
.label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* wordmark */
.wordmark { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 22px; }
.wordmark b { color: var(--accent); }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.topbar nav a { text-decoration: none; padding: 7px 11px; border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--muted); }
.topbar nav a:hover { color: var(--ink); }
.topbar nav a[aria-current="page"] { color: var(--ink); background: var(--bg); }
.topbar .end { display: flex; gap: 10px; align-items: center; margin-left: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px;
  padding: 11px 16px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 11px; font-size: 13.5px; border-radius: 9px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: 14px; }
.field small { color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=tel], textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
input[type=color] { width: 56px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 3px; }
textarea { min-height: 84px; resize: vertical; }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.input-prefix span { padding: 11px 0 11px 12px; color: var(--muted); font-family: var(--f-mono); font-size: 14px; white-space: nowrap; }
.input-prefix input { border: 0; border-radius: 0; padding-left: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.error { color: var(--danger); font-size: 14px; font-weight: 600; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; color: var(--danger); font-size: 14px; }
.field-validation-error { color: var(--danger); font-size: 13px; }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 14.5px; border: 1px solid var(--line); background: var(--surface); }
.notice.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); font-weight: 600; }
.notice.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-block: 28px 18px; }
.page-head h1 { font-size: clamp(26px, 4vw, 34px); }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; align-items: start; }
.dash-main { padding-bottom: 56px; display: flex; flex-direction: column; gap: 20px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat strong { display: block; font-family: var(--f-display); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13.5px; }

/* pills */
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.neutral { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--bg); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }

/* auth pages */
.auth { min-height: calc(100vh - 61px); display: grid; place-items: center; padding-block: 32px; }
.auth .panel { width: min(440px, 100%); }
.auth h1 { font-size: 28px; }

/* marketing */
.hero { padding-block: 56px 40px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px 24px; } }
.hero h1 { font-size: clamp(38px, 6.5vw, 66px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.hero h1 b { color: var(--accent); }
.hero p.lede { font-size: 19px; color: var(--muted); max-width: 34em; margin: 18px 0 26px; }
.taps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; padding-block: 12px 48px; }
.tap-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.tap-card .count { font-family: var(--f-display); font-weight: 800; font-size: 40px; color: var(--accent); line-height: 1; }
.tap-card h3 { margin: 8px 0 6px; font-size: 18px; }
.tap-card p { margin: 0; color: var(--muted); font-size: 15px; }
.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding-block: 8px 64px; align-items: center; }
@media (max-width: 760px) { .pricing { grid-template-columns: minmax(0, 1fr); } }
.price { font-family: var(--f-display); font-size: 44px; font-weight: 800; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.footer { border-top: 1px solid var(--line); padding-block: 22px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; }

/* the printable sign (always paper-white, both themes) */
.sign { background: #FFFFFF; color: #111111; width: 300px; max-width: 100%; border-radius: 6px; padding: 22px 22px 16px; display: flex; flex-direction: column; gap: 12px;
  border: 1px solid #E2E2E2; box-shadow: 0 12px 28px -16px rgba(0,0,0,0.45); }
.sign .s-biz { font-family: var(--f-display); font-weight: 800; font-size: 21px; line-height: 1.1; }
.sign .s-head { font-family: var(--f-display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; line-height: 1; }
.sign .s-head b { color: #E2531A; }
.sign .s-offer { font-size: 14px; }
.sign .s-qr { width: 190px; height: 190px; align-self: center; background: #fff; }
.sign .s-qr canvas, .sign .s-qr img, .sign .s-qr svg { width: 100%; height: 100%; display: block; }
.sign .s-url { font-family: var(--f-mono); font-size: 11px; text-align: center; color: #555; word-break: break-all; }
.sign .s-fine { font-size: 9.5px; line-height: 1.4; color: #555; border-top: 1px solid #DDD; padding-top: 9px; }
.sign-layout { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.sign-layout .notes { flex: 1; min-width: min(100%, 260px); }

@media print {
  body { background: #fff; }
  .topbar, .page-head, .no-print, .footer { display: none !important; }
  .sign { box-shadow: none; border: 0; width: 100%; max-width: 5.5in; margin: 0 auto; transform-origin: top center; }
  .sign-layout { display: block; }
}

/* ---------- customer scan page (phone-first) ---------- */
.scan { min-height: 100vh; display: flex; flex-direction: column; }
.scan main { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 22px max(18px, env(safe-area-inset-right)) 32px max(18px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 16px; }
.biz { display: flex; align-items: center; gap: 12px; }
.badge { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 18px; flex: none; }
.biz-name { font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.2; }
.biz-tag { font-size: 13.5px; color: var(--muted); }
.offer { font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -0.015em; }
.disc { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 0; }
.who { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.who > div { min-width: 0; }
.who small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #5B7FA6; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.btn-apple { background: #000; color: #fff; }
@media (prefers-color-scheme: dark) { .btn-apple { background: #fff; color: #000; } }
.btn-join { font-size: 17px; padding: 15px 18px; border-radius: 13px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gbtn { min-height: 44px; display: flex; justify-content: center; }
.done-check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 34px; font-weight: 800; align-self: center; }
.center { text-align: center; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.scan-foot { text-align: center; font-size: 12.5px; color: var(--muted); padding: 14px 16px 22px; }
.scan-foot .wordmark { font-size: 14px; }
details.email-form summary { cursor: pointer; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; list-style: none; text-align: center; }
details.email-form summary::-webkit-details-marker { display: none; }
details.email-form[open] summary { margin-bottom: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .done-check { animation: pop 0.35s ease-out; }
  @keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
}
