/* Visual system tokens: update colors, radius, shadows and motion values here. */
/* This palette is provisional and intended for testing. Do not treat as final brand identity. */
:root {
  --color-deep-sapphire: #002d72;
  --color-royal-blue: #1e88e5;
  --color-royal-blue-strong: #0f6fc9;
  --color-neon: #d8e022;
  --color-neon-strong: #c2cb1d;
  --color-accent-secondary: var(--color-neon);
  --color-accent-secondary-strong: var(--color-neon-strong);
  --color-luxe-ivory: #fff8e1;
  --color-white: #ffffff;
  --color-surface-soft: #f6f8fb;
  --color-surface-blue: #eef5ff;
  --color-text-primary: #0b1220;
  --color-text-secondary: #4b5563;
  --color-text-tertiary: #667085;
  --color-text-inverse: #eaf1ff;
  --color-border-soft: #dde3ea;
  --color-border-strong: #b9cbe2;
  --color-focus-ring: rgba(30, 136, 229, 0.22);
  --color-shadow: rgba(0, 45, 114, 0.12);
  --shadow-soft: 0 12px 28px rgba(0, 45, 114, 0.06);
  --shadow-medium: 0 18px 36px rgba(0, 45, 114, 0.1);
  --shadow-strong: 0 24px 48px rgba(0, 45, 114, 0.18);
  --radius-none: 0px;
  --radius-minimal: 4px;
  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 16px;
  --font-heading: "Cabinet Grotesk", system-ui, sans-serif;
  --font-body: "General Sans", system-ui, sans-serif;
  --font-weight-body: 300;
  --font-weight-body-medium: 300;
  --font-weight-body-strong: 400;
  --font-weight-heading-medium: 400;
  --font-weight-heading: 600;
  --font-weight-heading-active: 650;
  --expandable-duration: 480ms;
  --team-photo-overlay-opacity: 0;
  --team-photo-overlay-hover-opacity: 0.16;
  --team-photo-base-saturation: 0.62;
  --team-photo-hover-saturation: 0.84;
  --team-photo-base-brightness: 0.94;
  --team-photo-hover-brightness: 0.98;
  --team-photo-transition: 520ms;
  --container: min(1180px, calc(100% - 3rem));
  --section-space: clamp(4.5rem, 8vw, 7rem);
  --header-height: 96px;

  /* Motion settings: keep animations controlled and easy to disable or adjust. */
  --motion-fast: 160ms;
  --motion-normal: 240ms;
  --motion-slow: 520ms;
  --motion-reveal-duration: 620ms;
}

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

html {
  scroll-behavior: smooth;
}

html.js body {
  transition: opacity 420ms ease-out;
}

html.js body.is-loading {
  opacity: 0;
}

html.js body.is-loaded {
  opacity: 1;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: var(--font-weight-body);
  line-height: 1.68;
  color: var(--color-text-primary);
  background:
    linear-gradient(180deg, rgba(30, 136, 229, 0.03) 0, transparent 16rem),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 45, 114, 0.03), transparent 18rem),
    linear-gradient(90deg, rgba(0, 45, 114, 0.02) 1px, transparent 1px);
  background-size: auto, 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 42%);
}

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

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 0.5rem);
}

:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 3px;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section-spacing {
  padding: 0 0 var(--section-space);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.9rem 0 0;
  background: transparent;
  border-bottom: 0;
  transition:
    background-color var(--motion-normal) ease-out,
    backdrop-filter var(--motion-normal) ease-out,
    box-shadow var(--motion-normal) ease-out,
    border-color var(--motion-normal) ease-out;
}

/* Header scroll behavior: adjust background, blur, border or shadow here. */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 45, 114, 0.08);
  border-bottom: 1px solid rgba(0, 45, 114, 0.08);
}

.header-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 80px;
  padding-inline: clamp(0.35rem, 1vw, 0.85rem);
}

.brand {
  font-family: var(--font-body);
  color: var(--color-deep-sapphire);
  font-size: 1.05rem;
  font-weight: var(--font-weight-body-strong);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 2;
}

