/* =====================================================================
   WDFG Façade Engineering Consultancy — shared styles
   Brand system derived from the company brochure:
   deep navy, brochure red accent, white & light-grey panels.
   Typography: IBM Plex Sans (technical, engineering-grade) +
   IBM Plex Sans Condensed for display headlines.
   Motion is deliberately restrained: fade-up reveals, a load
   sequence, subtle parallax. prefers-reduced-motion fully respected.
   ===================================================================== */

/* fonts loaded via <link> in each page head (faster first paint) */

:root {
  /* --- Brand palette (from brochure) --- */
  --navy:            #0A1F44;  /* primary brand navy */
  --navy-deep:       #071630;  /* darkest sections / header */
  --navy-700:        #112B57;  /* elevated navy panels */
  --navy-600:        #1B3A6B;  /* hover / borders on dark */
  --red:             #C8202F;  /* brochure red — accent only */
  --red-bright:      #E23744;  /* hover state for red */
  --red-deep:        #9E1822;  /* tagline red */
  --ink:             #0E1726;  /* near-black text on light */
  --slate:           #4A5567;  /* muted text on light */
  --slate-light:     #6B7688;  /* lighter muted */
  --grey-panel:      #F4F6F9;  /* light section background */
  --grey-line:       #E2E7EF;  /* hairline borders on light */
  --white:           #FFFFFF;

  /* --- Silver header (metallic light bar) --- */
  --silver-1:        #ECEEF1;  /* top sheen */
  --silver-2:        #CDD2DA;  /* lower silver */
  --silver-line:     #B4BBC6;  /* hairline under header */

  /* --- Dark-section text --- */
  --on-dark:         #EEF2F8;
  --on-dark-muted:   #A9B6CC;
  --on-dark-line:    rgba(255,255,255,0.10);
  --on-dark-panel:   rgba(255,255,255,0.04);

  --shadow-sm: 0 2px 10px rgba(10,31,68,0.06);
  --shadow-md: 0 12px 30px rgba(10,31,68,0.10);
  --shadow-lg: 0 26px 60px rgba(7,22,48,0.16);
  --shadow-navy: 0 24px 50px rgba(7,22,48,0.35);

  --radius-lg: 16px;
  --radius-md: 11px;
  --radius-sm: 7px;

  --nav-height: 76px;
  --maxw: 1180px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .18s var(--ease); }

.container {
  width: min(var(--maxw), 100% - 2.75rem);
  margin-inline: auto;
}

main { display: block; }

/* ---------------------------------------------------------------
   Typography scale
   --------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0;
}

p { margin: 0; }

.text-muted { color: var(--slate); }
.mt-1 { margin-top: .4rem; }
.mt-3 { margin-top: 1rem; }
.mt-6 { margin-top: 1.75rem; }

/* ---------------------------------------------------------------
   Header / navigation
   --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--silver-1) 0%, var(--silver-2) 100%);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--silver-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}
.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
}
.nav-link {
  position: relative;
  color: var(--slate);
  font-weight: 500;
  font-size: .94rem;
  padding: .5rem .85rem;
  border-radius: var(--radius-sm);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-link:hover { color: var(--navy); background: rgba(10,31,68,0.06); }
.nav-link--active { color: var(--navy); }
.nav-link--active::after {
  content: "";
  position: absolute;
  left: .85rem; right: .85rem; bottom: .28rem;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.3;
  font-size: .82rem;
  color: var(--slate);
}
.nav-contact a:hover { color: var(--navy); }

.nav-toggle {
  display: none;
  background: rgba(10,31,68,0.05);
  border: 1px solid var(--silver-line);
  color: var(--navy);
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  padding: .8rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(200,32,47,0.28);
}
.btn-primary:hover { background: var(--red-bright); color: var(--white); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(200,32,47,0.36); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--grey-line);
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); transform: translateY(-2px); }

/* Ghost button on dark backgrounds */
.on-navy .btn-ghost { color: var(--on-dark); border-color: var(--on-dark-line); }
.on-navy .btn-ghost:hover { border-color: var(--white); color: var(--white); }

