/* ==========================================================================
   Vision Facility Management — main stylesheet (RTL first, no frameworks)
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
    --navy: #024684;
    --navy-900: #01335f;
    --cyan: #00b8ec;
    --cyan-600: #009ccb;
    --sky: #e8f2f9;
    --green: #3fa03a;
    --green-700: #328a2e;
    --ink: #0b2540;
    --muted: #4f6275;
    --line: #a9bccd;
    --dark: #072340;
    --dark-900: #020d19;
    --danger: #c62828;
    --white: #fff;

    --header-h: 80px;
    --container: 1340px;
    --gutter: clamp(1rem, 4vw, 2rem);
    --radius: 4px;
    --shadow: 0 18px 40px -18px rgba(2, 35, 70, .45);
    --ease: cubic-bezier(.2, .7, .2, 1);

    --fs-body: 1rem;
    --fs-lead: clamp(1.05rem, 1.2vw + .7rem, 1.4rem);
    --fs-h1: clamp(2.6rem, 5.6vw, 5.4rem);
    --fs-h2: clamp(2.1rem, 4.2vw, 3.9rem);
    --fs-h2-sm: clamp(1.7rem, 2.8vw, 2.6rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
    font-family: "Thmanyah Sans", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: var(--fs-body);
    line-height: 1.7;
    color: var(--ink);
    background: var(--white);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
img, picture { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { overflow-wrap: break-word; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; 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; inset-inline-start: 1rem; top: -100px; z-index: 100;
    background: var(--navy); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 46px; padding: .5rem 1.75rem;
    font-weight: 500; font-size: 1.05rem; line-height: 1.2;
    border: 1.5px solid transparent; border-radius: 0; cursor: pointer;
    transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--cyan { background: var(--cyan); color: var(--white); }
.btn--cyan:hover { background: var(--white); color: var(--navy); }
.btn--outline-light { border-color: rgba(255, 255, 255, .85); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--navy); }
.btn--navy { background: var(--navy); color: var(--white); min-height: 40px; padding-inline: 1.1rem; }
.btn--navy:hover { background: var(--cyan); }
.btn--green { background: var(--green); color: var(--white); border-radius: 999px; min-height: 44px; padding-inline: 2.25rem; }
.btn--green:hover { background: var(--green-700); }

/* ---------- Typography helpers ---------- */
.tag {
    display: inline-block; padding: .2rem .85rem; margin-bottom: 1rem;
    background: var(--sky); color: var(--navy);
    font-size: 1.05rem; font-weight: 500; line-height: 1.8;
}
.tag--center { display: table; margin-inline: auto; }
.eyebrow { color: var(--cyan); font-weight: 500; text-align: center; margin-bottom: .75rem; }
.section-title { font-size: var(--fs-h2); font-weight: 700; line-height: 1.3; color: var(--navy); margin-bottom: 1.25rem; }
.section-title--sm { font-size: var(--fs-h2-sm); }
.section-title--cyan { color: var(--cyan); }
.section-title--light { color: var(--white); }
.section-title--center { text-align: center; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 1px 0 rgba(2, 70, 132, .08), 0 6px 24px -18px rgba(2, 35, 70, .5);
}
@supports (backdrop-filter: blur(8px)) {
    .site-header { background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(10px); }
}
.site-header__inner { position: relative; display: flex; align-items: center; gap: 2rem; height: var(--header-h); }
.site-header__brand img { width: 168px; height: auto; }

.site-nav { display: flex; align-items: center; flex: 1; gap: 1.5rem; height: 100%; }
.site-nav__list { display: flex; align-items: stretch; height: 100%; }
.site-nav__link {
    position: relative; display: flex; align-items: center; height: 100%;
    padding-inline: 1rem; font-size: 1.1rem; font-weight: 500; color: var(--navy);
    transition: color .2s var(--ease), background-color .2s var(--ease);
}
.site-nav__link::after {
    content: ""; position: absolute; inset-inline: 1rem; bottom: 18px; height: 2px;
    background: var(--cyan); transform: scaleX(0); transition: transform .25s var(--ease);
}
.site-nav__link:hover { color: var(--cyan); }
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { background: var(--navy); color: var(--white); }
.site-nav__link[aria-current="page"]::after { display: none; }
.site-nav__cta { margin-inline-start: auto; }

