/* ---------- Design tokens (mirrors haphood-site/index.html) ---------- */
:root {
  --blue: #3B82F6;
  --teal: #14B8A6;
  --green: #22C55E;
  --gradient: linear-gradient(135deg, #60A5FA 0%, #2DD4BF 55%, #4ADE80 100%);

  /* Neutrals — dark theme (default) */
  --bg: #000000;
  --surface: #0A0A0A;
  --surface-2: #141414;
  --border: #1A1A1A;
  --border-strong: #2A2A2A;
  --text-1: #F1F5F9;
  --text-2: #94A3B8;
  --text-3: #64748B;

  /* Semantic */
  --success: #4ADE80;
  --info: #60A5FA;
  --warning: #FBBF24;

  /* Spacing */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-6: 48px;
  --s-8: 64px;
  --s-10: 56px;
  --s-12: 96px;

  /* Radii & shadows */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.25);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Light theme override */
[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --surface-2: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text-1: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.08), 0 12px 32px rgba(15, 23, 42, 0.10);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Top nav (logo only) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 200ms ease, backdrop-filter 200ms ease, border-color 200ms ease;
}

/* Pages with a hero (events, shop) — nav floats over the hero gradient */
body.page--hero .nav {
  background: rgba(0, 0, 0, 0.0);
  border-bottom-color: transparent;
}
body.page--hero .nav.is-scrolled {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--border);
}
[data-theme="light"] body.page--hero .nav.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--s-3);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--text-1);
  text-decoration: none;
}
.logo__mark {
  width: 32px; height: 32px;
  flex-shrink: 0;
  display: block;
}
.logo__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ---------- Nav right-side: links + Join + burger ---------- */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.nav__links a:not(.btn) {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 160ms ease;
}
.nav__links a:not(.btn):hover { color: var(--text-1); }
@media (max-width: 560px) {
  .nav__links > a:not(.btn) { display: none; }
}

.nav__menu {
  position: relative;
  display: inline-flex;
  margin-left: calc(var(--s-3) * -1);
}
.nav__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-1);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.nav__menu-btn:hover { background: var(--surface-2); }
.nav__menu-btn:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}
.nav__menu-btn svg { width: 18px; height: 18px; display: block; }
.nav__menu-btn .icon-close { display: none; }
.nav__menu-btn[aria-expanded="true"] .icon-open { display: none; }
.nav__menu-btn[aria-expanded="true"] .icon-close { display: block; }

.nav__menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  z-index: 60;
}
.nav__menu-panel[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__menu-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-1);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms ease, color 120ms ease;
}
.nav__menu-panel a:hover { background: var(--surface-2); }
.nav__menu-panel a[aria-current="page"] {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.12), rgba(34, 197, 94, 0.04));
  color: var(--text-1);
  font-weight: 600;
  position: relative;
}
.nav__menu-panel a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #14B8A6, #22C55E);
}
.nav__menu-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 999px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn--secondary {
  background: var(--surface);
  color: var(--text-1);
  border-color: var(--border-strong);
}
.btn--secondary:hover {
  border-color: var(--text-3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.btn--primary {
  background: var(--text-1);
  color: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.btn--small { padding: 9px 16px; font-size: 14px; }
.btn__arrow { font-size: 16px; line-height: 1; }

.btn--gradient {
  background: linear-gradient(135deg, #1D4ED8 -20%, #14B8A6 55%, #22C55E 120%);
  color: #fff;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 6px 20px -10px rgba(0, 0, 0, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.18);
}
.btn--gradient:hover {
  background: linear-gradient(135deg, #1741B5 -20%, #0FA08E 55%, #1DB055 120%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    0 10px 26px -10px rgba(0, 0, 0, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.22);
}

/* ---------- Hero (shared between subpages — same treatment as /shop/) ---------- */
.hero {
  position: relative;
  margin-top: -72px;
  padding: calc(var(--s-12) + 72px) 0 var(--s-10);
  overflow: hidden;
  background: var(--bg);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 90% 20%, rgba(20, 184, 166, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(34, 197, 94, 0.18), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.14), transparent 60%);
}
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 80%);
  opacity: 0.55;
}
[data-theme="light"] .hero__bg::before {
  background:
    linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px) 0 0 / 64px 64px;
  opacity: 0.7;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--s-3);
}
.hero__text { max-width: 620px; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: var(--s-3);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--success);
  opacity: 0.4;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 var(--s-3);
  color: var(--text-1);
  max-width: 540px;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, #14B8A6 0%, #22C55E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0 0 var(--s-4);
  max-width: 520px;
}
.hero__ctas {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: var(--s-3);
}
.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-3);
}
.hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero__meta-item svg {
  width: 16px; height: 16px;
  color: var(--success);
  flex-shrink: 0;
}

