/* ================================================
   ESTIMA KM - Industrial Precision Design System
   ================================================ */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&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');

:root {
  /* Primary Colors - Steel & Navy */
  --navy-900: #0a1628;
  --navy-800: #0f2137;
  --navy-700: #162d4a;
  --navy-600: #1e3a5f;
  --navy-500: #2a4a73;

  /* Copper Accents */
  --copper-500: #c77b3f;
  --copper-400: #d4934f;
  --copper-300: #e0ab6a;
  --copper-glow: rgba(199, 123, 63, 0.4);

  /* Neutrals */
  --white: #ffffff;
  --gray-100: #f4f6f8;
  --gray-200: #e8ecf0;
  --gray-300: #d1d9e0;
  --gray-400: #9aa5b1;
  --gray-500: #6b7684;
  --gray-600: #4a5568;

  /* Blueprint accent */
  --blueprint: #3b82f6;
  --blueprint-light: rgba(59, 130, 246, 0.1);

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 22, 40, 0.12);
  --shadow-lg: 0 16px 48px rgba(10, 22, 40, 0.16);
  --shadow-copper: 0 8px 32px var(--copper-glow);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-600);
  background: var(--white);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* Typography Scale */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--navy-900);
}

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

p {
  max-width: 65ch;
}

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

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

/* Container */
.container {
  width: min(1280px, 90vw);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ================================================
   HEADER & NAVIGATION
   ================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  transition: transform var(--transition-slow), box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  min-height: 72px;
}

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

.logo img {
  height: 48px;
  width: auto;
  transition: transform var(--transition-base);
}

.logo:hover img {
  transform: scale(1.02);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.primary-nav a {
  position: relative;
  font-weight: 500;
  color: var(--navy-700);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--copper-500);
  transition: width var(--transition-base);
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--copper-500);
}

.primary-nav a:hover::after,
.primary-nav a.active::after {
  width: 100%;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-700);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-toggle:hover {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ================================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  background: var(--copper-500);
  border: 2px solid var(--copper-500);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-slow);
}

.button:hover {
  background: var(--copper-400);
  border-color: var(--copper-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-copper);
}

.button:hover::before {
  left: 100%;
}

.button.ghost {
  color: var(--navy-700);
  background: transparent;
  border-color: var(--gray-300);
}

.button.ghost:hover {
  color: var(--copper-500);
  border-color: var(--copper-500);
  background: rgba(199, 123, 63, 0.05);
  box-shadow: none;
}

.button.dark {
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.button.dark:hover {
  background: var(--navy-700);
  border-color: var(--navy-700);
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 var(--space-2xl);
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  overflow: hidden;
}

/* Blueprint grid pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridPulse 20s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Diagonal accent */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, transparent 50%, rgba(199, 123, 63, 0.1) 50%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-text {
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--copper-400);
  margin-bottom: var(--space-md);
}

.eyebrow::before {
  content: '';
  width: 40px;
  height: 2px;
  background: var(--copper-500);
}

.hero-text h1 {
  color: var(--white);
  margin-bottom: var(--space-md);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-text h1 span {
  color: var(--copper-400);
}

.hero-text > p {
  font-size: 1.125rem;
  color: var(--gray-300);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.hero-cta .button.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-cta .button.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

/* Stats */
.hero-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-stats li {
  position: relative;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.hero-stats li:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--copper-500);
  transform: translateY(-4px);
}

.hero-stats span {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--copper-400);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.hero-stats li p {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin: 0;
}

/* Hero visual */
.hero-vis {
  position: relative;
  animation: fadeInRight 0.8s ease-out 0.3s backwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-photo {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 4px solid rgba(255, 255, 255, 0.1);
}

.testimony-chip {
  position: absolute;
  bottom: -30px;
  left: -30px;
  max-width: 300px;
  padding: var(--space-md);
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--copper-500);
  font-size: 0.9375rem;
  color: var(--navy-700);
  animation: floatIn 0.8s ease-out 0.6s backwards;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================================================
   SECTIONS - General
   ================================================ */
.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section-header {
  max-width: 700px;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.125rem;
}

/* ================================================
   COMPLIANCE / SERVICES SECTION
   ================================================ */
.compliance {
  background: var(--gray-100);
  position: relative;
}

.compliance::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, var(--white) 0%, transparent 100%);
  pointer-events: none;
}