.site-logo {
  display: inline-grid;
  align-items: center;
  position: relative;
  z-index: 2;
  width: clamp(9.75rem, 14vw, 12.5rem);
}

/* Logo sizing: adjust width/height here without replacing the asset path. */
.site-logo-image {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 220ms ease-out;
}

.site-logo-image--light {
  opacity: 1;
}

.site-logo-image--dark {
  opacity: 0;
}

.site-header.is-scrolled .site-logo-image--light {
  opacity: 0;
}

.site-header.is-scrolled .site-logo-image--dark {
  opacity: 1;
}

.site-nav-wrapper {
  justify-self: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.42rem;
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(221, 227, 234, 0.82);
  box-shadow: 0 10px 24px rgba(0, 45, 114, 0.08);
  backdrop-filter: blur(18px);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border-radius: var(--radius-minimal);
  font-size: 0.96rem;
  font-weight: var(--font-weight-body-strong);
  color: var(--color-deep-sapphire);
  transition:
    color var(--motion-fast) ease-out,
    background-color var(--motion-fast) ease-out,
    transform var(--motion-fast) ease-out;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-royal-blue);
  background: rgba(30, 136, 229, 0.08);
  transform: translateY(-1px);
}

.footer-nav a {
  display: inline-flex;
  position: relative;
  padding-bottom: 0.2rem;
  font-size: 0.96rem;
  font-weight: var(--font-weight-body-strong);
  color: var(--color-text-secondary);
  transition: color var(--motion-fast) ease-out;
}

.footer-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 2px;
  background: var(--color-accent-secondary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--motion-fast) ease-out;
}

.footer-nav a:hover::after,
.footer-nav a:focus-visible::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--radius-small);
  border: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(0, 45, 114, 0.08);
}

.menu-toggle span {
  width: 1rem;
  height: 2px;
  background: var(--color-deep-sapphire);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.7rem;
  position: relative;
  z-index: 2;
}

.header-cta {
  min-height: 2.8rem;
  padding: 0.75rem 1.12rem;
  background: var(--color-accent-secondary);
  color: var(--color-deep-sapphire);
  border-color: rgba(216, 224, 34, 0.34);
  box-shadow: 0 10px 22px rgba(216, 224, 34, 0.16);
}

.header-cta:hover,
.header-cta:focus-visible {
  background: var(--color-accent-secondary-strong);
  color: var(--color-deep-sapphire);
  box-shadow: 0 14px 28px rgba(216, 224, 34, 0.22);
}

.hero-section {
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--header-height) * -1);
  padding: 0.85rem 0 calc(var(--section-space) * 0.72);
}

.hero-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(42rem, 94vh, 52rem);
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: var(--radius-large);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 26px 60px rgba(0, 45, 114, 0.18);
}

.hero-visual-layer,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-visual-layer {
  /* Hero background placeholder */
  /* TEMP asset, replace with final BIM render, model capture or architectural visual. */
  /* Asset path: ../assets/images/hero/hero-main-placeholder.svg */
  background: var(--color-deep-sapphire);
  transform: translate3d(0, 0, 0) scale(1.04);
  transform-origin: center top;
  will-change: transform;
  z-index: 0;
}

.hero-visual-layer::before {
  content: "";
  position: absolute;
  inset: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.hero-visual-layer::after {
  content: "";
  position: absolute;
  inset: auto -4% 0 42%;
  height: 78%;
  background: rgba(30, 136, 229, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}

.hero-visual-tag {
  position: absolute;
  right: clamp(1.2rem, 3vw, 2rem);
  bottom: clamp(1.2rem, 3vw, 2rem);
  z-index: 1;
  display: none;
}

.hero-visual-tag span {
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-small);
  border-left: 4px solid var(--color-accent-secondary);
  background: rgba(255, 248, 225, 0.96);
  color: var(--color-deep-sapphire);
  font-size: 0.95rem;
  font-weight: var(--font-weight-body-strong);
  box-shadow: 0 12px 24px rgba(0, 45, 114, 0.14);
}

/* Hero overlay and parallax are experimental and should be easy to tune. */
.hero-overlay {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 45, 114, 0.86) 0%, rgba(0, 45, 114, 0.64) 34%, rgba(0, 45, 114, 0.28) 62%, rgba(0, 45, 114, 0.12) 100%),
    linear-gradient(180deg, rgba(0, 45, 114, 0.08), rgba(0, 45, 114, 0.22));
}

