/* ============================================
   DESIGNWEALTH DESIGN SYSTEM
   Brand Tokens, Typography, Components
   ============================================ */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
  /* Brand Colors — from DesignWealth Style Guide V.1 */
  --color-navy: #1D174B;
  --color-navy-light: #2E2768;
  --color-navy-dark: #140F35;
  --color-blue: #4F7FC0;
  --color-blue-light: #6E96CE;
  --color-teal: #38BAA9;
  --color-teal-light: #5CD4C4;
  --color-teal-dark: #2A9A8C;
  --color-purple: #AB3994;
  --color-grey: #B7B6BB;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-off-white: #F8F9FC;
  --color-gray-100: #F1F3F7;
  --color-gray-200: #E2E6EE;
  --color-gray-300: #C8CED9;
  --color-gray-400: #9AA3B4;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Semantic Colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;

  /* Typography — from DesignWealth Style Guide V.1 */
  --font-heading: 'Libre Franklin', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-subhead: 'Nunito Sans', 'Avenir', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Nunito Sans', 'Avenir', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font Sizes (Desktop) */
  --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: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  --text-6xl: 3.75rem;    /* 60px */
  --text-7xl: 4.5rem;     /* 72px */

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

  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;

  /* Spacing Scale */
  --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 */

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.05), 0 12px 24px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 960px;
  --container-wide: 1440px;
  --nav-height: 80px;
}

/* ── Google Fonts Import ── */
/* Google Fonts enqueued in functions.php */
/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-gray-800);
  background: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* ── Typography Classes ── */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-navy);
}

h1, .h1 { font-size: var(--text-6xl); }
h2, .h2 { font-size: var(--text-5xl); }
h3, .h3 { font-size: var(--text-4xl); }
h4, .h4 { font-size: var(--text-2xl); }
h5, .h5 { font-size: var(--text-xl); }
h6, .h6 { font-size: var(--text-lg); }

.text-body-lg {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.text-body {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.text-body-sm {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-teal);
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

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

.section {
  padding: var(--space-24) 0;
}

.section--sm {
  padding: var(--space-16) 0;
}

.section--lg {
  padding: var(--space-32) 0;
}

/* ── Button Components ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  padding: var(--space-4) var(--space-8);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn--primary:hover {
  background: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

.btn--secondary:hover {
  background: var(--color-navy);
  color: var(--color-white);
  transform: translateY(-1px);
}

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

.btn--white:hover {
  background: var(--color-off-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--ghost {
  background: transparent;
  color: var(--color-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--lg {
  font-size: var(--text-lg);
  padding: var(--space-5) var(--space-10);
}

.btn--sm {
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6);
}

.btn--icon-right svg,
.btn--icon-right .icon {
  margin-left: var(--space-2);
  transition: transform var(--transition-fast);
}

.btn--icon-right:hover svg,
.btn--icon-right:hover .icon {
  transform: translateX(3px);
}

/* ── Card Components ── */
.card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
}

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

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

.card--bordered:hover {
  border-color: var(--color-teal);
  box-shadow: var(--shadow-md);
}

/* ── Badge / Tag ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(56, 186, 169, 0.1);
  color: var(--color-teal-dark);
}

.badge--navy {
  background: rgba(27, 20, 68, 0.08);
  color: var(--color-navy);
}

/* ── Trust Bar ── */
.trust-bar {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-teal);
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  height: var(--nav-height);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-navy);
}

.nav__logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-teal), var(--color-blue));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray-600);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav__link:hover {
  color: var(--color-navy);
  background: var(--color-gray-100);
}

