/*
 * VESTA RESEARCH - Design System
 * "Quiet Authority" - Refined Luxury Editorial
 * ============================================
 */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES - DESIGN TOKENS
   ============================================ */
:root {
  /* === COLOR PALETTE === */
  /* Primary Navy - Institutional Trust */
  --navy-950: #031528;
  --navy-900: #062247;
  --navy-800: #0A3259;
  --navy-700: #0F426B;
  --navy-600: #1A5580;
  --navy-500: #2B6A99;

  /* Silver/Platinum - Refined Accents */
  --silver-600: #8A8A8C;
  --silver-500: #A8A8AA;
  --silver-400: #B8B8BA;
  --silver-300: #C8C8CA;
  --silver-200: #E0E0E2;
  --silver-100: #F0F0F2;
  --silver-50: #F8F8FA;

  /* Accent Gold - Prestige */
  --gold-500: #C9A962;
  --gold-400: #D4B870;
  --gold-300: #E0C88A;
  --gold-200: #EBD8A4;

  /* Neutrals */
  --white: #FFFFFF;
  --off-white: #FAFBFC;
  --gray-50: #F7F8F9;
  --gray-100: #EEF0F2;
  --gray-200: #E2E5E9;
  --gray-300: #CDD2D9;
  --gray-400: #9BA3AE;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic */
  --success: #059669;
  --warning: #D97706;
  --error: #DC2626;

  /* === TYPOGRAPHY === */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Type Scale - Perfect Fourth (1.333) */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 2rem;        /* 32px */
  --text-4xl: 2.5rem;      /* 40px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */
  --text-8xl: 6rem;        /* 96px */

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.12em;

  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* === SPACING === */
  --space-px: 1px;
  --space-0: 0;
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */
  --space-40: 10rem;     /* 160px */
  --space-48: 12rem;     /* 192px */

  /* === LAYOUT === */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;

  --section-padding: clamp(4rem, 10vw, 8rem);
  --content-padding: clamp(1.5rem, 5vw, 3rem);

  /* === EFFECTS === */
  /* Shadows - Subtle and Refined */
  --shadow-sm: 0 1px 2px rgba(6, 34, 71, 0.04);
  --shadow-md: 0 4px 12px rgba(6, 34, 71, 0.06);
  --shadow-lg: 0 8px 24px rgba(6, 34, 71, 0.08);
  --shadow-xl: 0 16px 48px rgba(6, 34, 71, 0.1);
  --shadow-2xl: 0 24px 64px rgba(6, 34, 71, 0.12);
  --shadow-inner: inset 0 2px 4px rgba(6, 34, 71, 0.04);

  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(20px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.2);

  /* Border Radius */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;

  /* === ANIMATION === */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-premium: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --duration-instant: 100ms;
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 500ms;
  --duration-slower: 700ms;
  --duration-slowest: 1000ms;

  /* === Z-INDEX === */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* ============================================
   CSS RESET - Refined
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--gray-700);
  background-color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ============================================
   TYPOGRAPHY CLASSES
   ============================================ */

/* Display Headlines - Cormorant Garamond */
.heading-hero {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: var(--font-light);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--white);
}

.heading-1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: var(--font-regular);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--navy-900);
}

.heading-2 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: var(--font-regular);
  line-height: var(--leading-tight);
  color: var(--navy-900);
}

.heading-3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: var(--font-medium);
  line-height: var(--leading-snug);
  color: var(--navy-900);
}

.heading-4 {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--navy-900);
}

.heading-5 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--navy-900);
}

/* Body Text */
.text-lead {
  font-size: var(--text-xl);
  font-weight: var(--font-regular);
  line-height: var(--leading-relaxed);
  color: var(--gray-600);
}

.text-body {
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-relaxed);
  color: var(--gray-700);
}

.text-body-sm {
  font-size: var(--text-sm);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--gray-600);
}

/* Special Typography */
.overline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold-500);
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.5vw, 1.75rem);
  font-weight: var(--font-light);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--silver-400);
}

.quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: var(--font-light);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--navy-800);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.container--narrow {
  max-width: var(--container-lg);
}

