/* ============================================
   Homepage masthead + full-bleed hero (Nov 2026)
   Two-tier transparent header over a full-bleed
   photo with a navy duotone treatment. On scroll
   the top tier folds away and the bar turns navy.
   ============================================ */

/* ---------- Masthead ---------- */
nav.masthead {
  display: block;
  padding: 0 4rem;
  background: linear-gradient(180deg, rgba(4, 12, 32, 0.55) 0%, rgba(4, 12, 32, 0) 100%);
}

nav.masthead.scrolled {
  padding: 0 4rem;
  background: rgba(8, 22, 56, 0.97);
  backdrop-filter: blur(10px);
}

.mast-top,
.mast-bottom {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.mast-top {
  height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: height 0.35s ease, opacity 0.25s ease, border-color 0.35s ease;
}

.mast-bottom {
  height: 60px;
}

/* Wordmark: crown + spaced serif caps, centered on the page */
.mast-wordmark {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
}

.mast-wordmark span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
}

/* Top-tier menus (audience + log in) */
.mast-menu {
  position: relative;
}

.mast-left {
  justify-self: start;
}

.mast-right {
  justify-self: end;
}

.mast-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  color: var(--white);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 0;
}

.mast-trigger svg,
.hero-scroll svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.mast-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mast-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  min-width: 250px;
  padding: 0.6rem 0;
  background: rgba(8, 22, 56, 0.97);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1002;
}

.mast-panel-right {
  left: auto;
  right: 0;
}

.mast-menu.open .mast-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mast-panel a {
  display: block;
  padding: 0.6rem 1.4rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.9rem;
}

.mast-panel a:hover,
.mast-panel a:focus-visible {
  color: var(--blue-light);
  background: rgba(125, 173, 255, 0.08);
}

/* Bottom tier: centered links, phone at right */
nav.masthead .nav-links {
  justify-self: center;
  gap: 2.75rem;
}

nav.masthead .nav-links a {
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

nav.masthead .nav-links a:hover {
  color: var(--blue-light);
}

.mast-phone {
  justify-self: end;
  display: inline-flex;
  color: var(--white);
  padding: 0.4rem;
}

.mast-phone svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mast-phone:hover {
  color: var(--blue-light);
}

/* Compact logo only appears once the top tier folds away */
.mast-compact {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--white);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.mast-compact span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

nav.masthead.scrolled .mast-top {
  height: 0;
  opacity: 0;
  overflow: hidden;
  border-color: transparent;
  pointer-events: none;
}

nav.masthead.scrolled .mast-compact {
  opacity: 1;
  visibility: visible;
}

nav.masthead .mobile-toggle {
  display: none;
}

/* ---------- Full-bleed hero ---------- */
.hero.hero-bleed {
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  display: flex;
  align-items: flex-end;
  background: var(--navy);
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
  background: var(--navy);
}

/* A 3:2 box that covers the hero like background-size: cover, so both
   photos share one coordinate frame and can be registered on each other. */
.hero-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100cqw, 150cqh);
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -50%) scale(1.23);
  animation: heroDrift 32s ease-in-out infinite alternate;
}

.hero-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Day shot dims as the sun goes down */
.hero-day {
  animation: duskDim 26s ease-in-out infinite;
}

/* Night shot, scaled and shifted so the skyline lines up with the day
   shot (same vantage point, slightly different framing), then dissolves in. */
.hero-night {
  opacity: 0;
  transform: translate(-10.96%, -8.3%) scale(1.053, 1.075);
  animation: dayToNight 26s ease-in-out infinite;
}

@keyframes heroDrift {
  from { transform: translate(-50%, -50%) scale(1.23); }
  to { transform: translate(-50%, -50%) scale(1.29); }
}

@keyframes dayToNight {
  0%, 16% { opacity: 0; }
  46%, 86% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes duskDim {
  0%, 16% { filter: brightness(1) saturate(1); }
  46%, 86% { filter: brightness(0.62) saturate(0.85); }
  100% { filter: brightness(1) saturate(1); }
}

/* Darken the top for the header and the bottom for the copy */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 12, 32, 0.6) 0%, rgba(4, 12, 32, 0.1) 30%, rgba(4, 12, 32, 0.15) 50%, rgba(4, 12, 32, 0.88) 100%),
    linear-gradient(90deg, rgba(4, 12, 32, 0.5) 0%, rgba(4, 12, 32, 0) 60%);
}