.compliance-plate {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl);
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.compliance-plate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--copper-500), var(--copper-300));
}

.compliance-plate h2 {
  margin-bottom: var(--space-sm);
}

.compliance-plate .subtitle {
  color: var(--gray-500);
  margin-bottom: var(--space-sm);
}

.compliance-plate .subtitle a {
  color: var(--copper-500);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.compliance-plate .subtitle a:hover {
  color: var(--copper-400);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--copper-500);
  background: rgba(199, 123, 63, 0.1);
  border: 2px solid var(--copper-500);
  border-radius: 4px;
  transition: all var(--transition-base);
}

.badge:hover {
  background: var(--copper-500);
  color: var(--white);
}

.compliance-mid {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--navy-900);
  margin: var(--space-xl) 0;
  position: relative;
}

.compliance-mid::before,
.compliance-mid::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 2px;
  background: var(--copper-500);
}

.compliance-mid::before {
  left: 20%;
}

.compliance-mid::after {
  right: 20%;
}

/* Service Cards */
.compliance-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.compliance-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compliance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy-700), var(--copper-500));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.compliance-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.compliance-card:hover::before {
  opacity: 1;
}

.compliance-card h3 {
  color: var(--navy-900);
  margin-bottom: var(--space-md);
}

.compliance-card ul {
  list-style: none;
  margin-bottom: var(--space-md);
  flex: 1;
}

.compliance-card li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--gray-600);
}

.compliance-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 2px;
  background: var(--copper-500);
}

.regulation-link {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: var(--space-md);
}

.regulation-link a {
  color: var(--copper-500);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.regulation-link a:hover {
  color: var(--copper-400);
}

/* License Chip Button */
.license-chip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-body);
  text-align: left;
  width: 100%;
  margin-top: auto;
}

.license-chip:hover {
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.license-chip:hover strong,
.license-chip:hover p {
  color: var(--white);
}

.license-chip:hover .doc-icon {
  background: var(--copper-500);
}

.doc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--navy-900);
  color: var(--white);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background var(--transition-base);
}

.license-chip strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.9375rem;
  transition: color var(--transition-base);
}

.license-chip p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--gray-500);
  transition: color var(--transition-base);
}

/* Compliance Plate License Chip */
.compliance-plate .license-chip {
  width: auto;
  flex-shrink: 0;
}

/* Compliance Bottom */
.compliance-bottom {
  padding: var(--space-lg);
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.compliance-bottom p {
  color: var(--navy-700);
  font-size: 1.0625rem;
}

.compliance-bottom .note {
  color: var(--gray-500);
  font-size: 0.875rem;
  font-style: italic;
  margin-top: var(--space-xs);
}

/* ================================================
   MODAL
   ================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.modal.open {
  display: flex;
  animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
  to { opacity: 1; }
}

.modal-content {
  width: 100%;
  max-width: 900px;
  height: 85vh;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  animation: modalSlideIn 0.3s ease forwards;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.95) translateY(20px);
  }
  to {
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-100);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy-900);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}

.modal-body {
  flex: 1;
  overflow: hidden;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================================
   LICENSES PAGE
   ================================================ */
.license-library {
  padding-top: 140px;
}

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

.license-card {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition-base);
}

.license-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  transform: translateY(-4px);
}

.license-card header {
  padding: var(--space-md) var(--space-lg);
  background: var(--navy-900);
}

.license-card header h2 {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.license-card header p {
  color: var(--gray-400);
  font-size: 0.875rem;
  margin: 0;
}

.license-preview {
  position: relative;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.license-preview iframe {
  width: 100%;
  height: 300px;
  border: none;
}

.license-actions {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: flex-end;
}

/* ================================================
   CONTACT PAGE / OFFICES
   ================================================ */
.offices {
  padding-top: 140px;
}

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

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

.office-card {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  transition: all var(--transition-base);
}

.office-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--copper-500);
}

.office-header {
  margin-bottom: var(--space-md);
}

.office-header .eyebrow {
  margin-bottom: var(--space-xs);
}

.office-header .eyebrow::before {
  display: none;
}

