/* =========================================================
   TML Civils — GLOBAL design system
   Theme: Bold Industrial Dark
   Shared across every page. Page-specific rules live in each
   page folder's own stylesheet (e.g. /about/about.css).
   Re-theme everything from the :root tokens below.
   ========================================================= */

:root {
  /* ---- Brand palette ----
     Brand: #115C9B deep blue · #1F76BD blue · #FFFFFF white
     (+ #5BAEEE lighter sky accent, suggested for highlights/glows) */
  --bg:          #081320;   /* page canvas (deep navy) */
  --bg-2:        #0b1a2c;   /* alternating section */
  --bg-3:        #0f2238;   /* raised band */
  --surface:     rgba(255,255,255,.05);
  --surface-2:   rgba(255,255,255,.08);
  --border:      rgba(120,170,220,.16);
  --border-soft: rgba(120,170,220,.10);

  --ink:         #f2f7fc;   /* headings */
  --body:        #c4d2e3;   /* body text */
  --muted:       #70849a;   /* low-emphasis */

  --accent:        #1F76BD;   /* brand blue */
  --accent-2:      #115C9B;   /* brand deep blue */
  --accent-bright: #5BAEEE;   /* suggested lighter sky accent */
  --accent-soft:   rgba(31,118,189,.16);
  --steel:         #4aa3e0;

  --glow:        0 0 0 1px rgba(31,118,189,.45), 0 12px 40px -8px rgba(31,118,189,.5);
  --shadow:      0 24px 60px -20px rgba(0,0,0,.7);
  --ring:        0 0 0 3px rgba(31,118,189,.28);

  --success-bg:  rgba(38,191,118,.12); --success-fg:#5fe0a3; --success-bd: rgba(38,191,118,.4);
  --error-bg:    rgba(255,86,86,.12);  --error-fg:#ff9a9a;  --error-bd: rgba(255,86,86,.4);

  /* ---- Type ---- */
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* ---- Layout ---- */
  --container: 1200px;
  --container-wide: 1360px;
  --radius:    18px;
  --radius-sm: 11px;
  --gutter:    clamp(1.1rem, 3.5vw, 2.2rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --header-h:  82px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* ambient industrial backdrop: faint grid + blue glow pools */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 85% -10%, rgba(17,92,155,.10), transparent 60%),
    radial-gradient(50vw 50vw at -10% 30%, rgba(74,163,224,.08), transparent 60%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }
ul { margin: 0; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.06;
  font-weight: 700;
  margin: 0 0 .55em;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.4rem, 6.5vw, 4.7rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
p  { margin: 0 0 1.1rem; }
strong { color: #d7e0ec; }
.lead { font-size: clamp(1.1rem, 2vw, 1.35rem); color: #b8c4d4; }

::selection { background: var(--accent); color: #ffffff; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-2); }
.section--band { background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border-block: 1px solid var(--border-soft); }
.center { text-align: center; }
.measure { max-width: 720px; }
.measure.center { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .22em;
  font-size: .74rem; font-weight: 600; color: var(--accent);
  padding: .4rem .8rem; border: 1px solid var(--accent-soft); border-radius: 999px;
  background: var(--accent-soft); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.gradient-text {
  background: linear-gradient(100deg, #fff 0%, #9fd0ff 45%, var(--accent) 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.accent-rule { width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); margin: 0 0 1.4rem; box-shadow: 0 0 18px rgba(17,92,155,.6); }
.center .accent-rule { margin-inline: auto; }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  --b: 0;
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: .92rem 1.7rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .2s, box-shadow .25s, background .2s, color .2s, border-color .2s;
  line-height: 1; position: relative; white-space: nowrap;
}
.btn svg, .btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(4px); }
.btn--primary { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #ffffff; box-shadow: 0 10px 30px -10px rgba(17,92,155,.7); }
.btn--primary:hover { color: #ffffff; transform: translateY(-3px); box-shadow: 0 16px 40px -10px rgba(17,92,155,.85); }
.btn--ghost { background: rgba(255,255,255,.04); color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; transform: translateY(-3px); }
.btn--dark { background: rgba(255,255,255,.06); color: var(--ink); border-color: var(--border); }
.btn--dark:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateY(-3px); }
.btn--block { width: 100%; justify-content: center; }

.btn-row { display: flex; gap: .9rem; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }
/* long CTA labels must wrap on small screens instead of forcing horizontal scroll */
@media (max-width: 600px) { .btn { white-space: normal; text-align: center; } }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; }
.topbar { background: #06090f; color: #8696a8; font-size: .82rem; border-bottom: 1px solid var(--border-soft); }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #a9b8c9; }
.topbar a:hover { color: var(--accent); }
.topbar-contact, .topbar-social { display: flex; gap: 1.3rem; list-style: none; flex-wrap: wrap; align-items: center; }

.nav-wrap { background: rgba(10,14,20,.72); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.navbar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; position: relative; }
.brand { display: flex; align-items: center; gap: .65rem; font-family: var(--font-head); font-weight: 700; color: #fff; letter-spacing: .04em; }
.brand img { height: 50px; width: auto; display: block; background: #fff; padding: 5px 10px; border-radius: 10px; box-shadow: 0 3px 14px rgba(0,0,0,.28); }
.site-footer .footer-brand { display: flex; align-items: center; }
.site-footer .brand { display: block; width: 100%; }
.site-footer .brand img { height: auto; width: 100%; max-width: 100%; padding: 18px 24px; border-radius: 14px; }
.brand__fallback { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.3rem; }
.brand__fallback small { font-size: .58rem; letter-spacing: .34em; color: var(--accent); font-weight: 600; margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: .15rem; list-style: none; }
.nav-links > li { position: relative; }
.nav-links a { display: block; padding: .55rem .85rem; border-radius: 999px; font-family: var(--font-head); font-weight: 500; font-size: .94rem; color: #c4d0de; transition: .18s; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-links a.is-active { color: var(--accent); }
.nav-cta { margin-left: .35rem; }

.nav-links .has-dropdown { position: static; } /* let the dropdown align to the navbar/container, not the item */
.has-dropdown > .dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; left: auto;
  background: #0d1320; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: .45rem; min-width: 248px; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s;
}
.has-dropdown:hover > .dropdown, .has-dropdown:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { font-size: .9rem; padding: .55rem .75rem; border-radius: 8px; color: #b9c5d4; }
.dropdown a:hover { background: var(--accent-soft); color: var(--accent); }
/* grouped mega dropdown: categories as headings, service pages beneath */
.dropdown--mega { display: grid; grid-template-columns: repeat(3, max-content); gap: .1rem 1.8rem; }
.dropdown--mega .dropdown__col { display: flex; flex-direction: column; gap: .05rem; }
.dropdown__head { font-family: var(--font-head); font-weight: 700; color: var(--accent-bright, #3aa0e6); font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; padding: .5rem .75rem .35rem; margin-bottom: .15rem; border-bottom: 1px solid var(--border); border-radius: 0; white-space: nowrap; }
.dropdown__head:hover { color: #fff; background: transparent; }
.dropdown--mega a:not(.dropdown__head) { font-size: .86rem; padding: .38rem .75rem; white-space: nowrap; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: #e7edf5; margin: 5px 0; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  /* Hide the contact/social top bar on mobile to keep the header compact. */
  .topbar { display: none; }
  /* backdrop-filter on an ancestor traps position:fixed children inside it,
     which would shrink the drawer to the header's height. Drop it on mobile
     so the menu can span the full viewport height. */
  .nav-wrap { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw);
    max-height: 100dvh;
    flex-direction: column; align-items: stretch; gap: .25rem;
    background: #0a0f18; padding: 5.5rem 1.2rem 2rem; box-shadow: var(--shadow);
    border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .3s ease; overflow-y: auto;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { padding: .8rem 1rem; }
  .nav-cta { margin: .6rem 0 0; }
  /* Services becomes a tap-to-expand accordion on mobile */
  .has-dropdown > a { display: flex; align-items: center; justify-content: space-between; }
  .has-dropdown > a::after { content: "\25BE"; font-size: .7em; opacity: .65; transition: transform .25s; }
  .has-dropdown.is-open > a::after { transform: rotate(180deg); }
  .has-dropdown > .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--accent-soft); border-radius: 0; margin: .2rem 0 .4rem .7rem; padding: 0; background: transparent; min-width: 0; display: none; }
  .has-dropdown.is-open > .dropdown { display: block; }
  .dropdown--mega { min-width: 0; }
  .dropdown__head { margin-top: .7rem; }
  .dropdown--mega a:not(.dropdown__head) { padding-left: 1.1rem; }
  body.nav-open { overflow: hidden; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); z-index: 99; opacity: 0; visibility: hidden; transition: .25s; }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
}

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; }
.hero__slides { position: relative; min-height: clamp(560px, 92vh, 920px); display: grid; }
.hero__slide { grid-area: 1/1; position: relative; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity 1.1s ease, transform 7s ease; }
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,11,17,.94) 0%, rgba(8,11,17,.78) 38%, rgba(8,11,17,.35) 100%), linear-gradient(0deg, var(--bg) 2%, transparent 38%); }
.hero__overlay { position: absolute; inset: 0; display: grid; align-items: center; z-index: 2; }
.hero__inner { max-width: 760px; }
.hero h1 { margin-bottom: 1.1rem; }
.hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #c2cdda; max-width: 600px; }
.hero__actions { margin-top: 1.8rem; }
.hero__dots { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: .55rem; }
.hero__dots button { width: 30px; height: 4px; border-radius: 4px; border: 0; background: rgba(255,255,255,.25); cursor: pointer; padding: 0; transition: .3s; }
.hero__dots button.is-active { background: var(--accent); box-shadow: 0 0 12px var(--accent); width: 46px; }
.hero__scroll { position: absolute; bottom: 1.8rem; right: 2rem; z-index: 3; color: var(--muted); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; writing-mode: vertical-rl; }

/* ---------- Page hero (interior) ---------- */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(5rem, 12vw, 9rem) clamp(3rem, 6vw, 5rem); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; background-image: var(--page-hero-img, none); opacity: .28; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,11,17,.6), var(--bg)); }
.page-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .55; }
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p { color: #b8c4d4; max-width: 620px; font-size: 1.15rem; }
.breadcrumb { list-style: none; display: flex; gap: .55rem; font-size: .85rem; color: var(--muted); margin-top: 1.4rem; flex-wrap: wrap; }
.breadcrumb a { color: #aab7c6; }
.breadcrumb li + li::before { content: "/"; margin-right: .55rem; color: #3c485a; }

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem; height: 100%; overflow: hidden;
  transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); opacity: .25; }
.card:hover { transform: translateY(-6px); background: var(--surface-2); border-color: rgba(31,118,189,.4); box-shadow: var(--shadow); }
.card__icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(31,118,189,.2), rgba(17,92,155,.06));
  border: 1px solid var(--accent-soft); color: var(--accent); margin-bottom: 1.2rem; font-size: 1.5rem;
}
.card h3 { margin-bottom: .45rem; color: #fff; }
.card p { margin-bottom: .9rem; font-size: .98rem; }
.card__link { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--accent); display: inline-flex; gap: .35rem; }
.card__link .arr { transition: transform .2s; }
.card:hover .card__link .arr { transform: translateX(4px); }
.service-card { display: flex; flex-direction: column; }
.service-card .card__link { margin-top: auto; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; text-align: center; }
.stats .stat { padding: 1.4rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stats .num { font-family: var(--font-head); font-size: clamp(2rem,4.5vw,3.2rem); font-weight: 700; line-height: 1; color: var(--accent); }
.stats .label { font-size: .85rem; color: var(--muted); margin-top: .5rem; text-transform: uppercase; letter-spacing: .12em; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2,1fr); } }

