/* ═══════════════════════════════════════════
   JMB SERVICES LLC - Design System
   Premium Enterprise Technology Aesthetic
   ═══════════════════════════════════════════ */

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

:root {
  /* Core Palette */
  --ink: #0b0d11;
  --ink-light: #12151c;
  --ink-mid: #1a1e28;
  --surface: #ffffff;
  --surface-dim: #f5f6f8;
  --surface-border: #e2e4e9;

  /* Text */
  --text-primary: #0b0d11;
  --text-secondary: #4a5068;
  --text-tertiary: #7c8298;
  --text-inverse: #ffffff;
  --text-inverse-dim: #a8adc0;

  /* Accent - deep steel blue */
  --accent: #2c4a6e;
  --accent-hover: #1e3650;
  --accent-light: #3d6490;

  /* Metrics */
  --nav-height: 72px;
  --section-pad: clamp(80px, 10vw, 140px);
  --content-max: 1200px;
  --content-narrow: 800px;

  /* Typography Scale */
  --fs-display: clamp(2.8rem, 5vw, 4.5rem);
  --fs-h1: clamp(2rem, 3.5vw, 3rem);
  --fs-h2: clamp(1.6rem, 2.5vw, 2.2rem);
  --fs-h3: clamp(1.1rem, 1.5vw, 1.35rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-caption: 0.8125rem;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 40px;
  --sp-2xl: 64px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.4s;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface);
  overflow-x: hidden;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
}

ul, ol {
  list-style: none;
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 3px;
}

.cta__contact-item a {
  transition: color 0.25s ease;
}

.cta__contact-item a:hover {
  color: var(--text-inverse);
}


/* ═══════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out);
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
}

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

.nav__logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
  transition: color var(--duration) var(--ease-out);
}

.nav--scrolled .nav__logo {
  color: var(--text-primary);
}

.nav__logo span {
  font-weight: 400;
  opacity: 0.5;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(var(--sp-md), 2.5vw, var(--sp-xl));
}

.nav__link {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-inverse-dim);
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
  position: relative;
}

.nav--scrolled .nav__link {
  color: var(--text-secondary);
}

.nav__link:hover {
  color: var(--text-inverse);
}

.nav--scrolled .nav__link:hover {
  color: var(--text-primary);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.3s var(--ease-out);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  font-size: var(--fs-small);
  font-weight: 600;
  padding: 10px 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: var(--text-inverse);
  border-radius: 6px;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
}

.nav--scrolled .nav__cta {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.nav__cta:hover {
  background: var(--text-inverse);
  color: var(--ink);
  border-color: var(--text-inverse);
}

.nav--scrolled .nav__cta:hover {
  background: var(--text-primary);
  color: var(--surface);
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px 0;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-inverse);
  transition: all 0.3s ease;
}

.nav--scrolled .nav__toggle span {
  background: var(--text-primary);
}


/* ═══════════════════════════════════════════
   Hero Section
   ═══════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--ink);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(11, 13, 17, 0.92) 0%,
    rgba(11, 13, 17, 0.7) 50%,
    rgba(11, 13, 17, 0.85) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 80px) var(--sp-lg) 80px;
  width: 100%;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-inverse-dim);
  margin-bottom: var(--sp-lg);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
}

.hero__eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent-light);
}

.hero__heading {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-inverse);
  max-width: 720px;
  margin-bottom: var(--sp-lg);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

.hero__sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  color: var(--text-inverse-dim);
  max-width: 520px;
  margin-bottom: var(--sp-xl);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s var(--ease-out) 0.7s forwards;
}

.hero__actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s var(--ease-out) 0.9s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ═══════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-small);
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 6px;
  letter-spacing: 0.01em;
  transition: all 0.3s ease;
}

.btn--primary {
  background: var(--surface);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--surface-dim);
  transform: translateY(-1px);
}

.btn--outline {
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: var(--text-inverse);
}

.btn--outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.btn--dark {
  background: var(--ink);
  color: var(--text-inverse);
}

.btn--dark:hover {
  background: var(--ink-light);
  transform: translateY(-1px);
}

.btn__arrow {
  transition: transform 0.3s ease;
  font-size: 1.1em;
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}


/* ═══════════════════════════════════════════
   Section Layout
   ═══════════════════════════════════════════ */

.section {
  padding: var(--section-pad) var(--sp-lg);
}

.section__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section__header {
  margin-bottom: var(--sp-2xl);
}

.section__label {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-md);
}

.section__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section__title--light {
  color: var(--text-inverse);
}

.section__subtitle {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-top: var(--sp-md);
  line-height: 1.65;
}

.section--dark {
  background: var(--ink);
  color: var(--text-inverse);
}

.section--dim {
  background: var(--surface-dim);
}


/* ═══════════════════════════════════════════
   Metrics Bar (below hero)
   ═══════════════════════════════════════════ */

.metrics {
  background: var(--ink-light);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--sp-xl) var(--sp-lg);
}

.metrics__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
}

.metric {
  text-align: center;
  padding: var(--sp-md);
}

.metric__value {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
  line-height: 1.2;
}