.office-header h2,
.office-header h3 {
  margin: 0;
}

.office-info p {
  margin: var(--space-xs) 0;
  color: var(--gray-600);
}

.office-info a {
  color: var(--copper-500);
  transition: color var(--transition-fast);
}

.office-info a:hover {
  color: var(--copper-400);
}

.office-map iframe {
  width: 100%;
  height: 200px;
  border: none;
  border-radius: 8px;
}

/* Main Office Highlight */
.office-main {
  position: relative;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  border-color: transparent;
  grid-template-columns: 1fr 400px;
}

.office-main .eyebrow {
  color: var(--copper-400);
}

.office-main h2 {
  color: var(--white);
}

.office-main .office-info p {
  color: var(--gray-300);
}

.office-main .office-info a {
  color: var(--copper-300);
}

.office-main .office-info a:hover {
  color: var(--copper-400);
}

.office-main .office-map iframe {
  height: 280px;
}

.office-main:hover {
  box-shadow: var(--shadow-lg);
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  position: relative;
  background: var(--navy-900);
  color: var(--gray-400);
  padding: var(--space-2xl) 0 var(--space-lg);
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--copper-500), var(--copper-300), var(--copper-500));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-grid .logo img {
  height: 40px;
  margin-bottom: var(--space-md);
  filter: brightness(0) invert(1);
}

.footer-grid > div:first-child p {
  color: var(--gray-400);
  max-width: 350px;
}

.footer-contact-small {
  font-size: 0.875rem;
  margin-top: var(--space-md);
}

.footer-contact-small a {
  color: var(--copper-400);
  transition: color var(--transition-fast);
}

.footer-contact-small a:hover {
  color: var(--copper-300);
}

.footer-grid h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer-grid a {
  display: block;
  color: var(--gray-400);
  padding: var(--space-xs) 0;
  transition: all var(--transition-fast);
}

.footer-grid a:hover {
  color: var(--copper-400);
  transform: translateX(4px);
}