/* Mobile toggle (CSS only: the menu opens via #site-nav:target and closes when any other anchor is followed) */
.nav-toggle { display: none; }

@media (max-width: 1080px) {
    .site-header__brand img { width: 140px; }
    .site-nav__link { padding-inline: .7rem; font-size: 1rem; }
}

@media (max-width: 920px) {
    :root { --header-h: 68px; }
    .nav-toggle {
        position: absolute; inset-inline-end: var(--gutter); top: 50%; transform: translateY(-50%);
        width: 46px; height: 46px; place-items: center; background: var(--sky);
    }
    .nav-toggle--open { display: grid; }
    .site-header__inner:has(.site-nav:target) .nav-toggle--open { display: none; }
    .site-header__inner:has(.site-nav:target) .nav-toggle--close { display: grid; }
    .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
        display: block; width: 22px; height: 2px; background: var(--navy);
    }
    .nav-toggle__bar { position: relative; }
    .nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; inset-inline-start: 0; }
    .nav-toggle__bar::before { top: -7px; }
    .nav-toggle__bar::after { top: 7px; }
    .nav-toggle--close .nav-toggle__bar { background: transparent; }
    .nav-toggle--close .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
    .nav-toggle--close .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

    .site-nav {
        position: absolute; top: 100%; inset-inline: 0; height: auto;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: .5rem var(--gutter) 1.25rem; background: var(--white);
        box-shadow: 0 20px 30px -20px rgba(2, 35, 70, .45);
        visibility: hidden; opacity: 0; transform: translateY(-8px);
        transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
    }
    .site-nav:target { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
    .site-nav__list { flex-direction: column; height: auto; }
    .site-nav__link { height: auto; padding: .85rem 1rem; border-bottom: 1px solid var(--sky); }
    .site-nav__link::after { display: none; }
    .site-nav__cta { margin: 1rem 0 0; min-height: 48px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: clamp(560px, calc(100svh - var(--header-h)), 900px);
    display: flex; color: var(--white); background: var(--navy);
}
.hero__media, .hero__media picture, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media { z-index: -1; }
.hero__media img { object-fit: cover; object-position: 70% center; }
.hero__media::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(to left, rgba(2, 60, 118, .2) 0%, rgba(2, 62, 122, .78) 45%, rgba(2, 58, 115, .94) 100%),
        linear-gradient(to top, rgba(2, 40, 85, .55), transparent 40%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 96px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 96px);
}
.hero__inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
    padding-block: clamp(3rem, 8vh, 5.5rem) clamp(6rem, 13vh, 8.5rem);
}
.hero__content { grid-column: 2; align-self: center; }
.hero__eyebrow {
    display: inline-block; color: var(--cyan); font-size: clamp(1rem, 1.5vw, 1.55rem);
    font-weight: 500; letter-spacing: .02em; padding-bottom: .55rem; margin-bottom: clamp(1.5rem, 4vh, 3rem);
    background: linear-gradient(var(--cyan), var(--cyan)) no-repeat left bottom / 45% 3px;
}
.hero__title { font-size: var(--fs-h1); font-weight: 700; line-height: 1.3; margin-bottom: 1.5rem; }
.hero__lead { font-size: var(--fs-lead); line-height: 1.75; color: rgba(255, 255, 255, .92); margin-bottom: clamp(2rem, 6vh, 4rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.hero__actions .btn { min-width: 170px; }

.hero__badge { grid-column: 1; grid-row: 1; align-self: end; justify-self: start; text-align: start; max-width: 360px; }
.hero__badge-en { font-size: 1.05rem; letter-spacing: .04em; text-align: right; }
.hero__badge-ar { font-size: 1.1rem; color: rgba(255, 255, 255, .9); padding-bottom: .75rem; position: relative; }
.hero__badge-ar::after {
    content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
    background: linear-gradient(to left, rgba(255, 255, 255, .9), rgba(255, 255, 255, .3));
}
.hero__badge-ar::before {
    content: ""; position: absolute; inset-inline-end: -4px; bottom: -3px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--cyan);
}

/* ---------- Capabilities strip ---------- */
.capabilities { position: relative; z-index: 2; margin-top: calc(clamp(4rem, 9vh, 5.5rem) * -1); }
.capabilities__list { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(.6rem, 1.2vw, 1.1rem); }
.capability-card {
    display: flex; flex-direction: column; min-height: 170px; padding: 1.1rem 1.25rem 1.2rem;
    background: var(--cyan); color: var(--white);
    border-bottom: 5px solid var(--navy); border-radius: 14px 14px 0 0;
    box-shadow: var(--shadow);
    transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.capability-card:hover { transform: translateY(-6px); background: var(--navy); border-bottom-color: var(--cyan); }
.capability-card__num { font-size: 1.35rem; font-weight: 700; line-height: 1; margin-bottom: auto; padding-bottom: 1.5rem; }
.capability-card__title { font-size: 1.2rem; font-weight: 700; line-height: 1.4; }
.capability-card__text { font-size: .95rem; opacity: .92; }

/* ==========================================================================
   About
   ========================================================================== */
.about { position: relative; padding-block: clamp(4rem, 9vw, 7rem); overflow: hidden; }
.about__media { position: absolute; inset-block: clamp(2rem, 4vw, 3rem) 0; inset-inline-end: 0; width: 46%; }
.about__media picture, .about__media img { width: 100%; height: 100%; }
.about__media img { object-fit: cover; clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%); }
.about__inner { position: relative; }
.about__content { width: 52%; padding-inline-end: 2rem; }
.about__logo { width: 128px; height: auto; margin-inline-start: auto; margin-inline-end: 22%; margin-bottom: 2rem; }
.about__text { font-size: var(--fs-lead); color: var(--ink); max-width: 46ch; margin-bottom: 2.5rem; line-height: 1.85; }

/* ==========================================================================
   Services
   ========================================================================== */
.services {
    display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.5rem);
    padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem);
}
.services__media { position: relative; min-height: 520px; }
.services__media picture, .services__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.services__media img { object-fit: cover; }
.services__content { padding-inline-start: 0; }
.services__content > .tag, .services__content > .section-title { margin-inline-start: 0; }
.services__list { display: grid; gap: .9rem; margin-top: 1.5rem; }
.service-item {
    padding: 1.15rem 1.5rem; background: var(--sky);
    border-inline-start: 4px solid transparent;
    transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease);
}
.service-item:hover { border-inline-start-color: var(--cyan); background: #dcebf6; }
.service-item__title { font-size: 1.3rem; font-weight: 500; color: var(--navy); line-height: 1.5; }
.service-item__num { font-size: .95rem; font-weight: 700; margin-inline-end: .35rem; }
.service-item__text { color: var(--muted); font-size: 1rem; }

/* ==========================================================================
   Dark grid sections (methodology, contact)
   ========================================================================== */
.dark-grid {
    position: relative; isolation: isolate; color: var(--white);
    background: linear-gradient(135deg, #0b2f55 0%, var(--dark) 40%, var(--dark-900) 100%);
}
.dark-grid::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 150px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 150px);
}