.hero-credit {
  position: absolute;
  z-index: 1;
  right: 1.5rem;
  bottom: 1rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
}

.hero-bleed-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4rem 7rem;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1.5rem;
}

.hero.hero-bleed h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.75rem);
  line-height: 1.06;
  font-weight: 500;
  max-width: 15ch;
  margin-bottom: 1.5rem;
}

.hero.hero-bleed .hero-sub {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 2.25rem;
}

.hero.hero-bleed .btn-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.hero.hero-bleed .hero-source {
  color: rgba(255, 255, 255, 0.5);
}

.hero-scroll {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: inline-flex;
  padding: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.hero-scroll:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ---------- Responsive ---------- */
@media (max-width: 1160px) {
  nav.masthead,
  nav.masthead.scrolled {
    padding: 0 2rem;
  }
  nav.masthead .nav-links {
    gap: 1.75rem;
  }
  .hero-bleed-inner {
    padding: 0 2rem 6rem;
  }
}

/* Below 960px: single bar with wordmark + hamburger */
@media (max-width: 960px) {
  nav.masthead,
  nav.masthead.scrolled {
    display: block;
    padding: 0 1.25rem;
  }
  .mast-top {
    display: flex;
    justify-content: space-between;
    height: 64px;
    border-bottom-color: rgba(255, 255, 255, 0.3);
  }
  nav.masthead.scrolled .mast-top {
    height: 64px;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
  }
  .mast-left,
  .mast-right,
  .mast-bottom {
    display: none;
  }
  .mast-wordmark span {
    font-size: 1.3rem;
    letter-spacing: 0.16em;
  }
  nav.masthead .mobile-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .hero.hero-bleed {
    min-height: 92svh;
    padding: 104px 0 0;
  }
  .hero.hero-bleed .hero-bleed-inner,
  .hero.hero-bleed h1,
  .hero.hero-bleed .hero-sub,
  .hero.hero-bleed .hero-eyebrow {
    text-align: left;
  }
  .hero.hero-bleed h1 {
    font-size: 2.45rem;
  }
  .hero-eyebrow {
    letter-spacing: 0.16em;
  }
  .hero-bleed-inner {
    padding: 0 1.25rem 5.5rem;
  }
  .hero.hero-bleed .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero.hero-bleed .hero-buttons a {
    text-align: center;
    justify-content: center;
  }
  .hero-scroll,
  .hero-credit {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage,
  .hero-day,
  .hero-night {
    animation: none;
  }
  .hero-night {
    opacity: 1;
  }
}

/* ---------- Stronger header and hero type ---------- */
nav.masthead .nav-links a,
.mast-trigger,
.mast-panel a {
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: 0.005em;
}

nav.masthead .nav-links a {
  font-size: 0.98rem;
}

.mast-wordmark span,
.mast-compact span {
  font-weight: 600;
}

.hero.hero-bleed h1 {
  font-weight: 600;
  letter-spacing: -0.005em;
}

.hero.hero-bleed .hero-sub {
  font-weight: 500;
}

.hero.hero-bleed .btn-primary,
.hero.hero-bleed .btn-secondary {
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 700;
}

/* ---------- Interior pages: clear the taller two-tier header ---------- */
body:has(nav.masthead) .product-hero {
  padding-top: 12rem;
}

body:has(nav.masthead) .connect-hero {
  padding-top: 10.5rem;
}

body:has(nav.masthead) .vgli-calc .wrap {
  padding-top: 168px;
}

@media (max-width: 960px) {
  body:has(nav.masthead) .product-hero {
    padding-top: 7.5rem;
  }
  body:has(nav.masthead) .connect-hero {
    padding-top: 6.5rem;
  }
  body:has(nav.masthead) .vgli-calc .wrap {
    padding-top: 104px;
  }
}