.footer-meta {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ================================================
   RESPONSIVE DESIGN - Mobile-First Optimizations
   ================================================ */

/* Tablet - 1024px */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .eyebrow {
    justify-content: center;
  }

  .eyebrow::before {
    display: none;
  }

  .hero-text > p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    max-width: 500px;
    margin: 0 auto;
  }

  .hero-vis {
    display: none;
  }

  .compliance-plate {
    grid-template-columns: 1fr;
  }

  .compliance-columns {
    grid-template-columns: 1fr;
  }

  .compliance-mid::before,
  .compliance-mid::after {
    display: none;
  }

  .license-grid {
    grid-template-columns: 1fr;
  }

  .office-main {
    grid-template-columns: 1fr;
  }

  .office-main .office-map iframe {
    height: 200px;
  }

  .office-grid-secondary {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

/* Mobile Navigation & Layout - 768px */
@media (max-width: 768px) {
  /* Adjust spacing variables for mobile */
  :root {
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }

  /* Header & Navigation */
  .nav-wrapper {
    min-height: 64px;
    padding: var(--space-xs) 0;
  }

  .logo img {
    height: 40px;
  }

  .nav-actions {
    display: contents;
  }

  .lang-toggle {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    order: 1;
  }

  .primary-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    z-index: 99;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: var(--space-lg) 0;
    gap: 0;
    background: var(--navy-900) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .primary-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .primary-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 64px;
    padding: var(--space-md) var(--space-lg);
    font-size: 1.5rem;
    font-family: var(--font-display);
    letter-spacing: 0.05em;
    text-align: center;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, color 0.2s ease;
  }

  .primary-nav a:first-child {
    border-top: none;
  }

  .primary-nav a::after {
    display: none;
  }

  .primary-nav a:hover,
  .primary-nav a.active {
    background: rgba(199, 123, 63, 0.2);
    color: var(--copper-400);
  }

  .primary-nav a:active {
    background: rgba(199, 123, 63, 0.3);
  }

  /* Hamburger Menu */
  .nav-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    z-index: 101;
  }

  .nav-toggle span {
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.2s ease;
  }

  .nav-toggle.active span {
    background: var(--copper-500);
  }

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

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

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

  /* Hero Section */
  .hero {
    min-height: auto;
    padding: 90px 0 var(--space-xl);
  }

  .hero::after {
    display: none;
  }

  .hero-text h1 {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
    margin-bottom: var(--space-sm);
  }

  .hero-text > p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
  }

  .hero-cta {
    margin-bottom: var(--space-lg);
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xs);
    max-width: 100%;
  }

  .hero-stats li {
    padding: var(--space-sm);
    text-align: center;
  }

  .hero-stats span {
    font-size: 1.75rem;
  }

  .hero-stats li p {
    font-size: 0.75rem;
  }

  /* Sections */
  .section {
    padding: var(--space-xl) 0;
  }

  .section-header {
    margin-bottom: var(--space-lg);
  }

  .section-header h1,
  .section-header h2 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .section-header p {
    font-size: 1rem;
  }

  /* Compliance Section */
  .compliance-plate {
    padding: var(--space-md);
    gap: var(--space-md);
    border-radius: 12px;
  }

  .compliance-plate h2 {
    font-size: 1.5rem;
  }

  .compliance-plate .subtitle {
    font-size: 0.9375rem;
  }

  .compliance-mid {
    font-size: 1.25rem;
    margin: var(--space-lg) 0;
  }

  .compliance-card {
    padding: var(--space-md);
  }

  .compliance-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
  }

  .compliance-card li {
    font-size: 0.9375rem;
    margin-bottom: var(--space-xs);
  }

  .compliance-bottom {
    padding: var(--space-md);
    border-radius: 12px;
  }

  .compliance-bottom p {
    font-size: 1rem;
  }

  /* License Chip */
  .license-chip {
    padding: var(--space-sm);
    gap: var(--space-sm);
    min-height: 56px;
  }

  .doc-icon {
    width: 40px;
    height: 40px;
  }

  .license-chip strong {
    font-size: 0.875rem;
  }

  .license-chip p {
    font-size: 0.75rem;
  }

  /* License Page */
  .license-library,
  .offices {
    padding-top: 90px;
  }

  .license-card header {
    padding: var(--space-md);
  }

  .license-card header h2 {
    font-size: 1.25rem;
  }

  .license-preview iframe {
    height: 250px;
  }

  .license-actions {
    padding: var(--space-md);
    justify-content: center;
  }

  /* Office Cards */
  .office-card {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .office-header h2,
  .office-header h3 {
    font-size: 1.5rem;
  }

  .office-info p {
    font-size: 0.9375rem;
  }

  .office-map {
    border-radius: 8px;
    overflow: hidden;
  }

  .office-map iframe {
    height: 200px;
    border-radius: 8px;
  }

  .office-main .office-map iframe {
    height: 220px;
  }

  /* Footer */
  .site-footer {
    padding: var(--space-xl) 0 var(--space-md);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .footer-grid > div:first-child p {
    max-width: none;
    margin: 0 auto;
  }

  .footer-grid .logo {
    justify-content: center;
  }

  .footer-grid h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
  }

  .footer-grid a {
    padding: var(--space-xs) 0;
    display: inline-block;
  }

  .footer-grid a:hover {
    transform: none;
  }

  .footer-contact-small {
    font-size: 0.8125rem;
    line-height: 1.8;
  }

  .footer-meta {
    padding-top: var(--space-md);
    font-size: 0.8125rem;
  }

  /* Modal */
  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    max-width: 100%;
    height: 90vh;
    border-radius: 16px 16px 0 0;
  }

  .modal-header {
    padding: var(--space-sm) var(--space-md);
  }

  .modal-header h3 {
    font-size: 1.125rem;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
}