.container--wide {
  max-width: var(--container-2xl);
}

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section--navy {
  background: var(--navy-900);
  color: var(--white);
}

.section--navy .heading-1,
.section--navy .heading-2,
.section--navy .heading-3,
.section--navy .heading-4 {
  color: var(--white);
}

.section--navy .text-body,
.section--navy .text-lead {
  color: var(--silver-300);
}

.section--light {
  background: var(--gray-50);
}

.section--silver {
  background: var(--silver-50);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }

/* Checklist styling - ensure icons align properly */
ul li.flex {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-4);
  align-items: start;
}

ul li.flex svg {
  width: 24px;
  height: 24px;
  margin-top: 2px;
}
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  padding: var(--space-5) 0;
  transition: all var(--duration-normal) var(--ease-out);
}

.nav--scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md);
  padding: var(--space-4) 0;
}

.nav--scrolled .nav__logo-text {
  color: var(--navy-900);
}

.nav--scrolled .nav__link {
  color: var(--gray-700);
}

.nav--scrolled .nav__link:hover {
  color: var(--navy-900);
}

.nav--scrolled .nav__cta.btn--ghost {
  color: var(--navy-900);
  border-color: var(--navy-900);
}

.nav--scrolled .nav__cta.btn--ghost:hover {
  background: var(--navy-900);
  color: var(--white);
}

/* Override scrolled styles when mobile menu is active */
@media (max-width: 1024px) {
  .nav--scrolled .nav__menu.active .nav__link {
    color: var(--white);
  }

  .nav--scrolled .nav__menu.active .nav__cta.btn--ghost {
    background: var(--gold-500);
    color: var(--navy-900);
    border-color: var(--gold-500);
  }

  .nav--scrolled .nav__menu.active .nav__cta.btn--ghost:hover {
    background: var(--gold-400);
    border-color: var(--gold-400);
  }
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 10;
  text-decoration: none;
}

.nav__logo-icon {
  height: 40px;
  width: auto;
}

.nav__logo-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  letter-spacing: 0.15em;
  color: var(--white);
  line-height: 1;
  transition: color var(--duration-normal) var(--ease-out);
}

.nav__logo-sub {
  font-size: var(--text-xs);
  font-weight: var(--font-normal);
  letter-spacing: 0.25em;
  opacity: 0.8;
  margin-top: 2px;
}

.nav--scrolled .nav__logo-text,
.nav--scrolled .nav__logo-sub {
  color: var(--navy-900);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  padding: var(--space-2) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold-500);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--white);
}

.nav__cta {
  margin-left: var(--space-4);
}

/* Mobile Menu */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  z-index: 10001;
  position: relative;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--duration-normal) var(--ease-out);
}

.nav--scrolled .nav__toggle span {
  background: var(--navy-900);
}

/* When menu is active, toggle (X) should be white regardless of scroll */
.nav__toggle.active span {
  background: var(--white);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    background: var(--navy-900);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-16) var(--space-4);
    padding-bottom: calc(var(--space-16) + env(safe-area-inset-bottom, 20px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 9999;
    transition: all var(--duration-normal) var(--ease-out);
    overflow-y: auto;
  }

  .nav__menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav__menu .nav__link {
    font-size: var(--text-2xl);
    color: var(--white);
  }

  .nav__cta {
    margin-left: 0;
    margin-top: var(--space-6);
  }

  .nav__cta.btn--ghost {
    padding: var(--space-4) var(--space-10);
    font-size: var(--text-lg);
    background: var(--gold-500);
    color: var(--navy-900);
    border-color: var(--gold-500);
  }

  .nav__cta.btn--ghost:hover {
    background: var(--gold-400);
    border-color: var(--gold-400);
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Mobile buttons - centered, not full width to keep text+icon together */
@media (max-width: 768px) {
  .section .btn {
    display: flex;
    margin-left: auto;
    margin-right: auto;
  }
}

.btn--primary {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.btn--primary:hover {
  background: var(--navy-800);
  border-color: var(--navy-800);
}

.btn--secondary {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--navy-900);
}

.btn--secondary:hover {
  background: var(--navy-900);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--gold {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}

.btn--gold:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
}

.btn--sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
}

.btn--lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-base);
}

