/* ═══════════════════════════════════════════
   HEADWATER CAPITAL — Shared Styles
   ═══════════════════════════════════════════ */

/* ═════ FONTS ═════ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700&display=swap');
@import url('https://fonts.cdnfonts.com/css/pp-neue-montreal');

/* ═════ ROOT VARIABLES ═════ */
:root {
  --deep: #1e3a4a;
  --ocean: #264a5a;
  --shore: #f4f1eb;
  --parch: #faf8f4;
  --white: #ffffff;
  --ink: #111827;
  --ink-70: #374151;
  --ink-50: #6b7280;
  --ink-30: #d1d5db;
  --ink-10: #f3f4f6;
  --teal: #7fb3b8;
  --gold: #7fb3b8;
  --gold-hover: #6da3a8;
  --line-lt: #e5e7eb;
  --mw: 1280px;
}

/* ═════ GLOBAL RESET ═════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'PP Neue Montreal', sans-serif;
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'PP Neue Montreal', sans-serif; font-weight: 500; }
h4 { font-family: 'PP Neue Montreal', sans-serif; font-weight: 500; }

/* ═════ WRAPPER ═════ */
.w { padding: 0 100px; max-width: 1600px; margin: 0 auto; }

/* ═════ NOISE TEXTURE ═════ */
.tex::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .028; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E") repeat;
  background-size: 256px;
}

/* ═════ SKIP LINK ═════ */
.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 300;
  background: var(--deep); color: var(--shore); padding: 12px 24px;
  text-decoration: none; font-size: 14px; font-weight: 500;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ═════ PRELOADER ═════ */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--deep);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .35s cubic-bezier(.22, 1, .36, 1);
}
.preloader.done { opacity: 0; pointer-events: none; }
.preloader-mark path, .preloader-mark line {
  opacity: 0;
  transform-origin: center bottom;
  transform: translateY(8px) scale(.92);
  animation: pathIn .6s cubic-bezier(.22, 1, .36, 1) forwards;
}
.preloader-mark path:nth-child(1) { animation-delay: .25s; }
.preloader-mark path:nth-child(2) { animation-delay: .5s; }
.preloader-mark path:nth-child(3) { animation-delay: .75s; }
.preloader-mark line { animation-delay: 1s; }
@keyframes pathIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═════ REDUCED MOTION ═════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .preloader { display: none; }
}

/* ═════ NAVIGATION ═════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 32px 0;
  transition: all .6s cubic-bezier(.22, 1, .36, 1);
}
body.banner-visible nav { top: 40px; }
nav.scrolled {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(24px);
  padding: 16px 0;
  border-bottom: 1px solid var(--line-lt);
}
nav.scrolled .n-logo { color: var(--ink); }
nav.scrolled .n-links a { color: var(--ink-70); }
nav.scrolled .n-links a:hover { color: var(--ink); }
nav.scrolled .n-cta { color: var(--white); background: var(--deep); backdrop-filter: none; }
nav.scrolled .n-cta:hover { background: var(--teal); }

nav .w { display: flex; justify-content: space-between; align-items: center; }
.n-logo {
  font-family: 'Outfit', sans-serif; font-size: 1.75rem; font-weight: 700;
  color: var(--shore); letter-spacing: -.03em; text-transform: none;
  text-decoration: none; transition: color .3s, opacity .3s;
}
.n-logo:hover { opacity: .7; }
.n-links { display: flex; gap: 48px; list-style: none; }
.n-links a {
  color: rgba(244, 241, 235, .95); text-decoration: none;
  font-size: 15px; font-weight: 500; letter-spacing: .05em;
  transition: color .3s;
}
.n-links a:hover { color: var(--shore); }
.n-links a.active { color: var(--shore); border-bottom: 1px solid var(--shore); padding-bottom: 2px; }
.n-cta {
  font-size: 13px; font-weight: 600; letter-spacing: .05em;
  color: var(--shore); background: rgba(244, 241, 235, .1); padding: 12px 28px;
  text-decoration: none; transition: all .4s;
  border-radius: 4px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.n-cta:hover { background: rgba(244, 241, 235, .18); transform: translateY(-1px); }

/* Hamburger */
.n-burger {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 5px; z-index: 201;
}
.n-burger span {
  display: block; width: 24px; height: 2px; background: var(--shore);
  transition: all .3s;
}
nav.scrolled .n-burger span { background: var(--ink); }
.n-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.n-burger.open span:nth-child(2) { opacity: 0; }
.n-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu overlay */
.n-mobile {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: var(--deep); flex-direction: column; align-items: center;
  justify-content: center; gap: 32px;
}
.n-mobile.open { display: flex; }
.n-mobile a {
  color: var(--shore); text-decoration: none; font-size: 24px;
  font-family: 'PP Neue Montreal', sans-serif; transition: opacity .3s;
}
.n-mobile a:hover { opacity: .7; }
.n-mobile .n-cta-mobile {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--deep);
  background: var(--shore);
  padding: 14px 36px;
  border-radius: 4px;
}

