/* ============================================
   JS ARCHITECTS — Design System & Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- Tokens --- */
:root {
  --black: #000000;
  --white: #FFFFFF;
  --yellow: #F2C94C;
  --yellow-dim: rgba(242, 201, 76, 0.15);
  --gray-100: #F5F5F5;
  --gray-200: #E0E0E0;
  --gray-300: #BDBDBD;
  --gray-400: #9E9E9E;
  --gray-500: #757575;
  --gray-600: #424242;
  --gray-700: #2A2A2A;
  --gray-800: #1A1A1A;
  --gray-900: #0D0D0D;

  --ff: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --fs-xs: clamp(0.7rem, 0.8vw, 0.8rem);
  --fs-sm: clamp(0.8rem, 0.9vw, 0.9rem);
  --fs-base: clamp(0.95rem, 1vw, 1.05rem);
  --fs-md: clamp(1.1rem, 1.2vw, 1.25rem);
  --fs-lg: clamp(1.4rem, 2vw, 1.8rem);
  --fs-xl: clamp(2rem, 3vw, 3rem);
  --fs-2xl: clamp(2.5rem, 4.5vw, 4.5rem);
  --fs-hero: clamp(2.8rem, 6vw, 6rem);

  --nav-height: 72px;
  --section-pad: clamp(80px, 10vw, 140px);
  --container: 1320px;
  --radius: 4px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--ff);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--white);
  background: var(--black);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; border: none; outline: none; background: none; }

/* Light mode overrides */
body.light-mode {
  color: var(--black);
  background: var(--white);
}
body.light-mode .nav { background: var(--white); border-bottom: 1px solid var(--gray-200); }
body.light-mode .nav__logo, body.light-mode .nav__link { color: var(--black); }
body.light-mode .nav__link:hover { color: var(--yellow); }
body.light-mode .footer { background: var(--gray-900); color: var(--white); }
body.light-mode .section--dark { background: var(--gray-100); color: var(--black); }
body.light-mode .card { background: var(--gray-100); color: var(--black); }
body.light-mode .form__input { background: var(--gray-100); color: var(--black); border-color: var(--gray-200); }
body.light-mode .form__input:focus { border-color: var(--yellow); }
body.light-mode .project-card__overlay { background: rgba(255,255,255,0.85); }
body.light-mode .project-card__title { color: var(--black); }
body.light-mode .service-card { background: var(--gray-100); border-color: var(--gray-200); }
body.light-mode .service-card:hover { border-color: var(--yellow); }
body.light-mode .career-card { background: var(--gray-100); border-color: var(--gray-200); }

/* --- Utilities --- */
.container { width: 90%; max-width: var(--container); margin: 0 auto; }
.section { padding: var(--section-pad) 0; }
.section--dark { background: var(--gray-900); }

/* Defer rendering of off-screen sections — browser skips paint until near viewport */
.section, footer { content-visibility: auto; contain-intrinsic-size: 0 600px; }
/* But don't defer the hero or nav */
.hero-slider, .nav { content-visibility: visible; contain-intrinsic-size: none; }
.text-yellow { color: var(--yellow); }
.text-gray { color: var(--gray-400); }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

.divider {
  width: 48px;
  height: 2px;
  background: var(--yellow);
  border: none;
  margin: 24px 0;
}
.divider--center { margin-left: auto; margin-right: auto; }

/* --- Typography --- */
.heading-xl {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.heading-lg {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.heading-md {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.heading-sm {
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.25;
}
.label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
}
.body-lg { font-size: var(--fs-md); line-height: 1.7; }
.body-sm { font-size: var(--fs-sm); color: var(--gray-400); line-height: 1.7; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn--primary {
  background: var(--yellow);
  color: var(--black);
}
.btn--primary:hover {
  background: #e0b83a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(242, 201, 76, 0.25);
}
.btn--outline {
  border: 1px solid var(--white);
  color: var(--white);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  transform: translateY(-2px);
}
.btn--dark {
  background: var(--black);
  color: var(--white);
}
.btn--dark:hover {
  background: var(--gray-800);
  transform: translateY(-2px);
}
.btn--sm { padding: 10px 24px; font-size: var(--fs-xs); }
.btn .arrow { transition: transform var(--transition-fast); }
.btn:hover .arrow { transform: translateX(4px); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
  background: rgba(0, 0, 0, 0.98);
  box-shadow: 0 1px 0 rgba(242, 201, 76, 0.1);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  line-height: 1;
}
.nav__logo-js {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav__logo-text {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.15;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__link {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-300);
  transition: color var(--transition-fast);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--yellow);
  transition: width var(--transition);
}
.nav__link:hover, .nav__link.active {
  color: var(--white);
}
.nav__link:hover::after, .nav__link.active::after {
  width: 100%;
}
.nav__actions { display: flex; align-items: center; gap: 16px; }

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-300);
  transition: color var(--transition-fast);
  border-radius: 50%;
}
.theme-toggle:hover { color: var(--yellow); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}
.nav__hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__hamburger.active span:nth-child(2) { opacity: 0; }
.nav__hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.nav__mobile.open { display: flex; }
.nav__mobile .nav__link {
  font-size: var(--fs-lg);
  letter-spacing: 0.05em;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.4) 50%,
    rgba(0,0,0,0.8) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}
