/* ============================================================
   ADAM ENGINEERING & CONSTRUCTION — DESIGN SYSTEM
   Brand Colors extracted from logo:
   Primary Blue: #1C3A5C | Teal: #2DA89A | Dark: #0F1F2E
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ─── CSS CUSTOM PROPERTIES ─────────────────────────────── */
:root {
  /* Brand Colors */
  --color-blue:          #1C3A5C;
  --color-blue-dark:     #112336;
  --color-blue-mid:      #234870;
  --color-blue-light:    #2A5580;
  --color-teal:          #2DA89A;
  --color-teal-dark:     #1E8A7E;
  --color-teal-light:    #3FC4B5;
  --color-teal-muted:    rgba(45, 168, 154, 0.15);

  /* Neutrals */
  --color-dark:          #0C1B2A;
  --color-dark-mid:      #0F1F2E;
  --color-slate:         #1A2E42;
  --color-slate-mid:     #243A50;
  --color-white:         #FFFFFF;
  --color-off-white:     #F8FAFB;
  --color-gray-50:       #F5F7FA;
  --color-gray-100:      #EFF2F7;
  --color-gray-200:      #E2E8F0;
  --color-gray-300:      #CBD5E1;
  --color-gray-400:      #94A3B8;
  --color-gray-500:      #64748B;
  --color-gray-600:      #475569;
  --color-gray-700:      #334155;
  --color-gray-800:      #1E293B;
  --color-gray-900:      #0F172A;

  /* Semantic */
  --color-text-primary:  #0C1B2A;
  --color-text-secondary:#334155;
  --color-text-muted:    #64748B;
  --color-text-light:    #94A3B8;
  --color-text-inverse:  #FFFFFF;
  --color-border:        #E2E8F0;
  --color-border-dark:   rgba(255,255,255,0.1);

  /* Typography */
  --font-display:        'Space Grotesk', sans-serif;
  --font-heading:        'Manrope', sans-serif;
  --font-body:           'Inter', sans-serif;
  --font-label:          'Plus Jakarta Sans', sans-serif;

  /* Font Sizes */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;
  --text-7xl:   4.5rem;
  --text-8xl:   6rem;

  /* Spacing (8px base) */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;
  --space-40:  10rem;

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

  /* Shadows */
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:    0 4px 16px rgba(12,27,42,0.08);
  --shadow-lg:    0 8px 32px rgba(12,27,42,0.12);
  --shadow-xl:    0 20px 60px rgba(12,27,42,0.16);
  --shadow-teal:  0 8px 32px rgba(45,168,154,0.25);
  --shadow-blue:  0 8px 32px rgba(28,58,92,0.25);

  /* Transitions */
  --transition-fast:   all 0.15s ease;
  --transition-base:   all 0.25s ease;
  --transition-slow:   all 0.4s ease;
  --transition-slower: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-max:  1320px;
  --container-wide: 1600px;
  --nav-height:     80px;
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display-xl {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 5vw, var(--text-8xl));
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-7xl));
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-6xl));
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.heading-xl  { font-size: clamp(var(--text-2xl), 2.5vw, var(--text-5xl)); }
.heading-lg  { font-size: clamp(var(--text-xl), 2vw, var(--text-4xl)); }
.heading-md  { font-size: clamp(var(--text-lg), 1.5vw, var(--text-3xl)); }
.heading-sm  { font-size: clamp(var(--text-base), 1.2vw, var(--text-2xl)); }

.body-xl  { font-size: var(--text-xl); line-height: 1.7; }
.body-lg  { font-size: var(--text-lg); line-height: 1.7; }
.body-md  { font-size: var(--text-base); line-height: 1.75; }
.body-sm  { font-size: var(--text-sm); line-height: 1.6; }

.label {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── LAYOUT UTILITIES ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

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

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

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

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

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

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* ─── COLOR UTILITIES ────────────────────────────────────── */
.text-white     { color: var(--color-white); }
.text-blue      { color: var(--color-blue); }
.text-teal      { color: var(--color-teal); }
.text-muted     { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }

.bg-white       { background-color: var(--color-white); }
.bg-light       { background-color: var(--color-gray-50); }
.bg-blue        { background-color: var(--color-blue); }
.bg-blue-dark   { background-color: var(--color-dark); }
.bg-teal        { background-color: var(--color-teal); }
.bg-slate       { background-color: var(--color-slate); }

/* ─── SECTION BACKGROUNDS ────────────────────────────────── */
.section-dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

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

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

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

/* ─── EYEBROW / SECTION LABELS ───────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--color-teal);
  border-radius: 2px;
}

.eyebrow-dark {
  color: var(--color-teal-light);
}

.eyebrow-dark::before {
  background: var(--color-teal-light);
}

/* ─── SECTION HEADER ─────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-16);
}

.section-header.centered {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-16);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.section-dark .section-subtitle,
.section-blue .section-subtitle,
.section-slate .section-subtitle {
  color: rgba(255,255,255,0.7);
}

/* ─── DIVIDER ────────────────────────────────────────────── */
.divider {
  width: 48px;
  height: 3px;
  background: var(--color-teal);
  border-radius: 2px;
  margin: var(--space-4) 0;
}

.divider.centered {
  margin: var(--space-4) auto;
}

/* ─── TEAL ACCENT LINE ───────────────────────────────────── */
.accent-line {
  display: inline-block;
  position: relative;
}

.accent-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-teal);
  border-radius: 2px;
}

/* ─── GEOMETRIC PATTERN OVERLAY ──────────────────────────── */
.geo-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(45,168,154,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,168,154,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.geo-pattern-dark {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ─── TAGS & BADGES ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.badge-teal {
  background: var(--color-teal-muted);
  color: var(--color-teal-dark);
}

.badge-blue {
  background: rgba(28,58,92,0.1);
  color: var(--color-blue);
}

.badge-white {
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
  border: 1px solid rgba(255,255,255,0.2);
}

/* ─── SCROLL REVEAL BASE STATE ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered delay helpers */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }
.delay-6 { transition-delay: 0.6s !important; }

/* ─── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-6);
}

.breadcrumb a {
  color: rgba(255,255,255,0.6);
  transition: var(--transition-fast);
}

.breadcrumb a:hover { color: var(--color-teal-light); }

.breadcrumb .sep { color: rgba(255,255,255,0.3); }

.breadcrumb .current { color: var(--color-teal-light); }

/* ─── BACK TO TOP ────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 48px;
  height: 48px;
  background: var(--color-blue);
  color: var(--color-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: var(--transition-base);
  z-index: 999;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-lg);
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--color-teal);
  transform: translateY(-4px);
  box-shadow: var(--shadow-teal);
}

/* ─── SCROLL PROGRESS BAR ────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-teal), var(--color-blue-light));
  z-index: 10000;
  transition: width 0.05s linear;
}

/* ─── RESPONSIVE BREAKPOINTS ─────────────────────────────── */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  :root { --nav-height: 72px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding-top: var(--space-20); padding-bottom: var(--space-20); }
  .section-lg { padding-top: var(--space-24); padding-bottom: var(--space-24); }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 {
    grid-template-columns: 1fr;
  }
  .section { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .section-lg { padding-top: var(--space-20); padding-bottom: var(--space-20); }
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  #back-to-top { bottom: var(--space-4); right: var(--space-4); }
}

@media (max-width: 480px) {
  .section { padding-top: var(--space-12); padding-bottom: var(--space-12); }
}
