/* ============================================
   CSA Advisors — Design System & Styles
   Dark Mode | Apple-like | ADA Compliant
   VERSION: v49 (drawer blur fix)
   ============================================ */


/* Fallback font metrics matched to Inter — prevents layout shift during font load */
@font-face {
  font-family: 'Inter-fallback';
  src: local('-apple-system'), local('BlinkMacSystemFont'), local('Segoe UI');
  font-display: swap;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 107%;
}

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Brand Colors */
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #111118;
  --color-bg-card: #16161f;
  --color-bg-glass: rgba(17, 17, 24, 0.75);
  --color-bg-glass-border: rgba(120, 160, 190, 0.12);

  /* Steel Blue / Teal Palette (from logo) */
  --color-accent: #6ea0b8;
  --color-accent-light: #8fbdd4;
  --color-accent-bright: #a3d5e8;
  --color-accent-dim: #5a94ad;
  --color-accent-glow: rgba(110, 160, 184, 0.15);

  /* Text */
  --color-text-primary: #f0f2f5;
  --color-text-secondary: #a0a8b4;
  --color-text-muted: #6b7280;
  --color-text-accent: #8fbdd4;

  /* Borders & Dividers */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(110, 160, 184, 0.3);

  /* Typography */
  --font-heading: 'Inter', 'Inter-fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Inter-fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-bright);
}

/* --- Focus styles for ADA --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip to content link — ADA */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-bg-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  z-index: 10000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Typography Scale --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.text-accent {
  color: var(--color-text-accent);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

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

.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;
  }
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 80px;
  transition: background var(--transition-base), border-color var(--transition-base), backdrop-filter var(--transition-base);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--color-border);
}

.site-header.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--color-bg-glass-border);
}

.header-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0.04em;
}

.logo-tagline {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  margin-top: 1px;
}

/* Desktop Nav */
.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.nav-list {
  display: flex;
  flex-direction: row;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--color-text-primary);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* Subtle hover underline for consistency */
.nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--color-accent-dim);
  border-radius: 1px;
  opacity: 0.4;
}

/* Dropdown for Resources */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.nav-dropdown-trigger .chevron {
  width: 10px;
  height: 10px;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .chevron,
.nav-dropdown:focus-within .chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
  transform: translateX(-50%) translateY(8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-dropdown-menu a:hover {
  background: var(--color-accent-glow);
  color: var(--color-text-primary);
}

/* CTA Button in Nav */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-bg-primary);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  margin-left: 0.75rem;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--color-accent-light);
  color: var(--color-bg-primary);
  transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  /* ═══ MOBILE NAV — Slide-in drawer from right ═══ */

  .mobile-menu-toggle {
    display: flex;
  }

  /* Drawer: 85% width max 340px, slides in from right */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    height: 100dvh; /* use dynamic viewport on modern browsers */
    z-index: 1100;
    background: #0f0f17;
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: calc(var(--header-height) + var(--space-md)) var(--space-md) var(--space-md);
    margin: 0;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  /* Backdrop overlay — dim only, no blur (blur affects drawer stacking) */
  body.menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: auto;
  }

  /* Nav list inside drawer */
  .main-nav .nav-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: stretch;
  }

  .main-nav .nav-list li {
    width: 100%;
    display: block;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav .nav-list li:last-child {
    border-bottom: none;
  }

  .main-nav .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 0.75rem 0;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.4;
  }

  .main-nav .nav-link[aria-current="page"] {
    color: var(--color-accent);
    font-weight: 600;
  }

  /* Hide underlines in mobile drawer — color change is enough */
  .main-nav .nav-link::after,
  .main-nav .nav-link[aria-current="page"]::after,
  .main-nav .nav-link:hover::after {
    display: none !important;
  }

  /* Partner Login CTA in drawer */
  .main-nav .nav-cta {
    margin: var(--space-md) 0 0 0;
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    min-height: 48px;
  }

  /* Resources dropdown menu — inline display in drawer */
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 var(--space-sm);
    min-width: auto;
  }

  .nav-dropdown-menu a {
    font-size: 1rem;
    padding: 0.5rem 0;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: calc(var(--header-height) + var(--space-xl)) var(--space-md) var(--space-xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--color-accent-glow), transparent),
    radial-gradient(ellipse 80% 40% at 20% 80%, rgba(74, 122, 144, 0.06), transparent),
    linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
  z-index: 1;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.08;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-logo {
  display: block;
  max-width: 480px;
  width: 100%;
  height: auto;
  margin: 0 auto var(--space-md);
}

