/* ==========================================================================
   نافذة صقل — Design System
   Palette derived from the logo mark: three stacked insulation layers
   (deep navy / steel blue / gray). No colour outside these tokens.
   ========================================================================== */

:root {
    /* Brand — navy (logo top layer) */
    --navy-900: #0A1622;
    --navy-800: #0F2334;
    --navy-700: #12283A;
    --navy-600: #1B3A52;

    /* Brand — steel blue (logo middle layer) */
    --steel-600: #27527F;
    --steel-500: #31629B;
    --steel-400: #4A7FBE;
    --steel-300: #7FA8D6;
    --steel-100: #E4EDF7;

    /* Brand — gray (logo bottom layer) */
    --gray-600: #5F646B;
    --gray-500: #70747A;
    --gray-400: #9AA0A7;
    --gray-300: #C7CCD2;
    --gray-200: #E2E6EA;

    /* Surfaces */
    --surface: #FFFFFF;
    --surface-alt: #F4F7FA;

    /* Text */
    --ink: #0F2334;
    --ink-soft: #4B5560;
    --ink-invert: #FFFFFF;
    --ink-invert-soft: #C3CDD8;

    /* Platform */
    --wa-green: #25D366;
    --wa-green-dark: #1EA855;

    /* Type */
    --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Radii */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-pill: 999px;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(15, 35, 52, .06), 0 2px 8px rgba(15, 35, 52, .05);
    --shadow-md: 0 4px 12px rgba(15, 35, 52, .07), 0 12px 32px rgba(15, 35, 52, .07);
    --shadow-lg: 0 18px 48px rgba(15, 35, 52, .16);

    /* Motion */
    --ease: cubic-bezier(.4, 0, .2, 1);
    --dur: .22s;

    /* Layout */
    --header-h: 76px;
    --gutter: 20px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    color-scheme: light;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink);
    background: var(--surface);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    line-height: 1.3;
    font-weight: 800;
    color: var(--ink);
    text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.9vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2.4rem); letter-spacing: -.015em; }
h3 { font-size: 1.15rem; }

p { text-wrap: pretty; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

img { height: auto; }

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button { cursor: pointer; background: none; border: 0; }

/* Kill the 300ms tap delay and pick the tap flash deliberately rather than
   inheriting the platform's grey box. */
a,
button,
[role="button"],
label,
input,
select,
textarea {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(49, 98, 155, .18);
}

ul, ol { list-style: none; }

/* Visually hidden but available to assistive tech */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    inset-block-start: -100px;
    inset-inline-start: var(--gutter);
    z-index: 200;
    padding: 12px 22px;
    background: var(--steel-500);
    color: #fff;
    font-weight: 600;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    transition: inset-block-start var(--dur) var(--ease);
}

.skip-link:focus-visible { inset-block-start: 0; }

/* One consistent focus ring everywhere */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--steel-400);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container-narrow { max-width: 820px; }

.section { padding-block: clamp(44px, 5vw, 76px); }

.section-alt { background: var(--surface-alt); }

.section-dark {
    background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
    color: var(--ink-invert);
}

.section-dark h2,
.section-dark h3 { color: var(--ink-invert); }

.section-dark p { color: var(--ink-invert-soft); }

.section-head {
    max-width: 760px;
    margin-inline: auto;
    margin-block-end: clamp(22px, 2.4vw, 34px);
    text-align: center;
}

.section-head h2 { margin-block: 8px 10px; }

.section-lede {
    color: var(--ink-soft);
    font-size: 1.03rem;
}

.section-dark .section-lede { color: var(--ink-invert-soft); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 8px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--steel-500);
    letter-spacing: .01em;
}

.section-dark .eyebrow { color: var(--steel-300); }

.eyebrow-line::before,
.eyebrow-line::after {
    content: "";
    width: 26px;
    height: 2px;
    background: currentColor;
    opacity: .45;
    border-radius: 2px;
}

.eyebrow-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.grid {
    display: grid;
    gap: clamp(16px, 2vw, 24px);
}

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

