/* ==========================================================================
   Bimbly — redesign C (2026-10-26): Instagram convenience, Google speed, Apple look.
   Loaded LAST by _shared/header.php (after the module's own stylesheet), so it restyles every page
   through the shared tokens and the shared header / bottom bar / footer.
   Motion: press feedback 150ms, menus ≤200ms, ease-out curves, nothing on keyboard
   actions, all of it off for prefers-reduced-motion.
   ========================================================================== */

:root {
  --c-ink: #1d1d1f;
  --c-ink-2: #3a3a3c;
  --c-muted: #6e6e73;
  --c-line: #e8e8ed;
  --c-fill: #f5f5f7;
  --c-accent: #0a66ff;
  --c-accent-ink: #0047c2;
  --c-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --c-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --c-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Noto Sans", "Noto Sans Arabic", "Noto Sans SC", system-ui, "Segoe UI", sans-serif;

  /* the shared tokens every module reads */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f5f5f7;
  --surface-soft: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e8e8ed;
  --brand: #0a66ff;
  --brand2: #3d86ff;
  --brand-strong: #0047c2;
  --accent: #3d86ff;
  --nav-brand: #0a66ff;
  --nav-brand-alpha: rgba(10, 102, 255, .10);
  --clr-border: #e8e8ed;
  --clr-surface: #ffffff;
  --clr-muted: #6e6e73;
  --clr-text: #1d1d1f;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .22);
  --nav-header-h: 56px;
}
[data-theme="dark"] {
  --c-ink: #f5f5f7; --c-ink-2: #d1d1d6; --c-muted: #98989d; --c-line: #2c2c2e; --c-fill: #1c1c1e;
  --c-accent: #4c8dff; --c-accent-ink: #7aa9ff;
  --bg: #000000; --surface: #1c1c1e; --surface2: #2c2c2e; --surface-soft: #1c1c1e;
  --text: #f5f5f7; --muted: #98989d; --line: #2c2c2e; --brand: #4c8dff; --brand2: #7aa9ff; --brand-strong: #7aa9ff; --accent: #7aa9ff; --nav-brand: #4c8dff; --nav-brand-alpha: rgba(76, 141, 255, .16);
  --clr-border: #2c2c2e; --clr-surface: #1c1c1e; --clr-muted: #98989d; --clr-text: #f5f5f7;
}

body {
  font-family: var(--c-font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { letter-spacing: -0.025em; }

/* press feedback on everything pressable (Kowalski: buttons must feel heard) */
a.button, button.button, .button, .btn, .mbn-item, .add-sheet-btn, .add-sheet-link, .nav-sub-cta, .c-press {
  transition: transform 150ms var(--c-ease), background-color 150ms ease, color 150ms ease;
}
a.button:active, button.button:active, .button:active, .btn:active, .add-sheet-btn:active, .add-sheet-link:active, .nav-sub-cta:active, .c-press:active { transform: scale(0.97); }

/* ── Header: thin, translucent, four words ──────────────────────────────── */
.site-header,
.site-header.is-scrolled {
  height: var(--nav-header-h);
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid var(--c-line);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding-inline: max(16px, calc((100vw - 1120px) / 2));
}
[data-theme="dark"] .site-header, [data-theme="dark"] .site-header.is-scrolled { background: rgba(22, 22, 23, .8); border-color: var(--c-line); }
.site-logo .brand-text strong { font-weight: 700; letter-spacing: -0.03em; color: var(--c-ink); }
.site-nav { margin-left: 28px; gap: 4px; }
.nav-item-link {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
}
.nav-item-group.is-open .nav-item-link, .nav-item-link:hover { background: transparent; color: var(--c-ink); opacity: .7; }
.nav-item-link.is-active { background: transparent; color: var(--c-ink); font-weight: 600; }
.nav-item-arrow { display: none; }

/* dropdowns: a soft card that grows from its trigger (≤200ms, ease-out) */
.nav-sub {
  border: 1px solid var(--c-line);
  border-radius: 18px;
  padding: 8px;
  background: var(--bg);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .28);
  transform-origin: top center;
  transform: translateX(-50%) translateY(-4px) scale(.98);
  transition: opacity 180ms var(--c-ease), transform 180ms var(--c-ease), visibility 0s linear 180ms;
}
.nav-item-group.is-open .nav-sub, .nav-item-group:hover .nav-sub {
  transform: translateX(-50%) translateY(0) scale(1);
  transition: opacity 180ms var(--c-ease), transform 180ms var(--c-ease), visibility 0s;
}
.nav-sub a { padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--c-ink); }
.nav-sub a:hover { background: var(--c-fill); color: var(--c-ink); }
.nav-sub-cta { margin-top: 6px !important; border-radius: 12px !important; background: var(--c-ink) !important; color: var(--bg) !important; }
.nav-sub-cta:hover { background: var(--c-ink-2) !important; }
@media (min-width: 861px) {
  /* Nearby: two columns of plain actions */
  .nav-item-group:nth-child(2) .nav-sub--mega { display: grid; grid-template-columns: repeat(2, minmax(190px, 1fr)); column-gap: 4px; }
  .nav-item-group:nth-child(2) .nav-sub--mega .nav-sub-cta { grid-column: 1 / -1; }
  /* "+ Add" sits right, next to the tools, as a quiet pill */
  .site-nav { flex: 1; }
  .nav-item-group--add { margin-left: auto; }
  .nav-item-group--add .nav-item-link { border: 1px solid var(--c-line); border-radius: 999px; padding: 7px 14px; }
  .nav-item-group--add .nav-sub { left: auto; right: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; }
  .nav-item-group--add.is-open .nav-sub, .nav-item-group--add:hover .nav-sub { transform: translateY(0) scale(1); }
}
.header-search-wrap { height: 34px; border-radius: 10px; background: var(--c-fill); border-color: transparent; }
.lang-trigger, .nav-toggle { border-color: var(--c-line); border-radius: 10px; }

