/* ==========================================================================
   Executive Theme — Vanguard Platform Advisory
   Light mode, serif headlines, glassmorphism nav, subtle polish.
   Corporate palette + Editorial typography + Technical interactivity.
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-navy: #1a2332;
  --c-navy-light: #243044;
  --c-accent: #1e6b8a;
  --c-accent-hover: #237a9e;
  --c-accent-glow: rgba(30, 107, 138, 0.12);
  --c-bg: #fafaf9;
  --c-white: #ffffff;
  --c-text: #1a1a1a;
  --c-text-light: #555;
  --c-text-muted: #777;
  --c-border: #e5e2dc;
  --c-border-dark: #d5d0c8;
  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1000px;
  --nav-height: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

body.site {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--c-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--c-accent-hover); }

/* --- Scroll-reveal animations --- */
.section,
.card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.is-visible,
.card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero should be visible immediately */
.section--hero {
  opacity: 1;
  transform: none;
}

/* Stagger card animations within visible sections */
.section.is-visible .card:nth-child(2) { transition-delay: 0.08s; }
.section.is-visible .card:nth-child(3) { transition-delay: 0.16s; }
.section.is-visible .card:nth-child(4) { transition-delay: 0.24s; }
.section.is-visible .card:nth-child(5) { transition-delay: 0.32s; }
.section.is-visible .card:nth-child(6) { transition-delay: 0.40s; }

/* --- Navigation (light glassmorphism, fixed) --- */
.site__nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-navy) !important;
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.nav__link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--c-text-light) !important;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--c-navy) !important;
  background: rgba(30, 107, 138, 0.06);
}

.nav__link--active {
  color: var(--c-accent) !important;
  background: var(--c-accent-glow);
}

/* --- Mobile hamburger menu (CSS-only) --- */
.nav__toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav__toggle-label {
  display: none;
  cursor: pointer;
  width: 28px;
  height: 24px;
  position: relative;
  z-index: 101;
}

.nav__toggle-icon,
.nav__toggle-icon::before,
.nav__toggle-icon::after {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle-icon {
  position: relative;
  top: 11px;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: '';
  position: absolute;
}

.nav__toggle-icon::before { top: -8px; }
.nav__toggle-icon::after { top: 8px; }

/* Animate to X when checked */
.nav__toggle-input:checked ~ .nav__toggle-label .nav__toggle-icon {
  background: transparent;
}

.nav__toggle-input:checked ~ .nav__toggle-label .nav__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav__toggle-input:checked ~ .nav__toggle-label .nav__toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* --- Main --- */
.site__main {
  margin-top: var(--nav-height);
}

/* --- Sections --- */
.section {
  padding: 5rem max(2rem, 50% - var(--max-width) / 2);
}

.section > *:not(.card) {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--c-navy);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.section h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-navy);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}

.section p {
  margin-bottom: 1.35rem;
  max-width: 72ch;
}

.section ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.section li {
  margin-bottom: 0.5rem;
}

.section li::marker {
  color: var(--c-accent);
}

.section strong {
  color: var(--c-navy);
  font-weight: 600;
}

/* --- Hero --- */
.section--hero {
  background: var(--c-bg);
  text-align: center;
  padding: 8rem max(2rem, 50% - var(--max-width) / 2) 5.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid background (adapted from technical, lighter) */
.section--hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--c-border-dark) 0.75px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.35;
  pointer-events: none;
}

.section--hero > * {
  position: relative;
}

.section--hero h1 {
  font-family: var(--font-serif);
  font-size: 3.1rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--c-navy);
  margin-bottom: 1rem;
}

.section--hero p {
  max-width: 55ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--c-text-light);
  font-size: 1.15rem;
}

.section--hero strong {
  color: var(--c-text);
}