.btn__icon {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn:hover .btn__icon {
  transform: translateX(4px);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  transition: all var(--duration-normal) var(--ease-out);
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

.card--elevated:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card--bordered {
  border: 1px solid var(--gray-200);
}

.card--bordered:hover {
  border-color: var(--navy-900);
}

.card--dark {
  background: var(--navy-900);
  color: var(--white);
}

.card--glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
}

/* Feature Card */
.feature-card {
  padding: var(--space-10);
  text-align: center;
}

.feature-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-6);
  color: var(--navy-900);
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-medium);
  color: var(--navy-900);
  margin-bottom: var(--space-4);
}

.feature-card__text {
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
}

/* Case Study Card */
.case-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
}

.case-card__image {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.case-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.case-card:hover .case-card__image img {
  transform: scale(1.05);
}

.case-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 34, 71, 0.9) 0%, transparent 60%);
}

.case-card__badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  padding: var(--space-1) var(--space-3);
  background: var(--gold-500);
  color: var(--navy-900);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.case-card__content {
  padding: var(--space-6);
}

.case-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-medium);
  color: var(--navy-900);
  margin-bottom: var(--space-3);
}

.case-card__excerpt {
  color: var(--gray-600);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--navy-900);
  transition: gap var(--duration-fast) var(--ease-out);
}

.case-card__link:hover {
  gap: var(--space-3);
}

.case-card__link svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 50%, var(--navy-800) 100%);
  overflow: hidden;
}

.hero__background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__wave {
  position: absolute;
  width: 200%;
  height: auto;
  opacity: 0.08;
}

.hero__wave--1 {
  bottom: -10%;
  left: -50%;
  animation: wave-float 20s ease-in-out infinite;
}

.hero__wave--2 {
  bottom: 5%;
  left: -30%;
  opacity: 0.05;
  animation: wave-float 25s ease-in-out infinite reverse;
}

.hero__wave--3 {
  top: 10%;
  right: -50%;
  opacity: 0.04;
  animation: wave-float 30s ease-in-out infinite;
}

@keyframes wave-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

/* Dot Grid Pattern */
.hero__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--content-padding);
}

.hero__logo {
  width: 120px;
  height: auto;
  margin: 0 auto var(--space-8);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.8s var(--ease-out) 0.2s forwards;
}

.hero__tagline {
  margin-bottom: var(--space-6);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.8s var(--ease-out) 0.4s forwards;
}

.hero__tagline span {
  display: block;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--silver-400);
  max-width: 600px;
  margin: 0 auto var(--space-10);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.8s var(--ease-out) 0.6s forwards;
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.8s var(--ease-out) 0.8s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--silver-500);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 1.2s forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--silver-500) 0%, transparent 100%);
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.6); opacity: 0.5; }
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page Hero (shorter) */
.page-hero {
  position: relative;
  padding: calc(var(--space-32) + 80px) 0 var(--space-20);
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 100%);
  overflow: hidden;
}

.page-hero__background {
  position: absolute;
  inset: 0;
  opacity: 0.05;
}

.page-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.page-hero__overline {
  margin-bottom: var(--space-4);
}

.page-hero__title {
  margin-bottom: var(--space-6);
}

.page-hero__subtitle {
  font-size: var(--text-xl);
  color: var(--silver-400);
  max-width: 600px;
}

/* ============================================
   TESTIMONIAL
   ============================================ */
.testimonial {
  position: relative;
  padding: var(--space-12);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.testimonial__quote-mark {
  position: absolute;
  top: var(--space-8);
  left: var(--space-8);
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: var(--font-bold);
  line-height: 1;
  color: var(--gold-200);
  opacity: 0.5;
  user-select: none;
}

.testimonial__text {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: var(--font-light);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--navy-800);
  margin-bottom: var(--space-8);
}

.testimonial__attribution {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.testimonial__photo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--silver-200);
}

.testimonial__meta {
  flex: 1;
}

.testimonial__name {
  font-weight: var(--font-semibold);
  color: var(--navy-900);
}

