/* ==========================================================================
   NOVAX — Design tokens & base styles
   Colors are the brand-only palette given: Primary #184A98, Secondary
   #EAEAEA — no third accent hue was supplied, so every accent below is a
   tint/shade of the primary, not a new color.
   ========================================================================== */

/* Native cross-page transitions — real page loads (no client-side router)
   softly crossfade instead of hard-cutting. Chromium-only today; every
   other browser just ignores this at-rule and does a normal instant
   navigation, so this is pure upside with zero fallback code needed. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* The header/logo read as one continuous element across navigations rather
   than crossfading with the rest of the page — same view-transition-name
   on every template. */
.site-header {
  view-transition-name: site-header;
}

:root {
  /* Brand colors — exactly as given, everything else derived from these */
  --color-primary: #184a98;
  --color-primary-dark: #0e2c5b;
  --color-primary-mid: #2f63b4;
  --color-primary-light: #7b9ad1;
  --color-secondary: #eaeaea;

  --color-ink: #16202b;
  --color-body: #4a5568;
  --color-muted: #7c8798;
  --color-bg: #ffffff;
  --color-bg-alt: var(--color-secondary);
  --color-border: #dcdfe3;

  --font-heading: "Montserrat Alternates", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --container-w: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(16, 32, 43, 0.07);
  --shadow-md: 0 12px 32px rgba(16, 32, 43, 0.12);
  --shadow-lg: 0 24px 60px rgba(16, 32, 43, 0.18);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 88px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-body);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Defensive: an off-screen (translateX) fixed element like the mobile
     nav panel can still nudge scrollWidth in some engines. Nothing on this
     site relies on body-level horizontal scroll. */
  overflow-x: hidden;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding: clamp(56px, 8vw, 108px) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-head {
  max-width: 640px;
  margin: 0 0 44px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  color: var(--color-primary);
  font-weight: 400;
}

h3 {
  font-size: 1.2rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--color-body);
}

/* ---------- Skyline divider (signature NOVAX detail — echoes the logo) ----------
   A jagged building silhouette cut into the bottom of a hero, sat inside it
   so the hero's own background shows through the gaps between "buildings"
   while the solid shapes mask down to the page background below. */
.skyline-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 46px;
  z-index: 2;
}

.skyline-divider path {
  fill: var(--color-bg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(24, 74, 152, 0.28);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 16px 32px rgba(24, 74, 152, 0.36);
}

/* Outline buttons get a fill that sweeps in from the left on hover, like a
   coat being applied, rather than an instant color swap. The sweep sits at
   z-index:-1 so it paints under the button's own (unpositioned) text/icon
   content within this stacking context, no extra markup needed. */
.btn-outline,
.btn-dark {
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s, color 0.3s var(--ease) 0.05s;
}

.btn-outline::before,
.btn-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-outline::before {
  background: #fff;
}

.btn-outline:hover {
  color: var(--color-primary);
  border-color: #fff;
}

.btn-outline:hover::before {
  transform: scaleX(1);
}

.btn-dark {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-dark::before {
  background: var(--color-primary);
}

.btn-dark:hover {
  color: #fff;
}

.btn-dark:hover::before {
  transform: scaleX(1);
}

/* ---------- Home intro (construction sequence) ----------
   Visible by default with no JS needed (so a no-JS page still shows real
   content underneath once the <noscript> rule below hides this). JS
   (js/intro.js) drives the stagger, the exit, and un-hiding the hero. */
#site-intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-mid) 100%);
  cursor: pointer;
}

.intro-skyline {
  position: relative;
  width: min(50vw, 300px);
  overflow: hidden;
}

.intro-skyline svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.45));
}

.intro-word {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: 0.16em;
  color: #fff;
  opacity: 0;
}

.intro-tagline {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  opacity: 0;
}

.intro-skip {
  position: absolute;
  bottom: 32px;
  right: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  padding: 9px 18px;
  border-radius: 999px;
  opacity: 0;
  transition: background 0.25s, border-color 0.25s;
}

.intro-skip:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 560px) {
  .intro-skip {
    bottom: 20px;
    right: 20px;
  }
}

