/* ═══════════════════════════════════════════════════════════
   SANE Consulting Inc. — styles.css
   Design: Eidon | Implementation: Zohar
   ═══════════════════════════════════════════════════════════ */

/* ─── 1. CSS Custom Properties ─── */

:root {
  /* Color Palette */
  --color-midnight:           #1B2028;
  --color-midnight-light:     #242B35;

  --color-copper:             #B87333;
  --color-copper-light:       #D4944A;
  --color-copper-dark:        #96592A;
  --color-copper-glow:        rgba(184, 115, 51, 0.15);
  --color-error-glow:         rgba(196, 91, 74, 0.15);

  --color-steel:              #5A7A8A;
  --color-steel-light:        #7A9DAD;

  --color-surface-warm:       #FAF8F5;
  --color-surface-mid:        #F0EDE8;
  --color-surface-cool:       #E8E4DF;

  --color-text-primary:       #1B2028;
  --color-text-secondary:     #5C5C5C;
  --color-text-tertiary:      #8A8A8A;
  --color-text-on-dark:       #F0EDE8;
  --color-text-on-dark-muted: #9A9A9A;

  --color-border:             #DDD9D3;
  --color-border-dark:        #2E3540;

  --color-success:            #4A8C5C;
  --color-error:              #C45B4A;

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  1.875rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-5xl:  3.75rem;

  --leading-tight:   1.2;
  --leading-snug:    1.35;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.05em;
  --tracking-wider:  0.1em;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-8:  3rem;
  --space-10: 4rem;
  --space-12: 5rem;
  --space-16: 8rem;

  /* Layout */
  --container-max:    1200px;
  --container-narrow: 800px;
  --container-pad:    var(--space-5);
  --section-pad-y:    var(--space-12);

  --grid-gap:    var(--space-6);
  --grid-gap-sm: var(--space-4);

  /* Borders & Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(27, 32, 40, 0.06), 0 1px 2px rgba(27, 32, 40, 0.04);
  --shadow-md:     0 4px 12px rgba(27, 32, 40, 0.08), 0 2px 4px rgba(27, 32, 40, 0.04);
  --shadow-lg:     0 12px 32px rgba(27, 32, 40, 0.10), 0 4px 8px rgba(27, 32, 40, 0.06);
  --shadow-copper: 0 4px 20px rgba(184, 115, 51, 0.20);

  /* Transitions */
  --ease-out:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out:   cubic-bezier(0.42, 0, 0.58, 1);
  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   400ms;
  --duration-reveal: 600ms;

  /* Z-Index */
  --z-base:    1;
  --z-sticky:  100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-toast:   400;
}

/* ─── 2. Reset & Base ─── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background: var(--color-surface-warm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

address {
  font-style: normal;
}

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

/* ─── 3. Skip Link ─── */

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--color-copper);
  color: white;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-copper-light);
  outline-offset: 2px;
}

/* ─── 4. Layout Utilities ─── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

section {
  padding-block: var(--section-pad-y);
}

/* Grids */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--grid-gap);
}

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

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

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

/* ─── 5. Typography Classes ─── */

.label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  line-height: var(--leading-tight);
}

.body-large {
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  margin-block-end: var(--space-4);
}

.body-large:last-child {
  margin-block-end: 0;
}

/* ─── 6. Buttons ─── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-copper);
  color: white;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--color-copper);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

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

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 3px;
}

/* Ghost button — dark backgrounds */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: transparent;
  color: var(--color-text-on-dark);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid rgba(240, 237, 232, 0.3);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out);
}

.btn-ghost:hover {
  border-color: var(--color-text-on-dark);
  background: rgba(240, 237, 232, 0.08);
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 3px;
}

/* ─── 7. Navigation ─── */

header {
  position: relative;
  z-index: var(--z-sticky);
}

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: var(--z-sticky);
  transition: background var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

#navbar.scrolled {
  background: var(--color-midnight);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo img {
  max-height: 40px;
  width: auto;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: block;
}

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

.nav-link {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-on-dark);
  text-decoration: none;
  line-height: 1;
  position: relative;
  transition: color var(--duration-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-copper);
  transform: scaleX(0);
  transition: transform var(--duration-fast);
}

.nav-link:hover {
  color: var(--color-copper-light);
}

.nav-link.active {
  color: var(--color-copper);
}

.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-cta {
  margin-left: var(--space-2);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 10px;
}

