/* ──────────────────────────────────────────────────────────────────
   TarantoRespira — map page styles
   ────────────────────────────────────────────────────────────────── */

:root {
  --bg:        #0d0a14;
  --text:      #ece7f5;       /* slightly brighter than before */
  --muted:     #8c84a0;       /* readable, not a whisper */
  --yellow:    #ecbf58;       /* brighter accent */
  --teal:      #6fd9c8;
  --c-primary: 195, 125, 60;
  --c-neutral: 110, 55, 160;
  --border:    rgba(180, 160, 220, 0.14);
  --font:      'Josefin Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
}

#map { position: fixed; inset: 0; }

/* ── Brand mark — top-left, now logo + wordmark together, clickable ── */
.brand {
  position: fixed;
  top: 1.15rem; left: 1.4rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e2efff;                                   /* logo pale-blue, brighter */
  text-decoration: none;
  cursor: pointer;
  text-shadow:
    0 2px 12px rgba(0,0,0,0.8),
    0 0 22px rgba(111, 217, 200, 0.32);             /* brighter teal breath */
  transition: transform 0.18s ease, filter 0.18s ease;
}
.brand:hover { transform: translateY(-1px); filter: brightness(1.08); }
.brand-text  { display: inline-block; }
.brand b {
  font-weight: 600;
  color: #f0b840;                                   /* logo gold, lifted */
}
.brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.55));
}

/* ── Loading veil — fades out once the map is ready ── */
.veil {
  position: fixed; inset: 0; z-index: 20;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.6s ease;
}
.veil.gone { opacity: 0; pointer-events: none; }

/* ── Attribution — quiet, on-brand ── */
.maplibregl-ctrl-attrib {
  background: rgba(13, 10, 20, 0.55) !important;
  backdrop-filter: blur(4px);
}
.maplibregl-ctrl-attrib a,
.maplibregl-ctrl-attrib {
  color: var(--muted) !important;
  font-family: var(--font);
  font-size: 0.6rem !important;
  letter-spacing: 0.04em;
}
.maplibregl-ctrl-attrib-button { filter: invert(1) opacity(0.4); }

/* ══════════════════════════════════════════════════════════════════
   LAUNCHER SYSTEM
   Left  (#launcherBtn → #launcher)        = NAVIGATOR (constant nav)
   Right (#actionsBtn → #actionsLauncher)  = layers & pollutants
   ══════════════════════════════════════════════════════════════════ */

/* ── Floating launcher buttons ─────────────────────────────────────── */
.launcher-btn-floating,
.actions-btn-floating {
  position: fixed;
  bottom: 1.75rem;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 800;
  transition: all 0.2s;
  backdrop-filter: blur(28px) saturate(160%) brightness(1.10);
  -webkit-backdrop-filter: blur(28px) saturate(160%) brightness(1.10);
  background: rgba(22, 16, 34, 0.42);
  box-shadow:
    0 0.6rem 1.8rem rgba(0,0,0,0.46),
    inset 0 1px 0 0 rgba(255,255,255,0.22),
    inset 0 -2px 6px 0 rgba(0,0,0,0.28);
}
.launcher-btn-floating {
  left: 1.75rem;
  border: 1px solid rgba(195,165,230,0.36);
  color: rgba(225,212,245,0.96);
  background:
    linear-gradient(180deg, rgba(120,65,180,0.30) 0%, rgba(70,30,100,0.36) 100%),
    rgba(22,14,34,0.40);
}
.actions-btn-floating {
  right: 1.75rem;
  border: 1px solid rgba(225,170,200,0.42);
  color: var(--yellow);
  background:
    linear-gradient(180deg, rgba(195,105,150,0.28) 0%, rgba(95,40,80,0.34) 100%),
    rgba(26,14,30,0.40);
}

