html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Age gate: hide all site content until the visitor confirms 18+ */
html.age-pending body > *:not(#age-gate),
html.age-denied body > *:not(#age-gate) { display: none !important; }
html.age-pending body, html.age-denied body { overflow: hidden; background: #101827; }
.age-card { animation: ageIn .45s cubic-bezier(.2,.9,.3,1) both; }
@keyframes ageIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* Buttons */
.btn-primary, .btn-outline, .btn-gold, .btn-ghost, .btn-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-weight: 600; font-size: .875rem; border-radius: .75rem; padding: .7rem 1rem;
  transition: all .2s ease; text-align: center; line-height: 1.2;
}
.btn-primary { background: #D61F2C; color: #fff; }
.btn-primary:hover { background: #b51722; transform: translateY(-1px); }
.btn-outline { border: 1.5px solid #101827; color: #101827; background: transparent; }
.btn-outline:hover { background: #101827; color: #fff; }
.btn-gold { background: #D4AF37; color: #101827; }
.btn-gold:hover { background: #c29e2b; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.25); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-dark { background: #101827; color: #fff; border: 1.5px solid #101827; }
.btn-dark:hover { background: #1f2a3f; }
.btn-primary:focus-visible, .btn-outline:focus-visible, .btn-gold:focus-visible, .btn-ghost:focus-visible, .btn-dark:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }

.chip {
  display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600;
  padding: .25rem .6rem; border-radius: 999px; background: #F5F5F5; color: #1C1F24;
  border: 1px solid rgba(16,24,39,.08);
}
.chip-dark { background: rgba(255,255,255,.08); color: #F5F5F5; border-color: rgba(255,255,255,.12); }

.form-field {
  width: 100%; border-radius: .7rem; border: 1px solid rgba(16,24,39,.15); background: #fff;
  padding: .65rem .8rem; font-size: .9rem; color: #1C1F24;
}
.form-field:focus { outline: 2px solid #D61F2C; outline-offset: 1px; }
.form-label { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #1C1F24; margin-bottom: .35rem; }

.nav-link { padding: .5rem .8rem; border-radius: .6rem; color: rgba(245,245,245,.8); font-weight: 500; transition: .2s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-link.active { color: #fff; background: rgba(214,31,44,.22); }

.footer-link { color: rgba(245,245,245,.7); transition: color .2s; }
.footer-link:hover { color: #D4AF37; }

/* Hero grid texture */
.grid-texture {
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* 3D floating cards */
.float-card { animation: floatY 6s ease-in-out infinite; transform-style: preserve-3d; }
.float-card.delay { animation-delay: -3s; }
@keyframes floatY {
  0%,100% { transform: translateY(0) rotateX(6deg) rotateY(-6deg); }
  50% { transform: translateY(-10px) rotateX(6deg) rotateY(-6deg); }
}
.perspective { perspective: 1000px; }

/* Map pins */
.pin { position: relative; display: block; width: 28px; height: 34px; animation: pinDrop .7s cubic-bezier(.2,1.4,.4,1) both; }
.pin-dot {
  position: absolute; left: 4px; top: 0; width: 20px; height: 20px; background: var(--c, #D61F2C);
  border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 3px 6px 10px rgba(0,0,0,.45), inset -3px -3px 5px rgba(0,0,0,.25);
}
.pin-dot::after { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; top: 5px; left: 5px; }
.pin::after {
  content: ''; position: absolute; left: 7px; bottom: 2px; width: 14px; height: 6px; border-radius: 50%;
  background: var(--c, #D61F2C); opacity: .6; animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
@keyframes pinDrop { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.user-pin { width: 18px; height: 18px; border-radius: 50%; background: #3B82F6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(59,130,246,.3); }

.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { font-family: Inter, system-ui, sans-serif; font-size: 13px; line-height: 1.45; }
.leaflet-popup-content a { color: #D61F2C; font-weight: 600; }
.leaflet-container { background: #101827; font-family: Inter, system-ui, sans-serif; }

/* Tabs */
.tab-btn { padding: .65rem 1rem; font-weight: 600; font-size: .875rem; border-bottom: 2px solid transparent; color: rgba(28,31,36,.6); white-space: nowrap; }
.tab-btn[aria-selected="true"] { color: #D61F2C; border-color: #D61F2C; }

/* FAQ */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .2s; }

/* Cookie banner */
#cookie-banner { transform: translateY(120%); visibility: hidden; transition: transform .4s ease, visibility 0s linear .4s; }
#cookie-banner.show { transform: translateY(0); visibility: visible; transition: transform .4s ease; }

/* Cookie settings modal */
#cookie-modal[hidden] { display: none !important; }
#cookie-modal .ck-panel { animation: ageIn .3s ease both; }
details[open] .ck-chevron { transform: rotate(180deg); }
.ck-chevron { transition: transform .2s; }

/* Toggle switch */
.cookie-switch { position: relative; display: inline-flex; flex-shrink: 0; width: 46px; height: 26px; cursor: pointer; }
.cookie-switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.cookie-slider { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
.cookie-slider::before { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.cookie-switch input:checked + .cookie-slider { background: #059669; }
.cookie-switch input:checked + .cookie-slider::before { transform: translateX(20px); }
.cookie-switch input:focus-visible + .cookie-slider { outline: 2px solid #D4AF37; outline-offset: 2px; }
.cookie-switch input:disabled { cursor: not-allowed; }
.cookie-switch input:disabled + .cookie-slider { opacity: .65; }

/* Toast */
#cookie-toast { transform: translateY(150%); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
#cookie-toast.show { transform: none; opacity: 1; }

.prose-legal h2 { font-size: 1.35rem; font-weight: 800; color: #101827; margin-top: 2rem; margin-bottom: .6rem; }
.prose-legal p, .prose-legal li { color: rgba(28,31,36,.85); line-height: 1.75; margin-bottom: .7rem; }
.prose-legal ul { list-style: disc; padding-left: 1.3rem; }
.prose-legal a { color: #D61F2C; font-weight: 600; text-decoration: underline; }
.prose-legal .btn-primary { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .float-card, .pin, .pin::after, .age-card, #cookie-modal .ck-panel { animation: none !important; }
  #cookie-banner, #cookie-toast { transition: none !important; }
  html { scroll-behavior: auto; }
}