/* ---------- Methodology ---------- */
.methodology { padding-block: clamp(4rem, 8vw, 6.5rem) clamp(3rem, 5vw, 4rem); text-align: center; }
.methodology__intro { max-width: 62ch; margin: 0 auto clamp(2.5rem, 5vw, 4rem); color: rgba(255, 255, 255, .72); font-size: 1.05rem; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1000px; margin-inline: auto; }
.step { position: relative; padding-inline: .75rem; }
.step:not(:last-child)::before {
    content: ""; position: absolute; top: 40px; inset-inline-start: 50%; width: 100%; height: 2px;
    background: var(--cyan); z-index: 0;
}
.step__num {
    position: relative; z-index: 1; display: grid; place-items: center;
    width: 80px; height: 80px; margin: 0 auto 1.25rem; border-radius: 50%;
    border: 2px solid var(--cyan); background: #0c2d50;
    font-size: 1.3rem; font-weight: 700;
    transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.step:hover .step__num, .step:first-child .step__num { background: var(--cyan); box-shadow: 0 0 0 8px rgba(0, 184, 236, .15); }
.step__title { font-size: 1.5rem; font-weight: 500; margin-bottom: .25rem; }
.step__text { font-size: .95rem; color: rgba(255, 255, 255, .75); }
.methodology__note {
    max-width: 820px; margin: clamp(3rem, 6vw, 4.5rem) auto 0; padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .7); font-size: var(--fs-lead);
}
.methodology__logo { width: 104px; height: auto; margin: 3rem auto 0; opacity: .95; }

