/* ====== TOKENS ====== */
:root {
  --royal: #2952C2;
  --royal-dark: #1E3F9C;
  --royal-tint: #EAEFFA;
  --orange: #F26B22;
  --orange-dark: #C2541A;
  --orange-tint: #FDEEE3;
  --ink: #14182B;
  --ink-soft: #2B304A;
  --slate: #6B7280;
  --hairline: #E5E7EB;
  --paper: #FFFFFF;
  --off: #F7F5F0;
  --cream: #FAF8F3;
  --green: #1B9E5A;
  --green-tint: #E6F4EC;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}

/* ====== RESET & BASE ====== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ====== CONTAINERS ====== */
.container        { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-tight  { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 820px;  margin: 0 auto; padding: 0 32px; }

/* ====== NAV ====== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
  transition: background 0.3s, border-color 0.3s, padding 0.25s, backdrop-filter 0.3s;
  padding: 14px 0;
}
.nav.scrolled { padding: 10px 0; border-bottom-color: var(--hairline); }
/* Hide border when nav is fresh (avoids hard line above dark hero sections) */
.nav:not(.scrolled):not(.nav-hero) { border-bottom-color: transparent; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo-img { height: 36px; width: auto; display: block; transition: height 0.25s, filter 0.3s; }
.nav.scrolled .logo-img { height: 32px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-family: var(--body); font-size: 14px; font-weight: 500;
  color: var(--ink-soft); transition: color 0.2s;
}
.nav-links a:not(.nav-cta):hover { color: var(--royal); }
.nav-links a.active { color: var(--royal); }
.nav-cta {
  background: var(--orange); color: white !important;
  padding: 11px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  transition: background 0.2s, transform 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.nav-cta:hover { background: var(--orange-dark); transform: translateY(-1px); }
.nav-cta::after { content: '→'; font-size: 16px; }

/* Mobile right side: CTA + hamburger */
.nav-mobile-right {
  display: none;
  align-items: center;
  gap: 10px;
}
.nav-cta-mobile {
  padding: 9px 16px; font-size: 13px;
}
.nav-cta-mobile::after { font-size: 14px; }

/* Hamburger button */
.hamburger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero-variant nav — starts transparent on home page */
.nav.nav-hero {
  background: transparent;
  border-color: transparent;
  padding: 20px 0;
}
.nav.nav-hero:not(.scrolled) .logo-img  { filter: brightness(0) invert(1); }
.nav.nav-hero:not(.scrolled) .nav-links a:not(.nav-cta) { color: white; }
.nav.nav-hero:not(.scrolled) .nav-links a:not(.nav-cta):hover { color: var(--orange); }
.nav.nav-hero:not(.scrolled) .hamburger span { background: white; }
.nav.nav-hero.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--hairline);
  padding: 12px 0;
}
.nav.nav-hero.scrolled .logo-img { filter: none; height: 32px; }
.nav.nav-hero.scrolled .nav-links a:not(.nav-cta) { color: var(--ink-soft); }
.nav.nav-hero.scrolled .nav-links a:not(.nav-cta):hover { color: var(--royal); }

/* Mobile drawer — hidden by default, open only via JS on mobile */
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 320px; max-width: 88vw;
  background: white;
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  padding: 0 0 40px;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.mobile-drawer.open { transform: translateX(0); }

/* Force drawer completely off on desktop — belt-and-suspenders */
@media (min-width: 881px) {
  .mobile-drawer, .mobile-drawer-overlay { display: none !important; }
}
.mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--hairline);
}
.mobile-drawer-logo { height: 30px; width: auto; }
.mobile-drawer-close {
  width: 36px; height: 36px;
  background: var(--off); border: none; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
}
.mobile-drawer-close svg { width: 18px; height: 18px; stroke: var(--ink); }
.mobile-drawer-links {
  display: flex; flex-direction: column;
  padding: 16px 0; flex: 1;
}
.mobile-drawer-links a {
  font-family: var(--body); font-size: 17px; font-weight: 500;
  color: var(--ink); padding: 14px 24px;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.15s, color 0.15s;
}
.mobile-drawer-links a:hover { background: var(--off); color: var(--royal); }
.mobile-drawer-links a.active { color: var(--royal); font-weight: 600; }
.mobile-drawer-cta {
  margin: 20px 24px 0;
  display: block; text-align: center;
  background: var(--orange); color: white;
  padding: 15px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: background 0.2s;
}
.mobile-drawer-cta:hover { background: var(--orange-dark); }
.mobile-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 299;
  backdrop-filter: blur(2px);
}