.testimonial__title {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.testimonial__company {
  font-size: var(--text-sm);
  color: var(--gold-500);
  font-weight: var(--font-medium);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-4);
  font-size: var(--text-base);
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--navy-900);
  box-shadow: 0 0 0 3px rgba(6, 34, 71, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* Form Error State */
.form-input.error,
.form-textarea.error,
.form-select.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Improved placeholder contrast */
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-500);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--navy-950);
  color: var(--silver-400);
  padding: var(--space-20) 0 var(--space-8);
}

.footer__wave {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--white);
}

.footer__wave svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-8);
}

@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer__brand {
  max-width: 320px;
}

.footer__logo {
  height: 48px;
  width: auto;
  margin-bottom: var(--space-6);
}

.footer__description {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--silver-500);
}

.footer__heading {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--space-6);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--silver-500);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__link:hover {
  color: var(--gold-500);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__copyright {
  font-size: var(--text-sm);
  color: var(--silver-600);
}

.footer__legal {
  display: flex;
  gap: var(--space-6);
}

.footer__legal a {
  font-size: var(--text-sm);
  color: var(--silver-600);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__legal a:hover {
  color: var(--silver-400);
}

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */

/* Reveal Animations - Content visible by default for reliability */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* Stagger Children - Content visible by default for reliability */
.stagger > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 300ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 400ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 500ms; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Margin Utilities */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

/* Section Divider */
.divider {
  width: 60px;
  height: 2px;
  background: var(--gold-500);
  margin: var(--space-6) 0;
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Tablet Breakpoint - 768px */
@media (max-width: 768px) {
  :root {
    --section-padding: clamp(3rem, 8vw, 5rem);
    --content-padding: clamp(1rem, 4vw, 2rem);
  }

  /* Override inline grid styles on mobile - CRITICAL for responsive */
  .grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-8) !important;
  }

  /* Center illustrations on mobile */
  .grid[style*="grid-template-columns"] svg {
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }

  /* Hero adjustments */
  .hero {
    min-height: 100svh;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .hero__scroll {
    display: none;
  }

  /* Page hero adjustments */
  .page-hero {
    padding: calc(var(--space-24) + 60px) 0 var(--space-12);
  }

  .page-hero__subtitle {
    font-size: var(--text-lg);
  }

  /* Touch target improvements - minimum 44px */
  .btn--sm {
    min-height: 44px;
    padding: var(--space-3) var(--space-5);
  }

  .nav__link {
    padding: var(--space-3) 0;
  }

  /* Card adjustments */
  .card {
    padding: var(--space-6);
  }

  .feature-card {
    padding: var(--space-6);
  }

  .domain-card {
    padding: var(--space-6);
  }

  /* Case study cards */
  .case-card__image {
    height: 200px;
  }

  /* Grid gap adjustments */
  .grid {
    gap: var(--space-6);
  }

  /* Stats adjustments */
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Timeline mobile adjustments */
  .timeline {
    padding-left: var(--space-8);
  }

  .timeline__dot {
    left: calc(-1 * var(--space-8) - 5px);
  }

  /* Testimonial adjustments */
  .testimonial {
    padding: var(--space-8);
  }

  .testimonial__quote-mark {
    font-size: 5rem;
    top: var(--space-4);
    left: var(--space-4);
  }

  .testimonial__text {
    font-size: var(--text-lg);
  }

  /* Publication card mobile layout */
  .publication-card .grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-4);
  }

  /* Form improvements for touch */
  .form-input,
  .form-textarea,
  .form-select {
    padding: var(--space-4);
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 48px;
  }

  /* Contact grid */
  .contact-grid {
    gap: var(--space-10);
  }

  /* Footer adjustments */
  .footer {
    padding: var(--space-12) 0 var(--space-6);
  }

  .footer__grid {
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Small Mobile Breakpoint - 480px */
@media (max-width: 480px) {
  :root {
    --content-padding: var(--space-4);
  }

  /* Further reduce case study images */
  .case-card__image {
    height: 160px;
  }

  /* Stats single column on very small screens */
  .stats {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Timeline further adjustments */
  .timeline {
    padding-left: var(--space-6);
  }

  .timeline__dot {
    left: calc(-1 * var(--space-6) - 5px);
    width: 10px;
    height: 10px;
  }

  /* Button full width */
  .btn--lg {
    width: 100%;
    padding: var(--space-4) var(--space-6);
  }

  /* Reduce testimonial padding */
  .testimonial {
    padding: var(--space-6);
  }

  .testimonial__quote-mark {
    font-size: 4rem;
  }

  /* Smaller card padding */
  .card {
    padding: var(--space-4);
  }

  .domain-card {
    padding: var(--space-5);
  }

  /* Footer single column */
  .footer__legal {
    flex-direction: column;
    gap: var(--space-3);
  }
}

/* ============================================
   SPECIFIC PAGE STYLES
   ============================================ */

/* About Page - Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-12);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--silver-200);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-10);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: calc(-1 * var(--space-12) - 5px);
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--gold-500);
  border-radius: var(--radius-full);
}

.timeline__year {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  color: var(--gold-500);
  margin-bottom: var(--space-2);
}

.timeline__title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--navy-900);
  margin-bottom: var(--space-2);
}

.timeline__text {
  color: var(--gray-600);
}

/* Capabilities - Domain Cards */
.domain-card {
  padding: var(--space-10);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
}

.domain-card:hover {
  border-color: var(--navy-900);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.domain-card__number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--font-light);
  color: var(--silver-300);
  line-height: 1;
  margin-bottom: var(--space-4);
}

.domain-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-medium);
  color: var(--navy-900);
  margin-bottom: var(--space-4);
}

