/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; }

/* === BRAND VARIABLES === */
:root {
  /* Navy palette */
  --navy: #1B3A5C;
  --navy-deep: #0d1b2a;
  --navy-mid: #142a42;

  /* Slate palette */
  --slate: #8FADC4;
  --slate-deep: #6B9AB8;
  --slate-light: #A3BFD3;

  /* Neutrals */
  --off-white: #f5f4f0;
  --bg: #f8f9fb;
  --bg-card: #ffffff;
  --text-primary: #1a2233;
  --text-secondary: #5a6577;
  --text-muted: #8b95a5;
  --gray: #888888;
  --border: rgba(26, 34, 51, 0.06);
  --border-solid: #e8eaef;

  /* Accent (used for interactive states) */
  --accent: #1B3A5C;
  --accent-light: rgba(27, 58, 92, 0.08);
  --accent-border: rgba(27, 58, 92, 0.12);

  /* Typography */
  --heading: 'Darker Grotesque', 'Helvetica Neue', system-ui, sans-serif;
  --sans: 'Nunito Sans', system-ui, -apple-system, sans-serif;
}

html {
  font-family: var(--sans);
  color: var(--text-primary);
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

/* === NAV === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s, border-color 0.4s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Default nav (light, used on subpages) */
.nav--light {
  background: rgba(248, 249, 251, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

/* Dark nav (transparent over dark hero) */
.nav--dark {
  background: transparent;
  border-bottom: 1px solid transparent;
}

/* Nav scrolled state (JS toggles this) */
.nav--scrolled {
  background: rgba(248, 249, 251, 0.92) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border) !important;
}

.nav-logo {
  font-family: var(--heading);
  font-weight: 400;
  font-size: 1.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s;
}

.nav--light .nav-logo,
.nav--scrolled .nav-logo { color: var(--navy); }
.nav--dark .nav-logo { color: var(--off-white); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s;
}

.nav--light .nav-links a,
.nav--scrolled .nav-links a { color: var(--text-secondary); }
.nav--light .nav-links a:hover,
.nav--scrolled .nav-links a:hover { color: var(--text-primary); }
.nav--dark .nav-links a { color: var(--slate); }
.nav--dark .nav-links a:hover { color: var(--off-white); }

.nav-cta {
  padding: 0.55rem 1.4rem;
  border-radius: 6px;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.2s;
}

.nav--light .nav-cta,
.nav--scrolled .nav-cta {
  background: var(--navy) !important;
  color: #fff !important;
}
.nav--dark .nav-cta {
  background: var(--off-white) !important;
  color: var(--navy-deep) !important;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(27, 58, 92, 0.25); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 0.35rem; }
.nav-dropdown > a::after {
  content: '';
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-dropdown:hover > a::after { transform: rotate(-135deg) translateY(-1px); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 260px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 12px 40px rgba(26, 34, 51, 0.1), 0 2px 8px rgba(26, 34, 51, 0.04);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  list-style: none;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -0.75rem; left: 0; right: 0;
  height: 0.75rem;
}
.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.dropdown-menu li a:hover {
  background: var(--accent-light);
  color: var(--text-primary);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav--light .nav-hamburger span,
.nav--scrolled .nav-hamburger span { background: var(--text-primary); }
.nav--dark .nav-hamburger span { background: var(--off-white); }

.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(248, 249, 251, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 99;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links a { font-size: 1.1rem; }
  .nav-links .nav-cta { margin-top: 1rem; font-size: 1rem; padding: 0.85rem 2.5rem; }
  /* Force light styles in mobile menu overlay */
  .nav-links a { color: var(--text-secondary) !important; }
  .nav-links .nav-cta { background: var(--navy) !important; color: #fff !important; }
  .nav-dropdown > a::after { display: none; }
  .dropdown-menu {
    position: static; transform: none;
    opacity: 1; visibility: visible;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    border: none; box-shadow: none;
    padding: 0.5rem 0 0 0; min-width: auto; text-align: center;
  }
  .dropdown-menu li a { font-size: 0.9rem; padding: 0.4rem 1rem; color: var(--text-muted); }
}

/* === SECTIONS === */
.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
}
.section-label {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 1rem;
  text-align: center;
}
.section-heading {
  font-family: var(--heading);
  font-size: clamp(2.15rem, 4.2vw, 3.2rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 24ch;
  margin-left: auto; margin-right: auto;
  text-align: center;
}
.section-desc {
  font-size: 1.05rem; line-height: 1.7;
  color: var(--text-secondary);
  max-width: 55ch;
  margin-left: auto; margin-right: auto;
  text-align: center;
  margin-bottom: 3rem;
}
.divider-line {
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

/* === BUTTONS === */
.btn-primary {
  padding: 0.85rem 2rem;
  background: var(--navy);
  color: #fff;
  border: none; border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(27, 58, 92, 0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.9rem; font-weight: 400;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--navy); transform: translateY(-1px); }

/* Hero variant buttons (on dark bg) */
.btn-primary--hero {
  background: var(--off-white);
  color: var(--navy-deep);
}
.btn-primary--hero:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }

.btn-secondary--hero {
  color: var(--slate);
  border-color: rgba(143, 173, 196, 0.3);
}
.btn-secondary--hero:hover { border-color: var(--slate); }

/* === CTA / CONTACT === */
.cta-banner {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) clamp(1.5rem, 4vw, 3rem);
}
.cta-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(26, 34, 51, 0.04);
}
.cta-inner h2 {
  font-family: var(--heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.cta-inner p {
  font-size: 1rem; line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 1rem;
}
.cta-contact { display: flex; flex-direction: column; gap: 1.5rem; }
.cta-office { padding: 1.5rem; background: var(--bg); border-radius: 12px; }
.cta-office h4 {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.5rem;
}
.cta-office p { font-size: 0.9rem; color: var(--text-primary); line-height: 1.5; margin-top: 0; }
@media (max-width: 768px) {
  .cta-inner { grid-template-columns: 1fr; padding: clamp(2rem, 5vw, 3rem); }
}

/* === CONTACT FORM === */
.contact-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}
.form-field input,
.form-field textarea {
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--navy); }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-muted); opacity: 0.6; }
.form-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 0.5rem; }
.form-note a { color: var(--navy); }
.form-success h3 { font-family: var(--heading); font-size: 1.5rem; font-weight: 400; margin-bottom: 0.5rem; }
.form-success p { color: var(--text-secondary); font-size: 0.95rem; }
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

/* === FOOTER (dark navy) === */
.footer {
  background: var(--navy-deep);
  padding: 3rem clamp(1.5rem, 4vw, 3rem);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left { font-size: 0.8rem; color: var(--slate); }
.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a {
  font-size: 0.8rem; color: var(--slate);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--off-white); }
@media (max-width: 768px) {
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.56s; }
.reveal-stagger.visible > *:nth-child(9) { transition-delay: 0.64s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