html.intro-locked,
html.intro-locked body {
  overflow: hidden;
  height: 100%;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary-mid), var(--color-primary));
  z-index: 150;
  transition: width 0.12s linear;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    transition: none;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 100;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), height 0.35s var(--ease);
  /* Faint scrim even before JS marks the header "scrolled" — keeps the
     white nav text readable if a user scrolls past a dark hero before the
     scroll listener fires, or if JS hasn't run yet. */
  background: linear-gradient(rgba(10, 18, 33, 0.22), transparent);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  height: 72px;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 861px) {
  .site-header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: padding 0.35s var(--ease);
}

.brand .mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  transition: width 0.35s var(--ease), height 0.35s var(--ease);
}

.brand .mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-ink);
  line-height: 1.1;
  transition: font-size 0.35s var(--ease);
}

.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 2px;
}

/* Centered brand gets a size bump on desktop — it's the focal point of the header now. */
@media (min-width: 861px) {
  .brand-center {
    justify-self: center;
    padding: 10px 26px 10px 14px;
  }
  .brand-center .mark {
    width: 48px;
    height: 48px;
  }
  .brand-center .brand-text {
    font-size: 1.35rem;
  }
  .brand-center .brand-text small {
    font-size: 0.62rem;
  }
  .site-header.is-scrolled .brand-center {
    padding: 8px 22px 8px 12px;
  }
  .site-header.is-scrolled .brand-center .mark {
    width: 38px;
    height: 38px;
  }
  .site-header.is-scrolled .brand-center .brand-text {
    font-size: 1.1rem;
  }
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* .nav-links is the mobile off-canvas panel now that .nav-cluster handles
   the desktop split-around-the-logo layout — hidden until the ≤860px
   media query below turns it into the fixed off-canvas menu. */
.nav-links {
  display: none;
}

.nav-cluster-left {
  justify-self: start;
}

.nav-cluster-right {
  justify-self: end;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-self: end;
}

.nav-links a,
.nav-cluster a {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--header-text, #fff);
  padding: 6px 0;
  transition: color 0.35s var(--ease);
}

.site-header.is-scrolled .nav-links a,
.site-header.is-scrolled .nav-cluster a {
  color: var(--color-ink);
}

.nav-links a::after,
.nav-cluster a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.3s var(--ease);
}

.site-header.is-scrolled .nav-links a::after,
.site-header.is-scrolled .nav-cluster a::after {
  background: var(--color-primary);
}

.nav-links a:hover::after,
.nav-links a.is-active::after,
.nav-cluster a:hover::after,
.nav-cluster a.is-active::after {
  width: 100%;
}

.nav-links a.is-active,
.nav-cluster a.is-active {
  color: var(--color-primary-light) !important;
}

.site-header.is-scrolled .nav-links a.is-active,
.site-header.is-scrolled .nav-cluster a.is-active {
  color: var(--color-primary) !important;
}

@media (max-width: 860px) {
  .nav-cluster {
    display: none;
  }
}

/* ---------- Language switch (UI only — no translation wired up yet) ---------- */
.lang-switch {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.site-header.is-scrolled .lang-switch {
  background: var(--color-bg-alt);
  border-color: var(--color-border);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--header-text, #fff);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.site-header.is-scrolled .lang-btn {
  color: var(--color-muted);
}

.lang-btn.is-active {
  background: #fff;
  color: var(--color-primary) !important;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: none;
  background: #fff;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle span {
  top: 22px;
}

.nav-toggle span::before {
  top: -8px;
}

.nav-toggle span::after {
  top: 8px;
}

.nav-open .nav-toggle span {
  background: transparent !important;
}

.nav-open .nav-toggle span::before {
  transform: translateY(8px) rotate(45deg);
}

.nav-open .nav-toggle span::after {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: flex;
    position: fixed;
    inset: 72px 0 0 0;
    height: calc(100dvh - 72px);
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 24px;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    overflow-y: auto;
  }

  .nav-open .nav-links {
    transform: translateX(0);
  }

  .nav-links a {
    color: var(--color-ink) !important;
    width: 100%;
    padding: 16px 4px;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.05rem;
  }
}