.nav__link--has-dropdown {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

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

.nav__cta {
  font-size: var(--text-sm);
}

/* Mobile Nav Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root {
    --text-6xl: 2.75rem;
    --text-5xl: 2.25rem;
    --text-4xl: 1.875rem;
  }

  .section {
    padding: var(--space-16) 0;
  }

  .section--lg {
    padding: var(--space-20) 0;
  }

  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  :root {
    --text-6xl: 2.25rem;
    --text-5xl: 1.875rem;
    --text-4xl: 1.5rem;
    --text-3xl: 1.375rem;
    --nav-height: 68px;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .section--lg {
    padding: var(--space-16) 0;
  }

  .btn--lg {
    font-size: var(--text-base);
    padding: var(--space-4) var(--space-8);
    width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --text-6xl: 1.875rem;
    --text-5xl: 1.625rem;
    --text-4xl: 1.375rem;
  }
}

/* ── Credibility Logo Bars ──
   Reusable component for "As Seen In", "Member Of", and "Awards" rows.
   Uniform-height, aspect-preserving, grayscale-by-default for press/memberships,
   full-color for awards. Wraps cleanly on small screens without breaking rows. */

.credibility-section {
  padding: var(--space-16) 0;
  background: var(--color-off-white);
}

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

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

.credibility-section--navy .credibility-section__label {
  color: rgba(255, 255, 255, 0.55);
}

.credibility-section__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-gray-500);
  text-align: center;
  margin-bottom: var(--space-8);
}

.credibility-group {
  margin-bottom: var(--space-12);
}

.credibility-group:last-child {
  margin-bottom: 0;
}

.logo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
  list-style: none;
}

.logo-bar__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-bar__img {
  display: block;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  transition: all var(--transition-base);
}

/* Press variant — grayscale, hover-to-color */
.logo-bar--press .logo-bar__img {
  height: 40px;
  filter: grayscale(100%);
  opacity: 0.55;
}

.logo-bar--press .logo-bar__img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* On dark backgrounds — apply via .credibility-section--navy OR .logo-bar--on-dark */
.credibility-section--navy .logo-bar--press .logo-bar__img,
.credibility-section--navy .logo-bar--members .logo-bar__img,
.logo-bar--on-dark.logo-bar--press .logo-bar__img,
.logo-bar--on-dark.logo-bar--members .logo-bar__img {
  filter: grayscale(100%) brightness(0) invert(1);
  opacity: 0.5;
}

.credibility-section--navy .logo-bar--press .logo-bar__img:hover,
.credibility-section--navy .logo-bar--members .logo-bar__img:hover,
.logo-bar--on-dark.logo-bar--press .logo-bar__img:hover,
.logo-bar--on-dark.logo-bar--members .logo-bar__img:hover {
  opacity: 0.9;
}

/* Memberships variant — slightly taller, similar treatment */
.logo-bar--members .logo-bar__img {
  height: 52px;
  filter: grayscale(100%);
  opacity: 0.65;
}

.logo-bar--members .logo-bar__img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* When membership logos sit on a dark background, give each one a white card
   backdrop. We don't try to invert the JPGs (their white backgrounds would
   collapse the logo into a solid block). Cards keep the brand colors intact
   and read as professional credentials rather than monochrome decoration. */
.logo-bar--on-dark.logo-bar--members .logo-bar__item {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition-base);
}
.logo-bar--on-dark.logo-bar--members .logo-bar__item:hover {
  transform: translateY(-2px);
}
.logo-bar--on-dark.logo-bar--members .logo-bar__img {
  filter: none;
  opacity: 1;
  height: 44px;
}

/* Awards variant — full color, larger badges */
.logo-bar--awards {
  gap: var(--space-10);
}

.logo-bar--awards .logo-bar__img {
  height: 110px;
}

.logo-bar--awards .logo-bar__img:hover {
  transform: scale(1.04);
}

/* Tablet adjustments */
@media (max-width: 1024px) {
  .logo-bar { gap: var(--space-8); }
  .logo-bar--press .logo-bar__img { height: 34px; }
  .logo-bar--members .logo-bar__img { height: 44px; }
  .logo-bar--awards .logo-bar__img { height: 90px; }
}

/* Mobile — keep proportions but tighten spacing */
@media (max-width: 768px) {
  .credibility-section { padding: var(--space-12) 0; }
  .logo-bar { gap: var(--space-6); }
  .logo-bar--press .logo-bar__img { height: 28px; }
  .logo-bar--members .logo-bar__img { height: 38px; }
  .logo-bar--awards .logo-bar__img { height: 76px; }
  .credibility-group { margin-bottom: var(--space-8); }
}