/* ═════ FOOTER ═════ */
footer { padding: 80px 0 48px; background: var(--deep); color: rgba(244,241,235,.6); }

/* ═════ SHIMMER BAND ═════ */
.shimmer-band { width: 100%; height: 438px; overflow: hidden; }
.shimmer-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(2, 1fr);
  width: 100%; height: 100%;
}
.shimmer-grid .tile {
  position: relative; overflow: hidden;
  background-size: 700% 200%; background-image: url('/assets/tiled-footer.png');
  animation: shimmer-bright var(--dur) ease-in-out infinite var(--delay);
}
.shimmer-grid .tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 20%, rgba(180,210,255,0.06) 45%, rgba(180,210,255,0.10) 50%, rgba(180,210,255,0.06) 55%, transparent 80%);
  background-size: 300% 300%;
  animation: shimmer-highlight calc(var(--dur) * 1.3) ease-in-out infinite calc(var(--delay) + 0.5s);
}
@keyframes shimmer-bright {
  0%, 100% { filter: brightness(0.92); }
  50% { filter: brightness(1.12); }
}
@keyframes shimmer-highlight {
  0% { background-position: 200% 200%; }
  100% { background-position: -100% -100%; }
}

.ft-top { display: grid; grid-template-columns: 2fr 1fr; gap: 60px; padding-bottom: 64px; border-bottom: 1px solid rgba(244,241,235,.1); }
.ft-brand { }
.ft-logo { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--shore); letter-spacing: -.02em; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.ft-tagline { font-size: 15px; line-height: 1.6; color: rgba(244,241,235,.5); max-width: 320px; }
.ft-col h4 { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(244,241,235,.35); margin-bottom: 24px; }
.ft-col a { display: block; font-size: 15px; color: rgba(244,241,235,.6); text-decoration: none; margin-bottom: 14px; transition: color .3s; }
.ft-col a:hover { color: var(--shore); }
.ft-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; }
.ft-bottom span { font-size: 13px; color: rgba(244,241,235,.3); }
.ft-bottom a { color: rgba(244,241,235,.3); text-decoration: none; transition: color .3s; }
.ft-bottom a:hover { color: rgba(244,241,235,.6); }

/* ═════ SHARED RESPONSIVE ═════ */
@media (max-width: 1024px) {
  .w { padding: 0 48px; }
  .ft-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .n-logo svg { height: 44px !important; }
}
@media (max-width: 810px) {
  .n-links { display: none; }
  .n-cta { display: none; }
  .n-burger { display: flex; }
}
@media (max-width: 700px) {
  .w { padding: 0 24px; }
  .n-logo svg { height: 36px !important; margin-right: 8px !important; }
  .n-logo { font-size: 1.4rem; }
  .ft-top { grid-template-columns: 1fr; gap: 32px; }
  .ft-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