/* ---------- Theme toggle FAB ---------- */
.theme-toggle {
  appearance: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.theme-toggle:hover {
  color: var(--text-1);
  border-color: var(--text-3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}
.theme-toggle--fab {
  position: fixed;
  right: var(--s-3);
  bottom: var(--s-3);
  z-index: 60;
  box-shadow: var(--shadow-soft);
}
.theme-toggle__icon { width: 20px; height: 20px; display: block; }
.theme-toggle__icon--sun { display: none; }
.theme-toggle__icon--moon { display: block; }
[data-theme="light"] .theme-toggle__icon--sun { display: block; }
[data-theme="light"] .theme-toggle__icon--moon { display: none; }

/* ---------- Legal page layout ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-3) var(--s-12);
}

.legal__back {
  margin-bottom: var(--s-4);
}

.legal__title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--text-1);
}

.legal__meta {
  font-size: 14px;
  color: var(--text-3);
  margin: 0 0 var(--s-3);
}

.legal__warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--warning);
  margin: 0 0 var(--s-4);
}
.legal__warning::before {
  content: "⚠";
  flex-shrink: 0;
  line-height: 1.2;
}
[data-theme="light"] .legal__warning {
  background: #FEF3C7;
  border-color: #FCD34D;
  color: #92400E;
}

.legal__intro {
  color: var(--text-2);
  margin: 0 0 var(--s-4);
  font-size: 15px;
  line-height: 1.7;
}

.legal section { margin-bottom: var(--s-4); }

.legal h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.legal h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 4px;
}

.legal p,
.legal li {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
}

.legal p { margin: 0 0 12px; }
.legal p:last-child { margin-bottom: 0; }

.legal ul {
  margin: 8px 0 12px;
  padding-left: 22px;
}

.legal li { margin-bottom: 6px; }
.legal li:last-child { margin-bottom: 0; }

.legal .group { margin-bottom: var(--s-2); }
.legal .group:last-child { margin-bottom: 0; }

.legal a {
  color: var(--info);
  text-decoration: none;
  transition: color 160ms ease;
}
.legal a:hover {
  color: var(--text-1);
  text-decoration: underline;
}
[data-theme="light"] .legal a { color: var(--blue); }
[data-theme="light"] .legal a:hover { color: var(--text-1); }

.legal strong { color: var(--text-1); font-weight: 600; }
.legal em { color: var(--text-1); }

.legal__footer {
  font-size: 13px;
  color: var(--text-3);
  margin-top: var(--s-6);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .legal { padding: var(--s-3) var(--s-2) var(--s-8); }
  .legal__title { font-size: 26px; }
  .theme-toggle--fab { right: var(--s-2); bottom: var(--s-2); }
}

/* ---------- Shared footer (Lost-or-found CTA + bottom bar) ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--s-3);
}

.btn .arrow {
  width: 14px;
  height: 14px;
  transition: transform 180ms ease;
}
.btn:hover .arrow { transform: translateX(2px); }

.footer-cta {
  padding: var(--s-6) 0 var(--s-10);
}
.footer-cta__inner {
  position: relative;
}
.footer-cta__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--s-6);
  align-items: center;
}
.footer-cta__or {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  user-select: none;
  align-self: stretch;
  justify-content: center;
}
.footer-cta__or::before,
.footer-cta__or::after {
  content: '';
  width: 1px;
  flex: 1;
  background: var(--border);
  min-height: 24px;
}
.footer-cta__text { text-align: left; }
.footer-cta__row {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-3);
}
.footer-cta__logo {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.footer-cta__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.footer-cta__copy { flex: 1; min-width: 0; }
.footer-cta__copy h2 { margin: 0 0 8px; }
.footer-cta__copy p {
  color: var(--text-2);
  font-size: 17px;
  margin: 0 0 var(--s-3);
  max-width: 480px;
}
.footer-cta h2 {
  font-size: clamp(28px, 3.2vw, 36px);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-1);
}
.footer-cta__text > p {
  color: var(--text-2);
  font-size: 17px;
  margin: 0 0 var(--s-4);
  max-width: 480px;
}

/* QR block */
.qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.qr__code {
  width: 140px;
  height: 140px;
  background: white;
  border-radius: 10px;
  padding: 5px;
  display: block;
}
.qr__code svg {
  width: 100%;
  height: 100%;
  display: block;
}
.qr__label {
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.4;
  max-width: 140px;
}
.qr__label strong {
  color: var(--text-1);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

@media (max-width: 720px) {
  .footer-cta { padding: var(--s-4) 0 var(--s-3); }
  .footer-cta__inner { padding: var(--s-4) var(--s-3); }
  .footer-cta__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--s-2);
  }
  .footer-cta__or {
    flex-direction: row;
    gap: 12px;
    align-self: center;
    margin: 6px 0;
  }
  .footer-cta__or::before,
  .footer-cta__or::after {
    width: 24px;
    height: 1px;
    flex: 0 0 auto;
    min-height: 0;
  }
  .footer-cta__text { text-align: center; }
  .footer-cta__text > p { margin-inline: auto; }
  .footer-cta__row {
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    margin-bottom: var(--s-2);
  }
  .footer-cta__copy { text-align: center; }
  .footer-cta__copy p { margin-inline: auto; }
  .footer-cta__logo { width: 72px; height: 72px; }
}

/* ---------- Footer bar ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--s-6) 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  color: var(--text-3);
  font-size: 13px;
}
.footer__links {
  display: flex;
  gap: var(--s-3);
}
.footer__links a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 160ms ease;
}
.footer__links a:hover { color: var(--text-2); }

.footer__social {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.footer__social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  border: 1px solid var(--border);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.footer__social a:hover {
  color: var(--text-1);
  border-color: var(--border-strong);
  background: var(--surface);
}
.footer__social svg {
  width: 14px;
  height: 14px;
}
@media (max-width: 560px) {
  .footer { padding: var(--s-3) 0; }
}