@media (max-width: 640px) {
  .hero-logo {
    max-width: 320px;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(110, 160, 184, 0.2);
  border-radius: var(--radius-full);
  background: var(--color-accent-glow);
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.1875rem;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  color: var(--color-text-secondary);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg-primary);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  color: var(--color-bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(110, 160, 184, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent-dim);
  background: var(--color-accent-glow);
  color: var(--color-text-primary);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* ============================================
   VALUE PROPS / WHY CSA SECTION
   ============================================ */
.values-section {
  background: var(--color-bg-secondary);
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: stretch;
}

.values-content {
  display: flex;
  flex-direction: column;
}

.values-intro {
  margin-bottom: var(--space-lg);
}

.values-intro h2 {
  margin-bottom: var(--space-sm);
}

.values-intro p {
  font-size: 1.0625rem;
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.value-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), background var(--transition-base);
}

.value-item:hover {
  border-color: var(--color-border-hover);
  background: rgba(22, 22, 31, 0.8);
}

.value-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-glow);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
}

.value-icon svg {
  width: 20px;
  height: 20px;
}

.value-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.value-item p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.values-image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: stretch;
}

.values-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.values-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

/* Who We Serve */
.serve-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.serve-card {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

.serve-card:hover {
  border-color: var(--color-border-hover);
}

.serve-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-glow);
  border-radius: var(--radius-md);
  color: var(--color-accent);
}

.serve-card-icon svg {
  width: 24px;
  height: 24px;
}

.serve-card h4 {
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}

.serve-card p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .values-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .values-image-wrapper {
    order: -1;
    min-height: 300px;
  }

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

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

/* ============================================
   BRANDS SECTION
   ============================================ */

/* Filter Tabs */
.brands-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--color-text-secondary);
  border-color: var(--color-border-hover);
  background: var(--color-accent-glow);
}

.filter-btn.active {
  color: var(--color-bg-primary);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.filter-btn .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.filter-btn.active .filter-count {
  background: rgba(0, 0, 0, 0.2);
}

/* Brand Grid */
.brands-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: var(--space-md) var(--space-sm);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  width: calc((100% - 3 * var(--space-sm)) / 4);
  min-width: 220px;
  text-decoration: none;
}

.brand-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.brand-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  width: 100%;
}

.brand-card-logo img {
  max-height: 75px;
  max-width: 186px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-base);
}

.brand-card:hover .brand-card-logo img {
  transform: scale(1.05);
}

.brand-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-align: center;
  letter-spacing: 0.01em;
  transition: color var(--transition-fast);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.brand-card:hover .brand-card-name {
  color: var(--color-text-secondary);
}

.brand-card-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 0.25rem;
}

/* Category tags under name */
.brand-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
}

.brand-tag {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-dim);
  background: var(--color-accent-glow);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

/* Filter hide/show */
.brand-card.hidden {
  display: none;
}

.brands-cta {
  text-align: center;
  margin-top: var(--space-lg);
}

@media (max-width: 1024px) {
  .brand-card {
    width: calc((100% - 2 * var(--space-sm)) / 3);
  }
}

@media (max-width: 768px) {
  .brand-card {
    width: calc((100% - var(--space-sm)) / 2);
  }
}

@media (max-width: 520px) {
  .brand-card {
    width: calc((100% - var(--space-sm)) / 2);
  }
}

/* ============================================
   CONTACT / CTA SECTION
   ============================================ */