.hero__label {
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero__title {
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}
.hero__subtitle {
  font-size: var(--fs-md);
  color: var(--gray-300);
  max-width: 560px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.7s forwards;
}
.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.9s forwards;
}
.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.1s forwards;
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--yellow), transparent);
  animation: scrollPulse 2s ease infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Hero Slider --- */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 580px;
  overflow: hidden;
  background: #0a0a0a;
}

/* Each slide */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* Background image with Ken Burns zoom */
.hero-slide__bg {
  position: absolute;
  inset: -5%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.06);
  transition: transform 7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.hero-slide.active .hero-slide__bg {
  transform: scale(1);
}

/* Dark gradient — heavier on left for text legibility */
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.45) 45%,
    rgba(0,0,0,0.1) 100%
  );
  z-index: 1;
}

/* Text content */
.hero-slide__content {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(58%, 700px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(28px, 7vw, 110px);
  z-index: 3;
}

.hero-slide__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s ease 0.2s, transform 0.85s ease 0.2s;
}
.hero-slide__title {
  font-size: clamp(2rem, 4.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 22px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease 0.42s, transform 0.9s ease 0.42s;
}
.hero-slide__desc {
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
  max-width: 400px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.85s ease 0.65s, transform 0.85s ease 0.65s;
}
.hero-slide__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease 0.85s, transform 0.8s ease 0.85s;
}

/* Animate text in when slide is active */
.hero-slide.active .hero-slide__label,
.hero-slide.active .hero-slide__title,
.hero-slide.active .hero-slide__desc,
.hero-slide.active .hero-slide__actions {
  opacity: 1;
  transform: translateY(0);
}

/* Decorative circle (right side) */
.hero-slider__circle {
  position: absolute;
  right: -12vw;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(400px, 55vw, 820px);
  height: clamp(400px, 55vw, 820px);
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.12);
  z-index: 4;
  pointer-events: none;
}
.hero-slider__circle::before {
  content: '';
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.07);
}
.hero-slider__circle::after {
  content: '';
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
}

/* Navigation dots */
.hero-slider__dots {
  position: absolute;
  bottom: 36px;
  left: clamp(28px, 7vw, 110px);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  flex-wrap: wrap;
  max-width: 50%;
}
.hero-slider__dot {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.32);
  border: none;
  cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease, opacity 0.35s ease;
  padding: 0;
  flex-shrink: 0;
}
.hero-slider__dot.active {
  width: 26px;
  background: var(--yellow);
}

/* Arrow controls */
.hero-slider__arrows {
  position: absolute;
  bottom: 28px;
  right: clamp(28px, 5vw, 80px);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.hero-slider__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hero-slider__arrow:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.55);
}

/* Bottom progress bar */
.hero-slider__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5px;
  width: 0%;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(242, 201, 76, 0.6);
  z-index: 10;
  transition: none;
}

/* Scroll indicator */
.hero-slider__scroll {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 10;
  pointer-events: none;
}
.hero-slider__scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(242,201,76,0.7), transparent);
  animation: scrollPulse 2s ease infinite;
}

@media (max-width: 768px) {
  .hero-slide__content { width: 100%; padding: 0 24px; }
  .hero-slider__circle { display: none; }
  .hero-slider__scroll { display: none; }
  .hero-slide__title { font-size: clamp(1.8rem, 7vw, 3rem); }
  .hero-slide__desc { max-width: 100%; }
}

/* --- Page Header --- */
.page-header {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  text-align: center;
}
.page-header__title { margin-bottom: 16px; }
.page-header__subtitle {
  font-size: var(--fs-md);
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 24px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Project Card --- */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  contain: layout paint style;
}
.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  will-change: transform;
}
.project-card:hover .project-card__img {
  transform: scale(1.05);
}
.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: opacity;
}
.project-card:hover .project-card__overlay {
  opacity: 1;
}
.project-card__category {
  font-size: var(--fs-xs);
  color: var(--yellow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.project-card__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--white);
}
.project-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}
.project-card:hover .project-card__accent { transform: scaleX(1); }

/* Featured project (large) */
.project-card--featured { aspect-ratio: 16 / 9; grid-column: span 2; }

/* ── Featured Work Mosaic (homepage) ── */
.fw-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 24px;
}
.fw-header .heading-md { margin-bottom: 0; }

