/* ─────────────────────────────────────────────────────────────
   TheDevAtlas shared chrome — header, footer, buttons, brand tokens.
   Served from thedevatlas.com/shared/ and loaded by every site/repo.
   Edit here and every page that includes chrome.js picks it up.
───────────────────────────────────────────────────────────── */

@font-face { font-family: 'Metropolis'; font-weight: 500; font-display: swap; src: url('fonts/Metropolis-Medium.otf')    format('opentype'); }
@font-face { font-family: 'Metropolis'; font-weight: 600; font-display: swap; src: url('fonts/Metropolis-SemiBold.otf')  format('opentype'); }
@font-face { font-family: 'Metropolis'; font-weight: 700; font-display: swap; src: url('fonts/Metropolis-Bold.otf')      format('opentype'); }
@font-face { font-family: 'Metropolis'; font-weight: 800; font-display: swap; src: url('fonts/Metropolis-ExtraBold.otf') format('opentype'); }
@font-face { font-family: 'Metropolis'; font-weight: 900; font-display: swap; src: url('fonts/Metropolis-Black.otf')     format('opentype'); }

:root {
  --blue-light: #3BB9F7;
  --blue-deep:  #0D4AE5;
  --brand-gradient: linear-gradient(180deg, var(--blue-light), var(--blue-deep));
  --bg: #000;
  --bg-raised: #111;
  --font: 'Metropolis', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 64px;
  --page-max: 1440px;
  --page-pad: 28px;
}

/* ── Fortnite-style hover ring: transparent + far away → white + snug ──
   Add class "fx-ring" to anything clickable (buttons, cards). */
.fx-ring {
  outline: 0 solid transparent;
  outline-offset: 10px;
  transition: outline-color .15s ease-out, outline-offset .15s ease-out, outline-width .15s ease-out;
}
.fx-ring:hover,
.fx-ring:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 28px;
  border-radius: 8px;
  font: 800 .95rem/1 var(--font);
  letter-spacing: .01em;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  border: 0;
}
.btn-primary   { background: var(--brand-gradient); box-shadow: 0 0 16px rgba(13, 74, 229, .35); }
.btn-secondary { background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ── Header ── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2000;                 /* above Leaflet/MapLibre panes (up to ~1000) on map pages */
  font-family: var(--font);
  background: var(--bg);
  transition: background-color .35s ease, backdrop-filter .35s ease;
}
.site-header.is-scrolled {
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}
.header-left  { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 4px; }
.header-wordmark { height: 34px; width: auto; display: block; }

/* Logo + dropdown */
.logo-wrapper { position: relative; }
.logo-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
}
.header-logo { height: 34px; width: auto; display: block; }
.chevron-down { color: rgba(255, 255, 255, .7); transition: transform .25s cubic-bezier(.4, 0, .2, 1); }
.logo-wrapper.is-open .chevron-down { transform: rotate(180deg); }
@media (hover: hover) { .logo-wrapper:hover .chevron-down { transform: rotate(180deg); } }

.logo-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 8px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s cubic-bezier(.4, 0, .2, 1);
}
/* invisible bridge so hover doesn't drop between button and menu */
.logo-dropdown::before { content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.logo-wrapper.is-open .logo-dropdown { opacity: 1; transform: translateY(4px); pointer-events: auto; }
@media (hover: hover) {
  .logo-wrapper:hover .logo-dropdown { opacity: 1; transform: translateY(4px); pointer-events: auto; }
}
.logo-dropdown-heading {
  margin: 0;
  padding: 6px 12px 4px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
}
.logo-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.logo-dropdown-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.logo-dropdown-item img { width: 22px; height: 22px; object-fit: contain; }

/* Social icons: bare glyphs, no boxes */
.social-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  opacity: .65;
  transition: opacity .2s ease, transform .15s ease;
}
.social-link img { width: 22px; height: 22px; object-fit: contain; }
.social-link:hover,
.social-link:focus-visible { opacity: 1; transform: translateY(-2px); outline: none; }
.social-link:focus-visible { box-shadow: 0 0 0 2px #fff; }

/* ── Footer ── */
.site-footer {
  font-family: var(--font);
  background: var(--bg-raised);
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 40px 0 32px;
  color: rgba(255, 255, 255, .6);
}
.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand .header-logo { height: 44px; }
.footer-brand .header-wordmark { height: 40px; }
.footer-socials { display: flex; gap: 6px; }
.footer-socials .social-link { width: 44px; height: 44px; }
.footer-socials .social-link img { width: 24px; height: 24px; }
.footer-copy {
  max-width: var(--page-max);
  margin: 24px auto 0;
  padding: 0 var(--page-pad);
  font-size: .75rem;
  color: rgba(255, 255, 255, .4);
}

@media (max-width: 560px) {
  :root { --page-pad: 16px; }
  .header-right { display: none; }                 /* socials live in the dropdown on phones */
  .header-left  { flex: 1; }
  .logo-dropdown { position: fixed; top: var(--header-h); left: 16px; right: 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-copy  { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-ring, .social-link, .logo-dropdown, .chevron-down { transition: none; }
}