/* Medium Mobile - 414px (iPhone Plus/Pro Max sizes) */
@media (max-width: 414px) {
  .container {
    width: 100%;
    padding: 0 var(--space-sm);
  }

  /* Typography */
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-sm);
  }

  /* Buttons */
  .button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    min-height: 48px;
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--space-sm);
  }

  /* Hero Stats */
  .hero-stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .hero-stats li {
    padding: var(--space-sm) var(--space-xs);
  }

  .hero-stats span {
    font-size: 1.5rem;
  }

  .hero-stats li p {
    font-size: 0.6875rem;
    line-height: 1.3;
  }

  /* Compliance */
  .compliance-plate {
    padding: var(--space-sm);
  }

  .compliance-plate h2 {
    font-size: 1.25rem;
  }

  .badge {
    font-size: 1rem;
    padding: 0.4rem 1rem;
  }

  .compliance-card {
    padding: var(--space-sm);
  }

  .compliance-card h3 {
    font-size: 1.125rem;
  }

  .regulation-link {
    font-size: 0.8125rem;
  }

  /* License Page */
  .license-preview {
    display: none;
  }

  .license-card header {
    padding: var(--space-sm) var(--space-md);
  }

  .license-card header h2 {
    font-size: 1.125rem;
  }

  .license-card header p {
    font-size: 0.8125rem;
  }

  .license-actions {
    padding: var(--space-sm) var(--space-md);
  }

  .license-actions .button {
    width: 100%;
  }

  /* Office Cards */
  .office-header .eyebrow {
    font-size: 0.6875rem;
  }

  .office-header h2,
  .office-header h3 {
    font-size: 1.25rem;
  }

  .office-info p {
    font-size: 0.875rem;
  }

  .office-map iframe {
    height: 180px;
  }
}

