/* ============================================================
   GoLocalAI — mobile-first design system
   Mobile is the default. Desktop layers on at 640 / 900 / 1200.
   ============================================================ */

/* Tokens */
:root {
  --bg: #fdfaf3;
  --surface: #ffffff;
  --surface-alt: #faf3e3;
  --ink: #1d1605;
  --ink-soft: #5a4a30;
  --ink-muted: #9a8a6e;
  --line: #ece2c9;
  --line-strong: #d8caa8;
  --primary: #1f6cb0;
  --primary-deep: #15406a;
  --primary-soft: #e5eef8;
  --accent: #f29422;
  --accent-ink: #ffffff;
  --offer: #f29422;
  --offer-ink: #ffffff;
  --pass: #dfa11a;
  --pass-ink: #1d1605;
  --success: #1f7a52;
  --danger: #b53b3b;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(15,22,5,.04), 0 2px 8px rgba(15,22,5,.04);
  --shadow: 0 4px 12px rgba(15,22,5,.06), 0 12px 32px rgba(15,22,5,.06);
  --shadow-lg: 0 8px 24px rgba(15,22,5,.08), 0 24px 60px rgba(15,22,5,.10);

  --header-h: 56px;
  --gutter: 16px;
  --max: 1280px;

  --t: cubic-bezier(.2,.8,.2,1);
}

/* Palette overrides — switch via [data-palette] on body */
body[data-palette="blue-led"] {
  --bg: #fafbfc; --surface: #fff; --surface-alt: #f3f5f8;
  --ink: #0f1f33; --ink-soft: #516074; --ink-muted: #8a96a6;
  --line: #e6ebf1; --line-strong: #ced8e3;
  --primary: #1f6cb0; --primary-deep: #15406a; --primary-soft: #e5eef8;
  --accent: #1f6cb0; --offer: #1f6cb0; --pass: #15406a; --pass-ink: #fff;
}
body[data-palette="civic"] {
  --bg: #f1f3f6; --surface: #fff; --surface-alt: #e8ecf1;
  --ink: #0a1726; --ink-soft: #3a4a5e; --ink-muted: #6c7a8c;
  --line: #d6dde6; --line-strong: #bcc8d4;
  --primary: #15406a; --primary-deep: #0a2240; --primary-soft: #dde6f1;
  --accent: #15406a; --offer: #b53b3b; --pass: #0a2240; --pass-ink: #fff;
}
/* Tenant tweaks */
body[data-tenant="goaegina"][data-palette="warm"] {
  --accent: #7aa83d; --offer: #7aa83d;
}
body[data-tenant="goaegina"][data-palette="blue-led"] {
  --primary: #1d6e9c; --primary-deep: #13456a; --accent: #1d6e9c; --offer: #1d6e9c;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ─── Layout primitives ─────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: 40px 0; }
.section-tight { padding: 28px 0; }
.section-loose { padding: 56px 0; }

.stack { display: flex; flex-direction: column; }
.stack-2 > * + * { margin-top: 8px; }
.stack-3 > * + * { margin-top: 12px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-6 > * + * { margin-top: 24px; }
.stack-8 > * + * { margin-top: 32px; }

.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.spacer { flex: 1; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 16px; }

.kicker {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}
.kicker-muted { color: var(--ink-muted); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.2px; line-height: 1.15; text-wrap: balance; }
.h-display { font-size: 36px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.05; }
.h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.6px; }
.h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.h3 { font-size: 17px; font-weight: 700; }
.h4 { font-size: 14px; font-weight: 700; }
.lead { font-size: 16px; color: var(--ink-soft); line-height: 1.5; }
.body  { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }
.small { font-size: 13px; color: var(--ink-soft); }
.tiny  { font-size: 12px; color: var(--ink-muted); }

/* ─── Buttons / chips ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  background: var(--surface-alt);
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s var(--t), background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-pass { background: var(--pass); color: var(--pass-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--surface); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 40px; padding: 0; height: 40px;
  border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 600;
  background: var(--surface-alt); color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
  cursor: pointer;
}
.chip-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-row > * { flex: 0 0 auto; scroll-snap-align: start; }
.chip-row-bleed {
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding-left: var(--gutter); padding-right: var(--gutter);
}

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  background: var(--accent); color: var(--accent-ink);
}
.badge-pass { background: var(--pass); color: var(--pass-ink); }
.badge-soft { background: var(--surface-alt); color: var(--ink-soft); border: 1px solid var(--line); }
.badge-live { background: rgba(31,122,82,.12); color: var(--success); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s var(--t), box-shadow .2s;
}
.card-flat { border-radius: var(--radius); }

.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  background: var(--surface-alt);
}
.card-img-tall { aspect-ratio: 4/5; }
.card-img-wide { aspect-ratio: 21/9; }

.card-body { padding: 14px 16px 16px; }

/* Horizontal scroll rail (mobile carousel) */
.h-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  padding: 4px var(--gutter) 8px;
  margin: 0 calc(-1 * var(--gutter));
  scrollbar-width: none;
}
.h-rail::-webkit-scrollbar { display: none; }
.h-rail > * { flex: 0 0 78%; max-width: 320px; scroll-snap-align: start; }
.h-rail-narrow > * { flex: 0 0 64%; }
.h-rail-wide > * { flex: 0 0 88%; }

