/* ============================================================
   Pōmaikaʻi Ventures — premium upgrades layer
   Constellation heroes, scroll reveals, hover micro-interactions,
   compact nav dropdown, 404 page, legal page typography.
   ============================================================ */

/* ===== Hero (image-backed) =====
   Photographic hero with per-page custom artwork. Each page sets
   data-hero="firm|investors|founders" on .hero — the picture inside
   .hero-bg supplies the actual image (WebP + JPG fallback). The
   left-side navy scrim guarantees legibility for the headline. */
.hero[data-hero] {
  position: relative;
  background: var(--navy, #0E1B2C);
  overflow: hidden;
}
.hero[data-hero] .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero[data-hero] .hero-bg picture,
.hero[data-hero] .hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero[data-hero] .hero-bg img {
  object-fit: cover;
  object-position: 100% center;
}
/* Mobile: push artwork further right + lower so it lives in the bottom
   corner below copy, not under it. */
@media (max-width: 760px) {
  .hero[data-hero] .hero-bg img {
    object-position: 90% 100%;
  }
}
/* Subtle atmospheric glow layer — gives extra depth without competing */
.hero[data-hero] .hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, transparent 40%, rgba(14, 27, 44, 0.30) 100%);
  z-index: 1;
  pointer-events: none;
}
/* Text-side scrim — deep navy holds the headline column, then fades
   to fully transparent past the typography to reveal the imagery.
   Sits ABOVE the image but BELOW .hero-inner. */
.hero[data-hero] .hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(14, 27, 44, 1.00) 0%,
    rgba(14, 27, 44, 1.00) 38%,
    rgba(14, 27, 44, 0.92) 52%,
    rgba(14, 27, 44, 0.55) 66%,
    rgba(14, 27, 44, 0.18) 82%,
    rgba(14, 27, 44, 0.00) 100%
  );
  z-index: 2;
  pointer-events: none;
}
/* On narrow viewports text spans full width — hold navy almost fully
   opaque through the entire copy column, then release just at the very
   bottom edge so a quiet hint of artwork peeks through. */
@media (max-width: 760px) {
  .hero[data-hero] .hero-bg::after {
    background: linear-gradient(
      180deg,
      rgba(14, 27, 44, 1.00) 0%,
      rgba(14, 27, 44, 1.00) 55%,
      rgba(14, 27, 44, 0.94) 70%,
      rgba(14, 27, 44, 0.78) 84%,
      rgba(14, 27, 44, 0.45) 94%,
      rgba(14, 27, 44, 0.20) 100%
    );
  }
}
/* The container needs to layer above the hero-bg */
.hero[data-hero] .hero-inner,
.hero[data-hero] .container {
  position: relative;
  z-index: 1;
}
/* End image hero */

/* ===== Compact nav dropdown =====
   Replaces the legacy full-screen mobile menu. Shown at all viewport
   widths via the hamburger toggle. The toggle is now visible on desktop
   too — confirmed UX direction from the user. The dropdown is a small
   panel anchored under the toggle, never covers the page, never locks
   scroll, and closes on outside click / Escape / link select. */

/* Always show the toggle (override the old desktop-hides rule) */
.nav-toggle { display: flex !important; position: relative; z-index: 102; }

