/* NovaConstruction public site.
   Mobile-first. Breakpoints: 768px (tablet), 1100px (desktop). No framework, no build step.
   Sections: 1 fonts · 2 tokens · 3 base · 4 utilities · 5 buttons · 6 header/nav · 7 hero · 8 sections & blocks · 8b house story
             9 forms & dialog · 10 footer · 11 mobile bar · 12 404 · 12b inner pages (projects, project, gallery,
             lightbox, privacy, cta) · 13 breakpoints · 14 reduced motion */

/* 1. Fonts ---------------------------------------------------------------- */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
        U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* 2. Tokens --------------------------------------------------------------- */
:root {
    --navy-950: #061420;
    --navy-900: #081927;
    --navy: #0b1e2d;
    --navy-800: #102a3e;
    --navy-700: #183750;
    --navy-600: #24486a;
    --text: #e8eef3;
    --muted: #a7b6c2;
    --line: rgba(232, 238, 243, 0.1);
    --line-strong: rgba(232, 238, 243, 0.22);
    --green: #12a150;
    --on-green: #04121c;
    --danger: #ff8f85;
    --focus: #e8eef3;

    --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
    --container: 1240px;
    --gutter: 16px;
    --header-h: 64px;
    --mobile-bar-h: 60px;
    --section-y: clamp(4rem, 3rem + 5vw, 7.5rem);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 3. Base ----------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

/* Smooth scrolling only after load (site.js adds .smooth-scroll), so a #fragment on load jumps instantly. */
html.smooth-scroll { scroll-behavior: smooth; }
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--navy);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
body:has(> .mobile-bar) { padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom)); }

img, svg, video { display: block; max-width: 100%; }
dialog:not([open]) { display: none; } /* fallback for browsers without <dialog> styles */
img { height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, textarea { font: inherit; color: inherit; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* 4. Utilities ------------------------------------------------------------ */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: var(--gutter); top: -100px; z-index: 100;
    padding: 0.75rem 1rem; border-radius: var(--radius-sm);
    background: var(--text); color: var(--navy); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

/* 5. Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 48px; padding: 0.75rem 1.35rem;
    border: 1px solid transparent; border-radius: 999px;
    font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: var(--on-green); }
.btn--primary:hover { filter: brightness(1.1); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(11, 30, 45, 0.25); }
.btn--ghost:hover { border-color: var(--text); background: rgba(232, 238, 243, 0.08); }
.btn--lg { min-height: 56px; padding-inline: 1.75rem; font-size: 1.0625rem; }
.btn--block { width: 100%; }

/* 6. Header & navigation -------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid var(--line);
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would become the
   containing block of the fixed mobile menu and clip it to the header height. */
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(11, 30, 45, 0.88);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
}
.site-header.is-open::before { background: var(--navy); }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); flex-wrap: wrap; }
.site-header__logo { display: block; margin-right: auto; padding: 4px 0; border-radius: 4px; }
.site-header__logo .logo { height: 36px; width: auto; }
.site-header__cta { display: none; }