.domain-card__text {
  color: var(--gray-600);
  margin-bottom: var(--space-6);
}

.domain-card__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.domain-card__list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--gray-700);
}

.domain-card__list-item::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold-500);
  border-radius: var(--radius-full);
  margin-top: 6px;
  flex-shrink: 0;
}

/* Publications */
.publication-card {
  padding: var(--space-8);
  background: var(--white);
  border-left: 3px solid var(--gold-500);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-out);
}

.publication-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateX(4px);
}

.publication-card__journal {
  font-size: var(--text-sm);
  color: var(--gold-500);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-2);
}

.publication-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  color: var(--navy-900);
  margin-bottom: var(--space-3);
}

.publication-card__meta {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-4);
}

.publication-card__abstract {
  color: var(--gray-600);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* Grants - Partner Logos as Text */
.partner-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  justify-content: center;
  align-items: center;
}

.partner-item {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  color: var(--silver-500);
  transition: color var(--duration-fast) var(--ease-out);
}

.partner-item:hover {
  color: var(--navy-900);
}

/* Contact - Split Layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-16);
}

@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info__item {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.contact-info__icon {
  width: 24px;
  height: 24px;
  color: var(--gold-500);
  flex-shrink: 0;
}

.contact-info__label {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-1);
}

.contact-info__value {
  font-weight: var(--font-medium);
  color: var(--navy-900);
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat__number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-light);
  color: var(--gold-500);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--silver-400);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* Case Study Grid Layouts */
.case-study-grid {
  display: grid;
  gap: var(--space-16);
  align-items: start;
}

.case-study-grid--left {
  grid-template-columns: 1fr 1.5fr;
}

.case-study-grid--right {
  grid-template-columns: 1.5fr 1fr;
}

@media (max-width: 1024px) {
  .case-study-grid--left,
  .case-study-grid--right {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .case-study-grid--right > *:first-child {
    order: 2;
  }

  .case-study-grid--right > *:last-child {
    order: 1;
  }
}

/* Mini Stats Grid */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .mini-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .mini-stats {
    grid-template-columns: 1fr;
  }
}

/* Wave SVG Background Pattern */
.wave-bg {
  position: absolute;
  width: 100%;
  height: auto;
  bottom: 0;
  left: 0;
}

/* Abstract Geometric Decorations */
.geo-decoration {
  position: absolute;
  opacity: 0.05;
  pointer-events: none;
}

.geo-decoration--circle {
  width: 400px;
  height: 400px;
  border: 2px solid var(--navy-900);
  border-radius: 50%;
}

.geo-decoration--line {
  width: 200px;
  height: 2px;
  background: var(--navy-900);
}