/* Hero 3D model-viewer: premium progressive enhancement over the existing Hero visual area. */
.hero-3d {
  position: absolute;
  z-index: 1;
  top: clamp(7rem, 16vh, 10rem);
  right: clamp(0.6rem, 2.4vw, 2rem);
  bottom: clamp(1rem, 3.5vw, 2.5rem);
  width: min(53vw, 47rem);
  min-width: 30rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.hero-3d::before {
  content: "";
  position: absolute;
  inset: 10% 4% 8% 18%;
  background: radial-gradient(circle at 54% 44%, rgba(216, 224, 34, 0.16), transparent 34%),
    radial-gradient(circle at 52% 52%, rgba(255, 255, 255, 0.14), transparent 46%);
  filter: blur(18px);
  opacity: 0.72;
  pointer-events: none;
}

.hero-model-viewer {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  --poster-color: transparent;
  opacity: 1;
  filter: drop-shadow(0 34px 42px rgba(0, 14, 38, 0.28));
  transition: opacity 420ms ease-out;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 37rem;
}

.eyebrow,
.section-kicker {
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1rem;
  color: var(--color-deep-sapphire);
  font-size: 0.8rem;
  font-weight: var(--font-weight-body-strong);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 2.75rem;
  height: 2px;
  background: var(--color-accent-secondary);
}

.hero-copy h1 {
  font-family: var(--font-heading);
  margin: 0;
  max-width: 10ch;
  color: var(--color-white);
  font-size: 4.75rem;
  font-weight: var(--font-weight-heading);
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
  transition: font-weight 600ms ease-out;
}

.hero-copy h1.hero-title--scrolled {
  font-weight: var(--font-weight-heading-active);
}

.hero-stage .eyebrow {
  color: rgba(255, 248, 225, 0.9);
}

.hero-subtitle,
.hero-supporting,
.section-heading p,
.contact-intro,
.footer-note,
.footer-contact p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.hero-subtitle {
  font-family: var(--font-heading);
  margin: 1.4rem 0 0;
  max-width: 35rem;
  font-size: 1.18rem;
  font-weight: var(--font-weight-heading-medium);
  line-height: 1.36;
  color: rgba(255, 255, 255, 0.92);
}

.hero-supporting {
  margin: 1rem 0 0;
  max-width: 31rem;
  font-size: 0.98rem;
  color: rgba(234, 241, 255, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 2rem 0 1rem;
}

.button {
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1.3rem;
  border-radius: var(--radius-small);
  border: 1px solid transparent;
  font-size: 0.97rem;
  font-weight: var(--font-weight-body-strong);
  letter-spacing: 0.01em;
  transition:
    transform var(--motion-fast) ease-out,
    border-color var(--motion-fast) ease-out,
    background-color var(--motion-fast) ease-out,
    box-shadow var(--motion-fast) ease-out,
    color var(--motion-fast) ease-out;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--color-royal-blue);
  color: var(--color-white);
  box-shadow: 0 14px 26px rgba(30, 136, 229, 0.2);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--color-royal-blue-strong);
  box-shadow: 0 18px 30px rgba(30, 136, 229, 0.24);
}

.button-secondary {
  background: var(--color-white);
  color: var(--color-deep-sapphire);
  border-color: var(--color-border-strong);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: var(--color-royal-blue);
  border-color: var(--color-royal-blue);
}

.hero-microcopy {
  margin: 0;
  max-width: 28rem;
  font-size: 0.94rem;
  color: rgba(234, 241, 255, 0.68);
}