/* ====== SHARED BUTTONS ====== */
.btn-primary {
  background: var(--orange); color: white;
  padding: 18px 32px; border-radius: 999px;
  font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn-primary::after { content: '→'; font-size: 18px; transition: transform 0.2s; }
.btn-primary:hover::after { transform: translateX(3px); }

/* ====== SHARED SECTION LABELS ====== */
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600;
  color: var(--orange); text-transform: uppercase; letter-spacing: 0.16em;
  margin-bottom: 28px;
}
.section-eyebrow::before { content: ''; width: 32px; height: 2px; background: var(--orange); }
.section-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.0; letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 900px;
}

/* ====== FOOTER ====== */
.footer {
  background: var(--orange); color: white;
  padding: 56px 0 24px;
  position: relative; overflow: hidden;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.7fr; gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .footer-logo-img { height: 60px; width: auto; display: block; margin-bottom: 22px; }
.footer-tagline {
  font-family: var(--display); font-style: italic; font-weight: 500;
  color: white; font-size: 21px; margin-bottom: 9px; letter-spacing: -0.01em;
}
.footer-brand p { font-size: 15px; color: rgba(255,255,255,0.9); line-height: 1.6; }
.footer-col h4 {
  font-family: var(--display); font-weight: 700;
  font-size: 14px; color: white;
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 22px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 15px; color: rgba(255,255,255,0.88); transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-contact-item { font-size: 15px; color: rgba(255,255,255,0.9); margin-bottom: 10px; }
.footer-contact-item a { color: white; font-weight: 600; }
.footer-contact-item a:hover { color: var(--ink); }

/* Newsletter form in footer */
.newsletter h4 { margin-bottom: 10px; }
.newsletter-sub { font-size: 14px; color: rgba(255,255,255,0.88); margin-bottom: 22px; line-height: 1.55; }
.newsletter-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.newsletter-form > * { min-width: 0; }
.newsletter-form input {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.12); color: white;
  font-family: var(--body); font-size: 14px;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.7); }
.newsletter-form input:focus { outline: none; border-color: white; background: rgba(255,255,255,0.2); }
.newsletter-email { grid-column: span 2; }
.newsletter .cf-turnstile { grid-column: span 2; }
.newsletter button {
  grid-column: span 2;
  background: var(--ink); color: white;
  padding: 14px 20px; border-radius: 10px;
  font-family: var(--body); font-weight: 600; font-size: 14px;
  border: none; cursor: pointer; transition: background 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.newsletter button:hover { background: white; color: var(--orange); }
.newsletter button::after { content: '→'; }
.newsletter-success { color: white; font-size: 14px; padding: 12px 0; display: none; line-height: 1.5; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.25);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: rgba(255,255,255,0.85);
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a:hover { color: var(--ink); }
.footer-inflowmate {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.75); font-size: 12px;
  text-decoration: none; transition: color 0.2s;
}
.footer-inflowmate:hover { color: white; }
.footer-inflowmate img { height: 20px; width: auto; opacity: 0.85; }

/* ====== ANIMATIONS ====== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-mobile-right { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .newsletter-form { grid-template-columns: 1fr; }
  .newsletter-email { grid-column: span 1; }
  .newsletter .cf-turnstile { grid-column: span 1; }
  .newsletter button { grid-column: span 1; }
  /* Prevent horizontal scroll */
  .container, .container-tight, .container-narrow { padding: 0 20px; }
}