@media (max-width: 360px) {
  /* Very narrow phones: drop the "EN"/"AR" labels' extra padding to keep
     brand + lang-switch + hamburger from crowding. */
  .lang-btn {
    padding: 6px 9px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(120deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, var(--color-primary-mid) 100%);
}

.hero-page {
  min-height: 52vh;
  padding-top: var(--header-h);
}

/* ---------- Home hero slideshow ---------- */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(14, 26, 51, 0.92) 0%, rgba(14, 26, 51, 0.72) 40%, rgba(24, 74, 152, 0.55) 75%, rgba(24, 74, 152, 0.35) 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s var(--ease-cinematic);
  animation: kenBurns 13s linear forwards;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide-caption {
  position: absolute;
  left: 32px;
  bottom: 68px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  background: rgba(14, 26, 51, 0.45);
  backdrop-filter: blur(4px);
  padding: 8px 16px;
  border-radius: 999px;
}

.hero-slide-dots {
  position: absolute;
  right: 32px;
  bottom: 64px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-slide-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  padding: 0;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), width 0.3s var(--ease);
}

.hero-slide-dots button.is-active {
  background: #fff;
  width: 22px;
  border-radius: 5px;
}

@media (max-width: 760px) {
  .hero-slide-caption,
  .hero-slide-dots {
    display: none;
  }
}

.hero .container {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + 20px);
  padding-bottom: 80px;
}

.hero-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(28px, 5vw, 72px);
}

.hero-logo-big {
  flex-shrink: 0;
  width: clamp(130px, 19vw, 280px);
}

.hero-logo-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 20px 46px rgba(0, 0, 0, 0.4));
}

.hero-content {
  max-width: 620px;
}

/* Text is held invisible until JS confirms it can run (.js-anim), so the
   hero animates in on load rather than sitting static. The logo mark itself
   is handled separately (see animations.css) — it's built path-by-path via
   a stroke-draw + fill-solidify sequence, not a plain fade. */
.js-anim .hero-content > * {
  opacity: 0;
}

@media (max-width: 900px) {
  .hero-split {
    flex-direction: column;
    text-align: center;
  }
  .hero-logo-big {
    width: clamp(110px, 34vw, 190px);
  }
  .hero-content .hero-cta {
    justify-content: center;
  }
}

.hero-content .eyebrow {
  color: rgba(255, 255, 255, 0.75);
}

.hero h1,
.hero-page h1 {
  color: #fff;
  font-weight: 600;
}

.hero p.lede {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.12rem;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-cue .line {
  width: 1px;
  height: 30px;
  background: linear-gradient(#fff, transparent);
  animation: scrollcue 1.8s infinite var(--ease);
}

/* ---------- Page hero (Who We Are / Our Projects / Contact) ---------- */
.page-hero-content {
  max-width: 640px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Intro (centered, "Welcome to…") ---------- */
.intro-block {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.intro-block h2 {
  margin-bottom: 16px;
}

/* ---------- Service row (browse-by-category cards) ---------- */
.service-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  position: relative;
  aspect-ratio: 3/2;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.service-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.service-card:hover img {
  transform: scale(1.08);
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(14, 26, 51, 0.88), rgba(14, 26, 51, 0.05) 65%);
}

.service-card .body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-card .label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.98rem;
}

.service-card .arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s var(--ease), transform 0.35s var(--ease);
}

.service-card .arrow svg {
  width: 14px;
  height: 14px;
}

.service-card:hover .arrow {
  background: var(--color-primary);
  transform: translateX(3px);
}

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

@media (max-width: 560px) {
  .service-row {
    grid-template-columns: 1fr;
  }
  .service-card {
    aspect-ratio: 16/10;
  }
}

/* ---------- Photo value cards (3-up) ---------- */
.photo-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .photo-cards {
    grid-template-columns: 1fr;
  }
}

.photo-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.photo-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.photo-card .photo {
  aspect-ratio: 4/3;
  overflow: hidden;
}

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

.photo-card .body {
  padding: 22px 24px 26px;
}

/* ---------- Generic cards (values / mission-vision) ---------- */
.grid {
  display: grid;
  gap: 28px;
}

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

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

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

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

.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card .icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(24, 74, 152, 0.08);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card .icon svg {
  width: 24px;
  height: 24px;
}

/* ---------- Project cards (Sectors-style: image + white card + link) ---------- */
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