/*
  3 columns × 2 rows, fixed total height.
  Tall card spans col 1 / both rows.
  The 4 remaining cards sit in cols 2-3, rows 1-2.
*/
.fw-mosaic {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  height: 540px;
}

.fw-card--tall {
  grid-column: 1;
  grid-row: 1 / 3;   /* spans both rows */
}

/* Base card — fills its grid cell */
.fw-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  display: block;
  text-decoration: none;
  background: var(--gray-900);
  contain: layout paint style;
  height: 100%;
}
.fw-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
  will-change: transform;
}
.fw-card:hover .fw-card__img { transform: scale(1.04); }

/* Always-visible label strip at bottom */
.fw-card__info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.3s ease;
}
.fw-card:hover .fw-card__info {
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.2) 100%);
}

/* Yellow accent bar sweep on hover */
.fw-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 2;
}
.fw-card:hover::before { transform: scaleX(1); }

.fw-card__cat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}
.fw-card__title {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

/* Responsive */
@media (max-width: 900px) {
  .fw-mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 200px);
    height: auto;
  }
  .fw-card--tall { grid-column: 1; grid-row: 1 / 3; }
}
@media (max-width: 560px) {
  .fw-mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 220px);
    height: auto;
  }
  .fw-card--tall { grid-column: 1; grid-row: 1; }
  .fw-header { flex-direction: column; align-items: flex-start; }
}

/* --- Category Grid (projects.html) --- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 0;
}
@media (max-width: 1024px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .cat-grid { grid-template-columns: 1fr; gap: 16px; } }

.cat-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: block;
  text-decoration: none;
  contain: layout paint style;
  background: var(--gray-900);
}
.cat-card__img-wrap {
  position: absolute;
  inset: 0;
}
.cat-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s ease;
  will-change: transform;
}
.cat-card:hover .cat-card__img { transform: scale(1.06); }

/* Always-visible dark gradient at bottom */
.cat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.05) 100%
  );
  transition: background 0.3s ease;
  pointer-events: none;
}
.cat-card:hover::after {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.45) 60%,
    rgba(0,0,0,0.12) 100%
  );
}
.cat-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px;
  pointer-events: none;
}
.cat-card__count {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 6px;
}
.cat-card__name {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.cat-card__arrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  margin-top: 8px;
  letter-spacing: 0.04em;
  transition: color 0.25s, transform 0.25s;
  display: inline-block;
}
.cat-card:hover .cat-card__arrow {
  color: var(--yellow);
  transform: translateX(4px);
}

/* Yellow accent bar at top on hover */
.cat-card__img-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 3;
}
.cat-card:hover .cat-card__img-wrap::before { transform: scaleX(1); }

/* --- Service Card --- */
.service-card {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width 0.5s ease;
}
.service-card:hover::before { width: 100%; }
.service-card:hover {
  border-color: var(--gray-700);
  transform: translateY(-4px);
}
.service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--yellow);
}
.service-card__icon svg { width: 100%; height: 100%; stroke: var(--yellow); fill: none; stroke-width: 1.5; }
.service-card__title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 12px;
}
.service-card__text {
  color: var(--gray-400);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

/* --- Team Card --- */
.team-card { text-align: center; }
.team-card__img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 20px;
  aspect-ratio: 3 / 4;
}
.team-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease, transform 0.5s ease;
}
.team-card:hover .team-card__img {
  filter: grayscale(0%);
  transform: scale(1.03);
}
.team-card__name {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: 4px;
}
.team-card__role {
  font-size: var(--fs-sm);
  color: var(--yellow);
}

/* About page — mission split layout */
.about-mission__grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 72px;
  align-items: start;
}
.about-mission__img-wrap {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  border-radius: var(--radius);
  overflow: hidden;
}
.about-mission__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
@media (max-width: 960px) {
  .about-mission__grid {
    grid-template-columns: 1fr;
  }
  .about-mission__img-wrap {
    position: static;
    max-height: 480px;
  }
  .about-mission__img { aspect-ratio: 16 / 9; }
}

/* Owner team grid — 2-up centred */
.team-owners-grid {
  display: grid;
  grid-template-columns: repeat(2, 320px);
  gap: 48px;
  justify-content: center;
}

.team-card--owner .team-card__img-wrap {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
}

.team-card__reg {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 6px;
  letter-spacing: 0.02em;
  min-height: 1.2em;
}

.team-card__email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: var(--fs-sm);
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.2s;
}
.team-card__email:hover { color: var(--yellow); }
.team-card__email svg { flex-shrink: 0; }

body.light-mode .team-card__reg { color: var(--gray-500); }
body.light-mode .team-card__email { color: var(--gray-500); }
body.light-mode .team-card__email:hover { color: var(--yellow); }

@media (max-width: 720px) {
  .team-owners-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
    gap: 40px;
  }
}