.hero-actions .button-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.hero-actions .button-secondary:hover,
.hero-actions .button-secondary:focus-visible {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.14);
}

.workflow-section {
  position: relative;
  z-index: 3;
  margin-top: calc(var(--section-space) * -0.48);
  background: transparent;
}

.workflow-shell {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 45, 114, 0.04);
  box-shadow: 0 22px 48px rgba(0, 45, 114, 0.12);
}

.section-heading {
  max-width: 43rem;
  margin-bottom: 2.2rem;
}

.section-heading-compact {
  margin-bottom: 1.5rem;
}

.section-heading h2,
.contact-copy h2 {
  font-family: var(--font-heading);
  margin: 0 0 0.8rem;
  color: var(--color-deep-sapphire);
  font-size: 3rem;
  font-weight: var(--font-weight-heading);
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-heading p,
.contact-copy p {
  margin: 0;
}

.workflow-grid,
.services-grid,
.projects-grid,
.team-grid {
  display: grid;
  gap: 1.25rem;
}

.workflow-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.workflow-card,
.service-card,
.project-card {
  position: relative;
  border-radius: var(--radius-medium);
}

.workflow-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.9rem;
  min-height: 11.4rem;
  padding: 1.35rem;
  background: linear-gradient(180deg, rgba(255, 248, 225, 0.36), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(0, 45, 114, 0.04);
  box-shadow: 0 10px 24px rgba(0, 45, 114, 0.05);
  transition:
    opacity var(--reveal-duration, var(--motion-slow)) ease-out,
    transform var(--reveal-duration, var(--motion-slow)) ease-out,
    border-color var(--motion-normal) ease-out,
    box-shadow var(--motion-normal) ease-out;
}

/* Workflow reveal is experimental; adjust or disable motion settings here. */
/* Global reveal motion: reusable fade reveal for sections, headings, grids and cards. */
html.motion-safe .reveal {
  opacity: 0;
}

html.motion-safe .workflow-card {
  opacity: 0;
  transform: translateY(var(--reveal-distance, 18px));
}

html.motion-safe .reveal.is-visible {
  opacity: 1;
}

html.motion-safe .workflow-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: var(--reveal-delay, 0ms);
}

.workflow-card:hover,
.workflow-card:focus-within,
.workflow-card.is-visible {
  border-color: rgba(30, 136, 229, 0.12);
  box-shadow: 0 16px 28px rgba(0, 45, 114, 0.08);
}

.workflow-card-visual {
  margin-bottom: 0.15rem;
  border-radius: var(--radius-medium);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.74);
}

.workflow-card-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.workflow-number {
  font-family: var(--font-heading);
  display: inline-block;
  color: var(--color-royal-blue);
  font-size: 1.15rem;
  font-weight: var(--font-weight-heading);
  line-height: 1;
  letter-spacing: 0.03em;
}

.workflow-step-heading {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.workflow-step-title,
.service-card h3,
.project-body h3,
.team-card h3 {
  font-family: var(--font-heading);
  margin: 0;
  font-size: 1.15rem;
  font-weight: var(--font-weight-heading-medium);
  line-height: 1.3;
}

.workflow-card p,
.service-card p,
.project-body p,
.team-description {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.workflow-card p {
  max-width: 28ch;
}

/* Card styles: keep service, project and team cards visually related but not identical. */
.services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.answer-section {
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(3.2rem, 6vw, 5rem);
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.answer-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  border-radius: var(--radius-medium);
  background: rgba(255, 248, 225, 0.44);
  box-shadow: 0 18px 44px rgba(0, 45, 114, 0.04);
  transition:
    transform var(--motion-normal) ease-out,
    background-color var(--motion-normal) ease-out,
    box-shadow var(--motion-normal) ease-out;
}

.answer-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-neon), var(--color-royal-blue));
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: left center;
  transition:
    opacity var(--motion-normal) ease-out,
    transform var(--motion-normal) ease-out;
}

.answer-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 248, 225, 0.72);
  box-shadow: 0 24px 60px rgba(0, 45, 114, 0.09);
}