/* ==========================================================================
   Works
   ========================================================================== */
.works { padding-block: clamp(4rem, 8vw, 6.5rem); }
.works .tag { font-size: 1.25rem; font-weight: 700; padding: .35rem 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.works__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.work-card { position: relative; overflow: hidden; aspect-ratio: 1.95 / 1; background: var(--navy); }
.work-card--featured { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
.work-card picture, .work-card img { width: 100%; height: 100%; }
.work-card img { object-fit: cover; transition: transform .7s var(--ease); }
.work-card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, rgba(2, 70, 132, .85) 0%, rgba(2, 70, 132, .25) 45%, rgba(2, 70, 132, .05) 100%);
}
.work-card:hover img { transform: scale(1.05); }
.work-card__caption {
    position: absolute; z-index: 1; inset-inline-start: clamp(1rem, 2vw, 1.5rem); bottom: clamp(.9rem, 2vw, 1.4rem);
    font-size: 1.05rem; font-weight: 500; color: var(--white); padding-bottom: .3rem;
    border-bottom: 3px solid var(--cyan);
}
.work-card--featured .work-card__caption { font-size: clamp(1.4rem, 2.6vw, 2.2rem); }

/* ==========================================================================
   Why Vision
   ========================================================================== */
.why {
    position: relative; isolation: isolate; overflow: hidden; color: var(--white);
    min-height: clamp(560px, 62vw, 780px); display: flex; align-items: flex-end;
    border-bottom: 6px solid var(--navy);
}
.why__media, .why__media picture, .why__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.why__media { z-index: -1; }
.why__media img { object-fit: cover; }
.why__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(2, 70, 132, .05) 0%, rgba(2, 70, 132, .35) 40%, rgba(2, 62, 122, .85) 70%, #024684 100%);
}
.why__inner { padding-block: 4rem clamp(3rem, 6vw, 4.5rem); }
.why__title { font-size: clamp(2.6rem, 5vw, 4.2rem); font-weight: 700; color: var(--cyan); line-height: 1.2; margin-bottom: .75rem; }
.why__lead { font-size: var(--fs-lead); margin-bottom: clamp(2rem, 4vw, 3.25rem); text-shadow: 0 1px 12px rgba(2, 30, 60, .5); }
.why__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.feature { border-inline-start: 1.5px solid rgba(255, 255, 255, .8); padding-inline-start: 1rem; padding-block: .15rem; }
.feature__title { font-size: clamp(1.25rem, 1.6vw, 1.55rem); font-weight: 500; margin-bottom: .35rem; }
.feature__text { font-size: 1rem; color: rgba(255, 255, 255, .88); max-width: 24ch; }