@media (max-width: 620px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.project-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* A thin frame draws inward on hover — reads as a technical/blueprint
   selection mark rather than a decorative glow. */
.project-card::before,
.service-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 2;
  border: 1.5px solid var(--frame-color, var(--color-primary));
  opacity: 0;
  transition: opacity 0.3s var(--ease), inset 0.3s var(--ease);
  pointer-events: none;
}

.service-card {
  --frame-color: rgba(255, 255, 255, 0.85);
}

.project-card:hover::before,
.service-card:hover::before {
  opacity: 1;
  inset: 9px;
}

.project-card .thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.project-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(70%) contrast(1.02);
  transition: transform 0.6s var(--ease), filter 0.5s var(--ease);
}

.project-card:hover .thumb img {
  transform: scale(1.08);
  filter: grayscale(0%);
}

.project-card .video-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(16, 32, 43, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.project-card .video-badge svg {
  width: 15px;
  height: 15px;
}

.project-card .body {
  padding: 22px 24px 24px;
}

.project-card .tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.project-card .learn-more {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-card .learn-more svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}

.project-card:hover .learn-more svg {
  transform: translateX(4px);
}

/* ---------- Filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-body);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s var(--ease);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ---------- State blocks ---------- */
.state-block {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  margin: 0 auto 16px;
  animation: spin 0.9s linear infinite;
}

/* ---------- Compact feed cards (home "Recent Projects" teaser) ---------- */
.feed-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 900px) {
  .feed-list {
    grid-template-columns: 1fr;
  }
}

.feed-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.feed-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}

.feed-card .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.feed-card h3 {
  font-size: 1rem;
  margin-bottom: 0;
}

/* ---------- Split section ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.media-frame img {
  border-radius: var(--radius-lg);
}

.badge-float {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: var(--color-primary);
  color: #fff;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.badge-float b {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

.badge-float span {
  font-size: 0.76rem;
  opacity: 0.85;
}

.pull-quote {
  border-left: 3px solid var(--color-primary);
  padding-left: 18px;
  margin: 24px 0;
  color: var(--color-ink);
  font-size: 1.02rem;
}

/* ---------- Brand mark showcase (Who We Are) ---------- */
.mark-showcase {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
}

.mark-showcase img {
  width: 130px;
  flex-shrink: 0;
}

.mark-showcase .text {
  max-width: 520px;
}

.mark-showcase .text h3 {
  margin-bottom: 10px;
  color: var(--color-primary);
}

@media (max-width: 640px) {
  .mark-showcase {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Values / check list ---------- */
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  color: var(--color-body);
}

.check-list svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 34px;
  border-left: 2px solid var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -41px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--color-primary);
}

.timeline-item .year {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  display: block;
  margin-bottom: 4px;
}

/* ---------- Team ---------- */
.team-card {
  text-align: center;
}

.team-card .photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.3rem;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.team-card:nth-child(2n) .photo {
  background: linear-gradient(135deg, var(--color-primary-mid), var(--color-primary));
}

.team-card .role {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Closing quote banner ---------- */
.quote-banner {
  background: var(--color-secondary);
  padding: 56px 0;
  text-align: center;
}

.quote-banner p {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  color: var(--color-ink);
  margin: 0 0 16px;
}

.quote-banner p strong {
  color: var(--color-primary);
}

.quote-banner .rule {
  width: 46px;
  height: 3px;
  background: var(--color-primary);
  margin: 0 auto;
  border-radius: 2px;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  color: #fff;
  margin: 0 0 8px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.cta-banner .cta-text {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.cta-banner .btn {
  position: relative;
  z-index: 1;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.office-block {
  padding: 22px 0;
  border-bottom: 1px solid var(--color-border);
}

.office-block:first-child {
  padding-top: 0;
}

.office-block h3 {
  color: var(--color-primary);
  font-size: 1.02rem;
  margin-bottom: 10px;
}

.office-block a {
  color: var(--color-primary);
}

.text-muted-placeholder {
  color: var(--color-muted);
  font-style: italic;
}

.map-frame {
  margin-top: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 16/10;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-frame-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: var(--color-bg-alt);
}

.map-frame-empty p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0;
}

.map-frame-empty span {
  font-size: 0.8rem;
}

.form-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.field {
  position: relative;
  margin-bottom: 20px;
}

/* Small corner ticks mark the focused field, like an annotation on a
   drawing, instead of a generic soft glow. */
.field::before,
.field::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--color-primary);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}

.field::before {
  left: 2px;
  border-left: 2px solid var(--color-primary);
}

.field::after {
  right: 2px;
  border-right: 2px solid var(--color-primary);
}

.field:focus-within::before,
.field:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--color-ink);
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  font: inherit;
  color: var(--color-ink);
  background: var(--color-bg-alt);
  transition: border-color 0.25s, background 0.25s;
}