/* Small Mobile - 375px (iPhone standard sizes) */
@media (max-width: 375px) {
  :root {
    --space-sm: 0.875rem;
    --space-md: 1.25rem;
    --space-lg: 1.75rem;
  }

  .nav-wrapper {
    min-height: 60px;
  }

  .logo img {
    height: 36px;
  }

  .lang-toggle {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-toggle span {
    width: 20px;
  }

  .primary-nav {
    top: 60px;
  }

  .primary-nav a {
    padding: var(--space-sm) var(--space-md);
    font-size: 1.25rem;
  }

  /* Hero */
  .hero {
    padding: 80px 0 var(--space-lg);
  }

  .hero-text h1 {
    font-size: 2rem;
  }

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

  .hero-stats span {
    font-size: 1.375rem;
  }

  .hero-stats li p {
    font-size: 0.625rem;
  }

  /* Sections */
  .section-header h1,
  .section-header h2 {
    font-size: 1.5rem;
  }

  .section-header p {
    font-size: 0.9375rem;
  }

  /* Cards */
  .compliance-plate {
    border-radius: 10px;
  }

  .compliance-card,
  .license-card,
  .office-card {
    border-radius: 10px;
  }

  /* Footer */
  .footer-grid .logo img {
    height: 32px;
  }

  .footer-grid h3 {
    font-size: 1rem;
  }
}

/* Extra Small Mobile - 320px (iPhone SE, older devices) */
@media (max-width: 320px) {
  :root {
    --space-xs: 0.375rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
  }

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

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.125rem; }

  .logo img {
    height: 32px;
  }

  .lang-toggle {
    padding: 0.35rem 0.625rem;
    font-size: 0.6875rem;
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .nav-toggle span {
    width: 18px;
    height: 2px;
  }

  .nav-wrapper {
    min-height: 56px;
  }

  .primary-nav {
    top: 56px;
  }

  .primary-nav a {
    padding: var(--space-sm);
    font-size: 1rem;
  }

  /* Hero */
  .hero {
    padding: 72px 0 var(--space-md);
  }

  .hero-text h1 {
    font-size: 1.625rem;
    line-height: 1.15;
  }

  .hero-text > p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .eyebrow {
    font-size: 0.6875rem;
  }

  .button {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }

  .hero-stats li {
    padding: var(--space-xs);
  }

  .hero-stats span {
    font-size: 1.25rem;
    margin-bottom: 2px;
  }

  .hero-stats li p {
    font-size: 0.5625rem;
  }

  /* Compliance */
  .compliance-plate h2 {
    font-size: 1.125rem;
  }

  .compliance-plate .subtitle {
    font-size: 0.8125rem;
  }

  .badge {
    font-size: 0.875rem;
    padding: 0.35rem 0.875rem;
  }

  .compliance-mid {
    font-size: 1rem;
  }

  .compliance-card h3 {
    font-size: 1rem;
  }

  .compliance-card li {
    font-size: 0.8125rem;
    padding-left: 1.25rem;
  }

  .compliance-card li::before {
    width: 6px;
  }

  .regulation-link {
    font-size: 0.75rem;
  }

  .license-chip {
    padding: var(--space-xs) var(--space-sm);
    gap: var(--space-xs);
    min-height: 48px;
  }

  .doc-icon {
    width: 36px;
    height: 36px;
    font-size: 0.6875rem;
  }

  .license-chip strong {
    font-size: 0.8125rem;
  }

  .license-chip p {
    font-size: 0.6875rem;
  }

  .compliance-bottom p {
    font-size: 0.9375rem;
  }

  .compliance-bottom .note {
    font-size: 0.8125rem;
  }

  /* License Page */
  .license-card header h2 {
    font-size: 1rem;
  }

  .license-card header p {
    font-size: 0.75rem;
  }

  /* Office Cards */
  .office-header h2,
  .office-header h3 {
    font-size: 1.125rem;
  }

  .office-info p {
    font-size: 0.8125rem;
  }

  .office-map iframe {
    height: 160px;
  }

  /* Footer */
  .footer-grid > div:first-child p {
    font-size: 0.875rem;
  }

  .footer-contact-small {
    font-size: 0.75rem;
  }

  .footer-meta {
    font-size: 0.75rem;
  }

  /* Modal */
  .modal-content {
    height: 95vh;
  }

  .modal-header h3 {
    font-size: 1rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Ensure minimum touch target sizes (44px recommended by Apple, 48px by Google) */
  .button,
  .license-chip,
  .nav-toggle,
  .lang-toggle,
  .modal-close,
  .badge {
    min-height: 44px;
  }

  .primary-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-grid a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .office-info a {
    display: inline-block;
    padding: 4px 0;
  }

  /* Disable hover effects that cause issues on touch */
  .button:hover,
  .compliance-card:hover,
  .office-card:hover,
  .license-card:hover,
  .hero-stats li:hover {
    transform: none;
  }

  /* Use active states instead for touch feedback */
  .button:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  .compliance-card:active,
  .license-card:active,
  .office-card:active {
    transform: scale(0.99);
    box-shadow: var(--shadow-sm);
  }

  .license-chip:active {
    transform: scale(0.98);
    background: var(--navy-900);
  }

  .license-chip:active strong,
  .license-chip:active p {
    color: var(--white);
  }

  .primary-nav a:active {
    background: var(--gray-100);
  }

  /* Remove the shimmer effect on buttons for touch devices */
  .button::before {
    display: none;
  }

  /* Smooth scroll behavior for iOS */
  .primary-nav {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  /* Reduce animation complexity on mobile */
  .hero::before {
    animation: none;
    opacity: 0.7;
  }

  /* Simplify hero animations */
  .hero-text,
  .hero-text > p,
  .hero-cta,
  .hero-stats {
    animation-duration: 0.5s;
  }

  /* Reduce blur effects which are GPU intensive */
  .hero-stats li {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.08);
  }

  .site-header {
    backdrop-filter: blur(12px);
  }

  .modal {
    backdrop-filter: blur(4px);
  }

  /* Hardware acceleration for smooth scrolling */
  .primary-nav {
    will-change: opacity, transform;
  }

  /* Optimize card transitions */
  .compliance-card,
  .license-card,
  .office-card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
  }
}

/* Landscape mode on mobile */
@media (max-width: 896px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 80px 0 var(--space-lg);
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
  }

  .primary-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: var(--space-md);
  }

  .primary-nav a {
    width: auto;
    border: none;
    padding: var(--space-sm) var(--space-md);
  }

  .modal-content {
    height: 85vh;
  }
}

/* Safe area insets for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }

  .primary-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .site-footer {
    padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
  }

  .modal-content {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* 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;
  }

  .hero::before {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .button {
    border-width: 3px;
  }

  .compliance-card,
  .license-card,
  .office-card {
    border-width: 2px;
  }

  .primary-nav a.active {
    text-decoration: underline;
    text-decoration-thickness: 3px;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .hero-vis,
  .license-preview,
  .modal,
  .nav-toggle,
  .lang-toggle {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  .hero {
    background: #fff;
    color: #000;
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-text h1,
  .hero-text p {
    color: #000;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  .button,
  .badge {
    border: 2px solid #000;
    background: transparent;
    color: #000;
  }
}