@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .grid-3,
    .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Text first, icon after it (icon sits on the left in RTL). */
    flex-direction: row-reverse;
    gap: 9px;
    min-height: 46px;
    padding: 11px 22px;
    border-radius: var(--r-sm);
    font-weight: 700;
    font-size: .97rem;
    line-height: 1.2;
    border: 1.5px solid transparent;
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
                color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.02rem; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: .9rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--steel-500);
    color: #fff;
    box-shadow: 0 6px 18px rgba(49, 98, 155, .28);
}

.btn-primary:hover {
    background: var(--steel-600);
    box-shadow: 0 10px 26px rgba(49, 98, 155, .34);
}

.btn-outline {
    border-color: var(--gray-300);
    color: var(--navy-700);
    background: var(--surface);
}

.btn-outline:hover {
    border-color: var(--steel-500);
    color: var(--steel-600);
    background: var(--steel-100);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .6);
}

.btn-whatsapp {
    background: var(--wa-green);
    color: #06301A;
    box-shadow: 0 6px 18px rgba(37, 211, 102, .26);
}

.btn-whatsapp:hover { background: var(--wa-green-dark); color: #fff; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Full-width CTAs on phones: bigger target, better conversion. */
@media (max-width: 560px) {
    .btn-row { flex-direction: column; }
    .btn-row > .btn { width: 100%; }
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: var(--r-sm);
    color: inherit;
    transition: background-color var(--dur) var(--ease);
}

.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.icon-btn .icon { width: 1.5rem; height: 1.5rem; }

/* ==========================================================================
   Header
   ========================================================================== */

/* Opaque, and exactly the navy the hero starts with, so at rest the two read as
   one surface with no seam — and hero copy scrolls *under* the header instead
   of showing through it. Turns white on the first scroll. */
.site-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 60;
    background: var(--navy-700);
    color: #fff;
    border-block-end: 1px solid transparent;
    transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.site-header.is-stuck {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border-block-end-color: var(--gray-200);
    box-shadow: 0 6px 24px rgba(15, 35, 52, .1);
    color: var(--ink);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--header-h);
}

/* Both marks share one grid cell, so swapping them cannot shift the layout. */
.brand {
    flex: none;
    display: grid;
    align-items: center;
    min-height: 44px;
}

.brand-logo {
    grid-area: 1 / 1;
    width: 176px;
    height: auto;
    transition: opacity var(--dur) var(--ease);
}

.brand-logo-dark { opacity: 0; }

.site-header.is-stuck .brand-logo-light { opacity: 0; }
.site-header.is-stuck .brand-logo-dark { opacity: 1; }

.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 11px;
    font-size: .91rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .82);
    border-radius: var(--r-sm);
}