.field textarea {
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 130px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
}

.form-note {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 14px;
}

.form-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.form-feedback.is-visible {
  display: block;
}

.form-feedback.success {
  background: rgba(29, 156, 99, 0.12);
  color: #147a4e;
}

.form-feedback.error {
  background: rgba(217, 65, 65, 0.12);
  color: #b02d2d;
}

/* ---------- Footer (minimal single row, matches reference) ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 30px 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-brand-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand-line .mark {
  width: 28px;
  height: 28px;
}

.footer-brand-line .mark img {
  width: 100%;
  filter: brightness(0) invert(1);
}

.footer-brand-line span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
}

.footer-nav a {
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-nav .sep {
  color: rgba(255, 255, 255, 0.3);
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s, transform 0.3s var(--ease);
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 760px) {
  .footer-row {
    flex-direction: column;
    text-align: center;
  }
  .footer-nav {
    justify-content: center;
  }
}

/* ---------- Project detail page ---------- */
.project-banner {
  position: relative;
  width: 100%;
  margin-top: var(--header-h);
  /* Plain height (not aspect-ratio) on purpose: aspect-ratio combined with
     min-height fights over which dimension wins on narrow viewports and can
     inflate the box's width past the viewport. */
  height: clamp(320px, 42vw, 560px);
  overflow: hidden;
  background: var(--color-bg-alt);
}

.project-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenBurns 16s linear forwards;
}

.project-banner .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 26, 51, 0.55) 0%, rgba(14, 26, 51, 0.35) 35%, rgba(14, 26, 51, 0.92) 100%);
  display: flex;
  align-items: flex-end;
}

.project-banner .overlay .container {
  padding-bottom: 36px;
  color: #fff;
}

.project-banner .tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--color-primary);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.project-banner h1 {
  color: #fff;
  margin-bottom: 8px;
}

.project-banner .meta-line {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 900px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
  }
}

.project-meta-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: 28px;
}

.project-meta-card dl {
  margin: 0 0 22px;
}

.project-meta-card .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.project-meta-card .row:last-of-type {
  border-bottom: none;
}

.project-meta-card .row dt {
  color: var(--color-muted);
}

.project-meta-card .row dd {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink);
  text-align: right;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%);
  transition: transform 0.5s var(--ease), filter 0.4s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.07);
  filter: grayscale(0%);
}

.gallery-item .video-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(16, 32, 43, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.gallery-item .video-badge svg {
  width: 14px;
  height: 14px;
}

.not-found-block {
  text-align: center;
  padding: 100px 20px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 22, 33, 0.9);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  position: relative;
  width: min(960px, 100%);
  max-height: 88vh;
  background: #0c1220;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.4s var(--ease);
}

.lightbox.is-open .lightbox-inner {
  transform: translateY(0) scale(1);
}

.lightbox-media {
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 64vh;
  overflow: hidden;
}

.lightbox-media img,
.lightbox-media video {
  max-height: 64vh;
  width: 100%;
  object-fit: contain;
}

.lightbox-body {
  padding: 22px 26px;
  color: #fff;
}

.lightbox-body h3 {
  color: #fff;
  margin-bottom: 6px;
}

.lightbox-body .meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  padding: 14px 26px 22px;
  overflow-x: auto;
}

.lightbox-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.55;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.25s, border-color 0.25s;
  flex-shrink: 0;
}

.lightbox-thumbs img.is-active {
  opacity: 1;
  border-color: var(--color-primary-light);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

/* ---------- Utility ---------- */
.text-center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cms-note {
  font-size: 0.78rem;
  color: var(--color-muted);
  border-top: 1px dashed var(--color-border);
  margin-top: 60px;
  padding-top: 18px;
}