.contact-section {
  background: var(--color-bg-secondary);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.contact-card {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-base);
}

.contact-card:hover {
  border-color: var(--color-border-hover);
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-glow);
  border-radius: var(--radius-md);
  color: var(--color-accent);
}

.contact-card-icon svg {
  width: 24px;
  height: 24px;
}

.contact-card h4 {
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.9375rem;
  margin-bottom: var(--space-sm);
}

.contact-card a {
  font-weight: 600;
  font-size: 0.9375rem;
}

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

/* Social Icons */
.social-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: var(--space-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0 var(--space-lg);
}

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

.footer-copy {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   ABOUT PAGE
   ============================================ */

/* About Hero */
.about-hero {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-xl);
  background: var(--color-bg-primary);
  text-align: center;
}

.about-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.about-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: var(--space-sm) 0;
  letter-spacing: -0.03em;
}

.about-hero p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 550px;
  margin: 0 auto;
}

/* Team Section */
.team-section {
  background: var(--color-bg-secondary);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.team-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.team-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
}

.team-card-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-bg-primary);
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.team-card:hover .team-card-photo img {
  transform: scale(1.04);
}

.team-card-info {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.team-card-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.team-card-title {
  font-size: 0.8125rem;
  color: var(--color-text-accent);
  font-weight: 500;
}

.team-card-territory {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.team-card-territory svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.team-card .btn-sm {
  align-self: center;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.team-card .btn-sm svg {
  width: 14px;
  height: 14px;
}

/* Territory map thumbnail inside team card */
.team-card-map {
  margin-top: var(--space-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-primary);
}

.team-card-map img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.team-card:hover .team-card-map img {
  transform: scale(1.03);
}

.team-card-map-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
  display: block;
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

@media (max-width: 520px) {
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Territory Section */
.territory-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.territory-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.territory-map img {
  width: 100%;
  height: auto;
  display: block;
}

.territory-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.territory-region {
  padding: var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

.territory-region:hover {
  border-color: var(--color-border-hover);
}

.territory-region h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.territory-region h3 svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.territory-region p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding-left: 1.625rem;
}

@media (max-width: 900px) {
  .territory-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* ============================================
   RESOURCES PAGE
   ============================================ */

/* Password Gate — Two-column lockscreen */
.password-gate-lockscreen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  min-height: 420px;
}

.password-gate-left h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: var(--space-sm) 0 var(--space-md);
}

.password-gate-left p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 440px;
}

.password-gate-right {
  display: flex;
  justify-content: center;
}

.password-gate-card {
  width: 100%;
  max-width: 400px;
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.password-gate-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-glow);
  border-radius: var(--radius-md);
  color: var(--color-accent);
}

.password-gate-icon svg {
  width: 24px;
  height: 24px;
}

.password-gate-card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
}

.portal-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: var(--space-lg) 0;
}

.portal-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.portal-features li svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.form-field {
  margin-bottom: 0.75rem;
}

.password-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.4rem;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.password-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;                /* 16px prevents iOS auto-zoom on focus */
  color: var(--color-text-primary) !important;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.password-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 160, 184, 0.4);
}

.password-input::placeholder {
  color: var(--color-text-muted);
}

.password-submit {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-sm);
}

.password-error {
  color: #e05252;
  font-size: 0.8125rem;
  margin-top: 0.5rem;
  min-height: 1.2em;
}

/* Toast popup for invalid login */
.login-toast {
  position: fixed;
  top: calc(var(--header-height) + 1rem);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1e1e2e;
  border: 1px solid #e05252;
  border-left: 4px solid #e05252;
  border-radius: 8px;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.login-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.login-toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #e05252;
}

.login-toast-text {
  flex: 1;
}

.login-toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f0f2f5;
  display: block;
}

.login-toast-sub {
  font-size: 0.78rem;
  color: #8899aa;
  display: block;
  margin-top: 0.1rem;
}