/* ---------------------------------------------------------------
   Section scaffolding + the facade-grid signature
   --------------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
/* sections that sit over the fixed hero photo need an opaque background */
main > .section { background: var(--white); }

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.5rem 3rem;
  align-items: end;
  margin-bottom: 2.75rem;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .85rem;
}
.section-kicker::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--red);
  display: inline-block;
}
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.section-description { color: var(--slate); font-size: 1.04rem; }

.on-navy .section-title { color: var(--white); }
.on-navy .section-description { color: var(--on-dark-muted); }
.on-navy .section-kicker { color: var(--red-bright); }
.on-navy .section-kicker::before { background: var(--red-bright); }

/* ---------------------------------------------------------------
   Cards
   --------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #CBD5E6; }
.card-inner { padding: 1.6rem 1.5rem; position: relative; }
.card-meta {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: .6rem;
}
.card-title { font-size: 1.28rem; margin-bottom: .55rem; color: var(--navy); }
.card p { color: var(--slate); font-size: .96rem; }

/* Cards on navy sections */
.on-navy .card {
  background: var(--on-dark-panel);
  border-color: var(--on-dark-line);
  box-shadow: none;
}
.on-navy .card:hover { border-color: var(--navy-600); background: rgba(255,255,255,0.06); }
.on-navy .card-title { color: var(--white); }
.on-navy .card p { color: var(--on-dark-muted); }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero-section { position: relative; overflow: hidden; }

/* --- Cinematic fixed Abu Dhabi backdrop --- */
/* The photo is pinned to the viewport (position:fixed) so it stays still
   while the page scrolls over it — the reliable, mobile-safe way to get the
   "background-attachment: fixed" cinematic effect. Content sections below
   the hero carry solid backgrounds so they slide up and cover the photo. */
.hero-fixed-hero { isolation: isolate; background: transparent !important; z-index: 1; }
.hero-fixed-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-fixed-photo {
  position: absolute; inset: 0;
  background-image: image-set(
    url('skyline-hero.jpg') 1x
  );
  background-image: url('skyline-hero.jpg');
  background-size: cover;
  background-position: center 28%;
  /* a slow, subtle zoom keeps it feeling alive without moving the framing much */
  animation: heroKen 28s ease-in-out infinite alternate;
  transform-origin: center 35%;
}
@keyframes heroKen {
  from { transform: scale(1.0); }
  to   { transform: scale(1.08); }
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,22,48,0.92) 0%, rgba(7,22,48,0.74) 36%, rgba(7,22,48,0.42) 66%, rgba(7,22,48,0.30) 100%),
    linear-gradient(180deg, rgba(7,22,48,0.40) 0%, rgba(7,22,48,0.10) 28%, rgba(7,22,48,0.30) 72%, rgba(7,22,48,0.72) 100%);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(3rem, 6vw, 5.5rem);
}
.hero--photo {
  grid-template-columns: 1fr;
  min-height: clamp(540px, 86vh, 820px);
  align-items: center;
  padding-block: clamp(4rem, 9vw, 7rem);
}
.hero-copy { max-width: 660px; }
.hero-subtitle--photo { color: #DCE5F2; text-shadow: 0 1px 12px rgba(7,22,48,0.55); max-width: 38rem; }
.hero-meta--photo { border-top-color: rgba(255,255,255,0.22); }
.hero-meta--photo span { color: #C4D2E6; }

/* CRITICAL: the section AFTER the fixed-bg hero must have a solid background
   so it scrolls up and covers the pinned photo. */
.hero-fixed-hero + section,
main > section:not(.hero-fixed-hero) {
  position: relative;
  z-index: 2;
}
.hero-kicker { margin-bottom: 1.1rem; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(200,32,47,0.10);
  color: var(--red);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(200,32,47,0.18);
}
.hero-title {
  font-size: clamp(2.5rem, 5.4vw, 4.1rem);
  line-height: 1.04;
  color: var(--navy);
  margin-bottom: 1.25rem;
}
.hero-title span { color: var(--red); }
.hero-subtitle { font-size: 1.12rem; color: var(--slate); max-width: 36rem; }
.hero-actions { display: flex; gap: .85rem; flex-wrap: wrap; margin-top: 1.9rem; }
.hero-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--grey-line);
}
.hero-meta span { display: flex; flex-direction: column; font-size: .86rem; color: var(--slate); }
.hero-meta strong {
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}