/* Hero CTAs — primary navy / secondary ghost */
.section--hero p:last-child a {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.4rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.section--hero p:last-child a:first-child {
  background: var(--c-navy);
  color: var(--c-white) !important;
}

.section--hero p:last-child a:first-child:hover {
  background: var(--c-navy-light);
  box-shadow: 0 4px 16px rgba(26, 35, 50, 0.2);
}

.section--hero p:last-child a:last-child {
  background: transparent;
  color: var(--c-navy) !important;
  border: 1px solid var(--c-border-dark);
}

.section--hero p:last-child a:last-child:hover {
  border-color: var(--c-accent);
  color: var(--c-accent) !important;
}

/* --- Alternating section backgrounds --- */
.section--problem,
.section--services-delivery,
.section--ai-approach,
.section--about {
  background: var(--c-white);
}

/* --- Section dividers (gradient lines, from technical) --- */
.section + .section {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--c-border), transparent) 1;
}

/* --- Cards --- */
.card {
  max-width: var(--max-width);
  margin: 1.25rem auto;
  padding: 1.75rem 2rem;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  border-radius: 6px;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-left-color: var(--c-accent-hover);
}

.card p:first-child {
  margin-bottom: 0.5rem;
}

.card p:first-child strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-navy);
}

.card p:last-child {
  margin-bottom: 0;
  color: var(--c-text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Track record cards — distinct styling */
.section--track-record .card {
  border-left-color: var(--c-navy);
}

.section--track-record .card p:first-child strong {
  color: var(--c-accent);
}

/* --- About section values --- */
.section--about > p > strong:first-child {
  color: var(--c-accent);
}

/* --- How We Work numbered steps --- */
.section--how-we-work h3 {
  border-bottom-color: var(--c-accent);
}

/* --- AI Approach lead-in styling --- */
.section--ai-approach > p > strong:first-child {
  color: var(--c-accent);
}

/* --- Contact Form --- */
.form {
  max-width: 580px;
  margin: 2.5rem auto 0;
}

.form__field {
  margin-bottom: 1.5rem;
}

.form__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-navy);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: var(--c-white);
  color: var(--c-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-glow);
}

.form__submit {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  background: var(--c-navy);
  color: var(--c-white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.form__submit:hover {
  background: var(--c-navy-light);
  box-shadow: 0 4px 16px rgba(26, 35, 50, 0.2);
}

/* --- Footer --- */
.site__footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 2.5rem 2rem;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  text-align: center;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__address {
  margin-top: 0.25rem;
  color: var(--c-border-dark);
}

/* --- Card grids --- */
@media (min-width: 768px) {
  .section--services-advisory,
  .section--services-delivery,
  .section--track-record {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
  }

  .section--services-advisory > h2,
  .section--services-advisory > h3,
  .section--services-advisory > p,
  .section--services-advisory > ul,
  .section--services-delivery > h3,
  .section--services-delivery > p,
  .section--track-record > h2,
  .section--track-record > p {
    width: 100%;
    flex: 0 0 100%;
  }

  .section--services-advisory > .card,
  .section--services-delivery > .card {
    flex: 0 0 calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
    margin-left: 0;
    margin-right: 0;
  }

  .section--services-advisory > .card:nth-child(odd of .card),
  .section--services-delivery > .card:nth-child(odd of .card) {
    margin-right: 0.75rem;
  }

  .section--services-advisory > .card:nth-child(even of .card),
  .section--services-delivery > .card:nth-child(even of .card) {
    margin-left: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .section--track-record > .card {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
    margin-left: 0;
    margin-right: 0;
  }

  .section--track-record > .card:not(:nth-child(3n of .card)) {
    margin-right: 1rem;
  }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  /* Show hamburger menu */
  .nav__toggle-label {
    display: block;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(250, 250, 249, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
    padding: 1rem 2rem 1.5rem;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  }

  .nav__toggle-input:checked ~ .nav__links {
    display: flex;
  }

  .nav__link {
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
  }

  .section--hero h1 { font-size: 2.3rem; }
  .section { padding: 3.5rem 1.5rem; }
  .section--hero { padding: 6rem 1.5rem 4rem; }
}

@media (max-width: 480px) {
  .section--hero h1 { font-size: 1.9rem; }
  .section--hero p { font-size: 1rem; }
  .section h2 { font-size: 1.7rem; }

  .form__submit {
    width: 100%;
    text-align: center;
  }
}