/* Shake animation on bad login */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-8px); }
  30%       { transform: translateX(8px); }
  45%       { transform: translateX(-6px); }
  60%       { transform: translateX(6px); }
  75%       { transform: translateX(-4px); }
  90%       { transform: translateX(4px); }
}

.shake {
  animation: shake 0.5s ease;
}

.password-help {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
}

.password-help a {
  color: var(--color-text-accent);
}

@media (max-width: 768px) {
  .password-gate-lockscreen {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    min-height: auto;
  }

  .password-gate-left {
    text-align: center;
  }

  .password-gate-left p {
    margin: 0 auto;
  }

  .password-gate-card {
    max-width: 100%;
  }
}

/* Protected Content */
.protected-content {
  display: none;
}

/* File Grid */
.file-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.file-folder {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-base);
}

.file-folder:hover {
  border-color: var(--color-border-hover);
}

.file-folder.hidden {
  display: none;
}

.file-folder-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.file-folder-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.file-folder-header h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
}

.file-folder-count {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.file-list {
  padding: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.file-item:hover {
  background: var(--color-accent-glow);
  color: var(--color-text-primary);
}

.file-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.file-item span:first-of-type {
  flex: 1;
}

.file-type {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-dim);
  background: var(--color-accent-glow);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

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

/* Tariff Grid */
.tariff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.tariff-card {
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

.tariff-card:hover {
  border-color: var(--color-border-hover);
}

.tariff-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.tariff-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.tariff-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0a0a0f;
  background: var(--color-accent);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.tariff-card h4 {
  margin-bottom: 0.5rem;
}

.tariff-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

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

/* Per-Manufacturer Tariff Cards */
.tariff-brand-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.tariff-brand-card {
  width: calc((100% - 3 * var(--space-md)) / 4);
  min-width: 220px;
  padding: var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: border-color var(--transition-base);
}

.tariff-brand-card:hover {
  border-color: var(--color-border-hover);
}

.tariff-brand-logo {
  height: 40px;
  max-width: 120px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  display: block;
}

.tariff-brand-card h4 {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.tariff-status {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.tariff-status--pending {
  color: #f5a623;
  background: rgba(245, 166, 35, 0.12);
}

.tariff-status--active {
  color: #e05252;
  background: rgba(224, 82, 82, 0.12);
}

.tariff-status--none {
  color: #4ecb71;
  background: rgba(78, 203, 113, 0.12);
}

.tariff-detail {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .tariff-brand-card {
    width: calc((100% - 2 * var(--space-md)) / 3);
  }
}

@media (max-width: 768px) {
  .tariff-brand-card {
    width: calc((100% - var(--space-md)) / 2);
  }
}

@media (max-width: 480px) {
  .tariff-brand-card {
    width: 100%;
  }
}

/* ============================================
   NEWS PAGE
   ============================================ */
.news-section {
  background: var(--color-bg-secondary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.news-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
}

.news-card-image {
  overflow: hidden;
  background: var(--color-bg-primary);
}

.news-card-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.news-card:hover .news-card-image img {
  transform: scale(1.04);
}

.news-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-card) 100%);
}

.news-card-placeholder img {
  width: 50%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
  opacity: 0.5;
}

.news-card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.news-card-date {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent-dim);
}

.news-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.news-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-accent);
  margin-top: auto;
  padding-top: 0.5rem;
}

.news-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.news-card:hover .news-card-link svg {
  transform: translateX(3px);
}

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

/* ============================================
   EVENTS PAGE
   ============================================ */

/* Event List */
.events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.event-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

.event-card:hover {
  border-color: var(--color-border-hover);
}

.event-card-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 0.75rem 0.5rem;
  background: var(--color-accent-glow);
  border-radius: var(--radius-sm);
  text-align: center;
  flex-shrink: 0;
}

.event-month {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

.event-day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text-primary);
}

.event-year {
  font-size: 0.625rem;
  color: var(--color-text-muted);
}

.event-card-info {
  flex: 1;
}

.event-card-info h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.event-location {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  color: var(--color-text-accent);
  margin-bottom: 0.5rem;
}