.metric__label {
  font-size: var(--fs-caption);
  color: var(--text-inverse-dim);
  margin-top: var(--sp-xs);
  letter-spacing: 0.03em;
}


/* ═══════════════════════════════════════════
   Services Section
   ═══════════════════════════════════════════ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--surface-border);
  border: 1px solid var(--surface-border);
}

.service-item {
  background: var(--surface);
  padding: var(--sp-xl) var(--sp-lg);
  transition: background 0.3s ease;
}

.service-item:hover {
  background: var(--surface-dim);
}

.service-item__number {
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-lg);
}

.service-item__title {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-md);
  color: var(--text-primary);
}

.service-item__desc {
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--text-secondary);
}

.service-item__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--accent);
  margin-top: var(--sp-lg);
  transition: gap 0.3s ease;
}

.service-item__link:hover {
  gap: 10px;
}


/* ═══════════════════════════════════════════
   About / Split Section
   ═══════════════════════════════════════════ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.split__media {
  position: relative;
  overflow: hidden;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.split__media:hover img {
  transform: scale(1.03);
}

.split__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-2xl) clamp(var(--sp-xl), 6vw, 80px);
}

.split__content--dark {
  background: var(--ink);
  color: var(--text-inverse);
}

.split__heading {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--sp-lg);
}

.split__text {
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-inverse-dim);
  margin-bottom: var(--sp-lg);
}

.split__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

.split__list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  font-size: var(--fs-small);
  color: var(--text-inverse-dim);
}

.split__list-item::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 1px;
  background: var(--accent-light);
  margin-top: 10px;
}

.split--reverse {
  direction: rtl;
}

.split--reverse > * {
  direction: ltr;
}


/* ═══════════════════════════════════════════
   Process Section
   ═══════════════════════════════════════════ */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-xl);
}

.process-step {
  position: relative;
}

.process-step__number {
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.04);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--sp-md);
}

.process-step__title {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--text-inverse);
  margin-bottom: var(--sp-sm);
}

.process-step__text {
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--text-inverse-dim);
}


/* ═══════════════════════════════════════════
   Showcase / Image Band
   ═══════════════════════════════════════════ */

.showcase {
  position: relative;
  height: 480px;
  overflow: hidden;
}

.showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 13, 17, 0.2) 0%,
    rgba(11, 13, 17, 0.6) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: var(--sp-xl) var(--sp-lg);
}

.showcase__caption {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.showcase__caption p {
  font-size: var(--fs-h3);
  font-weight: 500;
  color: var(--text-inverse);
  max-width: 560px;
  line-height: 1.5;
}


/* ═══════════════════════════════════════════
   Contact / CTA Section
   ═══════════════════════════════════════════ */

.cta {
  text-align: center;
  padding: var(--section-pad) var(--sp-lg);
}

.cta__inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
}

.cta__heading {
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--sp-md);
  color: var(--text-inverse);
}

.cta__sub {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--text-inverse-dim);
  margin-bottom: var(--sp-xl);
  line-height: 1.65;
}

.cta__contact-row {
  display: flex;
  justify-content: center;
  gap: var(--sp-xl);
  margin-top: var(--sp-xl);
  flex-wrap: wrap;
}

.cta__contact-item {
  font-size: var(--fs-small);
  color: var(--text-inverse-dim);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.cta__contact-item strong {
  color: var(--text-inverse);
  font-weight: 600;
}


/* ═══════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════ */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--sp-xl) var(--sp-lg);
  background: var(--ink);
}

.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.footer__left {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.footer__brand {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--text-inverse);
  letter-spacing: -0.01em;
}

.footer__brand span {
  font-weight: 400;
  opacity: 0.4;
}

.footer__copy {
  font-size: var(--fs-caption);
  color: var(--text-inverse-dim);
}

.footer__right {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
}

.footer__link {
  font-size: var(--fs-caption);
  color: var(--text-inverse-dim);
  transition: color 0.25s ease;
}

.footer__link:hover {
  color: var(--text-inverse);
}

.footer__ids {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
  margin-top: var(--sp-md);
  text-align: center;
  width: 100%;
  padding-top: var(--sp-md);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}


/* ═══════════════════════════════════════════
   Scroll Reveal Animations
   ═══════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

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

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */

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

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-xl) var(--sp-lg);
  }

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

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-xl);
    padding: var(--sp-xl);
  }

  .nav__links--open {
    display: flex;
  }

  .nav__links--open .nav__link {
    color: var(--text-primary);
    font-size: 1.2rem;
  }

  .nav__links--open .nav__cta {
    color: var(--text-primary);
    border-color: var(--text-primary);
  }

  .nav__toggle {
    display: flex;
  }

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

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

  .split__media {
    height: 300px;
  }

  .split--reverse {
    direction: ltr;
  }

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

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

  .hero__heading {
    max-width: 100%;
  }

  .cta__contact-row {
    flex-direction: column;
    align-items: center;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__right {
    flex-direction: column;
    gap: var(--sp-md);
  }

  .showcase {
    height: 320px;
  }
}

@media (max-width: 480px) {
  .metrics__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
  }

  .metric {
    padding: var(--sp-sm);
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    justify-content: center;
    width: 100%;
  }
}
