/**
 * JoinEnel site chrome — founding-member nav + footer styling.
 * Scoped to body.eh-joinenel-chrome only (live-site safe).
 */

body.eh-joinenel-chrome {
  --fm-teal: #2d9aad;
  --fm-teal-bright: #3daec4;
  --fm-teal-glow: #5bc4d6;
  --fm-mint: #86d4e0;
  --fm-teal-rgb: 45, 154, 173;
  --fm-ink: #e7ecf3;
  --fm-ink-mute: #a5b0c0;
  --fm-ink-faint: #6b7689;
  --fm-rule: rgba(91, 196, 214, 0.18);
  --fm-ink-light: #081328;
  --fm-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fm-content-max: min(72rem, 92vw);
  --fm-nav-wave-height: 34px;
  --fm-nav-bar-height: 54px;
  --fm-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Top navbar ── */
body.eh-joinenel-chrome .eh-fm-nav-header.eh-site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 72;
  flex-shrink: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: #fffbeb;
  border-bottom: none;
  margin: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: var(--fm-font-body);
}

body.eh-joinenel-chrome .eh-fm-nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  min-height: var(--fm-nav-bar-height);
  padding: 0.625rem clamp(1rem, 4vw, 1.375rem);
  background: transparent;
}

body.eh-joinenel-chrome .eh-nav-wave-green {
  line-height: 0;
  background: transparent;
  pointer-events: none;
}

body.eh-joinenel-chrome .eh-nav-wave-green__img {
  display: block;
  width: 100%;
  height: var(--fm-nav-wave-height);
}

.admin-bar body.eh-joinenel-chrome .eh-fm-nav-header.eh-site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar body.eh-joinenel-chrome .eh-fm-nav-header.eh-site-header {
    top: 46px;
  }
}

/* Founding-member wordmark brand */
body.eh-joinenel-chrome .eh-fm-nav-shell .eh-fm-nav__brand {
  font-family: var(--fm-font-body) !important;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fm-ink-light);
  text-decoration: none;
  text-shadow: none;
  flex-shrink: 0;
  min-width: 0;
}

body.eh-joinenel-chrome .eh-fm-nav-shell .eh-fm-nav__accent {
  color: var(--fm-mint);
}

body.eh-joinenel-chrome .eh-fm-nav-shell .eh-fm-nav__reg {
  font-size: 0.6em;
  font-weight: 600;
  vertical-align: super;
  color: var(--fm-teal);
}

/* Legacy brand fallback (if theme helper unavailable) */
body.eh-joinenel-chrome .eh-fm-nav-shell .eh-brand {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 0;
  max-width: min(100%, 22rem);
}

body.eh-joinenel-chrome .eh-fm-nav-shell .eh-site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 0.65rem;
}