.event-location svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.event-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.event-card-actions {
  flex-shrink: 0;
  align-self: center;
}

.event-card--empty {
  border-style: dashed;
  opacity: 0.7;
}

@media (max-width: 640px) {
  .event-card {
    flex-direction: column;
    align-items: stretch;
  }

  .event-card-date {
    flex-direction: row;
    gap: 0.5rem;
    min-width: auto;
    padding: 0.5rem 0.75rem;
  }

  .event-day {
    font-size: 1.125rem;
  }

  .event-card-actions {
    align-self: flex-start;
  }
}

/* Schedule a Meeting */
.schedule-section {
  background: var(--color-bg-secondary);
}

.schedule-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.schedule-info h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: var(--space-sm) 0 var(--space-md);
}

.schedule-info > p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 440px;
}

/* Advisor Preview */
.advisor-preview {
  margin-top: var(--space-lg);
}

.advisor-preview h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.advisor-preview-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.advisor-preview-photo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.advisor-preview-card strong {
  display: block;
  font-size: 0.9375rem;
}

.advisor-preview-card span {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-accent);
}

.advisor-preview-link {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

.advisor-preview-link:hover {
  color: var(--color-text-accent);
}

/* Schedule Form */
.schedule-form-card {
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.schedule-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.schedule-form .form-field {
  margin-bottom: var(--space-sm);
}

.schedule-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.schedule-form label span {
  color: var(--color-accent);
  margin-left: 2px;
}

.schedule-form input,
.schedule-form select,
.schedule-form textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-body);
  font-size: 1rem;                /* 16px prevents iOS auto-zoom */
  color: var(--color-text-primary) !important;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  line-height: 1.4;
}

.schedule-form input:focus,
.schedule-form select:focus,
.schedule-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 160, 184, 0.4);
}

.schedule-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTMgNC41TDYgNy41TDkgNC41IiBzdHJva2U9IiM2ZWEwYjgiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 12px 12px;
  padding-right: 2.5rem;
  cursor: pointer;
}

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

.form-disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .schedule-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

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

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 1; /* visible by default — JS enhances progressively */
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Only animate when JS has initialised the observer */
.js-fade-ready .fade-in {
  opacity: 0;
  transform: translateY(24px);
}

.js-fade-ready .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   TARIFF / RESOURCES BANNER
   ============================================ */
.banner-section {
  position: relative;
  overflow: hidden;
}

.banner-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.banner-card-content {
  flex: 1;
}

.banner-card-content h3 {
  margin-bottom: 0.5rem;
}

