/* Receipt pages: /crumbl, /joellas, /jerseymikes, /buffalowildwings,
   /chipotle, /fiveguys, /chickfila, /raisingcanes, /arbys, /panera,
   /jimmyjohns, /wendys, /potbelly, /pandaexpress, /subway, /tacobell.
   One delivery-app checkout beside NoTip's, on three bands — a hero in the
   restaurant's color, white proof, black close — so the page opens in
   their colors and lands on NoTip's. Only the black band inherits
   landing.css's dark-ground components (badges, web-link, footer); the two
   light bands restate their colors explicitly.

   Adding a receipt page. Every page shares this stylesheet and
   js/receipt/modal.js, so a new one needs:
   - public/<slug>.html, copied from a sibling, with
     <body class="brand-<slug>">, <dialog id="signup-modal"
     data-page="<slug>"> and the ids the modal builds from the slug:
     google-signin-<slug>, apple-signin-<slug>, ts-<slug>, ts-<slug>-town.
     A dismissal is stored under notip:<slug>-signup.
   - A .brand-<slug> rule below setting --brand, with a comment on why that
     value and its contrast with black text.
   - Optionally a product photo, public/img/receipts/<slug>-320.webp and
     -640.webp: .order-photo for a cutout, plus .order-photo--tile for a
     square photo, or .order-photo--small for one that came smaller than
     320 (public/img/receipts/<slug>-<width>.webp, shown at its own size).
   - The catalogue registrations: the share card (design/og/<slug>-og.html
     and render-<slug>.sh → public/og/<slug>.jpg, public/js/shared/
     shareCards.js), wrangler.jsonc run_worker_first,
     src/domain/suggestionPages.ts, the loyalty-copy list in
     vitest.config.ts, the page lists in tests/unit/suggestion-pages.test.ts,
     tests/integration/share-cards.test.ts, tests/integration/
     share-cards-admin.test.ts and tests/e2e/site-header.spec.ts, and the
     Mason-copy page list in README item 25. */

:root {
  /* The delivery app's red. Used as a surface/accent only — the app is
     never named, per the ask to echo the look without the wordmark. */
  --app-red: #eb1700;

  --hush: rgba(11, 11, 12, 0.66); /* secondary text on the brand color and on white */
}

/* ── Brand colors ─────────────────────────────────────────────────────── */

/* --brand fills the hero, the savings banner and the top row of the points
   ladder. Black text sits on it everywhere, and it is never a text or link
   color anywhere on the page. */

/* Crumbl's screen pink. Their print stock is a warmer CMYK value, so this
   matches the sticker on screen, not on vinyl. Black text on Crumbl Pink is
   the brand's only approved pairing (13.07:1). White text on pink is
   1.61:1 — an explicit brand "don't" and a WCAG failure. */
.brand-crumbl {
  --brand: #ffb9cd;
}

/* Illustrative echo of Joella's warm amber signage — not sourced from an
   official brand kit. Swap for the real value before this ships for real.
   Black text on Joella's Amber keeps the same high-contrast pairing as
   Crumbl's pink (13.4:1 here) — white text on amber would fail WCAG. */
.brand-joellas {
  --brand: #f4a300;
}

/* A pale tint of Jersey Mike's navy, not a value from their brand kit:
   their navy and red both fail with the black type every receipt page
   uses, so the hero takes a light blue that keeps that pairing. Black text
   on the blue is 12.6:1 — white text on this blue would fail WCAG. */
.brand-jerseymikes {
  --brand: #bcd0f0;
}

/* Matched by eye to the yellow of Buffalo Wild Wings' own checkout
   button, not a value from their brand kit. Black on yellow is their own
   pairing, and the one every receipt page uses: 12.5:1. White text on
   yellow is 1.58:1 and would fail WCAG. */
.brand-buffalowildwings {
  --brand: #ffc600;
}

/* A kraft-paper tan after Chipotle's brown bag and the dark brown of
   their own checkout button, not a value from their brand kit: their
   brown and their red both fail with the black type every receipt page
   uses. Black text on the tan is 11.1:1 — white text on it is 1.77:1 and
   would fail WCAG. */
.brand-chipotle {
  --brand: #d9bf9c;
}

/* A pale tint of Five Guys' red, not a value from their brand kit: the
   red itself is 3.6:1 with the black type every receipt page uses. Black
   text on the tint is 11.2:1 — white text on it is 1.75:1 and would fail
   WCAG. */
.brand-fiveguys {
  --brand: #f4b4b0;
}