.answer-card:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.answer-card h3 {
  font-family: var(--font-heading);
  margin: 0 0 0.55rem;
  color: var(--color-deep-sapphire);
  font-size: 1rem;
  font-weight: var(--font-weight-heading);
  line-height: 1.25;
}

.answer-card p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
}

.service-card,
.project-card {
  background: var(--color-white);
  border: 1px solid rgba(0, 45, 114, 0.04);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--motion-normal) ease-out,
    box-shadow var(--motion-normal) ease-out,
    border-color var(--motion-fast) ease-out;
}

.service-card:hover,
.service-card:focus-within,
.project-card:hover,
.project-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(30, 136, 229, 0.14);
  box-shadow: var(--shadow-medium);
}

.service-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.75rem;
  width: 3.5rem;
  height: 3px;
  background: var(--color-royal-blue);
}

.service-card-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-weight: var(--font-weight-heading);
}

.service-icon {
  position: relative;
  width: 4.4rem;
  height: 4.4rem;
  flex: 0 0 auto;
  margin-bottom: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#projects {
  background: linear-gradient(180deg, var(--color-surface-blue) 0%, #ffffff 100%);
}

.projects-grid {
  display: block;
}

html:not(.js) .projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.projects-carousel {
  --project-carousel-gap: 1.25rem;
  --project-carousel-duration: 34s;
}

.projects-carousel-viewport {
  container-type: inline-size;
  overflow: hidden;
  border-radius: var(--radius-medium);
}

.projects-carousel-track {
  display: flex;
  width: max-content;
  animation: project-carousel-scroll var(--project-carousel-duration) linear infinite;
  will-change: transform;
}

.projects-carousel-set {
  display: flex;
  gap: var(--project-carousel-gap);
  padding-right: var(--project-carousel-gap);
}

.projects-carousel:hover .projects-carousel-track,
.projects-carousel:focus-within .projects-carousel-track {
  animation-play-state: paused;
}

.project-card {
  flex: 0 0 calc((100cqw - (var(--project-carousel-gap) * 2)) / 3);
  overflow: hidden;
  background: var(--color-white);
}

.project-media {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.project-placeholder,
.team-placeholder {
  display: grid;
  place-items: center;
  color: var(--color-text-secondary);
}

.project-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform var(--motion-normal) ease-out;
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 1.35rem;
  background: linear-gradient(180deg, rgba(0, 45, 114, 0.04), rgba(0, 45, 114, 0.86));
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--motion-normal) ease-out,
    transform var(--motion-normal) ease-out;
}

.project-overlay h3 {
  font-family: var(--font-heading);
  margin: 0;
  color: var(--color-white);
  font-size: 1.18rem;
  font-weight: var(--font-weight-heading);
  line-height: 1.18;
}

.project-services {
  font-family: var(--font-body);
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.86rem;
  font-weight: var(--font-weight-body-strong);
  line-height: 1.4;
}

.project-card:hover .project-image,
.project-card:focus-within .project-image,
.project-card.is-active .project-image {
  transform: scale(1.04);
}

.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay,
.project-card.is-active .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

@keyframes project-carousel-scroll {
  to {
    transform: translateX(-50%);
  }
}

.project-tag {
  font-family: var(--font-body);
  display: inline-flex;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-small);
  font-size: 0.76rem;
  font-weight: var(--font-weight-body-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#about {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}

.about-team-static {
  position: relative;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: 2.4rem;
}

.about-preview {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: var(--radius-medium);
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.about-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-deep-sapphire);
  border-radius: var(--radius-medium);
  opacity: var(--team-photo-overlay-opacity);
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity var(--team-photo-transition) ease-out;
}

.about-group-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-medium);
  filter:
    grayscale(1)
    contrast(1.04)
    brightness(1.03);
  transform: scale(1);
  transition:
    filter var(--team-photo-transition) ease-out,
    transform var(--team-photo-transition) ease-out;
}

.about-team-expandable {
  position: relative;
  z-index: 2;
}