/* Convert the legacy fixed-overlay mobile menu into a compact dropdown */
.mobile-menu {
  position: absolute !important;
  inset: auto 24px auto auto !important;
  top: calc(100% + 8px) !important;
  right: 24px !important;
  left: auto !important;
  bottom: auto !important;
  width: 280px;
  background: var(--navy, #0E1B2C);
  border: 1px solid rgba(246, 240, 227, 0.12);
  border-radius: 6px;
  box-shadow:
    0 24px 48px -16px rgba(0, 0, 0, 0.55),
    0 8px 18px -8px rgba(0, 0, 0, 0.35);
  padding: 14px !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 101;
  overflow: hidden;
  transform-origin: top right;
  animation: pv-menu-pop 220ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.mobile-menu[hidden] { display: none !important; }

@keyframes pv-menu-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Soft Terra hairline at the top of the panel — echoes the modal */
.mobile-menu::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--terra, #8C4622);
  opacity: 0.85;
}

.mobile-menu a,
.mobile-menu button {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  font-weight: 500;
  padding: 12px 14px !important;
  border: none !important;
  border-radius: 4px;
  color: rgba(246, 240, 227, 0.85) !important;
  background: transparent !important;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  text-decoration: none;
  display: block;
  width: 100%;
  margin: 0 !important;
}
.mobile-menu a:hover,
.mobile-menu button:hover {
  background: rgba(246, 240, 227, 0.05) !important;
  color: var(--gold, #C9A96E) !important;
}

/* Final CTA button keeps its gold treatment, just sized into the panel */
.mobile-menu .btn.btn-gold {
  margin-top: 8px !important;
  background: var(--gold, #C9A96E) !important;
  color: var(--navy, #0E1B2C) !important;
  font-weight: 600;
  text-align: center;
  padding: 13px 14px !important;
  letter-spacing: 0.14em !important;
}
.mobile-menu .btn.btn-gold:hover {
  background: var(--gold-3, #D9B97C) !important;
  color: var(--navy, #0E1B2C) !important;
}

/* Hide the desktop nav-links and CTA when in dropdown mode — we now have a
   single source of truth in the dropdown, simpler and avoids duplicate UI.
   Brand mark + dropdown toggle remain. */
.nav-links { display: none !important; }
.nav-cta { display: none !important; }

/* Make sure the nav-inner is the positioning context for the dropdown.
   Do NOT override .nav position — it stays fixed (existing behavior). */
.nav .nav-inner { position: relative; }

/* Animated hamburger -> X when expanded */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
.nav-toggle span {
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 180ms ease !important;
}
/* End compact nav dropdown */

/* ===== Legacy hero photo background (retired — kept for reference) ===== */
.hero-photo .hero-photo-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-photo .hero-photo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Subtle entry — fades from black on first paint */
  animation: pv-hero-fade 1400ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  filter: saturate(0.95);
}
.hero-photo .hero-topo {
  /* Soften the topo so the photo reads as primary */
  opacity: 0.35;
  mix-blend-mode: screen;
}
.hero-photo .hero-vignette {
  /* Layered scrim system:
     1. Strong left-anchored horizontal scrim covering headline + body
     2. Mid-band darkening to neutralize the bright orange horizon
     3. Soft right-side outer vignette */
  background:
    /* Mid-band darkening — covers vertical zone where photo's bright band sits */
    linear-gradient(180deg, transparent 0%, transparent 32%, rgba(14, 27, 44, 0.55) 48%, rgba(14, 27, 44, 0.6) 62%, transparent 90%),
    /* Bottom soft fade for visual anchor */
    linear-gradient(180deg, rgba(14, 27, 44, 0.25) 0%, transparent 25%, transparent 70%, rgba(14, 27, 44, 0.45) 100%),
    /* Strong left horizontal scrim for headline + body contrast — covers ~75% of width */
    linear-gradient(90deg, rgba(14, 27, 44, 0.88) 0%, rgba(14, 27, 44, 0.78) 35%, rgba(14, 27, 44, 0.55) 60%, rgba(14, 27, 44, 0.18) 80%, transparent 100%),
    /* Outer vignette */
    radial-gradient(ellipse 110% 90% at 80% 50%, transparent 30%, rgba(14, 27, 44, 0.3) 100%);
}

/* On narrow viewports text spans full width — use a fuller scrim */
@media (max-width: 760px) {
  .hero-photo .hero-vignette {
    background:
      /* Strong overall darkening on mobile so text spans the full width legibly */
      linear-gradient(180deg, rgba(14, 27, 44, 0.6) 0%, rgba(14, 27, 44, 0.65) 30%, rgba(14, 27, 44, 0.78) 50%, rgba(14, 27, 44, 0.78) 70%, rgba(14, 27, 44, 0.85) 100%),
      radial-gradient(ellipse 120% 100% at 50% 50%, transparent 30%, rgba(14, 27, 44, 0.4) 100%);
  }
}

/* ===== Hero typography refinements ===== */
.hero-photo .eyebrow,
.hero .eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
}
.hero-photo h1 .italic,
.hero-photo h1 em,
.hero h1 em {
  letter-spacing: 0.005em;
}
.hero-photo .lead,
.hero .lead {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(246, 240, 227, 0.92);
  text-shadow: 0 1px 2px rgba(14, 27, 44, 0.35);
}
@media (max-width: 760px) {
  .hero-photo h1,
  .hero h1 { font-size: clamp(34px, 9vw, 44px) !important; }
  .hero-photo .lead,
  .hero .lead { font-size: 16px; }
}
.hero-photo h1,
.hero-photo .eyebrow {
  text-shadow: 0 1px 3px rgba(14, 27, 44, 0.4);
}

/* ===== Legibility pass: italic finishers + photo eyebrows =====
   Gold (#C9A96E) at ~67% lightness sits too close in luminance to the
   cream sky and Terra horizon band in both hero photos. Switching the
   italic finisher and photo-page eyebrow to cream restores contrast;
   italics still do the visual differentiation work color was after.
   Gold remains for buttons, nav hover, and eyebrows over solid navy. */
.display em,
.hero-photo h1 em,
.hero h1 em,
.hero-photo h1 .italic {
  color: var(--cream, #F6F0E3);
  text-shadow: 0 1px 4px rgba(14, 27, 44, 0.55);
}

/* Photo-page eyebrows: cream tracked uppercase + small Terra leading rule.
   Targets the hero eyebrow on /investors and /founders specifically.
   /firm and content-section eyebrows over solid navy keep their Terra/gold. */
.hero-photo .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream, #F6F0E3);
  text-shadow: 0 1px 3px rgba(14, 27, 44, 0.55);
}
.hero-photo .eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--terra, #8C4622);
  flex: 0 0 auto;
}

@keyframes pv-hero-fade {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }

/* Smooth anchor scrolling, with offset for sticky nav */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }

/* ===== Link / button hover micro-interactions ===== */
.nav-link, .footer-links a {
  position: relative;
  transition: color 200ms ease;
}
.nav-link::after, .footer-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav-link:hover::after, .footer-links a:hover::after {
  transform: scaleX(1);
}

.btn {
  transition:
    background 200ms ease,
    color 200ms ease,
    transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 200ms ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-gold:hover, .btn-terra:hover {
  box-shadow: 0 8px 22px -10px rgba(140, 70, 34, 0.45);
}

/* ===== Footer legal row ===== */
.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0 0;
  font-size: 12px;
  color: rgba(246, 240, 227, 0.45);
  letter-spacing: 0.04em;
}
.footer-legal a {
  color: rgba(246, 240, 227, 0.6);
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-legal a:hover { color: var(--cream, #F6F0E3); }
.footer-legal .sep { color: rgba(246, 240, 227, 0.25); }

/* ===== Legal page typography ===== */
.legal-page {
  background: var(--cream, #F6F0E3);
  color: var(--navy, #0E1B2C);
  min-height: 100vh;
  padding: 140px 0 96px;
}
.legal-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 28px;
}
.legal-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8C4622;
  font-weight: 600;
  margin: 0 0 16px;
}
.legal-title {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #0E1B2C;
  margin: 0 0 12px;
}
.legal-meta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: rgba(14, 27, 44, 0.55);
  margin: 0 0 56px;
  letter-spacing: 0.02em;
}
.legal-rule {
  border: none;
  border-top: 1px solid rgba(140, 70, 34, 0.4);
  width: 56px;
  margin: 0 0 56px;
}
.legal-page h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0E1B2C;
  margin: 56px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(14, 27, 44, 0.12);
}
.legal-page h2:first-of-type { margin-top: 0; }
.legal-page p,
.legal-page li {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(14, 27, 44, 0.82);
  margin: 0 0 14px;
}
.legal-page strong { color: #0E1B2C; font-weight: 600; }
.legal-page ul {
  margin: 0 0 18px;
  padding-left: 22px;
}
.legal-page ul li { margin-bottom: 8px; }
.legal-page a {
  color: #8C4622;
  text-decoration: none;
  border-bottom: 1px solid rgba(140, 70, 34, 0.3);
  transition: border-color 180ms ease;
}
.legal-page a:hover { border-bottom-color: #8C4622; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 64px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: #8C4622;
  text-decoration: none;
  border-bottom: none;
}
.legal-back:hover { color: #5C2C16; border-bottom: none; }

/* Legal page nav: simpler than main site */
.legal-page .nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 1px solid rgba(14, 27, 44, 0.08);
  color: #0E1B2C;
}
.legal-page .nav .brand-name { color: #0E1B2C; }

/* ===== 404 page ===== */
.notfound-page {
  background: var(--navy, #0E1B2C);
  color: var(--cream, #F6F0E3);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 28px;
  position: relative;
  overflow: hidden;
}
.notfound-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 30%, rgba(140, 70, 34, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 100% 70% at 50% 100%, rgba(14, 27, 44, 0.6) 0%, transparent 70%);
}
.notfound-inner {
  position: relative;
  text-align: center;
  max-width: 560px;
}
.notfound-mark {
  width: 56px;
  height: 56px;
  color: var(--cream, #F6F0E3);
  margin: 0 auto 28px;
  opacity: 0.85;
}
.notfound-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #C9A96E;
  font-weight: 600;
  margin: 0 0 14px;
}
.notfound-title {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1.1;
  margin: 0 0 18px;
  color: var(--cream, #F6F0E3);
}
.notfound-sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(246, 240, 227, 0.7);
  margin: 0 0 36px;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}
.notfound-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .hero-photo .hero-photo-img img,
  .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== Skip-to-content (a11y) ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--cream, #F6F0E3);
  color: var(--navy, #0E1B2C);
  padding: 12px 18px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 0 0 6px 0;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.4);
}
.skip-link:focus {
  left: 0;
  top: 0;
  outline: 2px solid #C9A96E;
  outline-offset: 2px;
}

/* ===== Modal submit loading state ===== */
.inquiry-submit[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
  cursor: progress;
}
.inquiry-submit[aria-busy="true"]::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: pv-spin 700ms linear infinite;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }
