/**
 * Phase 12H.2B — Header, mega menus, mobile drawer, footer shell
 */

:root {
  --eb-nav-h: 76px;
  --eb-shell-glass: rgba(255, 255, 255, 0.55);
  --eb-shell-glass-scrolled: rgba(255, 255, 255, 0.78);
  --eb-shell-border: rgba(15, 23, 42, 0.06);
}

[data-lp-theme="dark"] {
  --eb-shell-glass: rgba(15, 23, 42, 0.45);
  --eb-shell-glass-scrolled: rgba(15, 23, 42, 0.82);
  --eb-shell-border: rgba(248, 250, 252, 0.08);
}

@media (min-width: 1024px) {
  .d-none-mobile { display: inline-flex !important; }
}
.d-none-mobile { display: none; }

/* —— Glass header —— */
.eb-site-header { position: relative; z-index: 1100; }
.lp-nav--glass {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  transition: background 0.35s var(--eb-ease), border-color 0.35s var(--eb-ease),
    box-shadow 0.35s var(--eb-ease), backdrop-filter 0.35s var(--eb-ease);
}
.lp-nav--glass.is-scrolled {
  background: var(--eb-shell-glass-scrolled);
  border-bottom-color: var(--eb-shell-border);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: 0 1px 0 var(--eb-shell-border), 0 8px 32px rgba(15, 23, 42, 0.06);
}
[data-lp-theme="dark"] .lp-nav--glass.is-scrolled {
  box-shadow: 0 1px 0 var(--eb-shell-border), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.lp-brand--shell {
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.lp-brand__identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.lp-brand__flag {
  display: inline-flex;
  line-height: 0;
  opacity: 0.92;
}
.lp-brand__tagline {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--eb-text-soft);
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .lp-brand__tagline { display: none; }
}
@media (min-width: 1101px) {
  .lp-brand--shell .lp-brand__logo { height: 28px; }
}

/* Desktop nav links */
@media (min-width: 1024px) {
  .lp-nav__links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
  }
}
.lp-nav__item { position: relative; list-style: none; }
.lp-nav__trigger,
.lp-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--eb-text-muted);
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.lp-nav__trigger:hover,
.lp-nav__link:hover,
.lp-nav__item.is-open .lp-nav__trigger {
  color: var(--eb-primary);
  background: rgba(37, 99, 235, 0.06);
}
.lp-nav__trigger:focus-visible,
.lp-nav__link:focus-visible,
.lp-drawer__trigger:focus-visible,
.lp-drawer__flat:focus-visible {
  outline: 2px solid var(--eb-primary);
  outline-offset: 2px;
}
.lp-nav__chev {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s var(--eb-ease);
}
.lp-nav__item.is-open .lp-nav__chev { transform: rotate(-135deg) translateY(1px); }

.lp-nav__cta-secondary { font-size: 13px; padding: 8px 14px; }
.lp-nav__login { font-size: 13px; padding: 8px 14px; }

/* Mega menus */
.lp-mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: min(720px, 92vw);
  max-width: 920px;
  padding: 1.25rem 1.35rem 1rem;
  background: var(--eb-card);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg);
  box-shadow: var(--eb-shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s var(--eb-ease), transform 0.22s var(--eb-ease), visibility 0.22s;
  z-index: 1200;
}
.lp-nav__item--mega:first-child .lp-mega {
  left: 0;
  transform: translateX(0) translateY(8px);
}
@media (min-width: 1024px) {
  .lp-nav__links { display: flex !important; }
  .lp-nav__item--mega:hover .lp-mega,
  .lp-nav__item.is-open .lp-mega,
  .lp-nav__item--mega:focus-within .lp-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  .lp-nav__item--mega:first-child:hover .lp-mega,
  .lp-nav__item--mega:first-child.is-open .lp-mega,
  .lp-nav__item--mega:first-child:focus-within .lp-mega {
    transform: translateX(0) translateY(0);
  }
}
@media (max-width: 1023px) {
  .lp-nav__links { display: none !important; }
}

.lp-mega__grid {
  display: grid;
  gap: 1rem 1.25rem;
}
.lp-mega__grid--wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .lp-mega__grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lp-mega__title {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eb-text-soft);
}
.lp-mega__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-mega__list a,
.lp-mega__link {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--eb-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.lp-mega__list a:hover,
.lp-mega__link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--eb-primary);
}
.lp-mega__link-desc {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--eb-text-soft);
  margin-top: 2px;
}
.lp-mega__list--tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}
.lp-mega__list--cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}
.lp-mega__list--rich { gap: 6px; }
.lp-mega__foot {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--eb-border);
  font-size: 12px;
}
.lp-mega__foot a { color: var(--eb-primary); font-weight: 600; text-decoration: none; }

