/* ═══════════════════════════════════════════
   Header / Desktop Navigation
   ═══════════════════════════════════════════ */

.hd {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px max(48px, calc((100vw - 1320px) / 2 + 48px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all .5s var(--ease);
}

/* Scrolled state — frosted glass */
.hd.on {
  background: rgba(247, 246, 243, .92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
  padding: 16px max(48px, calc((100vw - 1320px) / 2 + 48px));
}

/* Light mode (sub-pages) — starts scrolled */
.hd--light {
  background: rgba(247, 246, 243, .92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
  padding: 16px max(48px, calc((100vw - 1320px) / 2 + 48px));
}
.hd--light .hd__logo--w { display: none; }
.hd--light .hd__logo--c { display: block; }
.hd--light .hd__lk       { color: var(--muted); }
.hd--light .hd__lk:hover { color: var(--blue); }
.hd--light .hd__hb span  { background: var(--text); }

/* ── Logo ── */
.hd__logo {
  height: 66px;
  transition: height .4s var(--ease);
}
.hd.on .hd__logo      { height: 50px; }
.hd--light .hd__logo   { height: 50px; }
.hd__logo--w           { display: block; }
.hd__logo--c           { display: none; }
.hd.on .hd__logo--w    { display: none; }
.hd.on .hd__logo--c    { display: block; }

/* ── Nav Links ── */
.hd__nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.hd__lk {
  font-weight: 500;
  font-size: 14px;
  color: rgba(255, 255, 255, .7);
  transition: color .25s;
  cursor: pointer;
  letter-spacing: .01em;
}
.hd.on .hd__lk       { color: var(--muted); }
.hd__lk:hover         { color: #fff; }
.hd.on .hd__lk:hover  { color: var(--blue); }

/* ── Dropdown ── */
.hd__dd {
  position: relative;
}
.hd__ddm {
  position: absolute;
  top: calc(100% + 16px);
  left: -20px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .1), 0 0 0 1px rgba(0, 0, 0, .03);
  padding: 8px;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .3s var(--ease);
}
.hd__dd:hover .hd__ddm {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.hd__ddi {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  transition: all .15s;
}
.hd__ddi:hover {
  background: var(--blue-pale);
  color: var(--blue);
}

/* ── CTA Button ── */
.hd__cta {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--teal);
  padding: 10px 28px;
  border-radius: 100px;
  transition: all .35s var(--ease);
  box-shadow: 0 2px 8px rgba(0, 148, 110, .2);
}
.hd__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 148, 110, .3);
  background: var(--teal-deep);
}

/* ── Hamburger ── */
.hd__hb {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 101;
}
.hd__hb span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s;
  position: absolute;
  left: 0;
}
.hd.on .hd__hb span { background: var(--text); }
.hd__hb span:nth-child(1) { top: 0; }
.hd__hb span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hd__hb span:nth-child(3) { bottom: 0; }

/* Hamburger active (X) */
.hd__hb.act span { background: var(--text); }
.hd__hb.act span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hd__hb.act span:nth-child(2) { opacity: 0; }
.hd__hb.act span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }


/* ═══════════════════════════════════════════
   Mobile Menu (slide-in drawer)
   ═══════════════════════════════════════════ */

.mm {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 85vw);
  background: var(--white);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 32px;
  transform: translateX(100%);
  transition: transform .45s var(--ease);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .08);
  overflow-y: auto;
}
.mm.act {
  transform: translateX(0);
}

.mm__overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, .4);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all .35s;
}
.mm__overlay.act {
  opacity: 1;
  visibility: visible;
}

.mm__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  color: var(--muted);
}
.mm__close:hover {
  background: var(--warm);
}
.mm__close svg {
  width: 18px;
  height: 18px;
}

.mm__logo {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.mm__logo img {
  height: 48px;
  margin: 0 auto;
}

.mm__nav {
  flex: 1;
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mm__link {
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
  transition: color .2s;
}
.mm__link:hover {
  color: var(--blue);
}

.mm__group {
  padding: 8px 0;
}

.mm__label {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--muted);
  padding: 8px 0 4px;
  display: block;
}

.mm__sub {
  display: block;
  font-weight: 400;
  font-size: 15px;
  color: var(--text);
  padding: 10px 0 10px 16px;
  border-left: 2px solid var(--light);
  transition: all .2s;
  margin-left: 4px;
}
.mm__sub:hover {
  color: var(--teal);
  border-left-color: var(--teal);
}

.mm__cta {
  display: block;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  background: var(--teal);
  padding: 16px;
  border-radius: 100px;
  margin-top: 24px;
}

.mm__social {
  text-align: center;
  padding-top: 20px;
  margin-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, .04);
}
.mm__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light);
  transition: background .2s;
}
.mm__social a:hover {
  background: var(--warm);
}


/* ═══════════════════════════════════════════
   Responsive — Header / Mobile Menu
   ═══════════════════════════════════════════ */

@media (max-width: 1150px) {
  .hd__nav { display: none; }
  .hd__hb  { display: block; }
}

@media (max-width: 768px) {
  .hd,
  .hd.on,
  .hd--light {
    padding: 14px 20px !important;
  }
}