/* split media + text */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 5vw, 4rem); align-items: center; }
.split > * { min-width: 0; } /* prevent nowrap content from blowing out grid tracks */
.media-frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 60px rgba(0,0,0,.5); pointer-events: none; }
@media (max-width: 850px) { .split { grid-template-columns: 1fr; } }

/* feature list with ticks */
.ticks { list-style: none; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 2rem; color: #b8c4d4; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 1.35rem; height: 1.35rem;
  display: grid; place-items: center; font-size: .75rem; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-soft); border-radius: 6px;
}

/* service image slider (fun crossfade + Ken Burns) */
.svc-slider { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 3 / 2; background: #0a0f18; isolation: isolate; }
.svc-slider__track { position: absolute; inset: 0; }
.svc-slide { position: absolute; inset: 0; margin: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity .9s ease; will-change: opacity, transform; }
.svc-slide.is-active { opacity: 1; animation: svcKen 7s ease-out forwards; z-index: 1; }
@keyframes svcKen { from { transform: scale(1.12); } to { transform: scale(1); } }
.svc-slider::after { content: ""; position: absolute; inset: 0; z-index: 2; box-shadow: inset 0 0 70px rgba(0,0,0,.55); pointer-events: none; }
.svc-slider__btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(8,15,25,.45); color: #fff; font-size: 1.6rem; line-height: 1; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); opacity: 0; transition: .22s; }
.svc-slider:hover .svc-slider__btn, .svc-slider:focus-within .svc-slider__btn { opacity: 1; }
.svc-slider__btn:hover { background: var(--accent); border-color: var(--accent); }
.svc-slider__btn--prev { left: .7rem; } .svc-slider__btn--next { right: .7rem; }
.svc-slider__dots { position: absolute; left: 0; right: 0; bottom: .8rem; z-index: 3; display: flex; gap: .5rem; justify-content: center; }
.svc-slider__dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: .22s; }
.svc-slider__dots button.is-active { background: var(--accent-bright, #3aa0e6); width: 22px; border-radius: 5px; }
/* contain variant: fit whole image/video in the frame (mixed portrait + video), no Ken Burns */
.svc-slider--contain .svc-slide { background-size: contain; background-repeat: no-repeat; transform: none; }
.svc-slider--contain .svc-slide.is-active { animation: none; transform: none; }
.svc-slider--contain .svc-slider__btn { opacity: 1; }
.svc-slide__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0a0f18; }

/* ---------- Interactive gallery (filter + animated grid) ---------- */
.g-filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1.8rem; }
.g-filter { font-family: var(--font-head); font-weight: 600; font-size: .85rem; padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: #c4d0de; cursor: pointer; transition: .2s; }
.g-filter:hover { border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.g-filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.g-item { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); border: 1px solid var(--border); aspect-ratio: 4 / 3; opacity: 0; background: #0a0f18; }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.g-item:hover img { transform: scale(1.12); }
.g-item__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: .9rem .8rem .7rem; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: #fff; background: linear-gradient(transparent, rgba(6,9,15,.92)); transform: translateY(101%); transition: transform .3s ease; }
.g-item:hover .g-item__cap { transform: translateY(0); }
.g-item::before { content: "+"; position: absolute; z-index: 2; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; font-size: 1.7rem; line-height: 1; color: #fff; background: rgba(31,118,189,.9); border-radius: 50%; opacity: 0; transform: scale(.6); transition: .3s; pointer-events: none; }
.g-item:hover::before { opacity: 1; transform: scale(1); }
@keyframes gIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.g-in { animation: gIn .5s forwards; }
@media (max-width: 600px) { .g-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; } }
@media (prefers-reduced-motion: reduce) { .g-item { opacity: 1; } .g-in { animation: none; } .g-item:hover img { transform: none; } }

/* folder-style gallery */
.g-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.g-folders[hidden] { display: none; }
.folder { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #0a0f18; cursor: pointer; aspect-ratio: 4 / 3; text-align: left; font: inherit; color: inherit; }
.folder__cover { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.folder:hover .folder__cover { transform: scale(1.1); }
.folder::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 28%, rgba(6,9,15,.92)); }
.folder:hover { border-color: var(--accent); }
.folder__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .85rem 1rem; }
.folder__name { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1rem; }
.folder__count { flex: none; font-size: .72rem; font-weight: 700; color: #fff; background: rgba(31,118,189,.92); border-radius: 999px; padding: .2rem .6rem; }
.g-folder-view[hidden] { display: none; }
.g-folder-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.g-folder-title { margin: 0; }
.g-back { font-family: var(--font-head); font-weight: 600; font-size: .9rem; padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: #c4d0de; cursor: pointer; transition: .2s; }
.g-back:hover { border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.g-item--video { cursor: default; }
.g-item--video::before { display: none; }
.g-item--video .g-item__cap { display: none; }
.g-item__video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0a0f18; }

/* homepage gallery teaser */
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.work-tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); border: 1px solid var(--border); aspect-ratio: 1 / 1; background: #0a0f18; }
.work-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.work-tile:hover img { transform: scale(1.12); }
.work-tile::after { content: ""; position: absolute; inset: 0; background: rgba(31,118,189,0); transition: background .3s; }
.work-tile:hover::after { background: rgba(31,118,189,.14); }
.work-tile__cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: .85rem .8rem .65rem; font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: #fff; background: linear-gradient(transparent, rgba(6,9,15,.92)); }
@media (max-width: 850px) { .work-grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; } }

/* expanding panels (gallery teaser) */
.xp-row { display: flex; gap: .8rem; height: 420px; }
.xp { position: relative; flex: 1; min-width: 54px; overflow: hidden; border-radius: 22px; text-decoration: none; cursor: pointer; background-image: var(--xp-bg); background-color: #0d1320; background-size: auto 120%; background-position: center; background-repeat: no-repeat; transition: flex .55s cubic-bezier(.05,.61,.41,.95), border-radius .55s, background-size .55s; }
.xp__shade { position: absolute; inset: 0; background: linear-gradient(transparent 25%, rgba(6,9,15,.9)); transition: .5s; }
.xp.is-active { flex: 6; border-radius: 28px; background-size: auto 100%; }
.xp__label { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: .7rem; }
.xp__icon { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--accent); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.xp__icon svg { width: 21px; height: 21px; }
.xp__info { display: flex; flex-direction: column; min-width: 0; }
.xp__main { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: #fff; white-space: nowrap; opacity: 0; transform: translateX(12px); transition: .45s cubic-bezier(.05,.61,.41,.95); }
.xp__sub { font-size: .82rem; color: #cdd8e6; white-space: nowrap; opacity: 0; transform: translateX(12px); transition: .45s cubic-bezier(.05,.61,.41,.95); transition-delay: .05s; }
.xp.is-active .xp__main, .xp.is-active .xp__sub { opacity: 1; transform: none; }
@media (max-width: 700px) {
  .xp-row { flex-direction: column; height: auto; gap: .7rem; }
  .xp { flex: none; min-height: 120px; border-radius: 16px; background-size: cover; }
  .xp__main, .xp__sub { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .svc-slide { transition: none; } .svc-slide.is-active { animation: none; } }

/* glass panel */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); }

/* tags / chips */
.tag { font-size: .68rem; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; background: var(--accent); color: #ffffff; padding: .26rem .6rem; border-radius: 999px; }
.tag--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent-soft); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px) { .form .row2 { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .85rem; font-weight: 600; color: #c8d3e0; margin-bottom: .4rem; font-family: var(--font-head); letter-spacing: .02em; }
.field input, .field textarea, .field select {
  width: 100%; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--ink); background: rgba(255,255,255,.04); transition: .18s;
}
.field input::placeholder, .field textarea::placeholder { color: #5d6b7d; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--accent); background: rgba(255,255,255,.06); box-shadow: var(--ring); }
.field select option { background: #0d1320; color: #e7edf5; }
.field textarea { resize: vertical; min-height: 140px; }
.field input[type="file"] { padding: .7rem; background: rgba(255,255,255,.03); cursor: pointer; }
.field input[type="file"]::file-selector-button { font: inherit; font-family: var(--font-head); font-weight: 600; margin-right: .9rem; padding: .5rem .9rem; border: 0; border-radius: 8px; background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.form-alert { display: none; padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-size: .95rem; border: 1px solid transparent; }
.form-alert.is-shown { display: block; }
.form-alert--success { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-bd); }
.form-alert--error { background: var(--error-bg); color: var(--error-fg); border-color: var(--error-bd); }

/* consistent inline SVG icons (replace mixed emoji) — inherit text colour.
   stroke-width here overrides the value baked into each <svg> so we can tune
   the weight site-wide in one place. */
.ico-svg { width: 1.3em; height: 1.3em; vertical-align: -.28em; flex: none; stroke: currentColor; stroke-width: 2.1; }
.info-list .ico .ico-svg { width: 1.45em; height: 1.45em; }
.card__icon .ico-svg { width: 30px; height: 30px; stroke-width: 1.9; }

/* contact info */
.info-list { list-style: none; display: grid; gap: 1rem; }
.info-list li { display: flex; gap: .85rem; align-items: flex-start; }
.info-list .ico { color: var(--accent); font-size: 1.05rem; margin-top: .15rem; }
.info-list a { color: #c4d0de; }
.info-list a:hover { color: var(--accent); }

.map-embed { border: 0; width: 100%; height: 380px; border-radius: var(--radius); filter: grayscale(.4) invert(.9) hue-rotate(180deg) contrast(.9); border: 1px solid var(--border); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.gallery-grid a { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4/3; border: 1px solid var(--border); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-grid a::after { content: "⤢"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.6rem; background: rgba(8,11,17,.55); opacity: 0; transition: .3s; }
.gallery-grid a:hover img { transform: scale(1.1); }
.gallery-grid a:hover::after { opacity: 1; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: repeat(2,1fr); } }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(4,6,10,.95); backdrop-filter: blur(6px); z-index: 200; display: none; place-items: center; padding: 2rem; }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow); }
.lightbox button { position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 1px solid var(--border); cursor: pointer; border-radius: 10px; font-size: 1.5rem; width: 50px; height: 50px; transition: .2s; }
.lightbox button:hover { background: var(--accent); color: #ffffff; }
.lightbox__close { top: 1.4rem; right: 1.4rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 1.4rem; } .lightbox__nav--next { right: 1.4rem; }

/* ---------- Vacancies (careers) ---------- */
.vacancy { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.8rem; background: var(--surface); transition: .25s; }
.vacancy:hover { border-color: rgba(31,118,189,.4); background: var(--surface-2); }
.vacancy h3 { margin-bottom: .4rem; color: #fff; }
.vacancy .meta { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-bottom: .8rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: clamp(20px, 4vw, 32px); padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; border: 1px solid var(--border); background: radial-gradient(120% 140% at 50% 0%, rgba(17,92,155,.18), transparent 55%), var(--bg-3); }
.cta-band h2 { color: #fff; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  .hero__slide { transition: opacity .4s; transform: none; }
  html { scroll-behavior: auto; }
}

/* placeholder flag (dev reminder of TODO content) */
.placeholder { background: rgba(31,118,189,.12); border: 1px dashed var(--accent); border-radius: 6px; padding: .05rem .4rem; color: #cfe6ff; }

/* ---------- Footer ---------- */
.site-footer { background: #06090f; border-top: 1px solid var(--border); color: #8696a8; font-size: .95rem; position: relative; }
.site-footer a { color: #aab7c6; }
.site-footer a:hover { color: var(--accent); }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.4rem; padding-block: clamp(3rem,6vw,5rem); }
@media (max-width: 850px) { .footer-main { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .footer-main { grid-template-columns: 1fr; } }
.footer-main h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 1.2rem; }
.footer-links { list-style: none; display: grid; gap: .6rem; }
.footer-brand .brand { margin-bottom: 1.1rem; }
.footer-bottom { border-top: 1px solid var(--border-soft); padding-block: 1.3rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.footer-social { display: flex; gap: 1rem; list-style: none; }

/* ---------- Credential badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: .7rem; }
.badges.center { justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: .6rem 1.1rem; transition: .2s;
}
.badge:hover { border-color: rgba(31,118,189,.45); background: var(--surface-2); }
.badge .b-ico { color: var(--accent); font-size: 1rem; }
.badge strong { color: #fff; }

/* ---------- Team / leadership ---------- */
.team-card { text-align: left; }
.team-card .role { font-family: var(--font-head); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: .6rem; }
.team-card .quals { font-size: .92rem; color: var(--body); }
.avatar { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: #fff; background: linear-gradient(160deg, var(--accent), var(--accent-2)); margin-bottom: 1rem; }

/* ---------- Project experience ---------- */
.proj-list { list-style: none; display: grid; gap: .8rem; }
.proj-list li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: .2s; }
.proj-list li:hover { border-color: rgba(31,118,189,.4); background: var(--surface-2); }
.proj-list .p-ico { color: var(--accent); font-size: 1.1rem; margin-top: .15rem; }
.proj-list .p-loc { display: block; font-size: .82rem; color: var(--muted); margin-top: .15rem; }

/* utilities */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-1{margin-top:1rem}.mt-2{margin-top:2rem}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #ffffff; padding: .6rem 1rem; z-index: 999; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; top: 0; }
[hidden] { display: none !important; }
