/* Base: reset, type, header, buttons, placeholders, footer, motion helpers */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--step-body)/var(--leading-text) var(--font);
  font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: var(--leading-tight); letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--mint); color: var(--ink); }
input, textarea { caret-color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible, .on-green :focus-visible { outline-color: var(--mint); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -64px; z-index: 60; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: var(--r-pill); }
.skip:focus { top: 12px; }

/* Content only the owners can supply */
.todo { background: var(--todo-bg); color: var(--todo-ink); font-size: 0.9em; font-weight: 600; letter-spacing: 0;
  padding: 0.05em 0.4em; border-radius: 4px; white-space: normal; }
/* Every card shown is a sample shop */
.sample { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step-small); font-weight: 600; color: var(--ink);
  background: var(--surface); padding: 4px 12px; border-radius: var(--r-pill); }
.sample::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* Buttons: the stamp, so always fully round */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: var(--tap); padding: 0.75em 1.5em;
  border: 0; border-radius: var(--r-pill); font-weight: 700; font-size: var(--step-body); line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) ease, color var(--dur-ui) ease; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--green); color: #fff; }
.btn--quiet { background: var(--surface); color: var(--ink); }
.btn--light { background: var(--surface); color: var(--ink); }
.btn--ink { background: var(--ink); color: #fff; }

/* Bullet = a stamp at text size */
.dot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dot-list li { display: flex; gap: 12px; align-items: baseline; }
.dot-list li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; transform: translateY(-1px); opacity: 0.9; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--ground); transition: box-shadow var(--dur-ui) ease; }
.site-header.is-floating { box-shadow: var(--shadow-float); } /* taste-skill-ignore: the one thing that floats */
.site-header .wrap { display: flex; align-items: center; gap: var(--gap-3); min-height: 72px; }
.brand { display: block; margin-right: auto; padding: 6px 0; }
.brand img { height: 26px; width: auto; }
/* Narrow phones: only the mark (the wordmark would crowd the menu button). */
.brand .brand-mark { display: none; }
@media (max-width: 380px) { .brand .brand-full { display: none; } .brand .brand-mark { display: block; height: 32px; } }
.nav { display: flex; gap: clamp(0.9rem, 1.8vw, 2rem); }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.97rem; padding: 0.5em 0; position: relative; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.nav a::after { content: ""; position: absolute; left: 50%; bottom: 0.1em; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--green); opacity: 0; transform: scale(0.6); transition: transform var(--dur-ui) var(--ease-out), opacity var(--dur-ui) var(--ease-out); }
.nav a[aria-current="true"]::after { opacity: 1; transform: scale(1); }
.lang { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border-radius: var(--r-pill); }
.lang a, .lang span { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: var(--r-pill); font-size: var(--step-small);
  font-weight: 700; text-decoration: none; color: var(--ink); }
.lang [aria-current="true"] { background: var(--ink); color: #fff; }
.stamps-progress { display: flex; gap: 4px; }
.stamps-progress i { width: 9px; height: 9px; border-radius: 50%; background: #D3D8D0; transition: background-color var(--dur-ui) ease, transform var(--dur-ui) var(--ease-out); }
.stamps-progress i.on { background: var(--green); }
.stamps-progress i.gift.on { background: var(--gold); transform: scale(1.25); }
.login { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.97rem; min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 0.4em; white-space: nowrap; }
.menu-btn { display: none; width: var(--tap); height: var(--tap); border: 0; background: var(--surface); border-radius: 50%; cursor: pointer; place-items: center; }
.menu-btn svg { width: 22px; height: 22px; }
.drawer { position: fixed; inset: 72px 0 0; z-index: 39; background: var(--ground); padding: var(--gap-3) var(--gutter); display: grid; align-content: start; gap: 4px;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out), visibility 0s linear var(--dur-ui); }
.drawer.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.drawer a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 1.6rem; font-weight: 800; padding: 0.4em 0; }
.drawer .btn { justify-self: start; margin-top: var(--gap-3); }
@media (max-width: 1040px) { .nav, .stamps-progress { display: none; } .menu-btn { display: inline-grid; } }
.nav a, .site-header .btn { white-space: nowrap; }
@media (max-width: 1240px) { .site-header .wrap > .stamps-progress { display: none; } }
@media (max-width: 520px) { .site-header .btn--primary, .site-header .wrap > .login { display: none; } .site-header .wrap { gap: 10px; } }

/* Footer: the mark, large, from the official file */
.site-footer { background: var(--ink); color: #fff; padding-block: var(--gap-5) var(--gap-4); }
.site-footer a { color: #fff; }
.foot-mark { margin-bottom: var(--gap-5); }
.foot-mark img { width: clamp(140px, 24vw, 320px); }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-4); }
.foot-grid h2 { font-size: var(--step-body); font-weight: 700; letter-spacing: 0; color: var(--on-dark-muted); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid li a { text-decoration: none; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--gap-2); margin-top: var(--gap-5); font-size: var(--step-small); color: var(--on-dark-muted); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Entrances: visible by default; JS opts in only when it can reveal */
.will-reveal [data-reveal] { opacity: 0; transform: translateY(20px); }
.will-reveal [data-reveal].is-in { opacity: 1; transform: none;
  transition: opacity var(--dur-enter) var(--ease-out), transform var(--dur-enter) var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
@media (prefers-reduced-motion: reduce) { .will-reveal [data-reveal] { transform: none; } }

/* Mobile thumb-zone bar: the ten stamps and the one action (shown after the hero, hidden at the coupon) */
.mobile-cta { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 18px; background: var(--surface); border-radius: var(--r-pill); box-shadow: var(--shadow-float); /* taste-skill-ignore: floats over content */
  transition: transform var(--dur-ui) var(--ease-out), opacity var(--dur-ui) var(--ease-out); } /* taste-skill-ignore: floats over content */
.mobile-cta[hidden] { display: flex; opacity: 0; transform: translateY(16px); pointer-events: none; visibility: hidden; }
.mobile-cta .stamps-progress { display: flex; }
@media (min-width: 1041px) { .mobile-cta { display: none !important; } }
@media (max-width: 1040px) { .site-footer { padding-bottom: 96px; } }
@media (prefers-reduced-motion: reduce) { .mobile-cta { transform: none !important; } }
.foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.foot-grid a, .coupon-left .direct a { overflow-wrap: anywhere; }

/* Phone feel (mobile-native): hover only where a precise pointer can hover; no tap flash; controls act on press and are not text */
html { -webkit-tap-highlight-color: transparent; }
button, a, [role="button"], [role="tab"], .how-range { touch-action: manipulation; }
button, .btn, [role="tab"], .chips span, .swatches button, .lang a, .lang span { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--green-press); }
  .btn--quiet:hover { background: var(--mint-soft); }
  .btn--light:hover { background: var(--mint); }
  .btn--ink:hover { background: var(--dark-2); }
  .foot-grid li a:hover { text-decoration: underline; }
  .nav a:hover::after { opacity: 1; transform: scale(1); }
  .login:hover { color: var(--green); }
}