/* Hero visual: a layered curtain-wall / mullion panel built in CSS,
   so it needs no external image and never breaks. If a hero.jpg is
   supplied it can be layered in via .hero-photo. */
.hero-visual { position: relative; }
.hero-panel {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(155deg, var(--navy) 0%, var(--navy-deep) 100%);
  box-shadow: var(--shadow-navy);
  overflow: hidden;
  color: var(--on-dark);
  min-height: 430px;
  isolation: isolate;
}
/* mullion grid overlay — evokes a glass façade */
.hero-panel::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 46px 56px;
  mask-image: linear-gradient(160deg, #000 30%, transparent 95%);
  -webkit-mask-image: linear-gradient(160deg, #000 30%, transparent 95%);
  z-index: 0;
}
/* glass sheen */
.hero-panel::after {
  content: "";
  position: absolute;
  top: -40%; left: -10%;
  width: 55%; height: 180%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.10), transparent);
  transform: rotate(8deg);
  z-index: 0;
}
.hero-panel-header, .hero-panel-main, .hero-projects-strip { position: relative; z-index: 1; }
.hero-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem 0;
}
.hero-panel-title { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }
.hero-chip {
  font-size: .72rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--on-dark-line);
  padding: .35rem .7rem;
  border-radius: 999px;
  color: var(--on-dark);
}
.hero-panel-main {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 1.25rem;
  padding: 1.5rem;
  align-items: stretch;
}
.hero-panel-main h3 { color: var(--white); font-size: 1.45rem; margin-bottom: .6rem; }
.hero-panel-main p { color: var(--on-dark-muted); font-size: .92rem; }
.hero-mini-metric {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .25rem;
}
.hero-mini-metric span { font-size: .74rem; color: var(--on-dark-muted); letter-spacing: .04em; }
.hero-mini-metric strong {
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: 2.2rem; font-weight: 700; color: var(--red-bright); line-height: 1;
}
.hero-projects-strip {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding: 0 1.5rem 1.5rem;
}
.hero-tag {
  font-size: .76rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--on-dark-line);
  color: var(--on-dark-muted);
  padding: .35rem .7rem;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------
   Navy band wrapper (full-bleed dark sections)
   --------------------------------------------------------------- */
.band-navy {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  position: relative;
  z-index: 2;
}
.band-grey { background: var(--grey-panel); position: relative; z-index: 2; }

/* ---------------------------------------------------------------
   Projects
   --------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-body { padding: 1.5rem; position: relative; }
.project-region-label {
  display: inline-block;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--white);
  background: var(--navy);
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}
.project-title { font-size: 1.22rem; color: var(--navy); margin-bottom: .35rem; }
.project-location { color: var(--slate); font-size: .9rem; margin-bottom: .9rem; }
.project-meta-row { display: flex; flex-direction: column; gap: .3rem; font-size: .84rem; color: var(--slate-light); }
.project-tag {
  align-self: flex-start;
  background: var(--grey-panel);
  border: 1px solid var(--grey-line);
  color: var(--navy);
  font-weight: 600;
  font-size: .76rem;
  padding: .25rem .6rem;
  border-radius: var(--radius-sm);
}

.filter-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.filter-chip {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: .86rem;
  padding: .5rem 1.05rem;
  border-radius: 999px;
  border: 1.5px solid var(--grey-line);
  background: var(--white);
  color: var(--slate);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.filter-chip:hover { border-color: var(--navy); color: var(--navy); }
.filter-chip[data-active="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---------------------------------------------------------------
   About / profile
   --------------------------------------------------------------- */