.banner-card-images {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.banner-card-images img {
  width: 140px;
  height: 93px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .banner-card {
    flex-direction: column;
    text-align: center;
  }

  .banner-card-images {
    justify-content: center;
  }
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */
@media (max-width: 768px) {
  /* Reduce section spacing */
  .section {
    padding: var(--space-xl) 0;
  }

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

  /* Reduce hero top padding */
  .about-hero {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }

  /* Use small viewport height for hero */
  .hero {
    min-height: 100svh;
  }

  /* Touch-friendly buttons */
  .btn-sm {
    min-height: 44px;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }

  .filter-btn {
    min-height: 44px;
    padding: 0.625rem 1.25rem;
  }

  /* Touch-friendly file download links */
  .file-item {
    padding: 0.75rem;
  }

  /* Touch-friendly footer links */
  .footer-links {
    gap: var(--space-sm);
  }

  .footer-links a {
    display: inline-block;
    padding: 0.5rem 0;
    min-height: 44px;
    line-height: 2;
  }

  /* Touch-friendly nav dropdown links */
  .nav-dropdown-menu a {
    padding: 0.75rem 0;
  }

  /* Shrink banner images to prevent overflow */
  .banner-card-images img {
    width: 100px;
    height: 67px;
  }

  /* Center portal features list */
  .portal-features {
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  /* Headings scale down */
  h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  /* Hero mobile fixes */
  .hero {
    min-height: 100svh;
    padding: calc(var(--header-height) + var(--space-lg)) var(--space-md) var(--space-lg);
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
    word-break: break-word;
  }

  .hero p {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero-logo {
    max-width: 260px;
    margin-bottom: var(--space-sm);
  }

  .hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 0.4rem 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  /* Stack banner images */
  .banner-card-images {
    flex-wrap: wrap;
  }

  /* overflow-x hidden removed from body — breaks position:fixed header */

  .hero h1 {
    font-size: clamp(1.75rem, 9vw, 2.25rem);
  }

  .hero p {
    font-size: 0.9375rem;
  }

  .hero-logo {
    max-width: 220px;
  }

  /* Brand grid single column on small phones */
  .brands-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Tariff grid single column */
  .tariff-brand-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 375px) {
  .hero h1 {
    font-size: clamp(1.5rem, 10vw, 2rem);
  }

  .hero-logo {
    max-width: 200px;
  }

  .brands-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================
   PROJECT INQUIRY FORM
   ============================================ */
.project-form-wrap {
  max-width: 860px;
  margin: 0 auto;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.project-form-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.project-form-header h3 {
  margin: var(--space-xs) 0 var(--space-xs);
}

.project-form-header p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  max-width: 500px;
  margin: 0 auto;
}

.project-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.pf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.pf-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pf-full {
  grid-column: 1 / -1;
}

.pf-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.pf-group label span {
  color: var(--color-accent);
  margin-left: 2px;
}

.pf-group input,
.pf-group select,
.pf-group textarea {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  font-size: 1rem;                /* 16px prevents iOS auto-zoom on focus */
  color: var(--color-text-primary) !important;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  line-height: 1.4;
}

/* Force dropdown option text color on all platforms (iOS Safari otherwise uses system colors) */
.pf-group select option,
.schedule-form select option {
  background-color: #16161f;
  color: #f0f2f5;
  padding: 0.5rem;
}

.pf-group select {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTMgNC41TDYgNy41TDkgNC41IiBzdHJva2U9IiM2ZWEwYjgiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 12px 12px;
  padding-right: 2.5rem;
  cursor: pointer;
}

.pf-group input::placeholder,
.pf-group textarea::placeholder {
  color: var(--color-text-muted);
}

.pf-group input:focus,
.pf-group select:focus,
.pf-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 160, 184, 0.15);
}

.pf-group textarea {
  resize: vertical;
  min-height: 120px;
}

.pf-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

.pf-footer {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}

.pf-submit {
  min-width: 160px;
}

.pf-privacy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  flex: 1;
  margin: 0;
}

.pf-success {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: rgba(110, 184, 130, 0.08);
  border: 1px solid rgba(110, 184, 130, 0.3);
  border-radius: var(--radius-md);
}

.pf-success svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #6eb882;
  margin-top: 2px;
}

.pf-success strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.pf-success p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 640px) {
  .pf-row {
    grid-template-columns: 1fr;
  }
  .project-form-wrap {
    padding: var(--space-lg) var(--space-md);
  }
  .pf-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .pf-submit {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   CHATBOT PLACEHOLDER
   ============================================ */
.chatbot-placeholder {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  /* Zoho SalesIQ widget will inject here via their script */
}

/* ============================================
   ADA ACCESSIBILITY — WCAG 2.1 AA
   ============================================ */

/* Remove outline for mouse users, keep for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure sufficient color contrast on interactive elements */
.nav-link:focus-visible,
.btn:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid #6eb4dc;
  outline-offset: 3px;
}

/* Minimum touch target size — 44x44px (WCAG 2.5.5)
   Use padding to hit target size — do NOT override display on nav-link
   as it breaks the flex nav alignment */
.btn,
.nav-cta,
.filter-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Nav list items — flex centered */
.nav-list li {
  display: flex;
  align-items: center;
}

/* High contrast mode support */
@media (forced-colors: active) {
  .brand-card,
  .brand-resource-card,
  .news-card,
  .event-card,
  .team-card {
    border: 2px solid ButtonText;
  }
  .btn-primary {
    background: ButtonText;
    color: ButtonFace;
  }
  .nav-cta {
    border: 2px solid ButtonText;
  }
}

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Ensure text never disappears — min contrast helpers */
.brc-name { color: var(--color-text-primary, #f0f0f5); }
.brc-tariff-detail { color: var(--color-text-secondary, #a0a0b0); }

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ============================================
   NEWS ARTICLE DETAIL PAGE
   ============================================ */
.article-page {
  padding: calc(var(--header-height) + var(--space-xl)) 0 var(--space-xl);
}

.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
}

.article-back:hover {
  color: var(--color-accent);
}

.article-back svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.article-back:hover svg {
  transform: translateX(-3px);
}

.article-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-glow);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.article-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.article-cover {
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.article-cover img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 480px;
  object-fit: cover;
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.article-body p {
  margin-bottom: var(--space-md);
}

.article-body h2,
.article-body h3 {
  color: var(--color-text-primary);
  margin: var(--space-lg) 0 var(--space-sm);
}

.article-body h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.article-body h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.375rem);
}

.article-body a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--color-accent-bright);
}