.nav-link:hover { color: #fff; }

.nav-link::after {
    content: "";
    position: absolute;
    inset-block-end: 4px;
    inset-inline: 11px;
    height: 2px;
    background: var(--steel-300);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform var(--dur) var(--ease);
}

.nav-link.is-active { color: #fff; font-weight: 800; }
.nav-link.is-active::after { transform: scaleX(1); }

/* Solid header: flip the nav to the dark palette. */
.site-header.is-stuck .nav-link { color: var(--ink-soft); }
.site-header.is-stuck .nav-link:hover,
.site-header.is-stuck .nav-link.is-active { color: var(--navy-700); }
.site-header.is-stuck .nav-link::after { background: var(--steel-500); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle { display: none; color: #fff; }
.menu-toggle:hover { background: rgba(255, 255, 255, .14); }

.site-header.is-stuck .menu-toggle { color: var(--navy-700); }
.site-header.is-stuck .menu-toggle:hover { background: var(--surface-alt); }

@media (max-width: 1080px) {
    .primary-nav { display: none; }
    .menu-toggle { display: inline-flex; }
}

@media (max-width: 560px) {
    :root { --header-h: 66px; }
    .header-actions .btn-primary { display: none; }
    .brand-logo { width: 148px; }
}

/* ==========================================================================
   Mobile drawer
   ========================================================================== */

.drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(10, 22, 34, .6);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}

.drawer-scrim.is-open { opacity: 1; }

.drawer {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    z-index: 100;
    width: min(320px, 86vw);
    padding: 18px;
    padding-block-end: calc(18px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    color: var(--ink);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
}

.drawer.is-open { transform: translateX(0); }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block-end: 16px;
    border-block-end: 1px solid var(--gray-200);
}

.drawer-head img { width: 148px; height: auto; }

.drawer-head .icon-btn { color: var(--gray-500); }
.drawer-head .icon-btn:hover { background: var(--surface-alt); color: var(--navy-700); }

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-block: 14px;
}

.drawer-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-weight: 600;
    color: var(--ink-soft);
}

.drawer-links a:hover {
    background: var(--surface-alt);
    color: var(--navy-700);
}

.drawer-cta {
    display: grid;
    gap: 10px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--gray-200);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    /* Fills the first screen; the fixed header overlays its top. */
    min-height: 100svh;
    padding-block: calc(var(--header-h) + clamp(24px, 4vw, 56px)) clamp(40px, 5vw, 72px);
    /* Holds --navy-700 flat through the strip behind the header so the join is
       invisible, then falls away. The glow starts below the header for the
       same reason. */
    background:
        radial-gradient(760px 420px at 85% 62%, rgba(74, 127, 190, .20), transparent 68%),
        linear-gradient(180deg,
            var(--navy-700) 0%,
            var(--navy-700) 12%,
            var(--navy-800) 46%,
            var(--navy-900) 100%);
    color: #fff;
    overflow: hidden;
}

/* Optional photographic layer. Declared as a background so a missing file
   degrades to the gradient alone instead of a broken image. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/hero.webp");
    background-size: cover;
    background-position: center;
    /* The photo is already dark and cool-toned, so it needs far less knocking
       back than a bright stock shot would; the wash below carries the contrast. */
    opacity: .62;
    pointer-events: none;
}

/* Navy wash: heaviest on the copy side (right in RTL) so text stays readable
   over any photo, and light enough to look intentional with no photo at all. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(275deg, rgba(10, 22, 34, .85) 0%, rgba(15, 35, 52, .45) 55%, rgba(15, 35, 52, 0) 100%);
    pointer-events: none;
}

.hero > .container { position: relative; z-index: 1; }

@supports not (min-height: 100svh) {
    .hero { min-height: 100vh; }
}

/* Single column: the copy holds the right half (RTL start) and the left half
   stays clear for the background photo. */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.hero-copy { max-width: 620px; }

.hero-copy .eyebrow {
    padding: 7px 15px;
    border: 1px solid rgba(127, 168, 214, .35);
    background: rgba(74, 127, 190, .14);
    border-radius: var(--r-pill);
    color: var(--steel-300);
}

.hero-copy h1 {
    margin-block: 20px 18px;
    color: #fff;
}