/* ==========================================================================
   Sectors
   ========================================================================== */
.sectors { padding-block: clamp(4rem, 8vw, 6.5rem); }
.sectors .section-title { margin-bottom: clamp(2rem, 4vw, 3rem); }
.sectors__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.sector { border-inline-start: 1.5px solid var(--navy); padding-inline-start: 1rem; padding-block: .25rem 1.5rem; }
.sector__title { font-size: clamp(1.25rem, 1.7vw, 1.6rem); font-weight: 700; color: var(--navy); line-height: 1.4; }
.sector__num { font-weight: 900; }
.sector__text { color: var(--muted); }
.sectors__banner {
    margin-top: clamp(2rem, 4vw, 3rem); padding: 1.6rem 1.5rem; text-align: center;
    background: var(--sky); color: var(--navy); font-size: clamp(1.15rem, 1.6vw, 1.5rem); font-weight: 500;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding-block: clamp(4rem, 8vw, 6.5rem); }
.contact__inner { display: grid; grid-template-columns: 1fr minmax(320px, 470px); gap: clamp(2rem, 6vw, 7rem); align-items: center; }
.contact__logo { width: 120px; height: auto; margin-bottom: 2.5rem; }
.contact__title { font-size: var(--fs-h2); font-weight: 700; color: var(--cyan); line-height: 1.3; margin-bottom: 1.5rem; }
.contact__lead { font-size: var(--fs-lead); line-height: 1.6; margin-bottom: 2.5rem; }
.contact__details { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 1.75rem 3.5rem; text-align: left; }
.contact__details-wide { grid-column: 1 / -1; }
.contact__details dt { font-size: .95rem; color: rgba(255, 255, 255, .85); }
.contact__details dd { font-size: clamp(1.3rem, 1.8vw, 1.65rem); font-weight: 500; color: var(--cyan); }
.contact__details a { transition: color .2s var(--ease); }
.contact__details a:hover { color: var(--white); }