.article-body ul,
.article-body ol {
  margin: 0 0 var(--space-md) 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body .article-lead {
  font-size: 1.1875rem;
  color: var(--color-text-primary);
  line-height: 1.65;
  margin-bottom: var(--space-md);
}

.article-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 0 0.5rem var(--space-md);
  margin: var(--space-md) 0;
  font-style: italic;
  color: var(--color-text-primary);
}

.article-body img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
}

.article-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.article-share span {
  font-weight: 500;
}

.article-share a {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.article-share a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.related-articles {
  background: var(--color-bg-secondary);
  margin-top: var(--space-2xl);
}

@media (max-width: 640px) {
  .article-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .article-cta {
    text-align: center;
  }
  .article-share {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ============================================
   MOBILE OPTIMIZATION — Responsive Overhaul
   Breakpoints: 900px, 768px, 520px, 375px
   ============================================ */

/* ── Brands Grid: 2 columns on mobile ─────── */
@media (max-width: 520px) {
  .brands-grid {
    gap: var(--space-xs);
    justify-content: stretch;
  }
  .brand-card {
    width: calc((100% - var(--space-xs)) / 2);
    min-width: 0;
    padding: var(--space-sm) var(--space-xs);
    gap: 0.5rem;
  }
  .brand-card-logo {
    height: 60px;
  }
  .brand-card-logo img {
    max-height: 55px;
    max-width: 130px;
  }
  .brand-card-name {
    font-size: 0.75rem;
  }
  .brand-card-desc {
    font-size: 0.7rem;
    -webkit-line-clamp: 2;
  }
}

/* ── Filter buttons wrap nicely on small screens ── */
@media (max-width: 520px) {
  .filter-tabs {
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .filter-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    min-height: 36px;
  }
}

/* ── Hero section mobile ───────────────────── */
@media (max-width: 768px) {
  .hero {
    padding: calc(var(--header-height) + var(--space-lg)) var(--space-sm) var(--space-lg);
    min-height: auto;
  }
  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .hero p { font-size: 1rem; }
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
  }
  .hero-actions .btn { width: 100%; justify-content: center; max-width: 360px; }
}

/* ── Section spacing mobile ────────────────── */
@media (max-width: 768px) {
  .section { padding: var(--space-xl) var(--space-sm); }
  .section-sm { padding: var(--space-lg) var(--space-sm); }
  .container { padding: 0 var(--space-sm); }
}

/* ── Banner card: stack on mobile ──────────── */
@media (max-width: 768px) {
  .banner-card {
    flex-direction: column;
    gap: var(--space-md);
  }
  .banner-card-content { order: 1; }
  .banner-card-images {
    order: 2;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
  }
  .banner-card-images img {
    width: calc(50% - 0.25rem);
    height: auto;
  }
  /* Tariff signup form */
  .tariff-signup-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tariff-signup-input {
  font-size: 1rem; min-width: 0; width: 100%; }
  .tariff-signup-btn { width: 100%; justify-content: center; }
}

/* ── News grid: 2-col tablet, 1-col mobile ── */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
}
@media (max-width: 580px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card-title { font-size: 1rem; }
}

/* ── Events list mobile ─────────────────────── */
@media (max-width: 640px) {
  .event-card {
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
  }
  .event-card-date {
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
  }
  .event-month { font-size: 0.75rem; }
  .event-day   { font-size: 1.5rem; }
}

/* ── About hero mobile ──────────────────────── */
@media (max-width: 768px) {
  .about-hero { padding: calc(var(--header-height) + var(--space-lg)) var(--space-sm) var(--space-lg); }
  .about-hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
}

/* ── Team grid: 2-col mobile ────────────────── */
@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

/* ── Contact grid: stack on mobile ─────────── */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

/* ── Project inquiry form ────────────────────── */
@media (max-width: 640px) {
  .pf-row { grid-template-columns: 1fr; gap: var(--space-sm); }
  .project-form-wrap { padding: var(--space-md) var(--space-sm); }
  .pf-footer { flex-direction: column; align-items: stretch; }
  .pf-submit { width: 100%; justify-content: center; }
}

/* ── Partner portal login gate: stack mobile ── */
@media (max-width: 768px) {
  .password-gate-lockscreen {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    min-height: auto;
  }
  .password-gate-left { order: 2; }
  .password-gate-right { order: 1; }
  .password-gate-card { max-width: 100%; }
}

/* ── Portal brand resource cards grid ─────── */
@media (max-width: 900px) {
  #file-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  #file-grid { grid-template-columns: 1fr !important; }
  .brc-logo-wrap { height: 75px; }
}

/* ── Typography scaling ──────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  h2 { font-size: clamp(1.4rem, 5vw, 2rem); }
  h3 { font-size: clamp(1.1rem, 4vw, 1.5rem); }
}

/* ── Button touch targets ───────────────────── */
@media (max-width: 768px) {
  .btn, .btn-primary, .btn-secondary {
    min-height: 48px;
    padding: 0.75rem 1.25rem;
  }
  .btn-sm { min-height: 40px; }
}

/* ── Footer mobile ───────────────────────────── */
@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
  }
}