/* --- Stats --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
  padding: 60px 0;
  border-top: 1px solid var(--gray-800);
  border-bottom: 1px solid var(--gray-800);
}
.stat__number {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 8px;
}
.stat__label {
  font-size: var(--fs-xs);
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Career Card --- */
.career-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius);
  transition: var(--transition);
}
.career-card:hover {
  border-color: var(--yellow);
  transform: translateX(4px);
}
.career-card__info { flex: 1; }
.career-card__title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 6px;
}
.career-card__meta {
  font-size: var(--fs-sm);
  color: var(--gray-400);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.career-card__meta span { display: flex; align-items: center; gap: 6px; }

/* --- Forms --- */
.form { display: grid; gap: 20px; }
.form--2col { grid-template-columns: 1fr 1fr; }
.form__group { display: flex; flex-direction: column; gap: 8px; }
.form__group--full { grid-column: 1 / -1; }
.form__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.form__input {
  padding: 14px 16px;
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  color: var(--white);
  font-size: var(--fs-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form__input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-dim);
}
.form__input::placeholder { color: var(--gray-500); }
textarea.form__input { resize: vertical; min-height: 140px; }

/* ── Where We Operate ── */
.where-operate { background: var(--gray-100); }
body.light-mode .where-operate { background: var(--gray-100); }

.where-operate__intro {
  font-size: var(--fs-base);
  color: var(--gray-500);
  max-width: 560px;
  margin: 12px auto 0;
  line-height: 1.7;
}

.wo-search-wrap {
  position: relative;
  max-width: 580px;
  margin: 0 auto 36px;
}
.wo-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}
.wo-search {
  width: 100%;
  padding: 15px 18px 15px 50px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--black);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wo-search:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(242,201,76,0.18);
}

.wo-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* State tab strip */
.wo-states {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-100);
  gap: 0;
}
.wo-states::-webkit-scrollbar { display: none; }

.wo-state {
  flex-shrink: 0;
  padding: 14px 28px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.wo-state:hover { color: var(--black); }
.wo-state.active { color: var(--black); border-bottom-color: var(--yellow); }

/* Content area */
.wo-content {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-height: 260px;
}

.wo-region__name {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 16px;
}

.wo-suburb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0;
}

.wo-suburb {
  font-size: var(--fs-sm);
  color: var(--black);
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-100);
  transition: color 0.15s;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  display: block;
}
.wo-suburb:hover { color: var(--yellow); }
.wo-suburb::after {
  content: '→';
  font-size: 0.65rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
  color: var(--yellow);
}
.wo-suburb:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.wo-empty {
  color: var(--gray-400);
  font-size: var(--fs-base);
  padding: 24px 0;
}

body.light-mode .wo-panel { background: var(--white); border-color: var(--gray-200); }
body.light-mode .wo-states { background: var(--gray-100); }
body.light-mode .wo-state.active { color: var(--black); }
body.light-mode .wo-suburb { color: var(--black); border-bottom-color: var(--gray-100); }

@media (max-width: 768px) {
  .wo-content { padding: 24px 20px; gap: 28px; }
  .wo-state { padding: 12px 18px; }
  .wo-suburb-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* --- Certifications --- */
.cert-section { background: var(--gray-50, #fafafa); }
.cert-header { text-align: center; margin-bottom: 40px; }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.cert-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}
.cert-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  border-color: var(--yellow);
  transform: translateY(-4px);
}

.cert-card__img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 24px auto 0;
  flex-shrink: 0;
}

.cert-card__body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cert-card__badge {
  display: inline-flex;
  align-items: center;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  align-self: flex-start;
}

.cert-card__title {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.01em;
  margin: 0;
}

.cert-card__desc {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.65;
  margin: 0;
}

body.light-mode .cert-section { background: #f7f7f5; }
body.light-mode .cert-card { background: var(--white); border-color: var(--gray-200); }
body.light-mode .cert-card__img { background: #f0f0ee; }

@media (max-width: 900px) {
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cert-grid { grid-template-columns: 1fr; }
  .cert-card__img { width: 110px; height: 110px; }
}

/* --- Contact Info --- */
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-item { display: flex; gap: 16px; }
.contact-item__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-900);
  border-radius: var(--radius);
  color: var(--yellow);
}
.contact-item__label {
  font-size: var(--fs-xs);
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.contact-item__value { font-size: var(--fs-base); font-weight: 500; }

/* --- Social --- */
.social {
  display: flex;
  gap: 12px;
}
.social__link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  color: var(--gray-400);
  transition: var(--transition-fast);
}
.social__link:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}
.social__link svg { width: 18px; height: 18px; }

/* --- Awards --- */
.award {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-800);
}
.award__year {
  font-size: var(--fs-sm);
  color: var(--yellow);
  font-weight: 600;
  min-width: 48px;
}
.award__title { font-weight: 600; }
.award__org { color: var(--gray-400); font-size: var(--fs-sm); }