.about-team-expandable .team-grid,
.projects-expandable .projects-grid {
  margin-top: 0.1rem;
}

.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  text-align: left;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.team-photo {
  position: relative;
  width: 100%;
  /* Team photo upload size: use 900x1350 JPG images to match this 2:3 editorial frame. */
  aspect-ratio: 2 / 3;
  margin: 0 0 1.35rem;
  border-radius: var(--radius-medium);
  overflow: hidden;
}

/* Team expanded layout: grayscale base, soft Deep Sapphire tint appears on hover/focus. */
.team-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-deep-sapphire);
  opacity: var(--team-photo-overlay-opacity);
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity var(--team-photo-transition) ease-out;
}

.team-placeholder,
.team-image {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-medium);
}

.team-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, #002d72 0%, #0b4b96 100%);
  color: var(--color-luxe-ivory);
  font-size: 1.55rem;
  font-weight: var(--font-weight-heading);
}

.team-placeholder::before {
  content: none;
}

.team-image {
  border: 0;
  object-fit: cover;
  filter:
    grayscale(1)
    contrast(1.04)
    brightness(1.03);
  transition:
    filter var(--team-photo-transition) ease-out,
    transform var(--team-photo-transition) ease-out;
}

.team-card-body {
  width: 100%;
}

.team-member-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.team-card h3 {
  color: var(--color-deep-sapphire);
  margin-bottom: 0.18rem;
  font-size: 1.36rem;
  font-weight: var(--font-weight-heading);
}

.team-role {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--color-deep-sapphire);
  font-size: 1rem;
  font-weight: var(--font-weight-body);
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.team-linkedin {
  display: inline-flex;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-deep-sapphire);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: var(--font-weight-body-strong);
  line-height: 1;
  transition:
    transform var(--motion-fast) ease-out,
    background-color var(--motion-fast) ease-out,
    box-shadow var(--motion-fast) ease-out;
}

.team-linkedin:hover,
.team-linkedin:focus-visible {
  transform: translateY(-2px);
  background: var(--color-royal-blue);
  box-shadow: 0 10px 22px rgba(30, 136, 229, 0.22);
}

.team-card:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 3px;
}

.team-card:active .team-photo::after,
.team-card:focus-visible .team-photo::after,
.team-card:focus-within .team-photo::after {
  opacity: var(--team-photo-overlay-hover-opacity);
}

.team-card:active .team-image,
.team-card:focus-visible .team-image,
.team-card:focus-within .team-image {
  filter:
    grayscale(0)
    saturate(0.78)
    contrast(1.02)
    brightness(0.98);
  transform: scale(1.02);
}

.about-preview:active::after,
.about-preview:focus-within::after {
  opacity: var(--team-photo-overlay-hover-opacity);
}

.about-preview:active .about-group-image,
.about-preview:focus-within .about-group-image {
  filter:
    grayscale(0)
    saturate(0.78)
    contrast(1.02)
    brightness(0.98);
  transform: scale(1.025);
}

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  /* About group photo: same branded hover treatment used by the individual team photos. */
  .about-preview:hover::after,
  .about-preview:focus-within::after {
    opacity: var(--team-photo-overlay-hover-opacity);
  }

  .about-preview:hover .about-group-image,
  .about-preview:focus-within .about-group-image {
    filter:
      grayscale(0)
      saturate(0.78)
      contrast(1.02)
      brightness(0.98);
    transform: scale(1.025);
  }

  /* Team interaction: keep the expanded layout clean and use only a subtle photo hover. */
  .team-card:hover .team-photo::after,
  .team-card:focus-visible .team-photo::after,
  .team-card:focus-within .team-photo::after {
    opacity: var(--team-photo-overlay-hover-opacity);
  }

  .team-card:hover .team-image,
  .team-card:focus-visible .team-image,
  .team-card:focus-within .team-image {
    filter:
      grayscale(0)
      saturate(0.78)
      contrast(1.02)
      brightness(0.98);
    transform: scale(1.02);
  }

}

#contact {
  background: linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
}