body.eh-joinenel-chrome .eh-fm-nav-shell .eh-site-title {
  margin: 0;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

body.eh-joinenel-chrome .eh-fm-nav-shell .eh-site-title a {
  color: var(--fm-ink-light);
  text-decoration: none;
}

body.eh-joinenel-chrome .eh-fm-nav-shell .eh-site-title a:hover {
  color: var(--fm-ink-light);
}

body.eh-joinenel-chrome .eh-fm-nav-shell .eh-site-tagline {
  margin: 0;
  font-size: 0.6875rem;
  color: rgba(8, 19, 40, 0.55);
  font-weight: 400;
  line-height: 1.35;
}

/* Desktop nav links */
body.eh-joinenel-chrome .eh-site-header__nav-group {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  margin-left: auto;
  min-width: 0;
  flex: 1 1 auto;
}

@media (min-width: 783px) {
  body.eh-joinenel-chrome .eh-site-header__nav-group {
    display: flex;
  }

  body.eh-joinenel-chrome .eh-site-header__nav-group .eh-fm-nav__libraries-nav--desktop {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 1rem;
    margin-left: 0;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.eh-joinenel-chrome .eh-site-header__nav-group .eh-fm-nav__libraries-nav--desktop::-webkit-scrollbar {
    display: none;
  }

  body.eh-joinenel-chrome .eh-site-header__library-nav {
    flex-shrink: 0;
    padding-left: 1rem;
    border-left: 1px solid rgba(8, 19, 40, 0.1);
  }
}

body.eh-joinenel-chrome .eh-fm-nav__libraries-nav--desktop {
  display: none;
}

body.eh-joinenel-chrome .eh-fm-nav__libraries {
  font-family: var(--fm-font-body) !important;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(8, 19, 40, 0.62);
  text-decoration: none;
  padding: 0;
  white-space: nowrap;
  transition: color 0.2s var(--fm-ease);
}

body.eh-joinenel-chrome .eh-fm-nav__libraries:hover,
body.eh-joinenel-chrome .eh-fm-nav__libraries:focus-visible {
  color: var(--fm-ink-light);
  outline: none;
}

body.eh-joinenel-chrome .eh-fm-nav__libraries.is-active,
body.eh-joinenel-chrome .eh-fm-nav__libraries[aria-current="page"] {
  color: var(--fm-ink-light);
  font-weight: 600;
}

/* Profile menu */
body.eh-joinenel-chrome .eh-fm-nav-shell .eh-profile-menu-shell {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  margin-left: 0.75rem;
}

body.eh-joinenel-chrome.eh-joinenel-chrome--minimal .eh-fm-nav-shell .eh-profile-menu-shell {
  margin-left: auto;
}

body.eh-joinenel-chrome.eh-joinenel-chrome--minimal .eh-site-header__library-nav {
  padding-left: 0;
  border-left: none;
}

body.eh-joinenel-chrome .eh-header__mobile-item--divider span {
  display: block;
  padding: 0.65rem 0.85rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(8, 19, 40, 0.45);
}

/* Mobile hamburger */
body.eh-joinenel-chrome .eh-fm-nav-shell .eh-header__menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0 0 0 auto;
  border: 1px solid rgba(28, 124, 142, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: var(--fm-ink-light);
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 782px) {
  body.eh-joinenel-chrome:not(.eh-joinenel-chrome--minimal) .eh-fm-nav-shell .eh-header__menu-btn,
  body.eh-joinenel-chrome.eh-joinenel-chrome--minimal .eh-fm-nav-shell .eh-header__menu-btn {
    display: inline-flex;
  }

  body.eh-joinenel-chrome .eh-fm-nav-shell {
    flex-wrap: nowrap;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.eh-joinenel-chrome .eh-fm-nav-shell .eh-fm-nav__brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.eh-joinenel-chrome .eh-fm-nav-shell .eh-brand {
    flex: 1 1 auto;
    max-width: none;
  }

  body.eh-joinenel-chrome .eh-fm-nav-shell .eh-site-tagline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.eh-joinenel-chrome .eh-fm-nav-shell .eh-profile-menu-shell {
    margin-left: 0.5rem;
  }
}

body.eh-joinenel-chrome .eh-site-header .eh-header__backdrop {
  z-index: 71;
}

body.eh-joinenel-chrome .eh-site-header .eh-header__mobile-panel {
  z-index: 73;
  border-color: rgba(8, 19, 40, 0.1);
}

/* Pre-footer wave */
body.eh-joinenel-chrome .eh-site-chrome-pre-footer {
  line-height: 0;
  background: #f5f5f0;
}

body.eh-joinenel-chrome .eh-site-chrome-pre-footer .eh-nav-wave-green {
  background: #f5f5f0;
}

body.eh-joinenel-chrome .eh-nav-wave-green + .eh-fm-footer {
  margin-top: 0;
}

body.eh-joinenel-chrome .eh-nav-wave-green + .eh-fm-footer::before {
  display: none;
}

/* ── Footer ── */
body.eh-joinenel-chrome .eh-fm-footer {
  position: relative;
  margin-top: -1px;
  background: #030610;
  color: var(--fm-ink-mute);
  border-top: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 -12px 40px rgba(0, 0, 0, 0.35);
  padding: clamp(2.25rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
  padding-bottom: max(clamp(2.25rem, 5vw, 3rem), env(safe-area-inset-bottom));
  text-align: center;
}

body.eh-joinenel-chrome .eh-fm-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--fm-teal-rgb), 0.45) 50%,
    transparent 100%
  );
  pointer-events: none;
}

body.eh-joinenel-chrome .eh-fm-footer__inner {
  max-width: var(--fm-content-max);
  margin: 0 auto;
}

body.eh-joinenel-chrome .eh-fm-footer__wordmark {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fm-ink);
  margin-bottom: 0.5rem;
}

body.eh-joinenel-chrome .eh-fm-footer__e {
  font-feature-settings: "liga" 0;
}

body.eh-joinenel-chrome .eh-fm-footer__reg {
  font-size: 0.65em;
  vertical-align: super;
}

body.eh-joinenel-chrome .eh-fm-footer__tag {
  font-size: 0.875rem;
  margin: 0 0 1.25rem;
  color: var(--fm-ink-faint);
}

body.eh-joinenel-chrome .eh-fm-footer .footer-legal {
  margin: 0 auto 1.25rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--fm-rule);
  max-width: 36rem;
}

body.eh-joinenel-chrome .eh-fm-footer .footer-legal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

body.eh-joinenel-chrome .eh-fm-footer .footer-legal__list li {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.eh-joinenel-chrome .eh-fm-footer .footer-legal a {
  display: inline-block;
  font-family: var(--fm-font-body) !important;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fm-teal-glow);
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

body.eh-joinenel-chrome .eh-fm-footer .footer-legal a:hover,
body.eh-joinenel-chrome .eh-fm-footer .footer-legal a:focus {
  color: var(--fm-ink);
  border-bottom-color: rgba(var(--fm-teal-rgb), 0.45);
  outline: none;
}

body.eh-joinenel-chrome .eh-fm-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  opacity: 0.75;
  color: var(--fm-ink-faint);
}

body.eh-joinenel-chrome .eh-fm-footer__dot {
  margin: 0 0.5rem;
}

@media (min-width: 640px) {
  body.eh-joinenel-chrome .eh-fm-footer .footer-legal__list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
  }

  body.eh-joinenel-chrome .eh-fm-footer .footer-legal__list li {
    display: inline-flex;
    align-items: center;
  }

  body.eh-joinenel-chrome .eh-fm-footer .footer-legal__list li:not(:last-child)::after {
    content: "·";
    margin: 0 0.75rem;
    color: var(--fm-ink-faint);
    font-weight: 400;
    pointer-events: none;
  }
}