.profile {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.profile > div p { color: var(--slate); }
.profile aside {
  background: var(--grey-panel);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
}
.profile aside p { color: var(--slate); font-size: .95rem; }
.profile-name { font-size: 1.7rem; color: var(--navy); }
.profile-role { color: var(--red); font-weight: 600; font-size: .95rem; margin: .35rem 0 1.1rem; }
.profile-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.badge-pill {
  font-size: .76rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 999px;
  border: 1px solid transparent;
}
.badge-pill--blue { background: rgba(10,31,68,0.08); color: var(--navy); border-color: rgba(10,31,68,0.14); }
.badge-pill--gold { background: rgba(200,32,47,0.10); color: var(--red); border-color: rgba(200,32,47,0.18); }
.badge-pill--red  { background: rgba(158,24,34,0.10); color: var(--red-deep); border-color: rgba(158,24,34,0.18); }
.profile-list { margin: 1rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.profile-list li { position: relative; padding-left: 1.4rem; color: var(--slate); font-size: .94rem; }
.profile-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--red);
}

/* ---------------------------------------------------------------
   Forms
   --------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid-full { grid-column: 1 / -1; }
.label { display: block; font-weight: 600; font-size: .85rem; color: var(--navy); margin-bottom: .4rem; }
.input, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--grey-line);
  border-radius: var(--radius-sm);
  padding: .75rem .85rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10,31,68,0.10);
}
.textarea { min-height: 140px; resize: vertical; }
.form-footnote { color: var(--slate-light); font-size: .85rem; }

/* honeypot — hidden anti-spam field */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--on-dark-muted);
  border-top: 3px solid var(--red);
  padding-block: 2.5rem;
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-contact { display: flex; flex-direction: column; gap: .3rem; }
.footer-contact strong { color: var(--white); font-size: 1.05rem; font-family: 'IBM Plex Sans Condensed', sans-serif; letter-spacing: .03em; }
.footer-contact a:hover { color: var(--white); }
.footer-meta { display: flex; flex-direction: column; gap: .4rem; text-align: right; font-size: .86rem; }
.footer-meta a:hover { color: var(--white); }

/* ---------------------------------------------------------------
   Contact card (replaces the dropped map)
   --------------------------------------------------------------- */