/* --- Project Detail --- */
.project-detail__hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
}
.project-detail__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-detail__hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--black), transparent);
}
.project-detail__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-800);
}
.project-detail__meta-item {}
.project-detail__meta-label {
  font-size: var(--fs-xs);
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.project-detail__meta-value { font-weight: 500; }
.project-detail__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 60px 0;
}
.project-detail__body p {
  color: var(--gray-300);
  line-height: 1.8;
  margin-bottom: 20px;
}
.project-detail__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 80px;
}
.project-detail__gallery img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project-detail__gallery img:first-child {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

/* --- Project Filters --- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}
.filter-btn {
  padding: 8px 18px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-400);
  border: 1px solid var(--gray-700);
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.filter-btn:hover, .filter-btn.active {
  color: var(--black);
  background: var(--yellow);
  border-color: var(--yellow);
}
@media (max-width: 768px) {
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
}

/* --- Map --- */
.map-container {
  width: 100%;
  height: 440px;
  overflow: hidden;
  filter: grayscale(30%);
  transition: filter 0.5s ease;
}
.map-container:hover { filter: grayscale(0%); }
.map-container iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --- Footer --- */
.footer {
  background: var(--gray-900);
  border-top: 1px solid var(--gray-800);
  padding: 64px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1.8fr 1.4fr;
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--gray-800);
}
.footer__brand { max-width: 280px; }
.footer__logo {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  letter-spacing: 0.04em;
}
.footer__logo-js {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--white);
}
.footer__logo span { color: var(--yellow); }
.footer__desc {
  color: var(--white);
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: 24px;
}
.footer__heading {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}
.footer__office { margin-bottom: 24px; }
.footer__office-name {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.footer__office-addr {
  font-size: var(--fs-sm);
  color: var(--white);
  line-height: 1.6;
}
.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: var(--fs-sm);
  padding: 5px 0;
  transition: color var(--transition-fast);
}
.footer__contact-item svg { flex-shrink: 0; color: var(--white); }
.footer__contact-item a { color: inherit; transition: color var(--transition-fast); }
.footer__contact-item:hover, .footer__contact-item a:hover { color: var(--yellow); }
.footer__nav-links { margin-top: 20px; display: flex; flex-direction: column; }
.footer__link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-size: var(--fs-sm);
  padding: 5px 0;
  transition: color var(--transition-fast);
}
.footer__link:hover { color: var(--yellow); }
.footer__link svg { width: 12px; height: 12px; }

/* Acknowledgment */
.footer__ack {
  padding: 36px 0;
  text-align: center;
  border-bottom: 1px solid var(--gray-800);
}
.footer__ack-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.footer__ack-text {
  font-size: var(--fs-xs);
  color: var(--white);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.8;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  border-top: none;
  font-size: var(--fs-xs);
  color: var(--white);
}

/* --- Culture Values --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.value-card {
  padding: 32px;
  border: 1px solid var(--gray-800);
  border-radius: var(--radius);
  transition: var(--transition);
}
.value-card:hover { border-color: var(--yellow); }
.value-card__number {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 16px;
  line-height: 1;
}
.value-card__title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 8px;
}
.value-card__text {
  color: var(--gray-400);
  font-size: var(--fs-sm);
}

/* --- Intro Split --- */
.intro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.intro-split__img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(60%);
  transition: filter 0.5s ease;
}
.intro-split__img:hover { filter: grayscale(0%); }