/* A pale tint of Chick-fil-A&rsquo;s red, not a value from their brand kit: the
   red itself fails with the black type every receipt page uses. Black text on it is 12.9:1; white text is
   1.53:1 and would fail WCAG. */
.brand-chickfila {
  --brand: #f8c4cc;
}

/* A pale tint of the yellow in Raising Cane&rsquo;s own branding, not a value
   from their brand kit, lightened so the black type every receipt page uses
   reads on it. Black text on it is 15.6:1; white text is
   1.26:1 and would fail WCAG. */
.brand-raisingcanes {
  --brand: #ffe38a;
}

/* A pale tint of the red-orange of Arby&rsquo;s hat, not a value from their
   brand kit: the red itself fails with the black type every receipt page uses. Black text on it is 13.1:1; white text is
   1.51:1 and would fail WCAG. */
.brand-arbys {
  --brand: #f9c9a6;
}

/* A pale tint of Panera&rsquo;s green, not a value from their brand kit: the
   green itself is too dark for the black type every receipt page uses. Black text on it is 14.7:1; white text is
   1.34:1 and would fail WCAG. */
.brand-panera {
  --brand: #d6e4b8;
}

/* A pale tint of Jimmy John&rsquo;s red, not a value from their brand kit: the
   red itself fails with the black type every receipt page uses. Black text on it is 12.9:1; white text is
   1.52:1 and would fail WCAG. */
.brand-jimmyjohns {
  --brand: #f3c7c7;
}

/* A pale tint of the light blue in Wendy&rsquo;s branding, not a value from
   their brand kit, picked over their red, which fails with the black type
   every receipt page uses. Black text on it is 14.8:1; white text is
   1.33:1 and would fail WCAG. */
.brand-wendys {
  --brand: #c5e4f7;
}

/* A pale tint of Potbelly&rsquo;s gold, not a value from their brand kit,
   lightened so the black type every receipt page uses reads on it. Black text on it is 14.7:1; white text is
   1.34:1 and would fail WCAG. */
.brand-potbelly {
  --brand: #f4dca6;
}

/* A pale tint of Panda Express&rsquo;s red, not a value from their brand kit:
   the red itself fails with the black type every receipt page uses. Black text on it is 12.5:1; white text is
   1.57:1 and would fail WCAG. */
.brand-pandaexpress {
  --brand: #f6c2bd;
}

/* A pale tint of Subway&rsquo;s green, not a value from their brand kit: the
   green itself is too dark for the black type every receipt page uses. Black text on it is 14.6:1; white text is
   1.35:1 and would fail WCAG. */
.brand-subway {
  --brand: #c8e6c0;
}

/* A pale tint of Taco Bell&rsquo;s purple, not a value from their brand kit:
   the purple itself fails with the black type every receipt page uses. Black text on it is 12.9:1; white text is
   1.53:1 and would fail WCAG. */
.brand-tacobell {
  --brand: #dccaf0;
}

/* ── Band shell ───────────────────────────────────────────────────────── */

body {
  display: block;
  /* The site header's solid bar (base.css) sits above the hero, never over
     it: white letters on the hero's color would fail contrast. */
  padding: var(--site-header-h) 0 0;
  background: #ffffff;
  color: var(--ink);
  color-scheme: light;
}

main {
  max-width: none;
  align-items: stretch;
  text-align: left;
}

.band {
  padding: clamp(2.5rem, 8vw, 4.5rem) 1.5rem;
}

.band-inner {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}

.band--brand {
  background: var(--brand);
  color: var(--ink);
}

.band--white {
  background: #ffffff;
  color: var(--ink);
}