/* Category rail — horizontal on mobile, grid on desktop */
.cat-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 8px;
  scrollbar-width: none;
}
.cat-rail::-webkit-scrollbar { display: none; }
.cat-rail > * {
  flex: 0 0 38%; min-width: 130px; max-width: 180px;
  scroll-snap-align: start;
}

/* ─── Header ────────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hdr-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hdr-logo {
  display: inline-flex; align-items: center; gap: 10px;
  flex: 0 0 auto;
}
.hdr-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.hdr-burger {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--ink);
  flex: 0 0 auto;
}
.hdr-burger:hover { background: var(--surface-alt); }
.hdr-cta { height: 38px; padding: 0 18px; font-size: 13px; font-weight: 700; }
.hdr-nav { display: none; }
.hdr-tools { display: none; }

/* Brand lockup: cropped icon + wordmark */
.brand-lockup {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--primary-deep);
}
.brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #fff;
}
.brand-icon img {
  /* The round logo file has a ring of text around the central icon —
     scale up so only the central icon shows inside the circle. */
  width: 200%; height: 200%;
  max-width: none;
  object-fit: cover; object-position: center;
}
.brand-word {
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--primary-deep);
  line-height: 1;
  white-space: nowrap;
}
.brand-md .brand-icon { width: 36px; height: 36px; }
.brand-md .brand-word { font-size: 18px; }

/* Mobile-only search icon button */
.hdr-search-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--ink);
  flex: 0 0 auto;
}
.hdr-search-icon:hover { background: var(--surface-alt); }
.hdr-search-icon svg { width: 18px; height: 18px; }