.ham-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-on-dark);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-base) var(--ease-out);
}

.hamburger:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--color-midnight);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--space-5);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--color-text-on-dark);
  cursor: pointer;
  transition: color var(--duration-fast);
  margin-bottom: var(--space-5);
}

.mobile-close:hover {
  color: var(--color-copper-light);
}

.mobile-close:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.mobile-link {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text-on-dark);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.mobile-link:hover {
  color: var(--color-copper-light);
}

.mobile-link:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 4px;
  border-radius: 2px;
}

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

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 32, 40, 0.6);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.mobile-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ─── 8. Network Pattern ─── */

.network-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ─── 9. Hero ─── */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-midnight);
  overflow: hidden;
  padding-block: var(--space-16);
  /* Push content below fixed nav */
  padding-block-start: calc(72px + var(--space-10));
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  max-width: var(--container-narrow);
}

.hero-overline {
  color: var(--color-copper);
  margin-block-end: var(--space-5);
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-on-dark);
  margin-block-end: var(--space-5);
}

.copper-dot {
  color: var(--color-copper);
}

.hero-sub {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-on-dark-muted);
  max-width: 600px;
  margin-block-end: var(--space-6);
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-block-end: var(--space-8);
}

.hero-location {
  color: var(--color-text-on-dark-muted);
  margin-block-start: var(--space-8);
}

/* ─── 10. Section Header Pattern ─── */

.section-header {
  margin-block-end: var(--space-8);
}

.section-overline {
  color: var(--color-copper);
  margin-block-end: var(--space-2);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-block-end: var(--space-3);
}

.section-subtitle {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  margin-block-end: var(--space-5);
}

.section-accent {
  width: 60px;
  height: 2px;
  background: var(--color-copper);
}

/* Dark section header variants */
.section-overline--dark {
  color: var(--color-copper-light);
}

.section-title--dark {
  color: var(--color-text-on-dark);
}

.section-subtitle--dark {
  color: var(--color-text-on-dark-muted);
}

.section-accent--dark {
  background: var(--color-copper-light);
}

/* ─── 11. Services Section ─── */

#services {
  background: var(--color-surface-warm);
}

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

.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-copper);
  transform: translateY(-2px);
}

.service-icon {
  color: var(--color-copper);
  width: 40px;
  height: 40px;
  margin-block-end: var(--space-5);
  flex-shrink: 0;
}

.service-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  margin-block-end: var(--space-3);
}

.service-desc {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  margin-block-end: var(--space-4);
  flex: 1;
}

/* Base: hidden by browser UA (no JS) */
.service-detail {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

/* JS-enhanced: transition-based expand/collapse */
.js-enabled .service-detail {
  display: block;        /* override [hidden] so transitions work */
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-block-end: 0;
  transition: max-height var(--duration-slow) var(--ease-out),
              opacity var(--duration-slow) var(--ease-out),
              margin var(--duration-slow) var(--ease-out);
}

.js-enabled .service-detail.is-expanded {
  max-height: 300px;
  opacity: 1;
  margin-block-end: var(--space-4);
}

.service-expand {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-copper);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  transition: color var(--duration-fast);
  margin-top: auto;
}

.service-expand:hover {
  color: var(--color-copper-light);
}

.service-expand:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 3px;
  border-radius: 2px;
}

.expand-arrow {
  display: inline-block;
  transition: transform var(--duration-base) var(--ease-out);
}

.service-expand:hover .expand-arrow {
  transform: translateX(4px);
}

.service-expand[aria-expanded="true"] .expand-arrow {
  transform: rotate(-90deg) translateX(0);
}

/* ─── 12. About Section ─── */

#about {
  background: var(--color-surface-mid);
}

.about-grid {
  align-items: start;
}

.about-narrative {
  padding-right: var(--space-4);
}

.about-metrics {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.metric-card {
  background: var(--color-surface-warm);
  border-left: 3px solid var(--color-copper);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.metric-number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--color-copper);
}

.metric-label {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

/* ─── 13. DIMS Section ─── */

#dims {
  position: relative;
  background: var(--color-midnight);
  overflow: hidden;
}

.dims-grid {
  position: relative;
  z-index: var(--z-base);
  align-items: start;
}

.dims-intro {
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--color-text-on-dark-muted);
  margin-block-end: var(--space-6);
}

.dims-feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.dims-feature-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.dims-marker {
  color: var(--color-copper-light);
  font-size: var(--text-md);
  line-height: 1.4;
  flex-shrink: 0;
  margin-top: 2px;
}

