/*
 * Full-bleed navigation and premium footer.
 * This file is intentionally isolated and must be loaded after hero-map-v2.css.
 */

/* -------------------------------------------------------------------------- */
/* Full-bleed matte navigation                                                 */
/* -------------------------------------------------------------------------- */

.site-header {
  --chrome-inline: max(24px, calc((100% - var(--container)) / 2));
  top: 0;
  height: 86px;
  padding: 0;
  background: transparent;
}

.site-header.is-scrolled {
  top: 0;
  height: 70px;
}

.site-header__inner {
  width: 100%;
  max-width: none;
  min-height: 86px;
  margin-inline: 0;
  padding: 10px var(--chrome-inline);
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 0;
  background: linear-gradient(
    112deg,
    rgba(249, 252, 255, 0.88),
    rgba(233, 244, 255, 0.72)
  );
  box-shadow:
    0 18px 52px rgba(4, 24, 62, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(18, 62, 125, 0.04);
  backdrop-filter: blur(28px) saturate(162%);
  -webkit-backdrop-filter: blur(28px) saturate(162%);
  transition:
    min-height 240ms var(--ease),
    padding 240ms var(--ease),
    background 240ms var(--ease),
    box-shadow 240ms var(--ease);
}

.site-header.is-scrolled .site-header__inner {
  min-height: 70px;
  padding-top: 6px;
  padding-bottom: 6px;
  background: linear-gradient(
    112deg,
    rgba(250, 253, 255, 0.95),
    rgba(235, 246, 255, 0.88)
  );
  box-shadow:
    0 12px 38px rgba(4, 24, 62, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(18, 62, 125, 0.06);
}

.site-header .brand {
  width: min(220px, 100%);
  min-width: 0;
}

.site-header .brand img {
  width: 100%;
  height: auto;
  filter: saturate(1.04) contrast(1.025)
    drop-shadow(0 2px 8px rgba(5, 31, 75, 0.06));
}

.site-header .desktop-nav {
  gap: clamp(12px, 2vw, 32px);
}

.site-header .desktop-nav a {
  padding: 11px 5px;
  color: #06183f;
  font-size: 14px;
  font-weight: 740;
  letter-spacing: -0.01em;
}

.site-header .desktop-nav a::after {
  right: 5px;
  bottom: 5px;
  left: 5px;
  height: 2px;
  background: linear-gradient(90deg, #1f64c0, var(--coral));
}

.site-header .button--compact {
  min-height: 48px;
  padding-inline: 21px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 12px 28px rgba(193, 16, 61, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline-color: rgba(24, 92, 188, 0.72);
  outline-offset: 3px;
}

@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .site-header__inner,
  .site-header.is-scrolled .site-header__inner {
    background: rgba(245, 250, 255, 0.97);
  }
}

/* The drawer repeats the same calm matte-glass language on tablet and mobile. */

.mobile-nav__backdrop {
  background: rgba(2, 12, 36, 0.62);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.mobile-nav__panel {
  top: 0;
  right: 0;
  bottom: 0;
  width: min(410px, 100%);
  padding: max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
    28px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-right: 0;
  border-radius: 32px 0 0 32px;
  background: linear-gradient(
    150deg,
    rgba(251, 253, 255, 0.98),
    rgba(232, 243, 255, 0.96)
  );
  box-shadow:
    -24px 0 80px rgba(2, 17, 49, 0.26),
    inset 1px 0 0 rgba(255, 255, 255, 0.84);
}

.mobile-nav__head {
  padding-bottom: 20px;
  border-bottom-color: rgba(17, 57, 115, 0.12);
  color: var(--navy-950);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mobile-nav .icon-button {
  border-color: rgba(14, 54, 113, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(4, 30, 75, 0.08);
}

.mobile-nav nav {
  margin-top: 22px;
}

.mobile-nav nav a {
  padding: 14px 2px;
  border-bottom-color: rgba(17, 57, 115, 0.1);
  color: #06183f;
  font-family: var(--font-display);
  font-size: clamp(20px, 5.8vw, 25px);
  font-weight: 700;
  letter-spacing: -0.035em;
  transition:
    color 180ms var(--ease),
    padding-left 180ms var(--ease);
}

.mobile-nav nav a:hover,
.mobile-nav nav a:focus-visible {
  padding-left: 8px;
  color: var(--blue-700);
}

/* -------------------------------------------------------------------------- */
/* Premium closing frame                                                       */
/* -------------------------------------------------------------------------- */

.site-footer {
  --footer-line: rgba(188, 226, 255, 0.14);
  --footer-muted: rgba(222, 237, 255, 0.62);
  position: relative;
  z-index: 1;
  min-height: 0;
  margin-top: -1px;
  padding: clamp(54px, 5vw, 78px) 0 24px;
  overflow: hidden;
  border-radius: clamp(34px, 4vw, 58px) clamp(34px, 4vw, 58px) 0 0;
  background:
    linear-gradient(
      118deg,
      rgba(9, 31, 68, 0.82) 0%,
      rgba(3, 14, 39, 0.38) 46%,
      rgba(2, 8, 25, 0.18) 100%
    ),
    #030a1c;
  color: var(--footer-muted);
  box-shadow:
    0 -24px 80px rgba(4, 24, 62, 0.12),
    inset 0 1px 0 rgba(147, 232, 241, 0.18);
  isolation: isolate;
}

.site-footer::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  height: auto;
  background:
    linear-gradient(
        90deg,
        transparent 2%,
        rgba(110, 225, 236, 0.76) 29%,
        rgba(125, 158, 255, 0.42) 62%,
        rgba(137, 142, 230, 0.28) 86%,
        transparent 100%
      )
      top / 100% 1px no-repeat,
    radial-gradient(
      ellipse 50% 32% at 12% -6%,
      rgba(70, 207, 225, 0.2),
      transparent 70%
    ),
    radial-gradient(
      ellipse 42% 28% at 86% 5%,
      rgba(103, 103, 228, 0.16),
      transparent 72%
    ),
    radial-gradient(
      ellipse 30% 24% at 92% 92%,
      rgba(119, 126, 221, 0.07),
      transparent 74%
    );
  content: "";
  opacity: 1;
  pointer-events: none;
}

.site-footer::after {
  position: absolute;
  z-index: -1;
  top: clamp(34px, 4vw, 62px);
  right: clamp(-190px, -8vw, -80px);
  width: clamp(520px, 47vw, 790px);
  aspect-ratio: 4 / 3;
  background: url("../assets/maps/kola-peninsula-outline.svg") center / contain
    no-repeat;
  content: "";
  opacity: 0.055;
  pointer-events: none;
  transform: rotate(-5deg);
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.site-footer__top {
  display: grid;
  grid-template-columns:
    minmax(330px, 1.26fr) minmax(190px, 0.86fr) minmax(220px, 1fr)
    minmax(150px, 0.62fr);
  align-items: start;
  gap: clamp(26px, 2.8vw, 44px);
  padding-bottom: clamp(30px, 3.2vw, 42px);
}

.site-footer__brand {
  position: relative;
  align-self: start;
  min-height: 0;
  padding: clamp(20px, 2.1vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(189, 228, 255, 0.13);
  border-radius: 27px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.018)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 64px rgba(0, 7, 27, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-footer__brand::after {
  position: absolute;
  right: 24px;
  bottom: 23px;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(119, 225, 235, 0.88);
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(105, 218, 230, 0.06),
    0 0 34px rgba(89, 220, 230, 0.38);
  content: "";
}

.site-footer__brand > img {
  width: min(304px, 100%);
  height: auto;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(250, 253, 255, 0.98), rgba(225, 237, 247, 0.93));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 32px rgba(0, 5, 20, 0.18);
  filter: none;
}

.site-footer__brand p {
  max-width: 340px;
  margin: clamp(19px, 2vw, 25px) 0 0;
  color: rgba(245, 250, 255, 0.88);
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 25px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.site-footer__top > div:not(.site-footer__brand) {
  position: relative;
  align-items: flex-start;
  padding-top: 9px;
}

.site-footer h2 {
  margin: 0 0 18px;
  color: rgba(135, 229, 238, 0.76);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-footer a,
.site-footer__top > div:not(.site-footer__brand) p {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 12px;
  color: var(--footer-muted);
  font-size: 13.5px;
  line-height: 1.48;
  text-decoration: none;
  transition:
    color 180ms var(--ease),
    border-color 180ms var(--ease),
    background-color 180ms var(--ease),
    transform 180ms var(--ease);
}

.site-footer__top > div:nth-child(2) a:first-of-type {
  margin-bottom: 15px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.5vw, 23px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.site-footer a img,
.site-footer__top p img {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-top: -5px;
  padding: 8px;
  border: 1px solid rgba(172, 220, 255, 0.12);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  filter: brightness(0) invert(1);
  opacity: 0.78;
}

.site-footer__top > div:nth-child(4) a {
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 11px 16px;
  border: 1px solid rgba(190, 227, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer__top > div:nth-child(4) a:hover {
  border-color: rgba(113, 224, 235, 0.38);
  background: rgba(105, 218, 230, 0.09);
  transform: translateY(-2px);
}

.site-footer a:focus-visible {
  outline-color: rgba(116, 226, 237, 0.86);
  outline-offset: 4px;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--footer-line);
  color: rgba(218, 233, 250, 0.43);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-footer__bottom > div {
  gap: 12px 24px;
}

.site-footer__bottom a {
  width: auto;
  margin: 0;
  color: rgba(222, 237, 255, 0.48);
}

@media (hover: hover) {
  .site-header .brand {
    transition: transform 220ms var(--ease);
  }

  .site-header .brand:hover {
    transform: translateY(-1px);
  }
}

/* -------------------------------------------------------------------------- */
/* Tablet                                                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .site-header {
    --chrome-inline: clamp(18px, 3vw, 32px);
  }

  .site-header__inner {
    grid-template-columns: 190px 1fr auto;
    gap: 16px;
  }

  .site-footer__top {
    grid-template-columns: minmax(280px, 1.2fr) repeat(3, minmax(150px, 0.72fr));
    gap: 28px;
  }
}

@media (max-width: 960px) {
  .site-header {
    --chrome-inline: clamp(14px, 3.3vw, 24px);
    top: 0;
    height: 72px;
  }

  .site-header.is-scrolled {
    top: 0;
    height: 66px;
  }

  .site-header__inner {
    min-height: 72px;
    padding-top: 8px;
    padding-bottom: 8px;
    grid-template-columns: minmax(164px, 190px) 1fr auto;
  }

  .site-header.is-scrolled .site-header__inner {
    min-height: 66px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .site-header .brand {
    width: 184px;
  }

  .site-header .menu-button {
    width: 46px;
    height: 46px;
    border-color: rgba(9, 43, 98, 0.11);
    background: rgba(255, 255, 255, 0.54);
    box-shadow:
      0 8px 22px rgba(4, 29, 73, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.82);
  }

  .site-footer {
    min-height: 0;
  }

  .site-footer::after {
    top: 64px;
    right: -190px;
    width: 620px;
    opacity: 0.07;
  }

  .site-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 44px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .site-footer__top > div:nth-child(4) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 190px));
    column-gap: 10px;
  }

  .site-footer__top > div:nth-child(4) h2 {
    grid-column: 1 / -1;
  }
}

/* -------------------------------------------------------------------------- */
/* Mobile                                                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 680px) {
  .site-header {
    --chrome-inline: max(12px, env(safe-area-inset-left));
    top: 0;
    height: 68px;
  }

  .site-header.is-scrolled {
    top: 0;
    height: 62px;
  }

  .site-header__inner {
    width: 100%;
    min-height: 68px;
    padding: 7px max(12px, env(safe-area-inset-right)) 7px
      max(12px, env(safe-area-inset-left));
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .site-header.is-scrolled .site-header__inner {
    min-height: 62px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .site-header .brand {
    width: clamp(154px, 43vw, 170px);
  }

  .site-header__actions {
    grid-column: 2;
  }

  .site-header .menu-button {
    width: 44px;
    height: 44px;
  }

  .site-header.is-scrolled .menu-button {
    width: 42px;
    height: 42px;
  }

  .mobile-nav__panel {
    width: 100%;
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
  }

  .site-footer {
    padding: 46px 0 22px;
    border-radius: 34px 34px 0 0;
  }

  .site-footer::after {
    top: 116px;
    right: -168px;
    width: 480px;
    opacity: 0.065;
    transform: rotate(-8deg);
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 28px;
  }

  .site-footer__brand {
    grid-column: auto;
    min-height: 0;
    margin-bottom: 22px;
    padding: 18px;
    border-radius: 24px;
  }

  .site-footer__brand > img {
    width: min(236px, 90%);
    padding: 10px 12px;
    border-radius: 15px;
  }

  .site-footer__brand p {
    max-width: 270px;
    margin-top: 20px;
    font-size: clamp(20px, 6.4vw, 24px);
  }

  .site-footer__top > div:not(.site-footer__brand) {
    padding: 20px 0 11px;
    border-top: 1px solid var(--footer-line);
  }

  .site-footer h2 {
    margin-bottom: 17px;
  }

  .site-footer a,
  .site-footer__top > div:not(.site-footer__brand) p {
    max-width: 330px;
    margin-bottom: 14px;
  }

  .site-footer__top > div:nth-child(2) a:first-of-type {
    font-size: clamp(21px, 6.4vw, 25px);
  }

  .site-footer__top > div:nth-child(4) {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 9px;
  }

  .site-footer__top > div:nth-child(4) h2 {
    grid-column: 1 / -1;
  }

  .site-footer__top > div:nth-child(4) a {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-top: 20px;
    line-height: 1.55;
  }

  .site-footer__bottom > div {
    display: grid;
    gap: 8px;
  }
}

@media (max-width: 390px) {
  .site-header .brand {
    width: 150px;
  }

  .site-header .menu-button {
    width: 42px;
    height: 42px;
  }

  .site-footer__brand {
    min-height: 0;
    padding: 17px;
  }

  .site-footer__brand::after {
    right: 21px;
    bottom: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__inner,
  .site-header .brand,
  .mobile-nav nav a,
  .site-footer a {
    transition: none;
  }
}