/* --- Specializations Section --- */
.specialize {
  background-color: var(--black);
  color: var(--white);
  position: relative;
  /* Blueprint-style architectural grid — large squares + fine subdivisions */
  background-image:
    /* Major grid lines */
    linear-gradient(rgba(255,255,255,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.10) 1px, transparent 1px),
    /* Minor grid lines */
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}
body.light-mode .specialize {
  background-color: var(--black);
}
.specialize__heading {
  font-size: clamp(2.5rem, 5.5vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--white);
  position: relative;
  z-index: 1;
}
/* Soft glow behind heading */
.specialize__heading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(242,201,76,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.specialize__intro {
  max-width: 780px;
  margin: 0 auto 32px;
  text-align: center;
  font-size: var(--fs-md);
  font-weight: 500;
  font-style: italic;
  color: var(--gray-400);
  line-height: 1.7;
}
.specialize__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.specialize__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--transition-fast);
}
.specialize__link:hover { color: var(--yellow); }
.specialize__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 280px));
  justify-content: center;
  gap: 4px 64px;
  padding: 48px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.specialize__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gray-300);
  padding: 10px 0;
  text-decoration: none;
  transition: color var(--transition-fast);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.specialize__item::before {
  content: '+';
  font-weight: 700;
  color: var(--yellow);
  font-size: 1em;
  flex-shrink: 0;
  line-height: 1;
}
a.specialize__item:hover {
  color: var(--white);
}
a.specialize__item:hover::before {
  color: var(--yellow);
}
.specialize__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  justify-content: center;
  gap: 32px;
  padding-top: 72px;
  padding-bottom: 16px;
  text-align: center;
}
.specialize__stat-number {
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  -webkit-text-stroke: 1.5px var(--white);
  color: transparent;
  margin-bottom: 4px;
}
body.light-mode .specialize__stat-number {
  -webkit-text-stroke-color: var(--white);
}
.specialize__stat-line {
  width: 40px;
  height: 2px;
  background: var(--yellow);
  margin: 12px auto;
}
.specialize__stat-label {
  font-size: var(--fs-sm);
  color: var(--gray-400);
  font-weight: 500;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .specialize__list { grid-template-columns: 1fr; }
  .specialize__stats { grid-template-columns: 1fr; gap: 48px; }
  .specialize__stat-number { -webkit-text-stroke: 1.5px var(--white); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .specialize__list { grid-template-columns: repeat(2, 1fr); }
}

/* specialize section on light-bg pages (e.g. services.html) */
.specialize--light {
  background: var(--gray-100) !important;
  background-image: none !important;
}
.specialize--light .specialize__item {
  color: var(--black) !important;
  border-color: var(--gray-300);
}
.specialize--light a.specialize__item:hover { color: var(--yellow) !important; }
.specialize--light .specialize__list {
  border-top-color: var(--gray-300);
  border-bottom-color: var(--gray-300);
}
.specialize--light .specialize__stat-number {
  -webkit-text-stroke: 2px var(--black) !important;
  color: transparent !important;
}
.specialize--light .specialize__stat-label { color: var(--black) !important; font-weight: 600; }

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--gray-800);
}
.timeline__item {
  position: relative;
  padding-bottom: 48px;
}
.timeline__item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
}
.timeline__year {
  font-size: var(--fs-xs);
  color: var(--yellow);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.timeline__title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 8px;
}
.timeline__text {
  color: var(--gray-400);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

/* --- Business Hours Card --- */
.hours-card {
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  padding: 36px;
}
body.light-mode .hours-card {
  border-color: var(--gray-200);
  background: var(--white);
}
.hours-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: 28px;
}
.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-800);
  font-size: var(--fs-sm);
  gap: 12px;
}
body.light-mode .hours-row { border-bottom-color: var(--gray-200); }
.hours-row:last-of-type { border-bottom: none; }
.hours-row__day { color: var(--gray-400); }
.hours-row__dots {
  flex: 1;
  border-bottom: 1px dotted var(--gray-700);
  margin: 0 8px;
  position: relative;
  top: -1px;
}
body.light-mode .hours-row__dots { border-bottom-color: var(--gray-300); }
.hours-row__time { font-weight: 500; color: var(--white); white-space: nowrap; }
body.light-mode .hours-row__time { color: var(--black); }
.hours-row__time.closed { color: var(--gray-500); }
.hours-card__note {
  margin-top: 20px;
  font-size: var(--fs-xs);
  color: var(--gray-500);
  line-height: 1.7;
  padding-top: 16px;
  border-top: 1px solid var(--gray-800);
}
body.light-mode .hours-card__note { border-top-color: var(--gray-200); }

/* Contact page form label style */
.form__label--bold {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
  margin-bottom: 6px;
}
body.light-mode .form__label--bold { color: var(--black); }

/* Contact page layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 72px;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
}

.contact-form { display: flex; flex-direction: column; gap: 24px; }

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

.form__name-col { display: flex; flex-direction: column; }

.form__sub-label {
  font-size: var(--fs-xs);
  color: var(--gray-500);
  margin-top: 4px;
}

.form__select { cursor: pointer; }

.contact-sidebar { display: flex; flex-direction: column; gap: 28px; }

.contact-social__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.contact-item__link {
  transition: color 0.2s ease;
}
.contact-item__link:hover { color: var(--yellow); }

/* Form submit area */
.form__submit-area { margin-top: 8px; }
.form__submit-divider {
  border: none;
  border-top: 1px solid var(--gray-700);
  margin-bottom: 28px;
}
body.light-mode .form__submit-divider { border-top-color: var(--gray-200); }

.form__submit-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.form__submit-btn { flex-shrink: 0; padding: 16px 40px; font-size: var(--fs-base); }
.form__submit-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-xs);
  color: var(--gray-500);
  line-height: 1.5;
  margin: 0;
}
.form__submit-note svg { flex-shrink: 0; color: var(--yellow); }

body.light-mode .contact-item__icon {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}
body.light-mode .contact-item__value { color: var(--black); }
body.light-mode .contact-social__label { color: var(--gray-500); }

/* --- Milestone Slider --- */
.milestone-section {
  overflow: hidden;
  padding: var(--section-pad) 0;
  background: var(--white);
  color: var(--black);
}
body.light-mode .milestone-section { background: var(--gray-100); }