.dims-feature-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-on-dark);
  margin-block-end: var(--space-1);
}

.dims-feature-desc {
  font-size: var(--text-base);
  color: var(--color-text-on-dark-muted);
}

/* DIMS Visualization */
.dims-viz-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.dims-viz {
  margin: 0;
  width: 100%;
  max-width: 420px;
}

.dims-viz-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 320px;
  margin-inline: auto;
}

.dims-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Site cards */
.dims-site {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--color-border-dark);
  background: var(--color-midnight-light);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  min-width: 90px;
}

.dims-hq {
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 120px;
  justify-content: center;
  border-color: var(--color-copper-dark);
}

.dims-site-a {
  top: 150px;
  left: 10px;
}

.dims-site-b {
  top: 150px;
  right: 10px;
}

.dims-site-c {
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  flex-shrink: 0;
}

.site-dot--active {
  background: var(--color-success);
}

.site-name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-on-dark);
}

/* Sync badge */
.sync-badge {
  position: absolute;
  top: 170px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(74, 140, 92, 0.15);
  border: 1px solid rgba(74, 140, 92, 0.4);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  color: var(--color-success);
  white-space: nowrap;
  animation: sync-pulse 2s ease-in-out infinite;
}

@keyframes sync-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 140, 92, 0.3); }
  50%       { box-shadow: 0 0 0 6px rgba(74, 140, 92, 0); }
}

/* Trusted by */
.dims-trusted {
  position: relative;
  z-index: var(--z-base);
  margin-block-start: var(--space-8);
  text-align: center;
}

.dims-trusted-label {
  color: var(--color-copper-light);
  margin-block-end: var(--space-3);
}

.dims-trusted-names {
  font-size: var(--text-md);
  color: var(--color-text-on-dark-muted);
}

/* ─── 14. Clients Section ─── */

#clients {
  background: var(--color-surface-warm);
}

.client-card {
  background: white;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-copper);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: border-top-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.client-card:hover {
  border-top-color: var(--color-copper-light);
  box-shadow: var(--shadow-md);
}

.client-name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  margin-block-end: var(--space-2);
}

.client-industry {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ─── 15. Partners Section ─── */

#partners {
  background: var(--color-surface-mid);
}

.partners-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}

.partner-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 160px;
  height: 100px;
  background: var(--color-surface-warm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.partner-badge:hover {
  border-color: var(--color-copper);
  box-shadow: var(--shadow-sm);
}

.partner-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.partner-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* ─── 16. Contact Section ─── */

#contact {
  background: var(--color-surface-warm);
}

.contact-grid {
  align-items: start;
}

/* Form */
.contact-form-wrap {
  /* intentionally no extra styling — let the form breathe */
}

.form-group {
  margin-block-end: var(--space-5);
}

.form-group:last-of-type {
  margin-block-end: 0;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin-block-end: var(--space-2);
}

.req-mark {
  color: var(--color-copper);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  transition: border-color var(--duration-fast);
  appearance: none;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-copper);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-copper-glow);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--color-error);
}

.form-group input.error:focus,
.form-group textarea.error:focus {
  box-shadow: 0 0 0 3px var(--color-error-glow);
}

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

.field-error {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-error);
  margin-top: var(--space-1);
  min-height: 1.2em;
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.field-error:not(:empty) {
  opacity: 1;
}

.form-submit {
  /* full-width on mobile, auto on desktop via responsive */
}

/* Form success */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  gap: var(--space-4);
}

.form-success[hidden] {
  display: none;
}

.success-text {
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  max-width: 380px;
}

/* Contact info card */
.contact-info-card {
  background: var(--color-surface-mid);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.contact-info-heading {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

.contact-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-4);
}

.contact-detail {
  margin-block-end: var(--space-5);
}

.contact-detail:last-of-type {
  margin-block-end: 0;
}

.contact-detail-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-copper);
  margin-block-end: var(--space-1);
}

.contact-detail-label svg {
  flex-shrink: 0;
}

.contact-detail-value {
  font-size: var(--text-base);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
}

.contact-detail-value p {
  margin: 0;
}

.contact-phone {
  color: var(--color-text-primary);
  transition: color var(--duration-fast);
}

.contact-phone:hover {
  color: var(--color-copper);
}