.contact-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.contact-tile {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.contact-tile .label { margin-bottom: .25rem; }
.contact-tile a, .contact-tile span { color: var(--slate); font-size: .95rem; }
.contact-tile a:hover { color: var(--navy); }

/* ---------------------------------------------------------------
   Motion — reveal on scroll + hero load sequence
   --------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* hero load sequence (staggered) */
.hero [data-load] { opacity: 0; transform: translateY(16px); }
.hero.loaded [data-load] { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.hero.loaded [data-load="1"] { transition-delay: .05s; }
.hero.loaded [data-load="2"] { transition-delay: .15s; }
.hero.loaded [data-load="3"] { transition-delay: .25s; }
.hero.loaded [data-load="4"] { transition-delay: .35s; }
.hero.loaded [data-load="5"] { transition-delay: .45s; }

/* animated facade-grid divider that draws itself when revealed */
.grid-rule { height: 2px; width: 100%; background: var(--grey-line); position: relative; overflow: hidden; border-radius: 2px; }
.grid-rule::after {
  content: ""; position: absolute; inset: 0; width: 0;
  background: linear-gradient(90deg, var(--navy), var(--red));
  transition: width 1.1s var(--ease);
}
.grid-rule.is-visible::after { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal, .hero [data-load], .grid-rule::after { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero [data-load] { opacity: 1; transform: none; }
  .hero-panel::after { display: none; }
  .hero-fixed-photo { animation: none !important; transform: none !important; }
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 2.25rem; }
  .section-header { grid-template-columns: 1fr; align-items: start; }
  .profile { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 760px) {
  .nav-contact { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Photo hero: stronger top-down scrim + brighter copy for readability over the image */
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(7,22,48,0.86) 0%, rgba(7,22,48,0.55) 45%, rgba(7,22,48,0.66) 75%, rgba(7,22,48,0.93) 100%);
  }
  /* lighter image + safer positioning on mobile (iOS handles position:fixed bg poorly) */
  .hero-fixed-bg { position: absolute; }
  .hero-fixed-photo { background-image: url('skyline-hero-m.jpg'); background-position: center 30%; }
  .hero--photo { min-height: clamp(560px, 90vh, 760px); }
  .hero-subtitle--photo { color: #EAF0F8; text-shadow: 0 1px 14px rgba(7,22,48,0.7); }
  .hero-meta--photo span { color: #DCE5F2; }
  .nav-links {
    position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(180deg, var(--silver-1), var(--silver-2));
    border-bottom: 1px solid var(--silver-line);
    box-shadow: var(--shadow-md);
    padding: .5rem 1rem 1rem;
    display: none;
  }
  .nav-links[data-open="true"] { display: flex; }
  .nav-link { padding: .85rem .75rem; }
  .nav-link--active::after { left: .75rem; right: auto; width: 24px; }
  .hero-panel-main { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}

@media (max-width: 420px) {
  .hero-meta { gap: 1.25rem; }
}

/* ============================================================
   CINEMATIC MODE  (body.cinematic)
   Skyline pinned behind every page; content floats over it in
   translucent frosted panels that scroll. Silver header stays on
   top so the logo remains legible.
   ============================================================ */
body.cinematic { background: var(--navy-deep); }
body.cinematic::before {            /* pinned skyline photo */
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: url('skyline-hero.jpg') center 28% / cover no-repeat;
  animation: heroKen 32s ease-in-out infinite alternate;
  transform-origin: center 35%;
}
body.cinematic::after {             /* readability scrim */
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7,22,48,0.52) 0%, rgba(7,22,48,0.40) 32%, rgba(7,22,48,0.50) 70%, rgba(7,22,48,0.66) 100%);
}
@media (prefers-reduced-motion: reduce) { body.cinematic::before { animation: none; } }

/* the per-page hero's own pinned photo is now redundant */
body.cinematic .hero-fixed-bg { display: none; }

/* sections transparent; their centered container becomes a frosted panel */
body.cinematic main > .section { background: transparent; }
body.cinematic main .container:not(.hero):not(.nav-inner) {
  background: rgba(9, 23, 51, 0.58);
  -webkit-backdrop-filter: blur(11px) saturate(125%);
  backdrop-filter: blur(11px) saturate(125%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.85rem);
  box-shadow: 0 28px 64px rgba(2,8,22,0.46);
}

/* light text across content */
body.cinematic main { color: var(--on-dark); }
body.cinematic main :is(h1,h2,h3,h4,.section-title,.card-title,.project-title,.profile-name) { color: #fff; }
body.cinematic main :is(p,li,.section-description,.project-location,.project-meta-row,.text-muted,.form-footnote) { color: var(--on-dark-muted); }
body.cinematic main :is(.card-meta,.section-kicker,.profile-role) { color: var(--red-bright); }

/* cards / project cards translucent */
body.cinematic main .card, body.cinematic main .project-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); box-shadow: none;
}
body.cinematic main .card:hover, body.cinematic main .project-card:hover {
  background: rgba(255,255,255,0.10); border-color: var(--navy-600);
}

/* filter chips on dark */
body.cinematic main .filter-chip { color: var(--on-dark-muted); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.20); }
body.cinematic main .filter-chip:hover { color: #fff; border-color: #fff; }
body.cinematic main .filter-chip[data-active="true"] { background: #fff; color: var(--navy); border-color: #fff; }

/* contact form: inputs stay readable */
body.cinematic main .label { color: #fff; }
body.cinematic main .input, body.cinematic main .textarea { background: #fff; color: #121212; }

/* translucent footer so the skyline carries through */
body.cinematic .site-footer { background: rgba(5, 16, 38, 0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* mobile: lighter pinned image */
@media (max-width: 760px) { body.cinematic::before { background-image: url('skyline-hero-m.jpg'); } }


/* ---------------------------------------------------------------
   FAQ (services page)
   --------------------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.3rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--red);
  flex: none;
  transition: transform .2s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 1.3rem 1.15rem; color: var(--slate); font-size: .97rem; }
.faq-answer p { margin: 0; }

body.cinematic main .faq-item { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); box-shadow: none; }
body.cinematic main .faq-item summary { color: #fff; }
body.cinematic main .faq-item summary::after { color: var(--red-bright); }
body.cinematic main .faq-answer { color: var(--on-dark-muted); }