.milestone-section__header {
  text-align: center;
  margin-bottom: 60px;
}
.milestone-section__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
}

.milestone-track-wrap {
  position: relative;
}
.milestone-arrows {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
}
.milestone-arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--black);
  flex-shrink: 0;
  transition: color var(--transition-fast);
  z-index: 2;
  background: none;
  border: none;
  font-size: 1.3rem;
}
.milestone-arrow:hover { color: var(--yellow); }

/* The horizontal line + dots */
.milestone-line-row {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
  overflow: hidden;
}
.milestone-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-300);
  transform: translateY(-50%);
}
.milestone-dots {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  position: relative;
  z-index: 1;
}
.milestone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--black);
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.milestone-dot.active { background: var(--yellow); transform: scale(1.4); }

/* Cards viewport */
.milestone-viewport {
  overflow: hidden;
}
.milestone-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.milestone-slide {
  flex: 0 0 33.333%;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Alternating: odd items show content top + dot, even show dot + content bottom */
.milestone-slide__top {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 24px;
  text-align: center;
}
.milestone-slide__bottom {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 24px;
  text-align: center;
}
.milestone-slide__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 2px;
}
.milestone-slide__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--black);
  letter-spacing: 0.04em;
}
.milestone-slide__logo .js { font-size: 2.2rem; line-height: 1; }
.milestone-slide__name {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}
.milestone-slide__desc {
  font-size: var(--fs-xs);
  color: var(--gray-500);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .milestone-slide { flex: 0 0 100%; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .milestone-slide { flex: 0 0 50%; }
}

/* --- Accordion --- */
.accordion {
  border-top: 1px solid var(--gray-800);
}
body.light-mode .accordion { border-top-color: var(--gray-200); }

.accordion__item {
  border-bottom: 1px solid var(--gray-800);
  transition: background var(--transition-fast);
}
body.light-mode .accordion__item { border-bottom-color: var(--gray-200); }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 24px 0;
  cursor: pointer;
  background: none;
  text-align: left;
  gap: 24px;
}
.accordion__title {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--white);
  transition: color var(--transition-fast);
  line-height: 1.3;
}
body.light-mode .accordion__title { color: var(--black); }
.accordion__trigger:hover .accordion__title { color: var(--yellow); }
.accordion__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gray-400);
  transition: color var(--transition-fast), transform var(--transition);
  line-height: 1;
}
.accordion__item.open .accordion__icon {
  color: var(--yellow);
  transform: rotate(45deg);
}
.accordion__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s ease,
              padding 0.3s ease;
  opacity: 0;
  padding-bottom: 0;
}
.accordion__item.open .accordion__body {
  max-height: 600px;
  opacity: 1;
  padding-bottom: 28px;
}
.accordion__content {
  color: var(--gray-400);
  font-size: var(--fs-sm);
  line-height: 1.85;
  max-width: 680px;
}
body.light-mode .accordion__content { color: var(--gray-600); }

/* --- Back link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--gray-400);
  padding: 24px 0;
  transition: color var(--transition-fast);
}
.back-link:hover { color: var(--yellow); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .intro-split { gap: 48px; }
  .project-detail__body { gap: 40px; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .project-card--featured { grid-column: span 1; }
  .intro-split { grid-template-columns: 1fr; gap: 32px; }
  .intro-split__img { aspect-ratio: 16 / 9; }
  .form--2col { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .career-card { flex-direction: column; align-items: flex-start; }
  .project-detail__body { grid-template-columns: 1fr; gap: 32px; }
  .project-detail__gallery { grid-template-columns: 1fr; }
  .project-detail__gallery img:first-child { grid-column: span 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(2rem, 8vw, 3.5rem); }
  .page-header { padding-top: calc(var(--nav-height) + 48px); padding-bottom: 48px; }
  .timeline { padding-left: 24px; }
  [style*="grid-template-columns: 1fr 2fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"] { grid-template-columns: 1fr !important; gap: 32px !important; }
  [style*="direction: rtl"] { direction: ltr !important; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

/* ============================================
   COMPREHENSIVE LIGHT MODE OVERRIDES
   ============================================ */

/* Buttons */
body.light-mode .btn--outline {
  border-color: var(--black);
  color: var(--black);
}
body.light-mode .btn--outline:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* Nav active/hover states */
body.light-mode .nav__link.active,
body.light-mode .nav__link:hover { color: var(--black); }
body.light-mode .nav__link.active::after,
body.light-mode .nav__link:hover::after { background: var(--yellow); }
body.light-mode .nav__hamburger span { background: var(--black); }
body.light-mode .nav__mobile {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}
body.light-mode .nav__mobile .nav__link { color: var(--gray-700); }
body.light-mode .nav__mobile .nav__link:hover { color: var(--black); }
body.light-mode .theme-toggle { color: var(--black); }