.hero-copy h1 em {
    display: block;
    /* Arabic descenders sit low; background-clip:text crops the glyph box, so
       give it room rather than letting the gradient cut the tail off. */
    padding-block-end: .18em;
    font-style: normal;
    background: linear-gradient(100deg, var(--steel-300), var(--steel-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lede {
    max-width: 56ch;
    margin-block-end: 30px;
    font-size: 1.06rem;
    color: var(--ink-invert-soft);
}


/* ==========================================================================
   Cards: feature / service / solution / value / step
   ========================================================================== */

.feature {
    padding: 26px 24px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}

.feature:hover {
    border-color: var(--steel-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.feature-icon,
.service-icon,
.solution-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-block-end: 16px;
    border-radius: var(--r-sm);
    background: var(--steel-100);
    color: var(--steel-600);
}

.feature-icon .icon,
.service-icon .icon,
.solution-icon .icon {
    width: 1.6rem;
    height: 1.6rem;
}

.feature h3 { margin-block-end: 8px; }
.feature p { color: var(--ink-soft); font-size: .96rem; }

/* Services */

.service {
    display: flex;
    flex-direction: column;
    padding: 26px 24px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}

.service:hover {
    border-color: var(--steel-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.service h3 { margin-block-end: 8px; }

.service > p {
    color: var(--ink-soft);
    font-size: .94rem;
}

.service-fit {
    margin-block: 14px 20px;
    padding-block-start: 14px;
    border-block-start: 1px dashed var(--gray-300);
    font-size: .87rem;
    color: var(--gray-600);
}

.service-fit span { font-weight: 700; color: var(--navy-700); }

.service .btn { margin-block-start: auto; }

.service-featured {
    background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
    border-color: var(--navy-600);
}

.service-featured h3 { color: #fff; }
.service-featured > p { color: var(--ink-invert-soft); }

.service-featured .service-icon {
    background: rgba(127, 168, 214, .18);
    color: var(--steel-300);
}

.service-featured .service-fit {
    border-block-start-color: rgba(255, 255, 255, .18);
    color: var(--ink-invert-soft);
}

.service-featured .service-fit span { color: var(--steel-300); }

/* Solutions (on dark) */

.solution {
    padding: 26px 24px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--r-md);
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}

.solution:hover {
    background: rgba(255, 255, 255, .09);
    border-color: rgba(127, 168, 214, .45);
    transform: translateY(-3px);
}

.solution-icon {
    background: rgba(127, 168, 214, .16);
    color: var(--steel-300);
}

.solution h3 { margin-block-end: 8px; }
.solution p { font-size: .94rem; }

/* Values */

.value {
    position: relative;
    padding: 26px 24px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    overflow: hidden;
}

.value::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(var(--steel-400), var(--steel-600));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--dur) var(--ease);
}

.value:hover::before { transform: scaleY(1); }

.value-num {
    display: block;
    margin-block-end: 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--steel-300);
    line-height: 1;
}

.value h3 { margin-block-end: 6px; }
.value p { color: var(--ink-soft); font-size: .95rem; }

/* Process steps */

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
    counter-reset: step;
}

.step {
    position: relative;
    padding: 28px 24px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
}

/* Connector line between steps (RTL: flows right to left) */
.step:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-block-start: 50px;
    inset-inline-start: -13px;
    width: 12px;
    height: 2px;
    background: var(--gray-300);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-block-end: 16px;
    border-radius: var(--r-sm);
    background: var(--navy-700);
    color: #fff;
    font-weight: 800;
}

.step h3 { margin-block-end: 8px; }
.step p { color: var(--ink-soft); font-size: .94rem; }

@media (max-width: 1000px) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step::after { display: none; }
}