/* ── Headings: prevent overflow on narrow screens */
h1, h2, h3, h4 {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Horizontal scroll prevention — clip on wrapper only, never html/body (breaks position:fixed) ── */
.container { overflow-x: clip; }
main { overflow-x: clip; }

/* ── Safe area padding for notched devices ─── */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer {
    padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
  }
}


/* ════════════════════════════════════════════════════
   ═══ V44 MOBILE CONSOLIDATION ═══
   Final authoritative mobile rules — overrides any
   earlier conflicting rules. Applied last in cascade.
   ════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* All form fields: 16px min font-size prevents iOS zoom */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Select dropdowns: ensure text is visible */
  select {
    color: var(--color-text-primary) !important;
    background-color: var(--color-bg-primary) !important;
  }

  /* All select options: explicit colors (iOS system override fix) */
  option {
    background-color: #16161f !important;
    color: #f0f2f5 !important;
  }

  /* Form rows always stack on mobile */
  .form-row,
  .pf-row {
    grid-template-columns: 1fr !important;
    gap: var(--space-sm) !important;
  }

  /* Form padding: reduce for mobile */
  .schedule-form-card,
  .project-form-wrap {
    padding: var(--space-md) !important;
  }

  /* Schedule layout: stack info above form */
  .schedule-layout {
    grid-template-columns: 1fr !important;
    gap: var(--space-lg) !important;
  }

  /* Container edge padding on mobile */
  .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  /* Touch targets for all form buttons */
  button[type="submit"],
  .btn {
    min-height: 48px;
  }
}

/* mobile nav rules consolidated into single block below */

/* Very small screens */
@media (max-width: 375px) {
  .hero h1 {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}