/* Page sections that have dark backgrounds */
body.light-mode .page-header { background: var(--gray-100); }
body.light-mode .hero { background: var(--gray-900); } /* hero stays dark intentionally */

/* Body text — inherit body color (but NOT inside the hero slider) */
body.light-mode :not(.hero-slider) > p,
body.light-mode :not(.hero-slider) > li,
body.light-mode :not(.hero-slider) > h1,
body.light-mode :not(.hero-slider) > h2,
body.light-mode :not(.hero-slider) > h3,
body.light-mode :not(.hero-slider) > h4 { color: inherit; }

/* Hero slider text always stays white regardless of theme */
.hero-slide__label,
.hero-slide__title,
.hero-slide__desc { color: #fff !important; }
.hero-slide__label { color: rgba(255,255,255,0.68) !important; }
.hero-slide__desc  { color: rgba(255,255,255,0.75) !important; }

/* Muted/gray text — make legible on white */
body.light-mode .body-sm { color: var(--gray-600); }
body.light-mode .text-gray { color: var(--gray-600); }
body.light-mode .label { color: var(--gray-500); }

/* Sections / dividers */
body.light-mode .stats {
  border-top-color: var(--gray-200);
  border-bottom-color: var(--gray-200);
}
body.light-mode .stat__label { color: var(--gray-600); }

/* Timeline */
body.light-mode .timeline { border-left-color: var(--gray-300); }
body.light-mode .timeline__item::before { background: var(--yellow); }
body.light-mode .timeline__year { color: var(--yellow); }
body.light-mode .timeline__title { color: var(--black); }
body.light-mode .timeline__text { color: var(--gray-600); }

/* Project cards — overlay stays readable */
body.light-mode .project-card__overlay { background: rgba(0,0,0,0.72); }
body.light-mode .project-card__title { color: var(--white); }
body.light-mode .project-card__category { color: var(--yellow); }

/* Project detail page */
body.light-mode .pd-meta {
  border-top-color: var(--gray-200);
  border-bottom-color: var(--gray-200);
}
body.light-mode .pd-meta__label { color: var(--gray-500); }
body.light-mode .pd-meta__value { color: var(--black); }

/* Service cards */
body.light-mode .service-card { background: var(--gray-100); border-color: var(--gray-200); }
body.light-mode .service-card__text { color: var(--gray-600); }

/* Career cards */
body.light-mode .career-card { background: var(--gray-100); border-color: var(--gray-200); }

/* Form inputs */
body.light-mode .form__input { background: var(--gray-100); color: var(--black); border-color: var(--gray-300); }
body.light-mode select.form__input option { background: var(--white); color: var(--black); }

/* Contact hours */
body.light-mode .hours-row__time { color: var(--black); }
body.light-mode .hours-row__day { color: var(--gray-600); }

/* Specialize section — always dark regardless of theme */
body.light-mode .specialize {
  background-color: var(--black);
  color: var(--white);
  background-image:
    linear-gradient(rgba(255,255,255,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.10) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}
body.light-mode .specialize .specialize__heading { color: var(--white); }
body.light-mode .specialize .specialize__intro { color: var(--gray-400); }
body.light-mode .specialize .specialize__link { color: var(--white); }
/* light-mode overrides for the dark specialize section (homepage) */
body.light-mode .specialize:not(.specialize--light) .specialize__item { color: var(--gray-300); }
body.light-mode .specialize:not(.specialize--light) a.specialize__item:hover { color: var(--white); }
body.light-mode .specialize:not(.specialize--light) .specialize__list {
  border-top-color: var(--gray-800);
  border-bottom-color: var(--gray-800);
}
body.light-mode .specialize:not(.specialize--light) .specialize__stat-number {
  -webkit-text-stroke: 1.5px var(--white);
  color: transparent;
}
body.light-mode .specialize:not(.specialize--light) .specialize__stat-label { color: var(--gray-400); }

/* Filters */
body.light-mode .filter-btn {
  color: var(--gray-700);
  border-color: var(--gray-300);
  background: transparent;
}
body.light-mode .filter-btn.active,
body.light-mode .filter-btn:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* Back link */
body.light-mode .back-link { color: var(--gray-500); }
body.light-mode .back-link:hover { color: var(--yellow); }

/* Mission / intro text that uses gray-300 inline */
body.light-mode [class*="body-lg"] { color: var(--gray-700); }

/* About mission section specific */
body.light-mode .mission p,
body.light-mode .intro p { color: var(--gray-700); }

/* About page mission text — always legible */
.about-mission .body-lg { color: var(--gray-700); }
.about-mission .body-sm { color: var(--gray-600); }
body.light-mode .about-mission .body-lg { color: var(--gray-700); }
body.light-mode .about-mission .body-sm { color: var(--gray-600); }

/* Lightbox stays dark always */
body.light-mode .lightbox { background: rgba(0,0,0,0.95); }