@media (max-width: 560px) {
    .steps { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Urgency band
   ========================================================================== */

.band {
    background: linear-gradient(120deg, var(--navy-700), var(--steel-600));
    color: #fff;
}

.band-inner {
    display: grid;
    grid-template-columns: 1.4fr auto;
    align-items: center;
    gap: clamp(24px, 4vw, 48px);
}

.band h2 { color: #fff; margin-block-end: 12px; }
.band p { color: rgba(255, 255, 255, .88); max-width: 62ch; }

@media (max-width: 900px) {
    .band-inner { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Projects
   ========================================================================== */

.project {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.project:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* A button, so the gallery is keyboard-operable — reset the UA button look. */
.project-media {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    aspect-ratio: 4 / 3;
    background: var(--navy-700);
    border: 0;
    overflow: hidden;
    cursor: zoom-in;
}

.project-count {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-start: 12px;
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    background: rgba(10, 22, 34, .78);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
    transition: background-color var(--dur) var(--ease);
}

.project-count .icon { width: .95rem; height: .95rem; }

.project-media:hover .project-count { background: var(--steel-500); }

/* Absolutely positioned so a portrait photo cannot stretch the box past its
   4:3 ratio — otherwise one tall image makes its whole card taller than the
   rest of the row. */
.project-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project:hover .project-media img { transform: scale(1.04); }

.project-media img { transition: transform .45s var(--ease); }

.project-tags {
    position: absolute;
    inset-block-start: 12px;
    inset-inline: 12px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: var(--r-pill);
    font-size: .78rem;
    font-weight: 700;
    background: rgba(10, 22, 34, .78);
    color: #fff;
    backdrop-filter: blur(6px);
}

.project-tag-cat { background: var(--steel-500); }

.project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
}

.project-body h3 { margin-block-end: 8px; }

.project-body p {
    margin-block-end: 20px;
    color: var(--ink-soft);
    font-size: .93rem;
}

.project-body .btn { margin-block-start: auto; }

.projects-empty {
    grid-column: 1 / -1;
    padding: 48px 24px;
    text-align: center;
    color: var(--ink-soft);
    background: var(--surface-alt);
    border: 1px dashed var(--gray-300);
    border-radius: var(--r-md);
}

/* ==========================================================================
   Service pages
   ========================================================================== */

/* Compact dark banner — same navy the header sits on, so the join is seamless. */
.page-hero {
    position: relative;
    padding-block: calc(var(--header-h) + clamp(24px, 3vw, 40px)) clamp(36px, 4vw, 56px);
    background:
        radial-gradient(700px 380px at 85% 70%, rgba(74, 127, 190, .18), transparent 68%),
        linear-gradient(180deg, var(--navy-700) 0%, var(--navy-700) 18%, var(--navy-800) 70%, var(--navy-900) 100%);
    color: #fff;
    overflow: hidden;
}

/* Optional per-service photo behind the banner. */
.page-hero.has-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--service-photo);
    background-size: cover;
    background-position: center;
    opacity: .5;
    pointer-events: none;
}

/* Navy wash, heaviest on the copy side (right in RTL). */
.page-hero.has-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(275deg, rgba(10, 22, 34, .9) 0%, rgba(15, 35, 52, .55) 55%, rgba(15, 35, 52, .08) 100%);
    pointer-events: none;
}

.page-hero > .container { position: relative; z-index: 1; }

.page-hero h1 {
    font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.6rem);
    color: #fff;
}

.page-hero .lede { margin-block: 14px 26px; }

.page-hero-inner { max-width: 640px; }

/* Breadcrumb */

.breadcrumb { margin-block-end: clamp(20px, 3vw, 32px); }

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--ink-invert-soft);
}

.breadcrumb li + li::before {
    content: "‹";
    margin-inline-end: 8px;
    color: var(--gray-500);
}

.breadcrumb a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding-inline: 6px;
    color: var(--steel-300);
}

.breadcrumb a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.breadcrumb [aria-current] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #fff;
    font-weight: 600;
}

/* Two-column body + sticky enquiry card */

.service-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(24px, 3vw, 44px);
}

.service-body > h2 {
    margin-block: clamp(28px, 3vw, 40px) 14px;
    font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem);
}

.service-body > h2:first-child { margin-block-start: 0; }

.service-body > p {
    margin-block-end: 12px;
    color: var(--ink-soft);
}

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

@media (max-width: 620px) {
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

.service-fit-line {
    margin-block: 18px 0;
    padding: 14px 18px;
    background: var(--surface-alt);
    border-inline-start: 3px solid var(--steel-500);
    border-radius: var(--r-sm);
    font-size: .94rem;
}

.service-fit-line strong { color: var(--navy-700); }

.service-steps {
    display: grid;
    gap: 12px;
    counter-reset: none;
}

.service-steps li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
}

.service-steps li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: var(--navy-700);
    color: #fff;
    font-weight: 800;
    font-size: .92rem;
}

.service-steps h3 { margin-block-end: 4px; font-size: 1.02rem; }
.service-steps p { color: var(--ink-soft); font-size: .93rem; }

/* Enquiry card */

.service-aside { position: sticky; top: calc(var(--header-h) + 20px); }

.service-cta-card {
    padding: clamp(22px, 2.4vw, 28px);
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
}

.service-cta-card h2 {
    margin-block-end: 6px;
    font-size: 1.15rem;
}

.service-cta-card > p {
    margin-block-end: 20px;
    color: var(--ink-soft);
    font-size: .92rem;
}

.service-contact {
    display: grid;
    gap: 4px;
    margin-block-start: 18px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--gray-200);
    font-size: .89rem;
    color: var(--ink-soft);
}