/* ── Phone: bottom bar, icons first (Instagram), labels small ───────────── */
@media (max-width: 860px) {
  .site-nav { margin-left: 0; }
  .nav-item-link { font-size: 17px; opacity: 1 !important; }
  .mobile-bottom-nav {
    background: rgba(255, 255, 255, .9);
    border-top: 1px solid var(--c-line);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }
  [data-theme="dark"] .mobile-bottom-nav { background: rgba(22, 22, 23, .88); }
  .mbn-item { color: var(--c-ink); }
  .mbn-item:active { transform: scale(0.92); }
  .mbn-item .mbn-icon svg { width: 26px; height: 26px; }
  .mbn-label { font-size: 10px; font-weight: 600; letter-spacing: .01em; }
  .mbn-item.is-active { color: var(--c-ink); }
  .mbn-item.is-active::before { display: none; }
  .mbn-item.is-active .mbn-icon svg { stroke-width: 2.4; }
  .mbn-item:not(.is-active) .mbn-label { color: var(--c-muted); }
}

/* ── "+ Add" sheet: slides up like an iOS sheet, closes faster than it opens ─ */
.add-sheet { position: fixed; inset: 0; z-index: 3000; }
.add-sheet[hidden] { display: none; }
.add-sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .32); opacity: 0; transition: opacity 200ms ease; }
.add-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, .3);
  transform: translateY(100%);
  transition: transform 200ms var(--c-ease);
}
.add-sheet.is-open .add-sheet-scrim { opacity: 1; }
.add-sheet.is-open .add-sheet-panel { transform: translateY(0); transition: transform 320ms var(--c-drawer); }
.add-sheet-grip { align-self: center; width: 36px; height: 5px; border-radius: 5px; background: var(--c-line); margin-bottom: 10px; }
.add-sheet-title { font-size: 20px; letter-spacing: -0.02em; margin: 0 4px 8px; color: var(--c-ink); }
.add-sheet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.add-sheet-btn { height: 50px; border: 0; border-radius: 14px; background: var(--c-fill); color: var(--c-ink); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.add-sheet-btn--report { background: var(--c-ink); color: var(--bg); }
.add-sheet-link { display: flex; align-items: center; min-height: 50px; padding: 0 6px; border-bottom: 1px solid var(--c-line); color: var(--c-ink); text-decoration: none; font-size: 16px; }
.add-sheet-link:last-child { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .nav-sub, .add-sheet-scrim, .add-sheet-panel, .mbn-item,
  a.button, button.button, .button, .btn, .add-sheet-btn, .add-sheet-link, .nav-sub-cta, .c-press { transition: none !important; }
  .add-sheet-panel { transform: none; }
}

/* ── Footer: the A1EX offer ─────────────────────────────────────────────── */
.c-a1ex-offer {
  max-width: 1120px; margin: 0 auto; padding: 36px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.c-a1ex-offer-text { display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.c-a1ex-offer-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a1a1a6; }
.c-a1ex-offer-h { font-size: 28px; letter-spacing: -0.03em; color: #f5f5f7; }
.c-a1ex-offer-p { font-size: 16px; color: #a1a1a6; line-height: 1.45; }
.c-a1ex-offer-btn { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 14px; background: #f5f5f7; color: #1d1d1f !important; font-weight: 700; text-decoration: none; }
@media (max-width: 600px) { .c-a1ex-offer { padding: 28px 16px; } .c-a1ex-offer-h { font-size: 24px; } .c-a1ex-offer-btn { width: 100%; justify-content: center; } }
