/* =========================================================
   ACE — Accrete Consulting Engineers
   Design tokens: navy + signal red from the logo, concrete paper,
   Archivo (variable width) for display, JetBrains Mono for survey labels.
   ========================================================= */
:root {
  --ink: #0A1633;
  --ink-2: #111F45;
  --navy: #1B2D6B;
  --red: #D7262F;
  --red-2: #B81C24;
  --paper: #F4F3EF;
  --paper-2: #EAE8E2;
  --card: #FFFFFF;
  --text: #0A1633;
  --muted: #5A6378;
  --line: rgba(10, 22, 51, .12);
  --line-light: rgba(255, 255, 255, .14);
  --on-dark: #E9ECF4;
  --on-dark-muted: #9AA4BD;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 116px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 1em; height: 1em; flex: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; font-weight: 700; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }

/* ---------- Type ---------- */
.display {
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  font-weight: 750;
  font-stretch: 88%;
  letter-spacing: -.025em;
  line-height: 1.02;
  text-wrap: balance;
}
.display em, .hero__title em { font-style: normal; color: var(--red); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; font-weight: 450; color: var(--text); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.eyebrow--light { color: rgba(255,255,255,.85); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(215,38,47,.22); }

/* Survey chainage label — the site's signature motif */
.chainage { display: flex; align-items: center; gap: 14px; color: var(--muted); margin: 0 0 22px; }
.chainage::before {
  content: ""; width: 56px; height: 9px; flex: none;
  background:
    linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 8px) left bottom / 100% 5px no-repeat,
    linear-gradient(var(--red), var(--red)) left bottom / 1.5px 9px no-repeat;
}
.chainage--light { color: var(--on-dark-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s, border-color .3s;
  white-space: nowrap;
}
.btn svg { font-size: 1.1em; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 8px 24px -10px rgba(215,38,47,.7); }
.btn--red:hover { background: var(--red-2); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--navy); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--paper); }
.btn--outline-light { border: 1px solid var(--line-light); color: #fff; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: transform .45s var(--ease); }
.utility { background: rgba(6, 14, 34, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: rgba(255,255,255,.82); font-size: .82rem; transition: margin .45s var(--ease), opacity .3s; }
.utility__row { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 16px; }
.utility a { display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.utility a:hover { color: #fff; }
.utility__contact, .utility__social { display: flex; align-items: center; gap: 22px; }
.utility__social { gap: 16px; }
.utility__social .mono { font-size: .7rem; opacity: .7; margin-right: 6px; }

.nav {
  margin-top: 12px;
  display: flex; align-items: center; gap: 24px;
  height: 66px;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  padding: 0 10px 0 22px;
  max-width: calc(var(--wrap) - 2 * var(--gutter));
  width: calc(100% - 2 * var(--gutter));
  box-shadow: 0 10px 40px -18px rgba(10,22,51,.45);
  transition: box-shadow .3s, background .3s;
}
.nav__brand img { height: 36px; width: auto; }
.nav__links { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav__links a { display: block; padding: 9px 14px; border-radius: 999px; font-weight: 550; font-size: .93rem; color: var(--ink); transition: background .2s, color .2s; position: relative; }
.nav__links a:hover { background: var(--paper); }
.nav__links a.is-current { color: var(--red); }
.nav__links a.is-current::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--red); transform: translateX(-50%); }
.nav__mobile-only { display: none; }
.nav__cta { padding: 12px 18px; }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); margin-left: auto; position: relative; }
.nav__toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease); }
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.site-header.is-scrolled .utility { margin-top: -38px; opacity: 0; }
.site-header.is-scrolled .nav { background: rgba(255,255,255,.94); }
.site-header.is-hidden { transform: translateY(-110%); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; min-height: 720px; display: flex; align-items: flex-end; color: #fff; background: var(--ink); overflow: hidden; isolation: isolate; }
@supports (height: 100svh) { .hero { min-height: max(720px, 100svh); } }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.12); transition: opacity 1.4s var(--ease), transform 9s linear; }
.hero__img.is-active { opacity: 1; transform: scale(1.0); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,22,51,.55) 0%, rgba(10,22,51,.05) 30%, rgba(10,22,51,.25) 55%, rgba(10,22,51,.94) 100%),
    linear-gradient(90deg, rgba(10,22,51,.75) 0%, rgba(10,22,51,0) 65%);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 60%);
}
.hero__inner { padding-top: calc(var(--header-h) + 60px); padding-bottom: 48px; display: grid; grid-template-columns: 1.25fr .9fr; grid-template-areas: "eyebrow eyebrow" "title slides" "tabs tabs"; column-gap: 56px; align-items: end; }
.hero__inner > .eyebrow { grid-area: eyebrow; }
.hero__title {
  grid-area: title;
  font-size: clamp(3.2rem, 9vw, 8.4rem);
  font-weight: 800; font-stretch: 82%;
  letter-spacing: -.035em; line-height: .9;
  text-shadow: 0 2px 40px rgba(0,0,0,.25);
}
.hero__title em { color: #F0434B; }
.hero__slides { grid-area: slides; position: relative; min-height: 280px; }
.slide {
  position: absolute; inset: auto 0 0 0;
  padding: 28px; border-radius: var(--radius);
  background: rgba(10, 22, 51, .45);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.slide h2 { font-size: 1.45rem; font-weight: 700; font-stretch: 92%; letter-spacing: -.01em; margin-bottom: 12px; }
.slide p { color: rgba(255,255,255,.82); font-size: .98rem; line-height: 1.55; margin-bottom: 20px; }
.hero__tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.hero__tabs button { text-align: left; display: flex; gap: 12px; align-items: baseline; padding: 16px 0 0; position: relative; color: rgba(255,255,255,.6); font-weight: 550; transition: color .3s; }
.hero__tabs button::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255,255,255,.2); }
.hero__tabs button i { position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--red); }
.hero__tabs button.is-active { color: #fff; }
.hero__tabs button.is-active i { animation: progress var(--slide-ms, 7000ms) linear forwards; }
.hero__tabs button .mono { color: var(--red); }
@keyframes progress { to { width: 100%; } }
.hero__scroll { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%) rotate(90deg); transform-origin: right center; display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.7); }
.hero__scroll svg { transform: rotate(-90deg); animation: nudge 2s var(--ease) infinite; }
@keyframes nudge { 50% { transform: rotate(-90deg) translateY(4px); } }