.service-contact li {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 9px;
    min-height: 44px;
}

.service-contact .icon { color: var(--steel-500); }

.service-contact a {
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 9px;
    min-height: 44px;
    font-weight: 700;
    color: var(--navy-700);
}

.service-contact a:hover { color: var(--steel-600); }

@media (max-width: 940px) {
    .service-layout { grid-template-columns: minmax(0, 1fr); }
    .service-aside { position: static; }
}

/* Service card heading link */

.service-link { color: inherit; }
.service-link:hover { color: var(--steel-600); }

/* Make the whole card clickable without nesting interactive elements. */
.service h3 .service-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.service { position: relative; }
.service .btn { position: relative; z-index: 2; }

/* ==========================================================================
   Contact section
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
    gap: clamp(20px, 2.6vw, 32px);
}

.contact-form-card,
.contact-info {
    padding: clamp(24px, 2.8vw, 32px);
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}

.contact-form-card > h3,
.contact-info > h3 {
    margin-block-end: 20px;
    padding-block-end: 14px;
    border-block-end: 1px solid var(--gray-200);
    font-size: 1.1rem;
}

.contact-form-card .btn { margin-block-start: 6px; }

.contact-list {
    display: grid;
    gap: 4px;
    margin-block-end: 22px;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    flex-direction: row-reverse;
    gap: 12px;
    padding-block: 8px;
}

.contact-list li > div { flex: 1; min-width: 0; }

.contact-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    background: var(--steel-100);
    color: var(--steel-600);
}

.contact-ico .icon { width: 1.15rem; height: 1.15rem; }

.contact-label {
    display: block;
    font-size: .78rem;
    color: var(--gray-500);
}

.contact-list a,
.contact-list div > p {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 700;
    font-size: .98rem;
    color: var(--navy-700);
}

.contact-list a:hover { color: var(--steel-600); }

.contact-quick {
    display: grid;
    gap: 10px;
    padding-block-start: 20px;
    border-block-start: 1px solid var(--gray-200);
}

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   About + contact card
   ========================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: clamp(28px, 4vw, 56px);
}

.about-copy h2 { margin-block: 10px 16px; }
.about-copy p + p { margin-block-start: 14px; }
.about-copy > p:not(.eyebrow):not(.pull-quote) { color: var(--ink-soft); }

.pull-quote {
    margin-block: 22px 0;
    padding-inline-start: 18px;
    border-inline-start: 3px solid var(--steel-500);
    font-weight: 700;
    color: var(--navy-700);
}

.about-copy .btn-row { margin-block-start: 26px; }

/* Layer order: tint on top, photo, then the logo motif underneath — so before
   about.webp exists the card shows the brand mark instead of an empty box. */
.about-media {
    aspect-ratio: 4 / 3;
    border-radius: var(--r-lg);
    background-color: var(--navy-700);
    background-image:
        linear-gradient(150deg, rgba(15, 35, 52, .1), rgba(39, 82, 127, .14)),
        url("../assets/about.webp"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 150'%3E%3Cpath d='M100 88 160 108 100 128 40 108Z' fill='%235F646B'/%3E%3Cpath d='M100 64 160 84 100 104 40 84Z' fill='%2331629B'/%3E%3Cpath d='M100 40 160 60 100 80 40 60Z' fill='%231B3A52'/%3E%3C/svg%3E");
    background-size: cover, cover, 52% auto;
    background-position: center, center, center;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: minmax(0, 1fr); }
    .about-media { aspect-ratio: 16 / 10; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

/* Light footer so the primary (dark) logo works here too. */
.site-footer {
    padding-block: clamp(36px, 4vw, 52px) 0;
    background: var(--surface-alt);
    border-block-start: 1px solid var(--gray-200);
    color: var(--ink-soft);
    font-size: .89rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr 1.4fr;
    gap: clamp(18px, 2.4vw, 40px);
}

.footer-brand img { width: 168px; height: auto; margin-block-end: 14px; }
.footer-brand p { max-width: 40ch; }

.footer-head {
    margin-block-end: 10px;
    font-size: .96rem;
    font-weight: 800;
    color: var(--navy-700);
}

.footer-col ul { display: grid; }

/* Eight links stacked make the footer tall. Where there is width for it, run
   each list as two side-by-side columns so it is four rows instead of eight. */
@media (min-width: 941px) {
    .footer-col-links ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 14px;
    }
}

/* Compactness comes from the two-column layout, not from shrinking the
   targets below the 44px minimum. */
.footer-col ul a,
.footer-col ul button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding-block: 4px;
    text-align: start;
    font: inherit;
    color: var(--ink-soft);
}