/* Desktop language dropdown */
.hdr-lang-wrap { position: relative; display: none; }
.hdr-lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
  display: flex; flex-direction: column;
}
.hdr-lang-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
  text-align: left;
}
.hdr-lang-item:hover { background: var(--surface-alt); color: var(--ink); }
.hdr-lang-item.active { color: var(--ink); }
.hdr-lang-item .lang-short {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 22px;
  background: var(--surface-alt); color: var(--ink-soft);
  border-radius: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
}
.hdr-lang-item.active .lang-short { background: var(--ink); color: #fff; }
.hdr-lang-item .lang-check { margin-left: auto; color: var(--accent); }

/* Drawer language section */
.drawer-section { margin-top: 20px; }
.drawer-section-label {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  font-weight: 700; color: var(--ink-muted);
  padding: 0 12px 8px;
}
.drawer-lang { display: flex; flex-direction: column; gap: 2px; }
.drawer-lang-item {
  display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 12px;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.drawer-lang-item:hover, .drawer-lang-item.active { background: var(--surface-alt); }
.drawer-lang-item .lang-short {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 24px;
  background: var(--surface-alt); color: var(--ink-soft);
  border-radius: 6px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .5px;
}
.drawer-lang-item.active .lang-short { background: var(--ink); color: #fff; }
.drawer-lang-item .lang-check { margin-left: auto; color: var(--accent); }

/* Search popup */
.search-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15,22,5,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 0;
  animation: fadeIn .18s var(--t);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.search-popup {
  background: var(--surface);
  width: 100%;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
  animation: searchDrop .25s var(--t);
}
@keyframes searchDrop { from { transform: translateY(-20px); opacity: .6; } to { transform: none; opacity: 1; } }
.search-popup-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.search-popup-icon { color: var(--ink-muted); display: inline-flex; }
.search-popup-icon svg { width: 18px; height: 18px; }
.search-popup-head input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 16px; font-weight: 500; color: var(--ink);
}
.search-popup-body { padding: 16px var(--gutter) 22px; }
.search-popup-label {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  font-weight: 700; color: var(--ink-muted); margin-bottom: 10px;
}
.search-popup-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Join popup — bottom sheet on mobile, centered on desktop */
.join-popup {
  background: var(--surface);
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  animation: sheetUp .25s var(--t);
}
.join-popup-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 14px var(--gutter) 8px;
}
.join-popup-title { font-size: 22px; font-weight: 800; letter-spacing: -.4px; margin-top: 4px; }
.join-popup-body {
  padding: 12px var(--gutter) 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.join-option {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s var(--t);
}
.join-option:hover { background: var(--surface-alt); border-color: var(--line-strong); }
.join-option:active { transform: scale(.99); }
.join-option-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  flex: 0 0 auto;
}
.join-option-pass .join-option-icon { background: var(--pass); color: var(--pass-ink); }
.join-option-biz  .join-option-icon { background: var(--primary-soft); color: var(--primary-deep); }
.join-option-text { flex: 1; min-width: 0; }
.join-option-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.join-option-sub { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }
.join-option-arr { color: var(--ink-muted); flex: 0 0 auto; }

/* Drawer */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15,22,5,.5);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--t);
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 71;
  width: 86%; max-width: 360px;
  background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s var(--t);
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.drawer-body { padding: 16px var(--gutter) 20px; overflow-y: auto; flex: 1; }
.drawer-list { display: flex; flex-direction: column; gap: 2px; }
.drawer-item {
  display: flex; align-items: center; gap: 12px;
  height: 48px; padding: 0 12px;
  border-radius: var(--radius);
  font-size: 16px; font-weight: 600; color: var(--ink);
  text-align: left;
}
.drawer-item:hover, .drawer-item.active { background: var(--surface-alt); }
.drawer-item .arr { margin-left: auto; opacity: .4; }
.drawer-foot {
  border-top: 1px solid var(--line);
  padding: 14px var(--gutter);
  display: flex; flex-direction: column; gap: 10px;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero-img {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease;
}
.hero-img.active { opacity: 1; }
.hero-img-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.05) 30%, rgba(0,0,0,.7) 100%);
}
.hero-inner {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 420px;
  padding-top: 48px; padding-bottom: 20px;
}
.hero-meta { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; opacity: .85; }
.hero-title { font-size: 38px; font-weight: 800; letter-spacing: -1px; line-height: 1.04; margin: 12px 0 0; }
.hero-sub { font-size: 16px; opacity: .9; margin-top: 12px; max-width: 540px; line-height: 1.5; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-rail {
  margin-top: 24px;
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 4px;
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.hero-rail::-webkit-scrollbar { display: none; }
.hero-rail::after { content: ''; flex: 0 0 8px; }
.hero-rail > button {
  flex: 0 0 30%; min-width: 96px; max-width: 220px;
  scroll-snap-align: start;
  text-align: left;
  padding: 8px 0;
  border-top: 2px solid rgba(255,255,255,.25);
  color: #fff;
  opacity: .65;
  transition: opacity .2s;
}
.hero-rail > button.active { opacity: 1; border-top-color: var(--accent); }
.hero-rail > button .step { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; opacity: .85; }
.hero-rail > button .ttl { font-size: 12.5px; font-weight: 600; margin-top: 2px; line-height: 1.3; }
.hero-stats {
  margin-top: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.hero-stats .v { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.hero-stats .l { font-size: 10.5px; opacity: .8; font-weight: 600; }

/* ─── Section header ────────────────────────────────────────── */
.sect-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.sect-head .ttl { font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; }
.sect-head .sub { font-size: 13.5px; color: var(--ink-soft); }
.sect-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 16px;
}
.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-weight: 700; font-size: 13.5px;
  white-space: nowrap;
}

/* ─── Business / offer cards (specifics) ────────────────────── */
.biz-card { display: flex; flex-direction: column; }
.biz-card .meta-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-muted); font-weight: 600;
}
.biz-card .name { font-size: 16px; font-weight: 700; margin-top: 4px; }
.biz-card .tagline { font-size: 13px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }
.biz-card .footer-row {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 12.5px; font-weight: 600;
}
.rating-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
}
.star { color: #d4a017; }

.offer-card { position: relative; display: flex; flex-direction: column; }
.offer-card .ribbon {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; gap: 4px; align-items: center;
  padding: 4px 8px; border-radius: var(--radius-pill);
  background: var(--offer); color: var(--offer-ink);
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.offer-card .ribbon-pass { background: var(--pass); color: var(--pass-ink); }
.offer-card .head { font-size: 15.5px; font-weight: 700; line-height: 1.3; margin-top: 6px; }
.offer-card .det { font-size: 13px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }

/* Locked Pass-only state */
.offer-card.locked .head, .offer-card.locked .det { filter: blur(5px); user-select: none; }
.offer-card.locked::after {
  content: 'Pass holders only · Tap to unlock';
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  background: var(--pass); color: var(--pass-ink);
  border-radius: var(--radius-pill);
  padding: 8px 12px; font-size: 12.5px; font-weight: 700;
  text-align: center;
}

/* ─── Sticky bottom bar (mobile detail) ─────────────────────── */
.sticky-bar {
  position: sticky; bottom: 0; z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 12px var(--gutter);
  display: flex; gap: 8px;
  box-shadow: 0 -4px 16px rgba(15,22,5,.06);
}

/* ─── Sheets / modals ───────────────────────────────────────── */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15,22,5,.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--surface);
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  animation: sheetUp .25s var(--t);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 36px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 8px auto 0; }
.sheet-head { padding: 14px var(--gutter); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.sheet-body { padding: 16px var(--gutter); }

/* ─── Footer ────────────────────────────────────────────────── */
.ftr {
  background: var(--ink); color: #fff;
  padding: 40px 0 28px;
  margin-top: 40px;
}
.ftr-brand-row {
  display: flex; flex-direction: column; gap: 18px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 28px;
}
.ftr-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ftr-brand img { width: auto; height: 28px; max-width: 200px; align-self: flex-start; }
.ftr-tagline { font-size: 14px; opacity: .7; line-height: 1.5; max-width: 420px; margin: 0; }
.ftr-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.ftr-col h4 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; opacity: .8; margin-bottom: 12px; }
.ftr-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ftr-col li { font-size: 14px; opacity: .7; }
.ftr-bottom {
  margin-top: 22px;
  font-size: 12px; opacity: .55;
  display: flex; flex-direction: column; gap: 6px;
}
.ftr-socials { display: flex; gap: 8px; }
.ftr-socials a {
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
}