.answer-section + #contact {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 1.3rem;
  align-items: start;
}

.contact-copy,
.contact-form {
  border-radius: var(--radius-medium);
}

.contact-copy {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  background:
    linear-gradient(180deg, #002d72 0%, #0b4b96 100%);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-medium);
}

.contact-copy::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.contact-copy > * {
  position: relative;
  z-index: 1;
}

.contact-copy .section-kicker,
.contact-copy .contact-intro {
  color: rgba(234, 241, 255, 0.82);
}

.contact-copy h2 {
  color: var(--color-white);
  font-weight: var(--font-weight-heading-medium);
  transition: font-weight 420ms ease-out;
}

.contact-copy h2.is-scroll-emphasized {
  font-weight: var(--font-weight-heading);
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--color-white);
  border: 1px solid rgba(0, 45, 114, 0.05);
  box-shadow: var(--shadow-soft);
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-field label {
  font-family: var(--font-body);
  color: var(--color-deep-sapphire);
  font-size: 0.94rem;
  font-weight: var(--font-weight-body-strong);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-small);
  border: 1px solid var(--color-border-soft);
  background: var(--color-white);
  color: var(--color-text-primary);
  transition:
    border-color var(--motion-fast) ease-out,
    box-shadow var(--motion-fast) ease-out;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #8b97a8;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-royal-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.14);
}

/* Contact CTA colors can be adjusted after testing Royal Blue vs Neon. */
.form-submit {
  justify-self: start;
  margin-top: 0.4rem;
  background: var(--color-accent-secondary);
  color: var(--color-text-primary);
  box-shadow: 0 14px 28px rgba(216, 224, 34, 0.2);
}

.form-submit:hover,
.form-submit:focus-visible {
  background: var(--color-accent-secondary-strong);
  box-shadow: 0 18px 30px rgba(216, 224, 34, 0.24);
}

.form-status {
  min-height: 1.4rem;
  color: var(--color-text-secondary);
  font-size: 0.94rem;
}

.form-privacy {
  max-width: 34rem;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.form-status.is-warning {
  color: var(--color-deep-sapphire);
}

.form-status.is-error {
  color: #9c2f2f;
}

.site-footer {
  padding: 2.5rem 0;
  background: var(--color-deep-sapphire);
  color: var(--color-text-inverse);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1.6rem;
  align-items: start;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--color-white);
}

.footer-note,
.footer-contact p {
  color: rgba(234, 241, 255, 0.72);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  align-content: start;
}

.footer-nav a,
.footer-contact a {
  color: rgba(255, 248, 225, 0.88);
}

.footer-nav a:hover,
.footer-nav a:focus-visible,
.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: var(--color-white);
}

.footer-contact {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
}

.reveal {
  transition: opacity var(--motion-reveal-duration) ease-out;
  will-change: opacity;
}

@media (max-width: 1023px) {
  :root {
    --container: min(1180px, calc(100% - 2.5rem));
    --header-height: 92px;
  }

  .hero-stage {
    min-height: 88vh;
  }

  .hero-3d {
    top: clamp(7rem, 17vh, 9rem);
    right: clamp(0.5rem, 2vw, 1.25rem);
    bottom: 8%;
    width: min(46vw, 34rem);
    min-width: 21rem;
  }

  .contact-shell {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .answer-grid,
  .projects-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    flex-basis: calc((100cqw - var(--project-carousel-gap)) / 2);
  }

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-header {
    padding-top: 0.7rem;
  }

  .header-shell {
    grid-template-columns: auto 1fr auto;
    min-height: 72px;
    padding-inline: 0.2rem;
  }

  .site-nav-wrapper {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 1rem;
    left: 1rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity var(--motion-fast) ease-out,
      transform var(--motion-fast) ease-out;
  }

  .site-header.is-open .site-nav-wrapper {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    min-width: 14rem;
    padding: 0.65rem;
    border-radius: var(--radius-large);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-medium);
  }

  .site-nav a {
    min-height: 0;
    padding: 0.85rem 0.75rem;
    border-radius: var(--radius-minimal);
  }

  .header-cta {
    min-height: 2.65rem;
    padding-inline: 0.95rem;
  }

  .brand {
    font-size: 1rem;
  }
}