.footer-col ul a:hover,
.footer-col ul button:hover { color: var(--steel-600); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-block-start: clamp(24px, 3vw, 34px);
    padding-block: 14px;
    border-block-start: 1px solid var(--gray-200);
    font-size: .82rem;
    color: var(--gray-500);
}

.footer-bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 6px;
    color: var(--ink-soft);
}

.footer-bottom a:hover { color: var(--steel-600); }

/* Brand spans the row; the two link lists stay side by side so the footer
   never becomes one long stack. */
@media (max-width: 940px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .footer-bottom { justify-content: center; text-align: center; }
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: var(--gutter);
}

.modal[hidden] { display: none; }

.modal-scrim {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 34, .68);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}

.modal.is-open .modal-scrim { opacity: 1; }

/* Column layout: the head and the submit bar are fixed, only .modal-body
   scrolls — so no scrollbar runs down the whole card. */
.modal-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-height: min(90svh, 780px);
    overflow: hidden;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(16px) scale(.98);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.modal-head {
    flex: none;
    padding: clamp(22px, 2.6vw, 28px) clamp(22px, 2.6vw, 30px) 16px;
    border-block-end: 1px solid var(--gray-200);
}

.modal-panel form {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.modal-body {
    flex: 1;
    min-height: 0;
    padding: clamp(18px, 2.2vw, 24px) clamp(22px, 2.6vw, 30px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }

.modal-body::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border: 2px solid var(--surface);
    border-radius: 999px;
}

.modal-body::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

.modal-foot {
    flex: none;
    padding: 16px clamp(22px, 2.6vw, 30px) clamp(20px, 2.4vw, 26px);
    border-block-start: 1px solid var(--gray-200);
    background: var(--surface);
}

.modal.is-open .modal-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    color: var(--gray-500);
}

.modal-close:hover { background: var(--surface-alt); color: var(--navy-700); }

.modal-panel h2 { font-size: 1.35rem; padding-inline-end: 44px; }

.modal-sub {
    margin-block-start: 6px;
    color: var(--ink-soft);
    font-size: .93rem;
}

.field { margin-block-end: 14px; }

.field:last-child { margin-block-end: 0; }

/* Two fields per row keeps the form short enough to rarely need scrolling. */
.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

@media (max-width: 480px) {
    .field-row { grid-template-columns: minmax(0, 1fr); }
}

.field label {
    display: block;
    margin-block-end: 7px;
    font-size: .89rem;
    font-weight: 700;
    color: var(--navy-700);
}

.req { color: #C0392B; }

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    /* Native <select> needs both stated explicitly or the OS picks its own. */
    background-color: var(--surface-alt);
    color: var(--ink);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--r-sm);
    font-size: .96rem;
    transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.field textarea { min-height: 90px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: var(--gray-400); }