.band--black {
  background: var(--ink);
  color: var(--paper);
  color-scheme: dark;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero h1 {
  font-size: clamp(1.9rem, 7vw, 3.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.hero-sub {
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  line-height: 1.5;
  color: var(--hush);
  max-width: 32rem;
  margin: 0 auto;
}

/* ── Proof band ───────────────────────────────────────────────────────── */

.band-heading {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.band-sub {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--hush);
  max-width: 30rem;
  margin: 0 auto 2rem;
}

/* The order itself, between the promise and the two checkouts: a cutout
   on a transparent ground, so it sits on the white band as is. */
.order-photo {
  display: block;
  width: min(20rem, 72vw);
  height: auto;
  margin: -0.5rem auto 1.75rem;
}

/* A photo that is square on its own ground rather than a cutout — Crumbl's
   box on their cream, Five Guys' burger on its foil — reads as a rounded
   tile, smaller than the sub and wing cutouts. */
.order-photo--tile {
  width: min(14rem, 60vw);
  border-radius: 20px;
}

/* A photo that only came small — Chipotle's 150px bowl — shows at about
   its own width rather than blown up soft. */
.order-photo--small {
  width: min(9.5rem, 44vw);
}

.checkouts {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: clamp(0.9rem, 3vw, 1.5rem);
  max-width: 40rem;
  margin: 0 auto 1.75rem;
}

.checkout {
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 14px;
  padding: clamp(0.9rem, 3.5vw, 1.5rem) clamp(0.75rem, 3vw, 1.35rem);
}

.checkout--app {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  box-shadow: 0 10px 28px -14px rgba(11, 11, 12, 0.3);
}

/* Transparent border matches the app card's 1px so both cards' contents —
   and their footer buttons — sit on the same baseline. */
.checkout--notip {
  background: var(--ink);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px -14px rgba(11, 11, 12, 0.55);
}

.checkout-brand {
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.1rem;
}

.checkout--app .checkout-brand {
  color: var(--app-red);
}

.checkout-note {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.checkout--app .checkout-note {
  color: #82828c;
}

.checkout--notip .checkout-note {
  color: #a1a1aa;
}

.lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.5rem 0;
  font-size: clamp(0.76rem, 2.4vw, 0.86rem);
}

.line:first-child {
  padding-top: 0;
}

.checkout--app .line + .line {
  border-top: 1px solid #ededf0;
}

.checkout--notip .line + .line {
  border-top: 1px solid #2a2a30;
}

.line-label {
  flex: 1 1 auto;
  min-width: 0;
}

.line-label small {
  display: block;
  font-size: 0.66rem;
  font-weight: 400;
  margin-top: 0.15rem;
}

.checkout--app .line-label small {
  color: #82828c;
}

.checkout--notip .line-label small {
  color: #a1a1aa;
}

.line-amount {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.line--zero .line-amount {
  font-weight: 800;
}

.checkout-foot {
  margin-top: auto;
  padding-top: 0.9rem;
}

.checkout--app .checkout-foot {
  border-top: 1.5px solid #d4d4d8;
}

.checkout--notip .checkout-foot {
  border-top: 1.5px solid #3f3f46;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.checkout-total-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.checkout--app .checkout-total-label {
  color: #82828c;
}

.checkout--notip .checkout-total-label {
  color: #a1a1aa;
}

.checkout-total-amount {
  font-size: clamp(1.25rem, 4.5vw, 1.75rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.checkout--app .checkout-total-amount {
  color: var(--app-red);
}

.pay-btn {
  display: block;
  margin: 0;
  padding: 0.6rem 0.5rem;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  font-size: clamp(0.78rem, 2.5vw, 0.9rem);
  font-weight: 700;
}

/* Not a control — a picture of the one in their app. */
.pay-btn--app {
  background: var(--app-red);
  color: #ffffff;
  cursor: default;
}

.pay-btn--notip {
  background: #ffffff;
  color: var(--ink);
  transition:
    transform 150ms ease,
    background 150ms ease;
}

.pay-btn--notip:hover {
  transform: translateY(-1px);
  background: #e9e9ec;
}

.pay-btn--notip:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.checkout-vs {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2rem, 6vw, 2.4rem);
  height: clamp(2rem, 6vw, 2.4rem);
  margin: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 5px #ffffff;
}

.savings-banner {
  background: var(--brand);
  color: var(--ink);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  max-width: 32rem;
  margin: 0 auto 1.25rem;
}

.savings-banner strong {
  display: block;
  font-size: clamp(1.15rem, 4vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.15rem;
}

.price-footnote {
  font-size: 0.73rem;
  line-height: 1.5;
  color: #6b6b74;
  max-width: 34rem;
  margin: 0 auto;
}

/* ── "So how is it cheaper?" — the explanation behind the numbers ─────── */

.why {
  margin: clamp(2.5rem, 7vw, 3.75rem) auto 0;
  padding-top: clamp(2rem, 5vw, 2.75rem);
  border-top: 1px solid #ededf0;
  max-width: 36rem;
}

.why-noah {
  display: block;
  width: clamp(84px, 20vw, 104px);
  height: auto;
  margin: 0 auto 1.1rem;
}

.why-heading {
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

/* The only multi-line prose on the page. Centering reads fine for the
   two-line ledes elsewhere, but loses the eye at this length. */
.why-copy {
  font-size: clamp(0.92rem, 2.4vw, 1rem);
  line-height: 1.6;
  color: var(--hush);
  text-align: left;
  text-wrap: pretty;
  margin: 0 0 0.9rem;
}

.why-copy:last-child {
  margin-bottom: 0;
}

/* Secondary to the order/app CTAs below, so it's outlined rather than solid. */
.why-cta {
  display: inline-block;
  margin-top: 1.75rem;
  /* Vertical padding tuned to clear the 44px minimum tap target. */
  padding: 0.82rem 1.6rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.why-cta:hover {
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-1px);
}

.why-cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ── Closing band ─────────────────────────────────────────────────────── */

.closer-heading {
  font-size: clamp(1.7rem, 6.5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.closer-sub {
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 28rem;
  margin: 0 auto 1rem;
}

.closer .badges,
.closer .web-link {
  margin-left: auto;
  margin-right: auto;
}

.closer .web-link {
  display: inline-block;
}

.mason-line {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.mason-line a {
  color: var(--paper);
  font-weight: 600;
}

/* ── Signup modal ─────────────────────────────────────────────────────── */

/* Native <dialog>: showModal() gives the focus trap, Escape-to-close, and
   inert background for free rather than hand-rolling them. */
.signup-modal {
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.5rem, 5vw, 2rem);
  border: none;
  border-radius: var(--r-card);
  background: #ffffff;
  color: var(--ink);
  color-scheme: light;
  box-shadow: 0 24px 60px -20px rgba(11, 11, 12, 0.5);
}

.signup-modal::backdrop {
  background: rgba(11, 11, 12, 0.62);
}

.signup-modal[open] {
  animation: modal-in 220ms ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6b6b74;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: #f0f0f2;
  color: var(--ink);
}

.modal-close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.modal-step--center {
  text-align: center;
}

.modal-noah {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 0.9rem;
}

.signup-modal h2 {
  font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.15;
  margin: 0 0 0.6rem;
  text-align: center;
}

.signup-modal h2:focus,
.signup-modal h2:focus-visible {
  outline: none;
}

.modal-lede {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--hush);
  text-align: center;
  margin: 0 0 1.25rem;
}

/* The ladder is what makes "start earning free delivery" concrete rather
   than a vague promise — it shows exactly what the goal costs. */
.miles-ladder {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  overflow: hidden;
}

.miles-ladder li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}

.miles-ladder li + li {
  border-top: 1px solid #ededf0;
}

.miles-ladder .miles {
  font-weight: 700;
}

.miles-ladder .reward {
  color: var(--hush);
}

.miles-ladder .top {
  background: var(--brand);
}

.miles-ladder .top .reward {
  color: var(--ink);
  font-weight: 800;
}

.modal-btn {
  display: block;
  width: 100%;
  padding: 0.82rem 1.2rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.modal-btn--primary {
  background: var(--ink);
  color: #ffffff;
  margin-top: 0.4rem;
}

.modal-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.modal-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal-btn--quiet {
  background: transparent;
  color: #6b6b74;
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 0.5rem;
  padding: 0.6rem;
}

.modal-btn--quiet:hover {
  color: var(--ink);
}

.modal-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.signup-modal .field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.9rem 0 0.35rem;
}

.signup-modal input[type="text"],
.signup-modal input[type="email"],
.signup-modal input[type="date"],
.signup-modal input[type="tel"] {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #a1a1aa;
  border-radius: var(--r-control);
}

.signup-modal input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.signup-modal input[aria-invalid="true"] {
  border-color: var(--error-ink);
}

.signup-modal .field-hint {
  font-size: 0.78rem;
  color: #6b6b74;
  line-height: 1.45;
  margin: 0.35rem 0 0;
}

.signup-modal .consent-row {
  display: flex;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.8rem;
  color: var(--hush);
  line-height: 1.45;
  margin: 1.1rem 0 0;
  cursor: pointer;
}

.signup-modal .consent-row input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--ink);
}

.signup-modal .consent-row a {
  color: var(--ink);
}

.signup-modal .error {
  display: block;
  font-size: 0.82rem;
  color: var(--error-ink);
  margin: 0.8rem 0 0;
}

.signup-modal .error[hidden] {
  display: none;
}

.signup-modal .eyebrow {
  text-align: center;
}

.signup-modal .envelope {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
}

.signup-modal .rolling-noah {
  margin: 0.5rem auto 1.3rem;
}

@media (prefers-reduced-motion: reduce) {
  .signup-modal[open] {
    animation: none;
  }
  .modal-btn--primary:hover {
    transform: none;
  }
  .pay-btn--notip,
  .why-cta {
    transition: none;
  }
  .pay-btn--notip:hover,
  .why-cta:hover {
    transform: none;
  }
}