.quote-card { background: var(--white); color: var(--ink); padding: clamp(1.25rem, 2.5vw, 2rem); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.quote-card__eyebrow { color: var(--navy); font-size: 1.15rem; margin-bottom: 1.25rem; }
.quote-card__title { color: var(--navy); font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 700; line-height: 1.3; margin-bottom: 1.25rem; }

.quote-form { background: var(--sky); padding: clamp(1.25rem, 2.5vw, 1.75rem); display: grid; gap: 1.1rem; }
.field { display: grid; gap: .1rem; }
.field label { font-size: .95rem; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%; min-height: 42px; padding: .4rem .1rem;
    font-size: 1rem; background: transparent;
    border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0;
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.field select {
    appearance: none; cursor: pointer; padding-inline-end: 1.75rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23024684' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat left .25rem center;
}
.field input::placeholder, .field textarea::placeholder { color: #8ea2b4; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--cyan); background-color: rgba(255, 255, 255, .55); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { box-shadow: 0 2px 0 0 var(--cyan); }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-bottom-color: var(--danger); }
.field__error { color: var(--danger); font-size: .875rem; margin-top: .2rem; }
.quote-form .btn { justify-self: center; margin-top: .5rem; }

.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.alert { padding: .75rem 1rem; margin-bottom: 1rem; font-size: .95rem; border-inline-start: 4px solid; }
.alert--success { background: #eaf6e9; color: #22631f; border-color: var(--green); }
.alert--error { background: #fdecec; color: #8e1c1c; border-color: var(--danger); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--white); color: var(--navy); padding-top: clamp(2.5rem, 5vw, 3.5rem); border-bottom: 16px solid var(--navy); }
.site-footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; padding-bottom: 2rem; }
.site-footer__brand img { width: clamp(200px, 26vw, 290px); height: auto; margin-bottom: 1.5rem; }
.site-footer__tagline { font-size: clamp(1.2rem, 1.8vw, 1.6rem); font-weight: 500; line-height: 1.6; }
.site-footer__nav { display: grid; gap: .35rem; margin-inline-end: clamp(0rem, 12vw, 12rem); }
.site-footer__nav a { display: inline-flex; align-items: center; gap: .6rem; font-weight: 500; padding-block: .15rem; transition: color .2s var(--ease); }
.site-footer__nav a::before { content: ""; width: 3px; height: 1em; background: var(--cyan); }
.site-footer__nav a:hover { color: var(--cyan); }
.site-footer__bottom { border-top: 1px solid var(--navy); padding-block: 1.25rem 1.5rem; text-align: center; font-weight: 500; font-size: .95rem; }
.site-footer__en { letter-spacing: .03em; margin-top: .25rem; }

/* ---------- Error pages ---------- */
.error-page { min-height: calc(100svh - var(--header-h)); display: grid; place-items: center; text-align: center; padding-block: 4rem; }
.error-page__code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 900; color: var(--cyan); line-height: 1; }
.error-page__title { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 500; margin: 1rem 0 2rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .capabilities__list { grid-template-columns: repeat(3, 1fr); }
    .capability-card { min-height: 150px; }
    .why__list, .sectors__list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__content { grid-column: 1; }
    .hero__badge { grid-row: auto; justify-self: stretch; max-width: 420px; }
    .hero__media::after {
        background:
            linear-gradient(to top, rgba(2, 50, 100, .95) 0%, rgba(2, 62, 122, .78) 55%, rgba(2, 62, 122, .55) 100%),
            repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 96px);
    }

    .about { padding-top: 0; }
    .about__media { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 2.5rem; }
    .about__media img { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
    .about__content { width: 100%; padding: 0; }
    .about__logo { margin-inline: 0; }

    .services { grid-template-columns: 1fr; }
    .services__media { min-height: 0; aspect-ratio: 4 / 3; }
    .services__content { padding-inline: var(--gutter); }

    .contact__inner { grid-template-columns: 1fr; }
    .quote-card { max-width: 560px; width: 100%; }
}

@media (max-width: 700px) {
    .steps { grid-template-columns: 1fr; gap: 1.75rem; max-width: 360px; text-align: start; }
    .step { display: grid; grid-template-columns: 64px 1fr; column-gap: 1rem; align-items: center; padding: 0; }
    .step__num { width: 64px; height: 64px; margin: 0; grid-row: span 2; font-size: 1.1rem; }
    .step__title { align-self: end; margin: 0; font-size: 1.3rem; }
    .step__text { align-self: start; }
    .step:not(:last-child)::before { top: 64px; inset-inline-start: 31px; width: 2px; height: calc(100% - 64px + 1.75rem); }

    .works__grid { grid-template-columns: 1fr 1fr; }
    .work-card--featured { aspect-ratio: 4 / 3; }
    .work-card:last-child { grid-column: 1 / -1; }

    .site-footer__top { flex-direction: column; }
    .site-footer__nav { margin: 0; grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 2.5rem; }
}

@media (max-width: 560px) {
    .capabilities__list { grid-template-columns: 1fr 1fr; }
    .capability-card:last-child { grid-column: 1 / -1; }
    .capability-card { min-height: 130px; padding: 1rem; }
    .capability-card__title { font-size: 1.05rem; }
    .hero__actions .btn { flex: 1 1 140px; min-width: 0; }
    .why__list, .sectors__list { grid-template-columns: 1fr; gap: 1.5rem; }
    .contact__details { grid-template-columns: 1fr; gap: 1.25rem; justify-content: stretch; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
    .site-header, .quote-card { display: none; }
    .hero, .dark-grid, .why { color: var(--ink); background: none; }
}