.field input:focus,
.field select:focus,
.field textarea:focus {
    background: var(--surface);
    border-color: var(--steel-400);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #C0392B; }

.field-error {
    margin-block-start: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: #C0392B;
}

/* ==========================================================================
   Project gallery lightbox
   ========================================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: grid;
    place-items: center;
    padding: clamp(12px, 2vw, 28px);
}

.lightbox[hidden] { display: none; }

.lightbox-scrim {
    position: absolute;
    inset: 0;
    background: rgba(6, 14, 22, .92);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}

.lightbox.is-open .lightbox-scrim { opacity: 1; }

.lightbox-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(1100px, 100%);
    max-height: 100%;
    min-height: 0;
    opacity: 0;
    transform: scale(.97);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.lightbox.is-open .lightbox-panel { opacity: 1; transform: none; }

.lightbox-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: none;
    color: #fff;
}

.lightbox-title {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Forced LTR: "3 / 4" must not flip to "4 / 3" in an RTL document. */
.lightbox-counter {
    flex: none;
    direction: ltr;
    font-size: .88rem;
    font-weight: 700;
    color: var(--steel-300);
    font-variant-numeric: tabular-nums;
}

.lightbox-close { flex: none; color: #fff; }
.lightbox-close:hover { background: rgba(255, 255, 255, .14); }

.lightbox-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    flex: 1;
}

/* Capped against the viewport, not the flex parent: a tall portrait photo
   would otherwise grow the panel and push the thumbnail strip off screen. */
.lightbox-stage img {
    max-width: 100%;
    max-height: calc(100svh - 210px);
    width: auto;
    height: auto;
    border-radius: var(--r-md);
    background: var(--navy-800);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

@supports not (max-height: 100svh) {
    .lightbox-stage img { max-height: calc(100vh - 210px); }
}

.lightbox-nav {
    position: absolute;
    inset-block-start: 50%;
    translate: 0 -50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 35, 52, .8);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    backdrop-filter: blur(8px);
    transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.lightbox-nav:hover { background: var(--steel-500); transform: translateY(-50%) scale(1.06); translate: none; }
.lightbox-nav .icon { width: 1.5rem; height: 1.5rem; }

/* RTL: "previous" sits on the right, "next" on the left. */
.lightbox-prev { inset-inline-start: 14px; }
.lightbox-next { inset-inline-end: 14px; }
.lightbox-next .icon { transform: scaleX(-1); }

.lightbox-thumbs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: none;
}

.lightbox-thumb {
    width: 70px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    overflow: hidden;
    opacity: .55;
    transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; }

.lightbox-thumb:hover { opacity: .85; }

.lightbox-thumb.is-current {
    opacity: 1;
    border-color: var(--steel-400);
}

@media (max-width: 640px) {
    .lightbox-nav { width: 46px; height: 46px; }
    .lightbox-prev { inset-inline-start: 6px; }
    .lightbox-next { inset-inline-end: 6px; }
    .lightbox-thumb { width: 56px; height: 44px; }
    .lightbox-title { font-size: .9rem; }
}

/* ==========================================================================
   Floating actions
   ========================================================================== */

.float-actions {
    position: fixed;
    /* Clear the iOS home indicator instead of sitting under it. */
    inset-block-end: calc(20px + env(safe-area-inset-bottom, 0px));
    /* Bottom-left of the screen. The page is always RTL, so inline-end is the
       physical left — hence the left safe-area inset. */
    inset-inline-end: calc(20px + env(safe-area-inset-left, 0px));
    z-index: 55;
    display: grid;
    gap: 10px;
}

.float-btn {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff;
    box-shadow: var(--shadow-md);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.float-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.float-btn .icon { width: 1.6rem; height: 1.6rem; }

.float-wa { background: var(--wa-green); color: #06301A; }
.float-call { background: var(--steel-500); }

@media (max-width: 520px) {
    .float-actions {
        inset-block-end: calc(16px + env(safe-area-inset-bottom, 0px));
        inset-inline-end: calc(16px + env(safe-area-inset-left, 0px));
    }

    .float-btn { width: 50px; height: 50px; }
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .btn:hover,
    .feature:hover,
    .service:hover,
    .solution:hover,
    .project:hover,
    .float-btn:hover { transform: none; }

    .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .site-header,
    .drawer,
    .drawer-scrim,
    .float-actions,
    .modal,
    .skip-link { display: none !important; }

    body { color: #000; background: #fff; }
    .section-dark, .hero, .band { background: #fff !important; color: #000 !important; }

    /* Never print a blank section because it was never scrolled into view. */
    .reveal { opacity: 1 !important; transform: none !important; }
}