/* ─── Listing page (list view) ──────────────────────────────── */
.list-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px 0 14px;
}
.list-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-alt); border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  height: 44px; padding: 0 14px;
}
.list-search input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 14px;
}
.list-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 12px 0;
  position: sticky; top: var(--header-h); z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.list-toolbar .count { font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-right: auto; }
.list-row {
  display: grid; grid-template-columns: 110px 1fr; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.list-row > .photo {
  aspect-ratio: 4/5;
  background: var(--surface-alt);
}
.list-row > .photo img { width: 100%; height: 100%; object-fit: cover; }
.list-row .body { padding: 12px 14px 14px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.list-row .nm { font-size: 15.5px; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.2; }
.list-row .mt { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.list-row .tl { font-size: 13px; color: var(--ink-soft); line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; display: -webkit-box; overflow: hidden; }
.list-row .ft { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; font-size: 12.5px; }

/* ─── Business detail ───────────────────────────────────────── */
.biz-gallery {
  margin: 0 calc(-1 * var(--gutter));
  display: flex; gap: 4px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  aspect-ratio: 4/3;
  scrollbar-width: none;
}
.biz-gallery::-webkit-scrollbar { display: none; }
.biz-gallery img { flex: 0 0 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }

.biz-tabs {
  display: flex; gap: 6px; overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin: 16px calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter);
  scrollbar-width: none;
}
.biz-tabs::-webkit-scrollbar { display: none; }
.biz-tab {
  padding: 10px 4px; font-size: 14px; font-weight: 600;
  color: var(--ink-muted); border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.biz-tab.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ─── Pass landing & other dramatic blocks ──────────────────── */
.pass-block {
  background: var(--pass);
  color: var(--pass-ink);
  border-radius: var(--radius-xl);
  padding: 28px 22px;
  position: relative; overflow: hidden;
}
.pass-block .deco {
  position: absolute; right: -100px; top: -100px;
  width: 280px; height: 280px;
  border-radius: 9999px;
  border: 1px solid currentColor; opacity: .15;
  pointer-events: none;
}

/* ─── Horizontal scroll affordances (arrow hints) ───────────── */
.hscroll-wrap { position: relative; }
.hscroll-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  z-index: 5;
  cursor: pointer;
  opacity: .95;
  transition: opacity .2s, transform .15s var(--t);
}
.hscroll-arrow[disabled] { opacity: 0; pointer-events: none; }
.hscroll-arrow:hover { transform: translateY(-50%) scale(1.06); }
.hscroll-arrow.prev { left: 4px; }
.hscroll-arrow.next { right: 4px; }
.hscroll-arrow svg { width: 16px; height: 16px; }

/* On hero, arrows go on the rail itself */
.hero-rail-wrap { position: relative; }
.hero-rail-wrap .hscroll-arrow {
  background: rgba(255,255,255,.18);
  color: #fff;
  border-color: rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
}

/* ─── Tweaks toggle visibility ──────────────────────────────── */
.show-mobile { }
.show-tablet { display: none; }
.show-desktop { display: none; }

/* ============================================================
   Tablet (≥640px)
   ============================================================ */
@media (min-width: 640px) {
  :root { --gutter: 24px; --header-h: 64px; }
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 20px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .h-display { font-size: 48px; letter-spacing: -1.4px; }
  .h1 { font-size: 36px; letter-spacing: -1px; }
  .h2 { font-size: 26px; }
  .hero-inner { min-height: 620px; padding-bottom: 36px; }
  .hero-title { font-size: 56px; letter-spacing: -1.6px; }
  .hero-rail > button { flex: 0 0 220px; }
  .section { padding: 56px 0; }
  .show-tablet { display: initial; }
  .ftr-brand-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
  .ftr-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .list-row { grid-template-columns: 180px 1fr; }
  .list-row > .photo { aspect-ratio: 4/3; }
  .biz-gallery { aspect-ratio: 16/9; border-radius: var(--radius-lg); margin: 0; }
  .biz-gallery img { border-radius: var(--radius); }
}

/* ============================================================
   Desktop (≥900px)
   ============================================================ */
@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 72px; }

  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 22px; }

  .h-display { font-size: 64px; letter-spacing: -2px; }
  .h1 { font-size: 44px; letter-spacing: -1.2px; }
  .h2 { font-size: 32px; letter-spacing: -.6px; }
  .h3 { font-size: 18px; }
  .lead { font-size: 17px; }

  .section { padding: 80px 0; }
  .section-loose { padding: 100px 0; }

  /* Header swaps to full nav */
  .hdr {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .hdr-row {
    gap: 20px;
  }
  .hdr-burger { display: none; }
  .hdr-search-icon { display: none; }
  .hdr-logo { flex: 0 0 auto; }
  .hdr-logo .brand-icon { width: 44px; height: 44px; }
  .hdr-logo .brand-word { font-size: 21px; }
  .hdr-nav {
    display: flex; align-items: center; gap: 2px;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .hdr-nav button {
    padding: 8px 10px;
    font-size: 13.5px; font-weight: 600;
    color: var(--ink); opacity: .78;
    border-radius: var(--radius);
    position: relative;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .hdr-nav button:hover { opacity: 1; background: var(--surface-alt); }
  .hdr-nav button.active { opacity: 1; }
  .hdr-nav button.active::after {
    content: ''; position: absolute;
    left: 10px; right: 10px; bottom: -2px;
    height: 2px; background: var(--accent); border-radius: 2px;
  }
  .hdr-tools {
    display: flex; align-items: center; gap: 10px;
  }
  /* Progressive disclosure: at 900–1099px keep header tight */
  .hdr-search { display: none !important; }
  .hdr-lang-wrap { display: none; }
  .hdr-tools .btn-ghost { display: none; }
  .hdr-search-icon { display: inline-flex; }
  .hdr-nav button { padding: 8px 8px; font-size: 13px; }
  .hdr-search {
    align-items: center; gap: 8px;
    height: 40px; padding: 0 14px;
    border-radius: var(--radius-pill);
    background: var(--surface-alt);
    border: 1px solid var(--line);
    width: 200px;
    flex: 0 0 auto;
  }
  .hdr-search input {
    flex: 1; background: transparent; border: none; outline: none; font-size: 13px;
  }
  .hdr-lang {
    display: inline-flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 13px; font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
  }
  .hdr-lang:hover { background: var(--surface-alt); color: var(--ink); }
  .hdr-cta { height: 40px; padding: 0 20px; font-size: 13.5px; }

  /* Hero scales up */
  .hero-inner { min-height: 720px; padding-bottom: 60px; }
  .hero-title { font-size: 80px; letter-spacing: -2.4px; }
  .hero-sub { font-size: 18px; }
  .hero-rail > button { flex: 1; max-width: none; }
  .hero-rail { gap: 24px; margin-left: 0; margin-right: 0; padding: 0; }
  .hero-rail::after { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; max-width: 360px; padding: 20px 22px; }
  .hero-stats .v { font-size: 30px; }
  .hero-cols {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: flex-end;
  }

  /* Section heads gain a row layout */
  .sect-head-row .sect-head { margin-bottom: 0; }

  /* H-rail on desktop becomes a regular grid for offers/businesses */
  .h-rail-to-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
    overflow: visible; padding: 0; margin: 0;
  }
  .h-rail-to-grid > * { flex: initial; max-width: none; }
  .h-rail-to-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; overflow: visible; padding: 0; margin: 0; }
  .h-rail-to-grid-4 > * { flex: initial; max-width: none; }

  /* Cat rail collapses to a 4-up grid on desktop */
  .cat-rail {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
    overflow: visible; padding: 0; margin: 0;
  }
  .cat-rail > * { flex: initial; min-width: 0; max-width: none; }
  /* Hide HScroll arrows when content fits as a grid */
  .hscroll-wrap:has(.cat-rail) .hscroll-arrow,
  .hscroll-wrap:has(.h-rail-to-grid) .hscroll-arrow,
  .hscroll-wrap:has(.h-rail-to-grid-4) .hscroll-arrow { display: none; }

  /* Listings: sidebar + body */
  .list-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
  }
  .list-toolbar { position: static; background: transparent; border-bottom: 0; padding-top: 0; }
  .list-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .list-row { grid-template-columns: 220px 1fr; }
  .list-row > .photo { aspect-ratio: 4/5; }

  /* Biz detail */
  .biz-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    align-items: flex-start;
  }
  .biz-side {
    position: sticky; top: calc(var(--header-h) + 24px);
  }
  .biz-gallery { aspect-ratio: 21/9; }

  /* Sheets: become centered modals */
  .sheet-scrim { align-items: center; }
  .sheet {
    width: 100%; max-width: 720px;
    border-radius: var(--radius-xl);
    max-height: 86vh;
  }
  .join-popup {
    width: 100%; max-width: 520px;
    border-radius: var(--radius-xl);
    max-height: 86vh;
  }
  .search-scrim { align-items: flex-start; padding-top: 80px; }
  .search-popup {
    width: 100%; max-width: 640px;
    border-radius: var(--radius-xl);
    margin: 0 auto;
  }

  /* Footer 4-col */
  .ftr-grid { grid-template-columns: repeat(4, 1fr); gap: 40px; }
  .ftr-bottom { flex-direction: row; justify-content: space-between; }

  /* Visibility utils */
  .show-desktop { display: initial; }
  .hide-desktop { display: none !important; }

  /* Sticky bar disappears on desktop (CTAs already in side panel) */
  .sticky-bar { display: none; }
}

