/* ==========================================================================
   Verastate shared shell
   Tokens, nav, layout, footer, mobile nav, cookie banner.
   Page-specific CSS stays in each page's own <style> block, which is loaded
   after this file and therefore wins on equal specificity.
   ========================================================================== */

:root {
  --blue: #004370;
  --blue-dark: #003360;
  --blue-mid: #0060A8;
  --blue-light: #0098f2;
  --blue-subtle: #E8F4FD;
  --gold: #C9A52A;
  --gold-subtle: #FDF6E3;
  --charcoal: #1C1F2E;
  --muted: #666666;
  --border: #E8E8E8;
  --bg: #FAFAFA;
  --green: #5D9C06;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--charcoal); -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4,.display { font-family: 'DM Sans', sans-serif; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1.5px solid var(--gold); height: 52px; display: flex; align-items: center; }
.nav-inner { max-width: 1200px; margin: 0 auto; width: 100%; padding: 0 24px; display: flex; align-items: center; gap: 0; }
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; margin-right: 32px; }
.nav-logo img { width: 28px; height: 28px; border-radius: 8px; }
.nav-logo-text { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 14px; color: var(--charcoal); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link { font-size: 14px; font-weight: 400; color: var(--muted); text-decoration: none; padding: 4px 12px; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.nav-link:hover { color: var(--blue); }
.nav-link.active { color: var(--blue); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* .btn-ghost-nav and .btn-nav-primary are styled by the button system below. */

/* LAYOUT */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* FOOTER */
footer { background: var(--charcoal); padding: 48px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(4,1fr); gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand-desc { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.7; margin-top: 12px; max-width: 240px; }
.footer-logo-row { display: flex; align-items: center; gap: 8px; }
.footer-logo-row img { width: 24px; height: 24px; border-radius: 8px; }
.footer-logo-row span { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 14px; color: #fff; }
.footer-col h2 { font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 300; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,0.6); text-decoration: none; margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 24px; display: flex; align-items: center; justify-content: space-between; }
.footer-bottom p { font-size: 14px; color: rgba(255,255,255,0.6); }

/* MOBILE NAV */
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 4px; justify-content: center; align-items: center; width: 36px; height: 36px; margin-left: auto; border-radius: 8px; flex-shrink: 0; }
.nav-hamburger span { display: block; width: 20px; height: 2px; background: var(--charcoal); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-nav { display: none; position: fixed; top: 52px; left: 0; right: 0; bottom: 0; background: #fff; z-index: 99; padding: 8px 24px 24px; overflow-y: auto; border-top: 1px solid var(--border); }
.mobile-nav.open { display: flex; flex-direction: column; }
.mobile-nav-link { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500; color: var(--charcoal); text-decoration: none; padding: 16px 0; border-bottom: 1px solid var(--border); transition: color 0.15s; }
.mobile-nav-link:hover { color: var(--blue); }
.mobile-nav-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
/* .mobile-nav-ghost and .mobile-nav-cta are styled by the button system below. */

/* COOKIE BANNER */
.cookie-banner { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: #1C1F2E; border-top: 2px solid #C9A52A; padding: 12px 24px; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cookie-text { font-family: 'DM Sans', sans-serif; font-size: 14px; color: rgba(255,255,255,0.6); margin: 0; line-height: 1.5; flex: 1; min-width: 200px; }
.cookie-text a { color: #C9A52A; text-decoration: underline; }
/* Fill, border, and sizing come from the button system below (secondary style);
   only the wrap behaviour is specific to the banner. */
.cookie-btn { white-space: nowrap; }

/* RESPONSIVE - shared nav only. Footer responsive rules stay page-local
   because the column gap differs per page. */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
}

/* ==========================================================================
   BUTTONS
   Five styles from the brand guide. Legacy class names are aliased onto the
   modifiers so page markup does not have to change.
     primary    blue fill, white text, --blue-dark on hover
     ghost      transparent, gold border
     secondary  white fill, gold border
     white      white fill on a blue band
     email      gold fill, gradient on hover (the one sanctioned gold fill)
   ========================================================================== */

.btn,
.btn-nav-primary, .btn-primary, .btn-primary-lg, .btn-submit,
.btn-coming-soon, .btn-primary-cta, .mobile-nav-cta,
.btn-ghost-nav, .btn-outline, .btn-outline-lg, .mobile-nav-ghost,
.btn-read, .cookie-btn,
.btn-white, .btn-white-ghost, .btn-outline-white,
.email-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}

/* compact size: nav bar, cookie banner, inline card action */
.btn-nav-primary, .btn-ghost-nav, .cookie-btn, .btn-read { padding: 8px 16px; }

/* primary */
.btn-primary-mod,
.btn-nav-primary, .btn-primary, .btn-primary-lg, .btn-submit,
.btn-coming-soon, .btn-primary-cta, .mobile-nav-cta { color: #fff; background: var(--blue); }
.btn-nav-primary:hover, .btn-primary:hover, .btn-primary-lg:hover, .btn-submit:hover,
.btn-coming-soon:hover, .btn-primary-cta:hover, .mobile-nav-cta:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* ghost - transparent with a gold border */
.btn-ghost-nav, .btn-outline, .btn-outline-lg, .mobile-nav-ghost { color: var(--charcoal); background: transparent; border-color: var(--gold); }
.btn-ghost-nav:hover, .btn-outline:hover, .btn-outline-lg:hover, .mobile-nav-ghost:hover { background: var(--gold-subtle); color: var(--charcoal); }

/* ghost on a dark or blue band - same gold border, white label for contrast */
.btn-white-ghost, .btn-outline-white { color: #fff; background: transparent; border-color: var(--gold); }
.btn-white-ghost:hover, .btn-outline-white:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }

/* secondary - white fill with a gold border */
.btn-read, .cookie-btn { color: var(--charcoal); background: #fff; border-color: var(--gold); }
.btn-read:hover, .cookie-btn:hover { background: var(--gold-subtle); }

/* white on blue */
.btn-white { color: var(--blue); background: #fff; }
.btn-white:hover { background: #F0F0F0; transform: translateY(-1px); }

/* email capture - the only sanctioned gold fill */
.email-btn { color: #1C1F2E; background: var(--gold); white-space: nowrap; }
.email-btn:hover { background: linear-gradient(135deg,#C9A52A,#D9B030); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,165,42,0.35); }

.btn:active, .btn-nav-primary:active, .btn-primary:active, .btn-primary-lg:active,
.btn-submit:active, .btn-coming-soon:active, .btn-primary-cta:active,
.mobile-nav-cta:active, .btn-white:active, .btn-outline-white:active,
.btn-white-ghost:active, .email-btn:active { transform: translateY(0); }

.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* focus-visible on every interactive control.
   Dual ring: a single colour cannot stay visible across white, --blue, charcoal
   and the gold button. White alone is 1.0:1 on white; charcoal alone is 1.59:1
   on --blue. Pairing them means one component always has strong contrast
   (worst case 6.93:1). */
.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--charcoal);
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Skip link. Visually hidden until focused, then pinned top-left.
   Without it, /legal makes a keyboard user pass 23 sidebar links first. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 24px;
  background: var(--charcoal);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* Respect a reduced-motion preference. Covers the fadeUp keyframes, the
   IntersectionObserver .fade-up reveals, and every transform hover. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fu, .fade-up, .reveal { opacity: 1 !important; transform: none !important; }
}
