/* Light Water - shared site chrome.
   Tokens, base type, nav, page header, footer and motion. Loaded on every page
   before the page-specific stylesheet (dispatch/article.css, careers/careers.css). */

:root {
  color-scheme: light;

  /* Brand palette (see documentation/LightWater_BrandGuide.html) */
  --navy:       #1E3A5F;
  --navy-mid:   #2E5075;
  --navy-lt:    #4A7AA0;
  --teal:       #6BBFB5;
  --teal-dk:    #3E8F86; /* teal for text on light grounds (AA) */
  --teal-lt:    #A2D4CE;
  --sky-pale:   #D9EDF8;
  --sun:        #F2D978;
  --sun-lt:     #F8EBB0;
  --warm-white: #FAFAF8;
  --off-white:  #F4F2EE;
  --sand:       #EBE9E5;
  --mid-gray:   #9A9A96;
  --lt-gray:    #E8E7E3;
  --body-text:  #3A3A38;
  --muted:      #5E5E5A; /* secondary copy; replaces opacity-faded text */
  --rule:       rgba(30,58,95,0.12);

  /* Layout */
  --gutter:    clamp(20px, 5vw, 64px);
  --max:       1200px;
  --measure:   760px;  /* reading column for articles and role pages */
  --nav-h:     72px;
  --section-y: clamp(72px, 10vw, 128px);

  /* Type scale (fluid) */
  --fs-label:   12px;
  --fs-small:   14px;
  --fs-body:    clamp(16px, 0.25vw + 15px, 17px);
  --fs-h3:      clamp(21px, 0.6vw + 18px, 24px);
  --fs-h2:      clamp(30px, 2.4vw + 20px, 44px);
  --fs-lede:    clamp(22px, 1.6vw + 16px, 32px);
  --fs-title:   clamp(40px, 4.8vw + 18px, 76px);
  --fs-display: clamp(48px, 7vw + 16px, 104px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px; scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--body-text);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; }
img { height: auto; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--navy); color: #fff;
  padding: 8px 16px; font-size: 13px; z-index: 9999;
}
.skip-link:focus { top: 0; }

.container {
  width: 100%; max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto; padding: 0 var(--gutter);
}

/* Shared type */
.eyebrow {
  display: block;
  font-size: var(--fs-label); font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--teal-dk);
}
.h2 {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -0.01em;
  color: var(--navy); text-wrap: balance;
}
.label-link {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px;
  font-size: var(--fs-label); font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none;
}
.label-link span { padding-bottom: 4px; border-bottom: 1px solid currentColor; border-color: inherit; }
.label-link svg { flex-shrink: 0; transition: transform 0.2s; }
.label-link:hover svg { transform: translateX(4px); }

/* Buttons (sun CTA) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  background: var(--sun); color: var(--navy);
  border-radius: 6px; text-decoration: none;
  font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
}
.btn:hover { background: #F0D05A; transform: translateY(-1px); }
.btn svg { transition: transform 0.2s; }
.btn:hover svg { transform: translateX(2px); }

/* NAV - scoped to #nav so in-page <nav> elements (breadcrumbs) are not made fixed */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(250,250,248,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.3s;
}
#nav.scrolled { box-shadow: 0 2px 24px rgba(30,58,95,0.07); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-home { display: block; }
.nav-logo { display: block; height: 56px; width: auto; }
.nav-links { list-style: none; display: flex; gap: 8px; }
.nav-links a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-size: var(--fs-label); font-weight: 400; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--navy);
  text-decoration: none; opacity: 0.65; transition: opacity 0.2s;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a.active { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 6px; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; cursor: pointer; color: var(--navy);
  align-items: center; justify-content: center;
}
.nav-toggle .bar, .nav-toggle .bar::before, .nav-toggle .bar::after {
  display: block; width: 22px; height: 1.5px; background: currentColor;
  transition: transform 0.25s, background 0.25s; position: relative;
}
.nav-toggle .bar::before, .nav-toggle .bar::after { content: ''; position: absolute; left: 0; }
.nav-toggle .bar::before { top: -7px; }
.nav-toggle .bar::after  { top: 7px; }
#nav.open .nav-toggle .bar { background: transparent; }
#nav.open .nav-toggle .bar::before { transform: translateY(7px) rotate(45deg); }
#nav.open .nav-toggle .bar::after  { transform: translateY(-7px) rotate(-45deg); }

/* PAGE HEADER - navy band used by the Dispatch index, Careers and articles */
.page-header {
  background: var(--navy);
  padding: calc(var(--nav-h) + clamp(48px, 7vw, 96px)) 0 clamp(48px, 6vw, 80px);
  position: relative; overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute; bottom: 0; right: 0; width: 60%; height: 90%;
  background: radial-gradient(ellipse at bottom right, rgba(107,191,181,0.10) 0%, transparent 65%);
  pointer-events: none;
}
.page-header-inner { position: relative; z-index: 1; }
.page-eyebrow {
  display: block;
  font-size: var(--fs-label); font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--teal); margin-bottom: clamp(16px, 2vw, 22px);
}
.page-title {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: var(--fs-title); line-height: 1.0; letter-spacing: -0.02em;
  color: rgba(255,255,255,0.94);
  margin-bottom: clamp(18px, 2.4vw, 28px);
  text-wrap: balance;
}
.page-desc {
  font-size: var(--fs-body); line-height: 1.75;
  color: rgba(255,255,255,0.7);
  max-width: 52ch;
}

/* FOOTER */
.site-footer { background: var(--navy); padding: clamp(48px, 6vw, 72px) 0 clamp(32px, 4vw, 44px); }
.footer-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 40px; margin-bottom: clamp(36px, 5vw, 56px);
}
.footer-logo { display: block; height: 80px; width: auto; opacity: 0.9; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.footer-links a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--sun); }
.footer-bottom {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 32px;
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 28px;
}
.footer-legal { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.5); max-width: 620px; }
.footer-location {
  font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); white-space: nowrap;
}

/* MOTION */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* RESPONSIVE */
@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .nav-logo { height: 48px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--warm-white);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(30,58,95,0.08);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  #nav.open .nav-links { visibility: visible; opacity: 1; transform: none; }
  .nav-links li + li { border-top: 1px solid var(--rule); }
  .nav-links a { min-height: 52px; padding: 0; font-size: 13px; opacity: 0.85; }
  .nav-links a.active { text-decoration: none; color: var(--teal-dk); }

  .footer-top { flex-direction: column; gap: 28px; }
  .footer-links { margin-left: -12px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