.burger {
    display: none; position: relative;
    width: 44px; height: 44px; margin-right: -8px; padding: 0;
    border: 0; background: transparent; cursor: pointer; border-radius: var(--radius-sm);
}
.burger__bar,
.burger__bar::before,
.burger__bar::after {
    position: absolute; left: 11px; width: 22px; height: 2px; border-radius: 2px;
    background: var(--text); content: ""; transition: transform 0.25s var(--ease), opacity 0.2s;
}
.burger__bar { top: 21px; }
.burger__bar::before { left: 0; top: -7px; }
.burger__bar::after { left: 0; top: 7px; }
.burger[aria-expanded="true"] .burger__bar { background: transparent; }
.burger[aria-expanded="true"] .burger__bar::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Without JS the menu is simply shown under the logo. */
.site-nav { width: 100%; padding-bottom: 0.75rem; }
.site-nav__list { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav__list a { display: inline-block; padding: 0.5rem 0; color: var(--muted); font-weight: 600; text-decoration: none; }
.site-nav__list a:hover { color: var(--text); }

.js .burger { display: block; }
.js .site-nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    display: flex; flex-direction: column; gap: 2rem;
    width: auto; padding: 1.5rem var(--gutter) calc(2rem + var(--mobile-bar-h));
    background: var(--navy); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.js .site-header.is-open .site-nav {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity 0.2s var(--ease), transform 0.25s var(--ease), visibility 0s;
}
.js .site-nav__list { flex-direction: column; gap: 0; }
.js .site-nav__list a {
    display: block; padding: 1rem 0; border-bottom: 1px solid var(--line);
    color: var(--text); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em;
}
body.nav-open { overflow: hidden; }

.lang-switcher { display: flex; gap: 0.25rem; }
.lang-switcher a {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
    padding: 0 0.5rem; border-radius: var(--radius-sm);
    color: var(--muted); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-decoration: none;
}
.lang-switcher a:hover { color: var(--text); }
.lang-switcher a[aria-current="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); border-radius: 0; }

/* 7. Hero ----------------------------------------------------------------- */
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; align-items: flex-end;
    min-height: min(calc(100svh - var(--header-h) - var(--mobile-bar-h)), 760px);
    padding: 7rem 0 3rem;
    background:
        radial-gradient(120% 80% at 85% 10%, rgba(36, 72, 106, 0.65), transparent 60%),
        linear-gradient(180deg, var(--navy-800), var(--navy));
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__poster,
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero--media::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(0deg, rgba(11, 30, 45, 0.97) 8%, rgba(11, 30, 45, 0.55) 55%, rgba(11, 30, 45, 0.25));
}
.hero__inner { display: grid; gap: 1.25rem; }
.hero__title { max-width: 16ch; font-size: clamp(2.25rem, 1.35rem + 4.2vw, 4.75rem); line-height: 1.04; letter-spacing: -0.03em; }
.hero__subtitle { max-width: 40ch; color: #d3dde5; font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
.hero__actions .btn { flex: 1 1 auto; }

/* 8. Sections & blocks ---------------------------------------------------- */
.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: grid; gap: 0.75rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); max-width: 720px; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 2rem; }
.section__title { font-size: clamp(1.875rem, 1.4rem + 2.2vw, 3rem); }
.section__intro { color: var(--muted); font-size: 1.0625rem; max-width: 60ch; }
.section__link { display: inline-flex; gap: 0.4rem; min-height: 44px; align-items: center; font-weight: 700; text-decoration: none; }
.section__link:hover { text-decoration: underline; }

/* Stats */
.stats { padding-block: 2.5rem; background: var(--navy-900); border-block: 1px solid var(--line); }
.stats__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1.25rem; }
.stats__item { display: flex; flex-direction: column-reverse; gap: 0.35rem; }
.stats__item::before { content: ""; order: 3; width: 28px; height: 4px; margin-bottom: 0.6rem; border-radius: 2px; background: var(--green); }
.stats__value { font-size: clamp(2.25rem, 1.8rem + 2vw, 3.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stats__label { color: var(--muted); font-size: 0.95rem; font-weight: 600; }

/* Services */
.services__grid { display: grid; gap: 1rem; }
.service-card__link {
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-800);
    text-decoration: none; transition: border-color 0.2s var(--ease), transform 0.3s var(--ease);
}
.service-card__link:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.service-card__media { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--navy-700), var(--navy-600)); overflow: hidden; }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.service-card__link:hover .service-card__media img { transform: scale(1.04); }
.service-card__body { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; padding: 1.25rem 1.25rem 1.4rem; }
.service-card__title { font-size: 1.25rem; letter-spacing: -0.01em; }
.service-card__text { color: var(--muted); font-size: 0.975rem; }
.service-card__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.925rem; line-height: 1.45; }
.service-card__list li { position: relative; padding-left: 0.95rem; }
.service-card__list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--green); }
.service-card__more { margin-top: auto; padding-top: 0.5rem; font-size: 0.925rem; font-weight: 700; }