/* ============================================================
   Wide (≥1200px)
   ============================================================ */
@media (min-width: 1100px) {
  .hdr-lang-wrap { display: inline-block; }
  .hdr-tools .btn-ghost { display: inline-flex; }
  .hdr-nav button { padding: 8px 10px; font-size: 13.5px; }
}

@media (min-width: 1200px) {
  .h-rail-to-grid-4 { gap: 24px; }
  .list-layout { grid-template-columns: 320px 1fr; gap: 40px; }
  .list-results { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .biz-layout { grid-template-columns: 1fr 380px; gap: 60px; }
  .hero-cols { grid-template-columns: 1fr 380px; }
  .hdr-nav button { padding: 8px 12px; }
}

/* ============================================================
   Simulated mobile (Tweaks → Device → Mobile wraps app in 420px frame)
   The frame creates an isolated container; we tell the app to behave
   as if viewport were narrow regardless of real width.
   ============================================================ */
.sim-mobile-frame {
  width: 100%; max-width: 420px;
  margin: 24px auto;
  border-radius: 36px;
  overflow: hidden;
  border: 10px solid #0a0a0a;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  background: var(--bg);
  /* Isolate so :hover/sticky behaves */
  position: relative;
  height: calc(100vh - 48px);
  overflow-y: auto;
  /* Container queries — makes media-query-shaped rules apply */
  container-type: inline-size;
  container-name: app;
}
body.has-sim-frame { background: #0a0a0a; }

/* When the app is inside the sim frame container, force mobile layout
   even though the real viewport is wide. */
@container app (max-width: 700px) {
  .grid-2, .grid-3, .grid-4, .list-results { grid-template-columns: 1fr !important; }
  .grid-3, .grid-4 { gap: 16px !important; }
  .h-rail-to-grid, .h-rail-to-grid-4 {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    margin: 0 calc(-1 * var(--gutter)) !important;
    padding: 4px var(--gutter) 8px !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .h-rail-to-grid > *, .h-rail-to-grid-4 > * {
    flex: 0 0 78% !important; max-width: 320px !important; scroll-snap-align: start;
  }
  .cat-rail {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 10px !important;
    overflow-x: auto !important;
    margin: 0 calc(-1 * var(--gutter)) !important;
    padding: 4px var(--gutter) 8px !important;
  }
  .cat-rail > * {
    flex: 0 0 38% !important; min-width: 130px !important; max-width: 180px !important;
    scroll-snap-align: start;
  }
  .hscroll-wrap:has(.cat-rail) .hscroll-arrow,
  .hscroll-wrap:has(.h-rail-to-grid) .hscroll-arrow,
  .hscroll-wrap:has(.h-rail-to-grid-4) .hscroll-arrow { display: inline-flex !important; }
  .h-display { font-size: 36px !important; letter-spacing: -.8px !important; }
  .h1 { font-size: 28px !important; letter-spacing: -.6px !important; }
  .h2 { font-size: 22px !important; }
  .hero-title { font-size: 38px !important; letter-spacing: -1px !important; }
  .hero-inner { min-height: 420px !important; padding-top: 48px !important; padding-bottom: 20px !important; }
  .hero-cols { grid-template-columns: 1fr !important; gap: 20px !important; }
  .hero-rail > button { flex: 0 0 30% !important; min-width: 96px !important; max-width: 220px !important; }
  .section { padding: 40px 0 !important; }
  .section-loose { padding: 56px 0 !important; }
  .list-layout { grid-template-columns: 1fr !important; gap: 16px !important; }
  .list-toolbar { position: sticky !important; top: var(--header-h) !important; padding: 12px 0 !important; background: var(--bg) !important; border-bottom: 1px solid var(--line) !important; }
  .biz-layout { grid-template-columns: 1fr !important; gap: 24px !important; }
  .biz-side { position: static !important; }
  .biz-gallery { aspect-ratio: 4/3 !important; margin: 0 calc(-1 * var(--gutter)) !important; border-radius: 0 !important; }
  .biz-gallery img { border-radius: 0 !important; }
  .ftr-brand-row { flex-direction: column !important; align-items: flex-start !important; gap: 18px !important; }
  .ftr-grid { grid-template-columns: 1fr 1fr !important; gap: 28px 20px !important; }
  .ftr-bottom { flex-direction: column !important; align-items: flex-start !important; }
  .hdr-row { gap: 8px !important; }
  .hdr-burger { display: inline-flex !important; }
  .hdr-nav, .hdr-tools { display: none !important; }
  .hdr-search-icon { display: inline-flex !important; }
  .hdr-logo { flex: 0 0 auto !important; }
  .hdr-logo .brand-icon { width: 34px !important; height: 34px !important; }
  .hdr-logo .brand-word { font-size: 17px !important; }
  .hdr-cta { height: 36px !important; padding: 0 16px !important; font-size: 12.5px !important; }
  .sticky-bar { display: flex !important; }
  .sheet-scrim { align-items: flex-end !important; }
  .sheet { max-width: 100% !important; border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important; max-height: 92vh !important; }
}