.contact-phone:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Map placeholder */
.map-placeholder {
  height: 200px;
  background: var(--color-surface-cool);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  margin-block-start: var(--space-5);
}

/* ─── 17. Footer ─── */

footer {
  position: relative;
  background: var(--color-midnight);
  overflow: hidden;
}

.network-pattern--footer {
  opacity: 0.6;
}

.footer-grid {
  position: relative;
  z-index: var(--z-base);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-8);
  padding-block: var(--space-10);
}

/* Footer brand */
.footer-logo img {
  max-height: 32px;
  background: rgba(255, 255, 255, 0.92);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-muted);
  margin-top: var(--space-4);
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-muted);
  margin-top: var(--space-4);
}

/* Footer links */
.footer-col-heading {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-on-dark);
  margin-block-end: var(--space-4);
}

.footer-links nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-muted);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.footer-link:hover {
  color: var(--color-copper-light);
}

.footer-link:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Footer contact */
.footer-contact .footer-col-heading {
  /* inherits from .footer-col-heading */
}

.footer-address {
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-muted);
  line-height: var(--leading-normal);
  margin-block-end: var(--space-3);
}

.footer-address p {
  margin: 0;
}

.footer-phone {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-muted);
  text-decoration: none;
  margin-block-end: var(--space-3);
  transition: color var(--duration-fast);
}

.footer-phone:hover {
  color: var(--color-copper-light);
}

.footer-phone:focus-visible {
  outline: 2px solid var(--color-copper-light);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-hours {
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-muted);
}

/* Footer bottom bar */
.footer-bottom {
  position: relative;
  z-index: var(--z-base);
  border-top: 1px solid var(--color-border-dark);
}

.footer-bottom .container {
  padding-block: var(--space-4);
  text-align: center;
}

.footer-location {
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-muted);
}

/* ─── 18. Scroll Reveal Animations ─── */

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ─── 19. prefers-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;
  }

  .js-enabled .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ─── 20. Responsive — Tablet (≥ 768px) ─── */

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

/* ─── 21. Responsive — Mobile (< 768px) ─── */

@media (max-width: 767px) {
  :root {
    --section-pad-y: var(--space-8);
  }

  /* Show hamburger, hide desktop nav */
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  #navbar {
    height: 60px;
  }

  .nav-logo img {
    max-height: 32px;
  }

  /* Hero — adjust for smaller nav */
  #hero {
    padding-block-start: calc(60px + var(--space-8));
  }

  .hero-headline {
    font-size: var(--text-4xl);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-ctas .btn-primary,
  .hero-ctas .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  /* Section headers */
  .section-header {
    text-align: center;
  }

  .section-accent {
    margin-inline: auto;
  }

  /* Grids collapse */
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

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

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* About */
  .about-narrative {
    padding-right: 0;
  }

  /* DIMS viz: simplified vertical stack */
  .dims-viz-inner {
    width: 100%;
    max-width: 280px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
    position: static;
  }

  .dims-lines {
    display: none;
  }

  .dims-site {
    position: static;
    transform: none;
    width: 100%;
    max-width: 200px;
    justify-content: flex-start;
  }

  .dims-hq {
    border-color: var(--color-copper-dark);
  }

  .sync-badge {
    position: static;
    transform: none;
  }

  /* Clients */
  .clients-grid {
    grid-template-columns: 1fr;
  }

  /* Partners */
  .partners-row {
    gap: var(--space-3);
  }

  .partner-badge {
    width: calc(50% - var(--space-3) / 2);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-submit {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding-block: var(--space-8);
  }

  /* Typography step-down */
  .section-title {
    font-size: var(--text-2xl);
  }

  /* Form inputs: prevent iOS zoom */
  .form-group input,
  .form-group textarea {
    font-size: 16px;
  }

  /* Touch targets */
  .service-expand,
  .mobile-link,
  .footer-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ─── 22. Responsive — Small mobile (< 480px) ─── */

@media (max-width: 479px) {
  .hero-headline {
    font-size: var(--text-3xl);
  }

  .section-title {
    font-size: var(--text-xl);
  }

  .partner-badge {
    width: 100%;
    max-width: 200px;
  }
}

/* ─── 23. Responsive — Tablet only (768px – 1023px) ─── */

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

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

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ─── 24. Responsive — Desktop (≥ 1024px) ─── */

@media (min-width: 1024px) {
  .partners-row {
    flex-wrap: nowrap;
    justify-content: center;
  }
}