/* Projects */
.projects__grid { display: grid; gap: 1rem; }
.project-tile__link {
    position: relative; display: block; height: 100%; min-height: 260px; overflow: hidden;
    border-radius: var(--radius); background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    text-decoration: none; aspect-ratio: 4 / 3;
}
.project-tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.project-tile__link:hover .project-tile__img { transform: scale(1.05); }
.project-tile__caption {
    position: absolute; inset: auto 0 0; display: grid; gap: 0.15rem;
    padding: 3rem 1.25rem 1.1rem;
    background: linear-gradient(0deg, rgba(6, 20, 32, 0.92), rgba(6, 20, 32, 0));
}
.project-tile__title { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.project-tile__meta { color: #c9d4dd; font-size: 0.875rem; font-weight: 600; }

/* About */
.about__inner { display: grid; gap: 2.5rem; align-items: center; }
.about__text { display: grid; gap: 1.1rem; justify-items: start; }
.about__text p { color: #c9d4dd; font-size: 1.0625rem; max-width: 62ch; }
.about__text .btn { margin-top: 0.75rem; }
.about__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* Testimonials */
.testimonials__list { display: grid; gap: 1rem; }
.testimonial { display: grid; gap: 1rem; align-content: start; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-800); }
.testimonial__stars { display: flex; gap: 2px; color: var(--navy-600); font-size: 1.1rem; letter-spacing: 0; }
.testimonial__stars .is-on { color: #f4c152; }
.testimonial__quote { margin: 0; font-size: 1.0625rem; }
.testimonial__author { color: var(--muted); font-weight: 700; font-size: 0.925rem; }
.testimonial__author span { font-weight: 500; }

/* Contact */
.contact__inner {
    display: grid; gap: 2rem;
    padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    background:
        radial-gradient(90% 120% at 0% 0%, rgba(36, 72, 106, 0.55), transparent 60%),
        var(--navy-800);
    box-shadow: var(--shadow);
}
.contact__text { display: grid; gap: 1rem; align-content: start; }
.contact__or { margin-top: 1rem; color: var(--muted); font-weight: 600; }
.contact__direct { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.contact__phone { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); font-weight: 800; letter-spacing: -0.01em; text-decoration: none; }
.contact__phone:hover { text-decoration: underline; }

/* 8b. House story ---------------------------------------------------------
   Static by default (no JS / reduced motion): finished house above finished bathroom, steps as a list.
   .is-animated (set by house-story.js): a tall track with a sticky full-height stage; the step list turns into a
   single caption that follows the scroll progress. */
.house { overflow-x: clip; }
.house__stage {
    display: grid; gap: 1.75rem;
    grid-template-areas: "title" "scene" "steps" "final";
    width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto;
}
.house__title { grid-area: title; }
.house__scene { grid-area: scene; position: relative; min-width: 0; }
.house__steps { grid-area: steps; margin: 0; padding: 0; list-style: none; }
.house__final { grid-area: final; }
.house__dashes { display: none; }

.house__svg { width: 100%; height: auto; overflow: visible; }
.house__svg * { transform-box: fill-box; }
.house__svg [data-pop] { transform-origin: 50% 50%; }
.house__svg [data-rise],
.house__svg [data-origin="b"] { transform-origin: 50% 100%; }
.house__ext { transform-box: view-box; transform-origin: 512px 358px; }
.house__int { transform-box: view-box; transform-origin: 400px 260px; }
.house:not(.is-animated) .house__int { transform: translateY(520px); }
.house__frame { fill: var(--navy-900); stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.house__bg { display: none; }
.house__svg .s { stroke: var(--text); stroke-opacity: 0.85; stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.house__svg .s2 { fill: none; stroke: var(--text); stroke-opacity: 0.25; stroke-width: 1; vector-effect: non-scaling-stroke; }
.house__svg .hs-green { fill: var(--green); }
.house__svg .hs-ink { fill: var(--navy); }
.house__svg .hs-paper { fill: var(--text); }
.house__svg .hs-tap { fill: none; stroke: var(--text); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.house__svg .hs-tap--thin { stroke-width: 3; }

/* Static step list */
.house__step {
    display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 0.75rem; align-items: baseline;
    padding-block: 0.8rem; border-top: 1px solid var(--line);
}
.house__step:last-child { border-bottom: 1px solid var(--line); }
.house__num { grid-row: span 2; color: var(--green); font-size: 0.875rem; font-weight: 800; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.house__of { display: none; }
.house__name { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; }
.house__sub { grid-column: 2; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.house__final { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.house:not(.is-animated) .house__final::before {
    content: ""; display: block; width: 28px; height: 4px; margin-bottom: 0.85rem; border-radius: 2px; background: var(--green);
}

/* Animated */
.house.is-animated { --house-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom)); padding-block: 0; }
.is-animated .house__track { position: relative; }
.is-animated .house__stage {
    position: sticky; top: var(--header-h);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(0.5rem, 1.6vh, 1rem);
    width: 100%; overflow: hidden;
    height: calc(100vh - var(--header-h) - var(--house-bottom));
    height: calc(100svh - var(--header-h) - var(--house-bottom));
    padding: clamp(1rem, 3.5vh, 2.5rem) var(--gutter) clamp(1rem, 3vh, 2rem);
}
.is-animated .house__title { position: relative; z-index: 1; font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2.25rem); text-align: center; }
.is-animated .house__scene { flex: 0 1 auto; min-height: 0; width: 100%; max-width: 980px; aspect-ratio: 640 / 450; }
.is-animated .house__svg { position: absolute; inset: 0; height: 100%; }
.is-animated .house__frames { display: none; }
.is-animated .house__bg { display: inline; }
.is-animated .house__final {
    position: relative; z-index: 1; opacity: 0; text-align: center;
    font-size: clamp(1.125rem, 1rem + 0.8vw, 1.5rem);
}
.is-animated .house__steps { position: relative; z-index: 1; display: grid; width: 100%; max-width: 40rem; }
.is-animated .house__step {
    grid-area: 1 / 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.2rem 0.85rem;
    padding: 0; border: 0; text-align: center;
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
/* The outgoing caption leaves quickly; the new one enters from below once it has gone. */
.is-animated .house__step[aria-current="step"] {
    opacity: 1; transform: none;
    transition: opacity 0.35s var(--ease) 0.12s, transform 0.45s var(--ease) 0.12s;
}
.is-animated .house__num { grid-row: auto; }
.is-animated .house__of { display: inline; }
.is-animated .house__name { font-size: clamp(1.125rem, 1rem + 0.8vw, 1.5rem); font-weight: 800; letter-spacing: -0.01em; }
.is-animated .house__sub { flex-basis: 100%; font-size: 0.9375rem; text-wrap: balance; }
.is-animated .house__dashes { position: relative; z-index: 1; display: flex; gap: 6px; }
.house__dashes i { width: 22px; height: 3px; border-radius: 2px; background: var(--line-strong); transition: background-color 0.3s var(--ease); }
.house__dashes i.is-on { background: var(--green); }

/* Shower: drops fall only while the bathroom is on screen (.is-showering is set by the script). */
.house.is-showering .house__drops line { animation: house-drop 0.6s linear infinite; }
.house.is-showering .house__drops line:nth-child(2) { animation-delay: -0.2s; }
.house.is-showering .house__drops line:nth-child(3) { animation-delay: -0.4s; }
@keyframes house-drop {
    0% { opacity: 0; transform: translateY(-4px); }
    25% { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}

@media (min-width: 768px) {
    .house.is-animated { --house-bottom: 0px; }
    .is-animated .house__scene { aspect-ratio: 800 / 450; }
    .house__stage {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        grid-template-areas: "scene title" "scene steps" "scene final";
        grid-template-rows: auto auto 1fr;
        column-gap: clamp(2rem, 5vw, 5rem); row-gap: 1.75rem;
    }
    .house:not(.is-animated) .house__scene { align-self: start; }
}

/* 9. Forms & dialog ------------------------------------------------------- */
.lead-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.925rem; font-weight: 700; }
.field__hint { color: var(--muted); font-weight: 500; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea {
    width: 100%; min-height: 50px; padding: 0.75rem 0.9rem;
    border: 1px solid var(--navy-600); border-radius: var(--radius-sm);
    background: var(--navy-900); color: var(--text); font-size: 1rem; /* 16px prevents iOS zoom */
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #7f93a3; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(232, 238, 243, 0.22); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 0.875rem; font-weight: 600; }
.field__error:empty { display: none; }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: 0.75rem; }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); }
.field--check label { color: var(--muted); font-weight: 500; font-size: 0.9rem; line-height: 1.5; }
.field--check label a { color: var(--text); }
.field--check .field__error { grid-column: 1 / -1; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-form__status { font-weight: 700; }
.lead-form__status:empty { display: none; }
.lead-form__status.is-sent { padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: rgba(18, 161, 80, 0.16); color: var(--text); border-left: 3px solid var(--green); }
.lead-form__status.is-error { color: var(--danger); }
.lead-form.is-busy button[type="submit"] { opacity: 0.7; cursor: progress; }

.lead-modal {
    width: 100%; max-width: 100%; max-height: 100%; margin: auto 0 0; padding: 0;
    border: 0; background: transparent; color: var(--text);
}
.lead-modal::backdrop { background: rgba(4, 12, 20, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lead-modal__panel {
    position: relative; display: grid; gap: 0.75rem;
    max-height: 92svh; overflow-y: auto;
    padding: 1.75rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
    border: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--navy-800); box-shadow: var(--shadow);
}
.lead-modal[open] .lead-modal__panel { animation: sheet-in 0.3s var(--ease); }
.lead-modal__title { padding-right: 3rem; font-size: 1.6rem; }
.lead-modal__intro { margin-bottom: 0.5rem; color: var(--muted); }
.lead-modal__close {
    position: absolute; top: 0.75rem; right: 0.75rem;
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: 50%; background: rgba(232, 238, 243, 0.08); cursor: pointer;
}
.lead-modal__close:hover { background: rgba(232, 238, 243, 0.16); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 10. Footer -------------------------------------------------------------- */
.site-footer { padding-top: clamp(3rem, 2rem + 4vw, 5rem); background: var(--navy-950); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.site-footer__grid { display: grid; gap: 2.25rem; }
.site-footer__brand { display: grid; gap: 1.25rem; justify-items: start; }
.site-footer__logo .logo { height: 40px; width: auto; }
.site-footer__brand .lang-switcher { margin-left: -0.5rem; }
.site-footer__title { margin-bottom: 0.75rem; color: var(--text); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.site-footer__list { display: grid; gap: 0.5rem; }
.site-footer__text + .site-footer__text { margin-top: 0.75rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer__list + .site-footer__title { margin-top: 1.75rem; }
.site-footer__bottom { margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid var(--line); font-size: 0.85rem; }

/* 11. Mobile bar ---------------------------------------------------------- */
.mobile-bar {
    position: fixed; inset: auto 0 0; z-index: 40;
    display: flex; gap: 1px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--navy-950); border-top: 1px solid var(--line);
}
.mobile-bar__btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: var(--mobile-bar-h); font-weight: 800; text-decoration: none;
}
.mobile-bar__btn--call { background: var(--green); color: var(--on-green); }
.mobile-bar__btn--wa { background: var(--navy-800); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.mobile-bar__btn--wa .icon { fill: var(--green); }

/* 12. 404 ----------------------------------------------------------------- */
.not-found { padding-block: clamp(5rem, 4rem + 8vw, 10rem); }
.not-found__inner { display: grid; gap: 1.25rem; justify-items: start; }
.not-found__inner > * { max-width: 720px; }
.not-found__code { font-size: clamp(5rem, 3rem + 10vw, 10rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.05em; color: var(--navy-600); }
.not-found__title { font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem); }
.not-found__text { color: var(--muted); font-size: 1.125rem; margin-bottom: 0.75rem; }

/* 12b. Inner pages -------------------------------------------------------- */
.page-head { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.page-head__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; justify-items: start; }
.page-head__title { max-width: 22ch; font-size: clamp(2.125rem, 1.5rem + 3vw, 3.75rem); letter-spacing: -0.03em; }
.page-head__intro { max-width: 60ch; color: var(--muted); font-size: 1.0625rem; }
.page-head__meta { color: var(--muted); font-size: 1.0625rem; font-weight: 600; }
.page-head__back {
    display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px;
    color: var(--muted); font-size: 0.925rem; font-weight: 700; text-decoration: none;
}
.page-head__back:hover { color: var(--text); }
.section--tight { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) var(--section-y); }

/* Service filter: horizontally scrollable pills on phones, wrapping from 768px. */
.filter { width: 100%; margin-top: 0.75rem; }
.filter__list {
    display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter);
    -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.filter__list::-webkit-scrollbar { display: none; }
.filter__list li { flex: none; scroll-snap-align: start; }
.pill {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1.1rem;
    border: 1px solid var(--line-strong); border-radius: 999px;
    color: var(--muted); font-size: 0.95rem; font-weight: 700; text-decoration: none; white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.pill:hover { border-color: var(--text); color: var(--text); }
.pill[aria-current="page"] { border-color: var(--text); background: var(--text); color: var(--navy); }
.projects__reset { margin-top: 1.25rem; }

.prose { display: grid; gap: 1.1rem; max-width: 68ch; color: #c9d4dd; font-size: 1.0625rem; line-height: 1.7; }
.page__body { padding-bottom: var(--section-y); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; grid-auto-flow: dense; }
.gallery__item { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: var(--navy-800); aspect-ratio: 1; }
.gallery__item--wide { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
/* Phones: the first tile is wide, so an even count would leave the last tile alone on its row. */
.gallery__item:last-child:nth-child(even) { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
/* Media are taken out of the flow so the tile size comes from the grid alone (a portrait photo cannot stretch a row). */
.gallery__link { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.gallery__item video { position: absolute; inset: 0; }
.gallery__link img,
.gallery__item video { width: 100%; height: 100%; object-fit: cover; }
.gallery__link img { transition: transform 0.6s var(--ease), opacity 0.2s; }
.gallery__link:hover img { transform: scale(1.03); }
.gallery__link:focus-visible { outline-offset: -3px; }
.gallery__item--video { background: #000; }
.gallery__item--video video { object-fit: contain; }

/* Full-screen viewer */
html.is-locked { overflow: hidden; }
.lightbox {
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; overflow: hidden;
    background: rgba(3, 9, 15, 0.97); color: var(--text);
}
.lightbox::backdrop { background: rgba(3, 9, 15, 0.97); }
.lightbox[open] { animation: fade-in 0.2s var(--ease); }
.lightbox__stage {
    display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; width: 100%; height: 100%; margin: 0;
    padding: calc(56px + env(safe-area-inset-top)) 0 calc(56px + env(safe-area-inset-bottom));
    touch-action: pan-y pinch-zoom; will-change: transform;
}
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox__count {
    position: absolute; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
    color: var(--muted); font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.lightbox__btn {
    position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
    border: 0; border-radius: 50%; background: rgba(232, 238, 243, 0.1); color: var(--text); cursor: pointer;
    transition: background-color 0.15s;
}
.lightbox__btn:hover { background: rgba(232, 238, 243, 0.2); }
.lightbox__btn .icon { width: 24px; height: 24px; }
.lightbox__btn--close { top: calc(0.5rem + env(safe-area-inset-top)); right: 0.5rem; }
.lightbox__btn--prev,
.lightbox__btn--next { bottom: calc(0.25rem + env(safe-area-inset-bottom)); }
.lightbox__btn--prev { left: 0.5rem; }
.lightbox__btn--next { right: 0.5rem; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Closing call to action */
.cta__inner {
    display: grid; gap: 1.5rem; justify-items: start;
    padding: clamp(1.5rem, 1rem + 3vw, 3rem);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: radial-gradient(90% 120% at 0% 0%, rgba(36, 72, 106, 0.55), transparent 60%), var(--navy-800);
}
.cta__text { display: grid; gap: 0.6rem; }
.cta__title { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.4rem); }
.cta__intro { max-width: 56ch; color: var(--muted); font-size: 1.0625rem; }
.project + .cta,
.projects + .cta { border-top: 0; padding-top: 0; }

/* 13. Breakpoints --------------------------------------------------------- */
@media (min-width: 480px) {
    .hero__actions .btn { flex: 0 0 auto; }
}

@media (min-width: 768px) {
    :root { --gutter: 32px; --header-h: 76px; }
    body:has(> .mobile-bar) { padding-bottom: 0; }
    .mobile-bar { display: none; }

    .site-header__inner { flex-wrap: nowrap; gap: 1.5rem; }
    .site-header__logo .logo { height: 40px; }
    .js .burger { display: none; }
    .site-nav,
    .js .site-nav {
        position: static; display: flex; flex-direction: row; align-items: center; gap: 1rem;
        width: auto; padding: 0; background: none; overflow: visible;
        visibility: visible; opacity: 1; transform: none; transition: none;
    }
    .site-nav__list,
    .js .site-nav__list { flex-direction: row; flex-wrap: nowrap; gap: 1.25rem; }
    .site-nav__list a,
    .js .site-nav__list a { padding: 0.5rem 0; border: 0; color: var(--muted); font-size: 0.95rem; font-weight: 600; white-space: nowrap; }
    .site-nav__list a:hover,
    .js .site-nav__list a:hover { color: var(--text); }
    .site-header__cta { display: inline-flex; min-height: 44px; padding: 0.6rem; }
    .site-header__cta span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

    .hero { min-height: min(calc(100svh - var(--header-h)), 860px); align-items: center; padding: 8rem 0 6rem; }
    .hero--media::before {
        background:
            linear-gradient(90deg, rgba(11, 30, 45, 0.94) 0%, rgba(11, 30, 45, 0.7) 40%, rgba(11, 30, 45, 0.12) 100%),
            linear-gradient(0deg, rgba(11, 30, 45, 0.6), transparent 35%);
    }
    .hero__inner { gap: 1.5rem; }

    .stats { padding-block: 3rem; }
    .stats__list { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

    .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
    .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
    /* Odd number of tiles: the first one spans the full width so the rows stay complete. */
    .projects__grid > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
    .projects__grid > :first-child:nth-last-child(odd) .project-tile__link { aspect-ratio: 16 / 9; }

    .about__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 5rem); }
    .about--media .about__media img { aspect-ratio: 4 / 5; max-height: 640px; }
    .about:not(.about--media) .about__inner { grid-template-columns: minmax(0, 760px); }

    .testimonials__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }

    .contact__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); }

    .lead-modal { width: min(100% - 2 * var(--gutter), 540px); margin: auto; }
    .lead-modal__panel { padding: 2.25rem; border-radius: var(--radius-lg); }

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

    .filter__list { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
    /* Project list: a plain uniform grid (no mosaic spanning). */
    .projects__grid--list > :first-child:nth-last-child(odd) { grid-column: auto; }
    .projects__grid--list > :first-child:nth-last-child(odd) .project-tile__link { aspect-ratio: 4 / 3; }
    .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
    .gallery__item,
    .gallery__item:last-child:nth-child(even) { grid-column: auto; border-radius: var(--radius); aspect-ratio: 4 / 3; }
    .gallery__item--wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
    /* One or two items: the wide tile's spanned rows would have no height, so stack full-width 16:9 tiles. */
    .gallery__item:only-child,
    .gallery__item:first-child:nth-last-child(2),
    .gallery__item:first-child:nth-last-child(2) + .gallery__item { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
    .lightbox__stage { padding: 72px 88px; }
    .lightbox__btn--prev,
    .lightbox__btn--next { top: 50%; bottom: auto; transform: translateY(-50%); width: 56px; height: 56px; }
    .lightbox__btn--prev { left: 1rem; }
    .lightbox__btn--next { right: 1rem; }
    .lightbox__btn--close { top: 1rem; right: 1rem; }
    .cta__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

@media (min-width: 1100px) {
    .site-header__inner { gap: 2rem; }
    .site-nav__list,
    .js .site-nav__list { gap: 2rem; }
    .site-nav,
    .js .site-nav { gap: 1.5rem; }
    .site-header__cta { padding: 0.6rem 1.25rem; }
    .site-header__cta span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }

    .services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .services__grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* Mosaic per tile count (class projects__grid--N, 'many' for 6+): a large first tile next to smaller ones. */
    .projects__grid { grid-auto-rows: minmax(220px, auto); }
    .projects__grid > * .project-tile__link { aspect-ratio: auto; }
    .projects__grid > :first-child .project-tile__title { font-size: 1.5rem; }
    .projects__grid > :first-child:nth-last-child(odd) { grid-column: auto; }
    .projects__grid--1 { grid-template-columns: 1fr; }
    .projects__grid--1 > :first-child .project-tile__link { aspect-ratio: 21 / 9; }
    .projects__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .projects__grid--2 > * .project-tile__link { aspect-ratio: 4 / 3; }
    .projects__grid--3,
    .projects__grid--4 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .projects__grid--3 > :first-child { grid-row: span 2; }
    .projects__grid--4 > :first-child { grid-row: span 3; }
    .projects__grid--5 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: minmax(260px, auto); }
    .projects__grid--5 > :first-child { grid-row: span 2; }
    .projects__grid--many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .projects__grid--many > * .project-tile__link { aspect-ratio: 4 / 3; }
    .projects__grid--many > :first-child .project-tile__title { font-size: 1.15rem; }

    .testimonials__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .projects__grid--list { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; }
    .projects__grid--list > * .project-tile__link { aspect-ratio: 4 / 3; }
    .projects__grid--list > :first-child .project-tile__title { font-size: 1.15rem; }

    .site-footer__grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
}

/* 14. Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html.smooth-scroll { scroll-behavior: auto; }
    *,
    *::before,
    *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .hero__video { display: none; }
}
