:root {
  /* Brand Color Tokens */
  --color-primary: #1E3A8A;
  --color-secondary: #0D9488;
  --color-accent: #D97706;
  --color-neutral-dark: #0F172A;
  --color-neutral-light: #F8FAFC;

  /* Typography Families */
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Type Scale Desktop */
  --text-h1: 56px;
  --text-h1-lh: 1.15;
  --text-h2: 36px;
  --text-h2-lh: 1.2;
  --text-h3: 24px;
  --text-h3-lh: 1.25;
  --text-body: 16px;
  --text-body-lh: 1.65;
  --text-small: 14px;
  --text-small-lh: 1.5;

  /* Spacing Scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;

  /* Layout Tokens */
  --container-max-width: 1200px;
  --section-padding-desktop: 96px;
  --section-padding-mobile: 56px;

  /* Card and Component Tokens */
  --card-radius: 16px;
  --card-border: 1px solid rgba(15, 23, 42, 0.08);
  --card-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);

  --btn-radius: 9999px;
  --btn-padding-y: 14px;
  --btn-padding-x: 28px;
}

/* Base resets & typography foundation */
html {
  scroll-behavior: smooth;
  color: var(--color-neutral-dark);
  background-color: var(--color-neutral-light);
  font-family: var(--font-body);
}

body {
  margin: 0;
  padding: 0;
  line-height: var(--text-body-lh);
}

/* Scroll-Aware Sticky Header Behavior */
.site-header {
  transition: padding 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.is-scrolled {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

/* Nav toggle hamburger bar transforms */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 6px;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-neutral-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Responsive Navigation Contract */
@media (max-width: 767px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #F8FAFC;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.1);
    padding: 24px 20px;
    flex-direction: column;
    gap: 16px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
  }

  .site-nav .nav-link {
    display: block;
    width: 100%;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 600;
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex !important;
    align-items: center;
  }
}

/* Active Nav Links */
.nav-link.is-active {
  color: var(--color-accent) !important;
}

/* FAQ Accordion Behavior */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.is-open .faq-answer {
  max-height: 480px;
  opacity: 1;
}

.faq-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  position: relative;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background-color: currentColor;
  border-radius: 1px;
}

.faq-icon::before {
  top: 8px;
  left: 1px;
  width: 16px;
  height: 2px;
}

.faq-icon::after {
  top: 1px;
  left: 8px;
  width: 2px;
  height: 16px;
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-icon::after {
  transform: rotate(90deg);
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

/* Scroll Reveal Orchestration */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}