@media (max-width: 767px) {
  :root {
    --container: min(1180px, calc(100% - 2.25rem));
    --header-height: 84px;
  }

  body::before {
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 26%);
  }

  .hero-section {
    margin-top: calc(var(--header-height) * -1);
    padding-top: 0.85rem;
    padding-bottom: calc(var(--section-space) * 0.7);
  }

  .workflow-grid,
  .services-grid,
  .answer-grid,
  .projects-grid,
  .team-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .projects-carousel {
    --project-carousel-gap: 0.9rem;
    --project-carousel-duration: 28s;
  }

  .project-card {
    flex-basis: 100cqw;
  }

  .project-overlay {
    padding: 1rem;
  }

  /* Mobile behavior: simplified motion and hamburger menu. */
  .header-shell {
    grid-template-columns: auto 1fr auto;
    gap: 0.6rem;
    padding-inline: 0;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-cta {
    min-height: 2.5rem;
    padding-inline: 0.85rem;
    font-size: 0.9rem;
  }

  .hero-stage {
    min-height: 84vh;
    align-items: flex-end;
    padding: calc(var(--header-height) + 1.5rem) 1.5rem 1.5rem;
    border-radius: var(--radius-large);
  }

  .hero-visual-layer::after {
    inset: auto -12% 0 18%;
    height: 55%;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(0, 45, 114, 0.16) 0%, rgba(0, 45, 114, 0.76) 58%, rgba(0, 45, 114, 0.9) 100%),
      linear-gradient(90deg, rgba(0, 45, 114, 0.34), rgba(0, 45, 114, 0.18));
  }

  .hero-copy {
    order: 1;
    max-width: none;
  }

  .hero-copy h1 {
    max-width: 12ch;
    font-size: 2.8rem;
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 2.35rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stage {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    gap: 1.7rem;
  }

  .hero-3d {
    position: relative;
    z-index: 3;
    order: 2;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    height: clamp(18rem, 76vw, 28rem);
    margin-top: 0.2rem;
  }

  .hero-3d::before {
    inset: 14% 8% 10%;
  }

  .hero-3d::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--radius-large);
    background:
      linear-gradient(180deg, rgba(0, 45, 114, 0.08) 0%, rgba(0, 45, 114, 0.2) 100%),
      linear-gradient(90deg, rgba(0, 45, 114, 0.16), rgba(0, 45, 114, 0.06));
    pointer-events: none;
  }

  .workflow-section {
    margin-top: calc(var(--section-space) * -0.36);
  }

  .workflow-shell,
  .contact-copy,
  .contact-form {
    padding: 1.5rem;
  }

  .workflow-card {
    gap: 0.8rem;
    padding: 1.2rem;
  }

  .workflow-step-heading {
    gap: 0.45rem;
  }

  .workflow-number {
    font-size: 1.02rem;
  }

  .workflow-step-title {
    font-size: 1.08rem;
  }

  /* Mobile About behavior: keep secondary info visible to avoid inaccessible hover-only content. */
  .team-card {
    align-items: flex-start;
    padding: 0;
  }

  .team-card h3 {
    font-size: 1.28rem;
  }

  .form-submit {
    width: 100%;
  }

  .site-footer {
    padding: 2rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js body {
    transition: none !important;
  }

  html.js body.is-loading,
  html.js body.is-loaded {
    opacity: 1;
  }

  .site-logo-image {
    transition: none !important;
  }

  .hero-copy h1 {
    transition: none !important;
  }

  .hero-visual-layer {
    transform: none !important;
  }

  .about-preview::after,
  .team-photo::after {
    transition: none !important;
  }

  .about-group-image,
  .team-image {
    transition: none !important;
    transform: none !important;
  }

  .projects-carousel-track {
    animation: none !important;
    transform: none !important;
  }

  .answer-card:hover {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