/* Mobile drawer */
.lp-drawer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  pointer-events: none;
  visibility: hidden;
}
.lp-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}
.lp-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s var(--eb-ease);
}
.lp-drawer.is-open .lp-drawer__backdrop { opacity: 1; }
.lp-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(400px, 92vw);
  height: 100%;
  background: var(--eb-card);
  border-left: 1px solid var(--eb-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--eb-ease);
  box-shadow: -12px 0 48px rgba(15, 23, 42, 0.12);
}
.lp-drawer.is-open .lp-drawer__panel { transform: translateX(0); }
.lp-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--eb-border);
}
.lp-drawer__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.lp-drawer__section { border-bottom: 1px solid var(--eb-border); }
.lp-drawer__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.25rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--eb-text);
  text-align: left;
  cursor: pointer;
  min-height: 52px;
}
.lp-drawer__chev {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--eb-text-muted);
  border-bottom: 2px solid var(--eb-text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.lp-drawer__section.is-open .lp-drawer__chev { transform: rotate(-135deg); }
.lp-drawer__panel[hidden] { display: none; }
.lp-drawer__section .lp-drawer__panel {
  padding: 0 1.25rem 1rem;
}
.lp-drawer__group-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eb-text-soft);
}
.lp-drawer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lp-drawer__links a {
  display: block;
  padding: 10px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--eb-text-muted);
  text-decoration: none;
  border-radius: 8px;
  min-height: 44px;
  line-height: 1.3;
  display: flex;
  align-items: center;
}
.lp-drawer__links a:hover { color: var(--eb-primary); background: rgba(37, 99, 235, 0.06); }
.lp-drawer__flat {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 1rem 1.25rem;
  font-size: 16px;
  font-weight: 600;
  color: var(--eb-text);
  text-decoration: none;
  border-bottom: 1px solid var(--eb-border);
}
.lp-drawer__cta {
  padding: 1rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--eb-border);
  background: var(--eb-bg);
}
.lp-drawer__cta .lp-btn { width: 100%; min-height: 48px; font-size: 15px; }
body.lp-drawer-open { overflow: hidden; }

@media (min-width: 1024px) {
  .lp-mobile-toggle { display: none !important; }
  .lp-drawer { display: none; }
}

/* —— Footer shell —— */
.lp-footer--shell .lp-footer__top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lp-footer__made-in--prominent {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--eb-text-on-dark);
  margin: 0 0 0.75rem;
}
.lp-footer__payments-title {
  margin: 0 0 1rem;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eb-text-on-dark);
}
.lp-footer__features--5 {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .lp-footer__features--5 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .lp-footer__features--5 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .lp-footer__features--5 { grid-template-columns: repeat(5, 1fr); }
}
.lp-footer__features--6 {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .lp-footer__features--6 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .lp-footer__features--6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .lp-footer__features--6 { grid-template-columns: repeat(6, 1fr); }
}
.lp-footer__legal--shell {
  text-align: center;
  padding-top: 2rem;
}
.lp-footer__legal--shell .lp-footer__credit-main {
  margin: 0 0 0.5rem;
  font-size: 14px;
  color: var(--eb-text-on-dark);
}
.lp-footer__legal--shell .lp-footer__credit-main a {
  color: var(--eb-heading-on-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lp-footer__legal--shell .lp-footer__credit-sub {
  margin: 0.2rem 0;
  font-size: 12px;
  color: var(--eb-text-soft);
}
.lp-footer__legal--shell .lp-footer__credit-sub a {
  color: var(--eb-text-soft);
}
.lp-footer__legal--shell .lp-footer__credit-sub a:hover { color: #fff; }

/* Trust strip icons */
.mkt-trust-row--icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.mkt-trust-pill--icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 600;
  color: var(--eb-text-on-dark);
}
.mkt-trust-pill__icon {
  display: inline-flex;
  color: var(--eb-accent);
  opacity: 0.95;
}
.lp-body .mkt-trust-pill--icon {
  background: var(--eb-card);
  border-color: var(--eb-border);
  color: var(--eb-text);
}
.lp-body .mkt-trust-pill__icon { color: var(--eb-primary); }

.lp-reduced-motion .lp-mega,
.lp-reduced-motion .lp-drawer__panel,
.lp-reduced-motion .lp-nav--glass {
  transition: none;
}