.launcher-btn-floating svg,
.actions-btn-floating svg {
  width: 2.25rem; height: 2.25rem;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.launcher-btn-floating:hover {
  background: rgba(120,65,180,0.30);
  border-color: rgba(195,170,230,0.48);
  color: var(--text); transform: scale(1.08);
}
.actions-btn-floating:hover {
  background: rgba(225,170,200,0.20);
  border-color: rgba(225,170,200,0.55);
  transform: scale(1.08);
}
.launcher-btn-floating.open {
  background: rgba(120,65,180,0.42);
  border-color: rgba(200,180,235,0.55);
  color: var(--text); transform: rotate(90deg) scale(1.06);
}
.actions-btn-floating.open {
  background: rgba(225,170,200,0.36);
  border-color: rgba(225,170,200,0.65);
  transform: scale(1.06);
}

/* ── Overlay containers ────────────────────────────────────────────── */
.launcher, .actions-launcher {
  position: fixed; inset: 0;
  z-index: 900;
  pointer-events: none;
}
.launcher.open, .actions-launcher.open { pointer-events: all; }

.launcher-backdrop, .actions-launcher-backdrop {
  position: absolute; inset: 0;
  background: rgba(8,5,15,0.28);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.launcher.open .launcher-backdrop,
.actions-launcher.open .actions-launcher-backdrop { opacity: 1; }

/* ── Bottom sheets ─────────────────────────────────────────────────── */
.launcher-sheet, .actions-launcher-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 0.75rem 1.5rem 2rem;
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.30s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex; flex-direction: column; gap: 1.25rem;
  box-shadow:
    0 -18px 52px rgba(0,0,0,0.34),
    inset 0 1px 0 0 rgba(255,255,255,0.24);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.15);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.15);
}
.launcher-sheet {
  background:
    linear-gradient(180deg, rgba(140,90,210,0.18) 0%, rgba(80,40,120,0.22) 100%),
    rgba(22,14,34,0.32);
  border-top: 1px solid rgba(200,180,235,0.30);
}
.actions-launcher-sheet {
  background:
    linear-gradient(180deg, rgba(195,105,150,0.18) 0%, rgba(95,40,80,0.22) 100%),
    rgba(26,14,30,0.32);
  border-top: 1px solid rgba(225,170,200,0.32);
}
.launcher.open .launcher-sheet,
.actions-launcher.open .actions-launcher-sheet { transform: translateY(0); }

.launcher-sheet::-webkit-scrollbar,
.actions-launcher-sheet::-webkit-scrollbar { width: 2px; }
.launcher-sheet::-webkit-scrollbar-thumb         { background: rgba(140,90,210,0.30); }
.actions-launcher-sheet::-webkit-scrollbar-thumb { background: rgba(225,170,200,0.30); }

.launcher-sheet::before,
.actions-launcher-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%,
      rgba(255,255,255,0.10) 0%,
      rgba(255,255,255,0)   60%);
}

/* ── Sheet handle + header ─────────────────────────────────────────── */
.sheet-handle {
  width: 2.5rem; height: 3px;
  border-radius: 2px;
  align-self: center;
  flex-shrink: 0;
  margin-bottom: 0.25rem;
  background: rgba(200,180,235,0.32);
}
.sheet-header {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  text-align: center;
  padding: 0.31rem 0;
}

/* ── Sheet sections + tiles ────────────────────────────────────────── */
.sheet-section { display: flex; flex-direction: column; gap: 0.55rem; }
.sheet-section-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  padding-left: 0.25rem;
}
.tile-grid { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.tile {
  width: 5rem; height: 5rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(140,90,210,0.40);
  background: rgba(140,90,210,0.16);
  color: rgba(220,200,240,0.96);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.44rem;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.16s;
  text-decoration: none;
}
.tile svg {
  width: 1.375rem; height: 1.375rem;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.tile span {
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  text-align: center;
  line-height: 1.2;
}
.tile:hover {
  background: rgba(140,90,210,0.24);
  border-color: rgba(180,140,225,0.55);
  color: var(--text);
  transform: translateY(-2px);
}
.tile.active {
  background: rgba(225,170,200,0.22);
  border-color: rgba(225,170,200,0.65);
  color: var(--yellow);
}

/* Nav tiles are <a> elements — same look as buttons but no hover lift on tap */
.nav-tile { text-decoration: none; }
.nav-tile:active { transform: translateY(0); }

/* ══════════════════════════════════════════════════════════════════
   "INSTANT KNOWING" HEADLINE — the glass pill, top-center
   ══════════════════════════════════════════════════════════════════ */
.headline {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.125rem;
  border-radius: 2rem;
  background: rgba(13, 10, 20, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(200,180,235,0.20);
  font-family: var(--font);
  white-space: nowrap;
}
.headline-dot {
  width: 0.625rem; height: 0.625rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}
.headline-text {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text);
}
.headline-text b { font-weight: 400; }

@media (max-width: 768px) {
  .launcher-btn-floating, .actions-btn-floating {
    bottom: 1.25rem;
    width: 3.25rem; height: 3.25rem;
  }
  .launcher-btn-floating svg,
  .actions-btn-floating svg { width: 1.4rem; height: 1.4rem; }
  .launcher-btn-floating { left: 1.25rem; }
  .actions-btn-floating  { right: 1.25rem; }
  .headline { top: 0.875rem; }
  .headline-text { font-size: 0.7rem; }
  .brand { top: 0.9rem; left: 1rem; font-size: 0.85rem; }
  .brand-mark { width: 1.5rem; height: 1.5rem; }
}