/* ---------- Stats ---------- */
.stats { background: var(--ink); color: #fff; border-top: 1px solid var(--line-light); }
.stats__row { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 40px 28px 44px; border-left: 1px solid var(--line-light); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-size: clamp(2.4rem, 4.2vw, 3.6rem); font-weight: 750; font-stretch: 80%; letter-spacing: -.03em; line-height: 1; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.stat > span { color: var(--on-dark-muted); font-size: .92rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-head { max-width: 980px; margin-bottom: clamp(40px, 6vw, 72px); }

/* About */
.about__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about__copy p { color: var(--muted); }
.about__copy .lead { color: var(--text); }
.about__points { display: grid; gap: 14px; margin: 32px 0 36px; }
.about__points > div { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.about__points .mono { width: 40px; height: 40px; display: grid; place-items: center; background: var(--paper); border-radius: 50%; color: var(--red); font-weight: 500; }
.about__points p { margin: 0; color: var(--text); font-size: .98rem; }
.about__media { position: relative; aspect-ratio: 1 / 1.05; }
.about__img { position: absolute; margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(10,22,51,.45); }
.about__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.about__img:hover img { transform: scale(1.04); }
.about__img--a { inset: 0 18% 26% 0; }
.about__img--b { inset: 46% 0 0 34%; border: 8px solid var(--paper); }
.about__badge { position: absolute; left: 4%; bottom: 4%; background: var(--red); color: #fff; padding: 18px 22px; border-radius: 14px; display: grid; gap: 2px; box-shadow: 0 20px 40px -18px rgba(215,38,47,.8); }
.about__badge b { font-size: .8rem; font-weight: 500; opacity: .85; }
.about__badge span { font-size: 1.6rem; font-weight: 750; font-stretch: 85%; line-height: 1; }
.about__badge small { opacity: .8; font-size: .66rem; margin-top: 6px; }

/* Quality */
.quality { position: relative; background: var(--ink); color: #fff; padding: clamp(90px, 12vw, 160px) 0; overflow: hidden; isolation: isolate; }
.quality__bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: .16; filter: grayscale(1); }
.quality::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 15% 0%, rgba(215,38,47,.25), transparent 50%), linear-gradient(180deg, var(--ink) 0%, rgba(10,22,51,.6) 50%, var(--ink) 100%); }
.quality__quote { margin: 0 0 56px; font-size: clamp(1.8rem, 3.9vw, 3.4rem); font-weight: 600; font-stretch: 90%; line-height: 1.12; letter-spacing: -.02em; max-width: 1050px; text-wrap: balance; }
.quality__quote::before { content: "“"; display: block; color: var(--red); font-size: 1.8em; line-height: .6; margin-bottom: 8px; }
.quality__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); color: var(--on-dark); max-width: 1050px; }
.quality__values { list-style: none; padding: 0; margin: 56px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.quality__values li { padding: 10px 16px; border: 1px solid var(--line-light); border-radius: 999px; color: var(--on-dark); }
.quality__pdf { margin-top: 28px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.form__consent { flex-basis: 100%; margin: 0; font-size: .8rem; color: var(--muted); }
.form__consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.form__consent a:hover { color: var(--red); }
.news .form__consent { color: var(--on-dark-muted); }

/* Services */
.services__grid { display: grid; grid-template-columns: .85fr 1.4fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.services__intro { position: sticky; top: 110px; }
.services__intro > p { color: var(--muted); margin-top: 22px; max-width: 420px; }
.services__img { margin: 32px 0 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.services__img img { width: 100%; height: 100%; object-fit: cover; }
.services__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.svc {
  --card: #fff;
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 26px; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s, background .4s, color .4s;
  overflow: hidden;
}
.svc svg { font-size: 44px; color: var(--navy); transition: color .4s, transform .5s var(--ease); }
.svc .mono { position: absolute; top: 24px; right: 24px; color: var(--muted); }
.svc h3 { font-size: 1.12rem; font-weight: 650; line-height: 1.25; letter-spacing: -.005em; }
.svc::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--red); transition: width .5s var(--ease); }
.svc:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -28px rgba(10,22,51,.5); border-color: transparent; }
.svc:hover::after { width: 100%; }
.svc:hover svg { color: var(--red); transform: scale(1.06); }

/* Projects */
.projects { background: var(--ink); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.projects::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/Bridge-New-1.jpg") center 30% / cover; opacity: .09; filter: grayscale(1); mask-image: linear-gradient(180deg, #000, transparent 45%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 45%); }
.projects__head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; margin-bottom: 48px; }
.footprint { display: grid; gap: 8px; }
.footprint__title { color: var(--on-dark-muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.fp-row { display: grid; grid-template-columns: 130px 1fr 28px; gap: 12px; align-items: center; font-size: .85rem; color: var(--on-dark); cursor: pointer; border-radius: 6px; padding: 2px 0; }
.fp-row:hover .fp-bar i, .fp-row.is-active .fp-bar i { background: var(--red); }
.fp-row.is-active { color: #fff; font-weight: 600; }
.fp-bar { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.fp-bar i { display: block; height: 100%; width: 0; background: #6F86C9; border-radius: 3px; transition: width 1.2s var(--ease), background .2s; }
.fp-row .mono { text-align: right; color: var(--on-dark-muted); }

.projects__controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line-light); border-radius: 999px; }
.seg { display: flex; background: rgba(0,0,0,.25); border-radius: 999px; padding: 4px; }
.seg button { padding: 10px 16px; border-radius: 999px; font-weight: 550; font-size: .92rem; color: var(--on-dark-muted); display: inline-flex; align-items: center; gap: 8px; transition: background .25s, color .25s; }
.seg button .mono { font-size: .7rem; opacity: .8; }
.seg button.is-active { background: #fff; color: var(--ink); }
.live { width: 7px; height: 7px; border-radius: 50%; background: #2ECC71; box-shadow: 0 0 0 0 rgba(46,204,113,.6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-light); font-size: .88rem; color: var(--on-dark); transition: all .25s; }
.chips button:hover { border-color: rgba(255,255,255,.4); }
.chips button.is-active { background: var(--red); border-color: var(--red); color: #fff; }
.search { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 44px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line-light); min-width: 260px; flex: 0 1 320px; }
.search svg { color: var(--on-dark-muted); }
.search input { background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: .93rem; width: 100%; }
.search input::placeholder { color: var(--on-dark-muted); }
.search:focus-within { border-color: rgba(255,255,255,.5); }

.projects__count { color: var(--on-dark-muted); margin: 28px 0 16px; }
.projects__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.proj {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  padding: 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  border: 1px solid var(--line-light);
  transition: border-color .3s, background .3s, transform .4s var(--ease);
  animation: rise .6s var(--ease) both;
}
.proj:hover { border-color: rgba(255,255,255,.32); transform: translateY(-3px); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.proj__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--on-dark-muted); }
.proj__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--on-dark); white-space: nowrap; }
.tag--ongoing { background: rgba(46,204,113,.15); color: #7BE3A6; display: inline-flex; gap: 6px; align-items: center; }
.tag--ongoing .live { width: 6px; height: 6px; }
.tag--struct { background: rgba(215,38,47,.18); color: #FF9CA1; }
.proj__name { font-size: .98rem; line-height: 1.5; color: #fff; font-weight: 450; margin: 0; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.proj.is-open .proj__name { -webkit-line-clamp: unset; }
.proj__expand { align-self: flex-start; font-size: .8rem; color: var(--on-dark-muted); text-decoration: underline; text-underline-offset: 3px; }
.proj__expand:hover { color: #fff; }
.proj__client { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-light); font-size: .88rem; color: var(--on-dark); display: grid; gap: 2px; }
.proj__client .mono { font-size: .64rem; color: var(--on-dark-muted); }
.projects__empty { grid-column: 1 / -1; text-align: center; padding: 60px 0; color: var(--on-dark-muted); }
.projects__more { display: flex; justify-content: center; margin-top: 40px; }
.projects__more[hidden] { display: none; }
mark { background: rgba(215,38,47,.4); color: #fff; border-radius: 3px; padding: 0 2px; }

/* Clients */
.clients { padding-bottom: clamp(60px, 8vw, 110px); }
.clients__head { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; margin-bottom: 56px; }
.clients__head p { color: var(--muted); }
.clients__head .lead { color: var(--text); }
/* Logo wall: each tile cross-fades between two clients */
.logo-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.logo-tile { position: relative; height: 120px; display: grid; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; overflow: hidden; transition: border-color .3s, box-shadow .3s, transform .4s var(--ease); }
.logo-tile img {
  grid-area: 1 / 1; place-self: center; max-height: 70px; max-width: 100%; width: auto; object-fit: contain;
  filter: grayscale(1) contrast(1.05); opacity: 0; transform: translateY(14px) scale(.94);
  transition: opacity .7s var(--ease), transform .8s var(--ease), filter .4s;
}
.logo-tile img.is-on { opacity: .75; transform: none; }
.logo-tile::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.logo-tile:hover { border-color: transparent; box-shadow: 0 18px 36px -22px rgba(10,22,51,.5); transform: translateY(-3px); }
.logo-tile:hover::after { transform: scaleX(1); }
.logo-tile:hover img.is-on { filter: none; opacity: 1; }

/* Gallery */
.gallery { padding-top: clamp(40px, 6vw, 80px); }
.gallery__head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 40px; }
.gallery__head > p { color: var(--muted); max-width: 360px; margin: 0; }
.gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 12px; }
.gallery__item { position: relative; overflow: hidden; border-radius: 14px; background: var(--paper-2); padding: 0; animation: rise .6s var(--ease) both; }
.gallery__item:nth-child(7n + 1) { grid-column: span 2; grid-row: span 2; }
.gallery__item:nth-child(7n + 5) { grid-column: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery__item::after { content: "+"; position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; font-size: 1.3rem; opacity: 0; transform: scale(.7); transition: all .35s var(--ease); }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item:hover::after { opacity: 1; transform: none; }
.gallery__more { display: flex; justify-content: center; margin-top: 36px; }
.gallery__more[hidden] { display: none; }

/* Voices */
.voices { padding: 0 0 clamp(60px, 9vw, 120px); }
.voices__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.voice { margin: 0; padding: 32px 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); position: relative; }
.voices__label { margin-bottom: 22px; }
.voice::before { content: "“"; display: block; height: .45em; font-size: 4.2rem; line-height: 1; color: var(--red); font-weight: 800; margin-bottom: 10px; }
.voice blockquote { margin: 0; font-size: 1.18rem; font-weight: 500; font-stretch: 94%; line-height: 1.4; letter-spacing: -.01em; }
.voice:nth-child(2) { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Careers */
.careers { background: var(--paper-2); }
.careers__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.careers__img { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 4.4; }
.careers__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.careers__img figcaption { position: absolute; left: 16px; bottom: 16px; background: rgba(255,255,255,.92); padding: 8px 12px; border-radius: 8px; color: var(--ink); }
.careers__body > p { color: var(--muted); margin: 20px 0 28px; }
.careers__body > p strong { color: var(--text); }

/* Forms */
.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; }
.form label > span { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.form input, .form textarea {
  width: 100%; font: inherit; font-size: .98rem; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(27,45,107,.12); }
.form .is-invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(215,38,47,.12); }
.form__foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form__foot small { color: var(--muted); font-size: .82rem; }
.form .btn:disabled { opacity: .75; cursor: progress; transform: none; }
/* spam trap: off-screen, never seen by people */
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* CV upload */
.file { position: relative; }
.file input[type=file] { position: absolute; inset: auto 0 0 0; height: calc(100% - 22px); width: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.form .file > .file__box { font-family: var(--font); font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.file__box { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed rgba(10,22,51,.25); border-radius: 12px; background: var(--card); transition: border-color .2s, background .2s, box-shadow .2s; }
.file__box svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--paper); color: var(--red); flex: none; }
.file__text { display: grid; gap: 2px; min-width: 0; font-family: var(--font); text-transform: none; letter-spacing: 0; }
.file__text b { font-weight: 600; font-size: .95rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__text small { font-size: .8rem; color: var(--muted); }
.file:hover .file__box, .file.is-drag .file__box { border-color: var(--navy); background: #F8F9FC; }
.file input:focus-visible + .file__box { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(27,45,107,.12); }
.file.has-file .file__box { border-style: solid; border-color: rgba(46,160,90,.6); }
.file.has-file .file__box svg { color: #2E9F5A; }
.file.is-invalid .file__box { border-color: var(--red); box-shadow: 0 0 0 4px rgba(215,38,47,.12); }

/* Send status */
.form__status { margin: 0; font-size: .92rem; line-height: 1.45; min-height: 0; }
.form__status:empty { display: none; }
.form__status.is-ok, .form__status.is-error { padding: 12px 14px; border-radius: 10px; }
.form__status.is-ok { background: rgba(46,160,90,.12); color: #1D6B3C; }
.form__status.is-error { background: rgba(215,38,47,.1); color: #A3161E; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Contact */
.contact { position: relative; background: var(--ink); color: #fff; padding: clamp(90px, 11vw, 150px) 0 clamp(60px, 8vw, 100px); overflow: hidden; isolation: isolate; }
.contact__bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: .22; }
.contact::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,22,51,.6), var(--ink) 75%); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__info > p { color: var(--on-dark); margin: 22px 0 32px; max-width: 480px; }
.contact__cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact__cards li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line-light); color: var(--on-dark); font-size: .95rem; }
.contact__cards svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: rgba(215,38,47,.16); color: #FF8A90; }
.contact__cards b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.contact__cards a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.contact__panel { background: var(--paper); color: var(--text); border-radius: calc(var(--radius) + 6px); padding: clamp(24px, 3.5vw, 40px); box-shadow: 0 40px 80px -40px rgba(0,0,0,.7); }
.contact__panel h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); font-weight: 750; font-stretch: 88%; letter-spacing: -.02em; margin-bottom: 24px; }
.map { margin-top: 56px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-light); height: 340px; background: var(--ink-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }

/* Footer */
.footer { background: #060E22; color: var(--on-dark-muted); padding: 80px 0 0; font-size: .93rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr .8fr 1fr 1.1fr; gap: 40px; padding-bottom: 56px; }
.footer h4 { color: #fff; margin-bottom: 18px; font-weight: 500; }
.footer a:hover { color: #fff; }
.footer__logo { display: inline-block; background: #fff; padding: 12px 16px; border-radius: 12px; margin-bottom: 22px; }
.footer__logo img { height: 34px; width: auto; }
.footer__nav { display: grid; gap: 8px; align-content: start; }
.news { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.news .form__status { flex-basis: 100%; font-size: .85rem; }
.news .form__status.is-ok { background: rgba(46,204,113,.12); color: #7BE3A6; }
.news .form__status.is-error { background: rgba(215,38,47,.16); color: #FF9CA1; }
.news input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-light); background: rgba(255,255,255,.05); color: #fff; font: inherit; }
.news input::placeholder { color: var(--on-dark-muted); }
.news input:focus { outline: 0; border-color: rgba(255,255,255,.5); }
.news .btn { width: 48px; height: 48px; padding: 0; justify-content: center; }
.news .is-invalid { border-color: var(--red); }
.footer__social { display: flex; gap: 10px; }
.footer__social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-light); transition: all .25s; }
.footer__social a:hover { background: var(--red); border-color: var(--red); }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line-light); padding-top: 22px; padding-bottom: 28px; font-size: .84rem; }

/* Privacy policy page */
.legal-top { position: sticky; top: 0; z-index: 10; background: rgba(244,243,239,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.legal-top__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 72px; }
.legal-top .btn { padding: 11px 18px; }
.legal { max-width: 860px; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(60px, 8vw, 110px); }
.legal h1 { margin-bottom: 10px; }
.legal__meta { color: var(--muted); margin-bottom: 28px; }
.legal__toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; margin-bottom: 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.legal__toc a { padding: 6px 12px; border-radius: 999px; background: var(--paper); font-size: .88rem; font-weight: 550; transition: background .2s, color .2s; }
.legal__toc a:hover { background: var(--ink); color: #fff; }
.legal section { padding-top: 12px; margin-bottom: 36px; scroll-margin-top: 90px; }
.legal h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 700; font-stretch: 90%; letter-spacing: -.01em; margin-bottom: 14px; }
.legal p, .legal li { color: #2B3550; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .45em; }
.legal a:not(.btn) { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.legal a:not(.btn):hover { color: var(--red); }
.legal__table { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.legal th { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--paper); }
.legal tr:last-child td { border-bottom: 0; }
.legal td:first-child { white-space: nowrap; }
.legal__card { font-style: normal; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: var(--radius-sm); line-height: 1.7; margin-bottom: 1em; }
.footer--legal { padding-top: 24px; }
@media (max-width: 720px) {
  .legal td:first-child { white-space: normal; }
  .legal-top .btn { padding: 10px 14px; font-size: .85rem; }
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(4,9,22,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; padding: 60px 80px; animation: fade .3s; }
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure { margin: 0; display: grid; gap: 14px; justify-items: center; }
.lightbox img { max-width: min(1200px, 100%); max-height: calc(100vh - 160px); border-radius: 12px; box-shadow: 0 40px 80px -30px #000; }
.lightbox figcaption { color: var(--on-dark-muted); }
.lightbox button { position: absolute; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; transition: background .2s; }
.lightbox button:hover { background: var(--red); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav__links a { padding: 9px 10px; font-size: .9rem; }
  .projects__list { grid-template-columns: repeat(2, 1fr); }
  .search { margin-left: 0; flex: 1 1 100%; }
  .projects__controls { border-radius: 24px; }
}
@media (max-width: 1024px) {
  .utility__social .mono { display: none; }
  /* backdrop-filter would make the nav the containing block of the fixed menu panel */
  .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.96); }
  .nav__links {
    position: fixed; inset: 0; margin: 0; overflow-y: auto;
    flex-direction: column; gap: 2px; padding: 130px var(--gutter) 32px;
    background: var(--paper);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .55s var(--ease), visibility 0s .55s; z-index: -1;
  }
  .nav__links.is-open { clip-path: inset(0); visibility: visible; transition: clip-path .55s var(--ease); }
  .nav__links li { opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .5s var(--ease); }
  .nav__links.is-open li { opacity: 1; transform: none; }
  .nav__links.is-open li:nth-child(2) { transition-delay: .05s; } .nav__links.is-open li:nth-child(3) { transition-delay: .1s; }
  .nav__links.is-open li:nth-child(4) { transition-delay: .15s; } .nav__links.is-open li:nth-child(5) { transition-delay: .2s; }
  .nav__links.is-open li:nth-child(6) { transition-delay: .25s; } .nav__links.is-open li:nth-child(7) { transition-delay: .3s; }
  .nav__links a { font-size: 1.4rem; font-weight: 650; font-stretch: 88%; padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__links a.is-current::after { display: none; }
  .nav__mobile-only { display: block; }
  .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .hero__inner { grid-template-columns: 1fr; grid-template-areas: "eyebrow" "title" "slides" "tabs"; }
  .hero__slides { margin-top: 36px; min-height: 0; display: grid; }
  .slide { position: relative; inset: auto; grid-area: 1 / 1; }
  .hero__tabs { margin-top: 32px; }
  .hero__scroll { display: none; }
  .about__grid, .services__grid, .projects__head, .clients__head, .careers__grid, .contact__grid { grid-template-columns: 1fr; }
  .services__intro { position: static; }
  .services__img { display: none; }
  .about__media { max-width: 620px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  :root { --header-h: 96px; }
  .utility__contact a:last-child { display: none; }
  .nav { height: 58px; padding-left: 16px; padding-right: 7px; margin-top: 10px; }
  .nav__brand img { height: 30px; }
  .hero__title { font-size: clamp(2.9rem, 14vw, 4.4rem); }
  .hero__tabs { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hero__tabs button { font-size: .78rem; flex-direction: column; gap: 4px; }
  .slide { padding: 22px; }
  .slide h2 { font-size: 1.2rem; }
  .slide p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .hero__inner { padding-top: calc(var(--header-h) + 40px); padding-bottom: 28px; }
  .hero__slides { margin-top: 28px; }
  .hero__tabs { margin-top: 24px; }
  .nav__links a { font-size: 1.7rem; }
  .stats__row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 28px 16px; border-left: 0; border-top: 1px solid var(--line-light); }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line-light); }
  .quality__cols { grid-template-columns: 1fr; }
  .services__list { grid-template-columns: 1fr; }
  .svc { min-height: 0; flex-direction: row; align-items: center; gap: 18px; padding: 20px 56px 20px 20px; }
  .svc svg { font-size: 36px; }
  .svc .mono { top: 50%; transform: translateY(-50%); right: 18px; }
  .projects__controls { padding: 10px; }
  .seg { width: 100%; }
  .seg button { flex: 1; justify-content: center; padding: 10px 6px; font-size: .86rem; }
  .projects__list { grid-template-columns: 1fr; }
  .fp-row { grid-template-columns: 110px 1fr 24px; }
  .gallery__head { flex-direction: column; align-items: start; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 8px; }
  .gallery__item:nth-child(7n + 5) { grid-column: span 1; }
  .voices__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .map { height: 260px; }
  .lightbox { padding: 60px 12px; }
  .lightbox__nav { top: auto !important; bottom: 18px; transform: none !important; }
  .logo-wall { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .logo-tile { height: 92px; padding: 14px 16px; }
  .logo-tile img { max-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
