/* ==========================================================================
   ABE — Brand-bold design system
   World: site signage. Ink and warm paper, solid brand red slabs, diagonal
   cuts taken from the logo's slanted roofline, photography at full strength.
   Loaded after main.css (which the admin login still uses).
   ========================================================================== */

:root {
    --paper: #F5F2EC;
    --paper-2: #ECE7DE;
    --ink: #14161A;
    --ink-2: #1D2024;
    --red: #D2372F;
    --red-d: #B22C25;
    --red-l: #F27A72;
    --green: #2E7D46;
    --green-l: #6FC08A;
    --line: #D6D0C4;
    --mute: #55585E;
    --on-ink: #F2EFE9;
    --on-ink-mute: #B4B8BE;

    --f-display: 'Archivo', 'Cairo', system-ui, sans-serif;
    --f-body: 'Archivo', 'Cairo', system-ui, sans-serif;

    --ease: cubic-bezier(.16, 1, .3, 1);
    --wrap: 1280px;
    --gutter: clamp(1.25rem, 5vw, 3.5rem);
    --header-h: 76px;
    --cut: clamp(1.5rem, 4vw, 3.5rem);

    /* map the legacy tokens so main.css-driven bits follow the palette */
    --bg-color: var(--paper);
    --text-color: var(--ink);
    --text-secondary: var(--mute);
    --section-bg: var(--paper-2);
    --card-bg: #FFFFFF;
    --border-color: var(--line);
    --nav-bg: var(--paper);
    --nav-text: var(--ink);
    --font-main: var(--f-body);
}

html.dark-mode, body.dark-mode {
    --paper: #0F1113;
    --paper-2: #171A1D;
    --ink: #F2EFE9;
    --ink-2: #F2EFE9;
    --line: #2A2E33;
    --mute: #A9ADB3;
    --card-bg: #171A1D;
    --on-ink: #F2EFE9;
    --on-ink-mute: #B4B8BE;
    --red-d: #F27A72;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--f-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    font-size: 1.0625rem;
    transition: background-color .3s ease, color .3s ease;
}
html[lang="ar"] body { font-family: 'Cairo', 'Archivo', system-ui, sans-serif; line-height: 1.85; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
* { scrollbar-color: var(--red) var(--paper-2); }
img { max-width: 100%; }
main { display: block; }

/* ---------- type ---------- */
.display, .h-xl, .h-lg, .h-md {
    font-family: var(--f-display);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.02;
    text-wrap: balance;
    margin: 0;
    text-transform: none;
}
html[lang="ar"] .display, html[lang="ar"] .h-xl, html[lang="ar"] .h-lg, html[lang="ar"] .h-md {
    font-family: 'Cairo', sans-serif; letter-spacing: 0; line-height: 1.25; font-weight: 800;
}
.display { font-size: clamp(2.75rem, 7.4vw, 6rem); }
.h-xl { font-size: clamp(2.25rem, 5.4vw, 4.25rem); }
.h-lg { font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1.08; }
.h-md { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.65; color: var(--mute); max-width: 62ch; }
.em { color: var(--red); }
.on-ink .em, .section--ink .em { color: var(--red-l); }
.on-red .em { color: var(--ink); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
.section--paper2 { background: var(--paper-2); }
.section--ink { background: #14161A; color: var(--on-ink); }
.section--ink .lead, .section--ink .mute { color: var(--on-ink-mute); }
.section--red { background: var(--red); color: #fff; }
.section--red .lead { color: rgba(255,255,255,.88); }
.section--cut { clip-path: polygon(0 var(--cut), 100% 0, 100% calc(100% - var(--cut)), 0 100%); padding-block: calc(var(--cut) + clamp(3rem, 7vw, 6rem)); margin-block: calc(var(--cut) * -0.5); z-index: 1; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 4rem); }
.sec-head .lead { margin: 0; }
@media (max-width: 800px) { .sec-head { grid-template-columns: 1fr; } }
.mute { color: var(--mute); }

/* ---------- buttons ---------- */
.abtn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: 1rem 1.9rem; font: 700 .9rem/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase;
    border: 2px solid transparent; text-decoration: none; cursor: pointer;
    transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
html[lang="ar"] .abtn { letter-spacing: 0; font-family: 'Cairo', sans-serif; font-size: 1rem; }
.abtn:hover { transform: translateY(-2px); }
.abtn--red { background: var(--red); color: #fff; }
.abtn--red:hover { background: var(--red-d); }
.abtn--ink { background: #14161A; color: #fff; }
.abtn--ink:hover { background: #000; }
.abtn--ghost { border-color: currentColor; color: var(--ink); }
.abtn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.abtn--ghost-light { border-color: rgba(255,255,255,.7); color: #fff; }
.abtn--ghost-light:hover { background: #fff; color: #14161A; border-color: #fff; }
.abtn i { transition: transform .25s var(--ease); }
.abtn:hover i { transform: translateX(4px); }
html[dir="rtl"] .abtn:hover i { transform: translateX(-4px); }

/* ---------- reveal (content is visible without JS) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
html.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
    *:not(#intro):not(#intro *) { animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- intro (critical CSS also inlined in layout head) ---------- */
#intro { position: fixed; inset: 0; z-index: 9999; background: #14161A; color: #F2EFE9; display: flex; align-items: center; justify-content: center; transition: transform .9s cubic-bezier(.76, 0, .24, 1); }
#intro.is-out { transform: translateY(-100%); }
#intro .intro__words { display: flex; flex-wrap: wrap; justify-content: center; gap: .15em .5em; font: 800 clamp(2rem, 7vw, 5rem)/1.05 'Archivo', 'Cairo', sans-serif; letter-spacing: -0.02em; padding: 0 1.5rem; text-align: center; }
#intro .intro__word { opacity: 0; transform: translateY(.4em); }
#intro .intro__word:last-child { color: #BE322B; }
#intro.is-run .intro__word { animation: introIn .7s cubic-bezier(.16, 1, .3, 1) forwards; animation-delay: calc(var(--i) * 280ms); }
@keyframes introIn { to { opacity: 1; transform: none; } }
#intro .intro__bar { position: absolute; inset-inline: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, #D2372F 0 82%, #2E7D46 82% 100%); transform: scaleX(0); transform-origin: left; }
html[dir="rtl"] #intro .intro__bar { transform-origin: right; }
#intro.is-run .intro__bar { animation: introBar 1.5s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes introBar { to { transform: scaleX(1); } }
html.intro-pending body { overflow: hidden; }

/* ---------- header ---------- */
.sh {
    position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--header-h); padding: 0;
    background: transparent; color: var(--on-ink); box-shadow: none;
    transition: background .3s ease, color .3s ease, border-color .3s ease; border-bottom: 1px solid transparent;
}
.sh.sh--solid, .sh.is-scrolled { background: var(--paper); color: var(--ink); border-bottom-color: var(--line); }
.sh__bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.sh__logo { display: inline-flex; align-items: center; flex: none; }
.sh__logo img { height: 46px; width: auto; display: block; }
.sh__links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); list-style: none; margin: 0; padding: 0; }
.sh__links a { color: inherit; text-decoration: none; font-weight: 600; font-size: .95rem; padding: .4rem 0; position: relative; }
.sh__links a::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
html[dir="rtl"] .sh__links a::after { transform-origin: right; }
.sh__links a:hover::after, .sh__links a[aria-current="page"]::after { transform: scaleX(1); }
.sh__tools { display: flex; align-items: center; gap: .5rem; }
.sh__icon { background: none; border: 0; color: inherit; cursor: pointer; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.sh__icon:hover { color: var(--red-l); }
.sh.sh--solid .sh__icon:hover, .sh.is-scrolled .sh__icon:hover { color: var(--red); }
.sh__cta { padding: .75rem 1.3rem; font-size: .8rem; }
.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: .45rem; width: auto; padding-inline: .6rem; font-size: .9rem; font-weight: 600; }
.lang__menu { display: none; position: absolute; top: calc(100% + .4rem); inset-inline-end: 0; min-width: 150px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.18); z-index: 10; }
.lang__menu.open { display: block; }
.lang__menu a { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.lang__menu a:hover { background: var(--paper-2); }
.lang__menu i { width: 14px; color: var(--red); }
.sh__burger { display: none; }
@media (max-width: 1060px) {
    .sh__burger { display: inline-flex; }
    .sh__links {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
        background: var(--paper); color: var(--ink); padding: 1rem var(--gutter) 2rem; border-bottom: 1px solid var(--line);
        transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility .25s;
    }
    .sh__links.open { opacity: 1; transform: none; visibility: visible; }
    .sh__links a { display: block; padding: 1rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
    .sh__links a::after { display: none; }
    .sh__cta { display: none; }
}

/* ---------- hero ---------- */
.hero {
    --hero-red: var(--red);
    position: relative; min-height: 100vh; min-height: 100svh; background: #14161A; color: var(--on-ink); --on-ink: #F2EFE9; --on-ink-mute: #B4B8BE;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem);
    padding: calc(var(--header-h) + 3rem) 0 3.5rem; padding-inline-start: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); overflow: hidden;
}
.hero__text { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding-inline-end: 1rem; }
.hero h1 { font-size: clamp(2.75rem, 6.2vw, 6rem); font-weight: 800; letter-spacing: -0.035em; line-height: .98; margin: 0 0 1.6rem; color: var(--on-ink); text-wrap: balance; text-transform: none; }
html[lang="ar"] .hero h1 { font-family: 'Cairo', sans-serif; letter-spacing: 0; line-height: 1.2; }
.hero h1 .em { color: #BE322B; }
.hero__lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--on-ink-mute); max-width: 34rem; margin: 0 0 2.2rem; line-height: 1.65; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__built { margin-top: clamp(2rem, 5vh, 3.5rem); padding-top: 1.4rem; border-top: 1px solid #33373D; color: var(--on-ink-mute); font-size: .95rem; max-width: 34rem; }
.hero__built b { color: var(--on-ink); font-weight: 600; }
.hero__media { position: relative; min-height: 440px; }
/* slanted frame cut with clip-path (anti-aliased, no skewed bitmap); bar + photo share the same shape so they line up */
.hero__media { margin-inline-end: -90px; --sl: 64px; }
.hero__bar, .hero__slider { position: absolute; inset: 0; clip-path: polygon(var(--sl) 0, 100% 0, calc(100% - var(--sl)) 100%, 0 100%); }
.hero__bar { background: linear-gradient(var(--red) 0 80%, var(--green) 80% 100%); translate: -22px 0; }
.hero__slider { overflow: hidden; background: #14161A; isolation: isolate; }
html[dir="rtl"] .hero__bar, html[dir="rtl"] .hero__slider { clip-path: polygon(0 0, calc(100% - var(--sl)) 0, 100% 100%, var(--sl) 100%); }
html[dir="rtl"] .hero__bar { translate: 22px 0; }
.hero .slide { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; background-attachment: fixed; opacity: 0; transition: opacity 1.2s ease-in-out; }
.hero .slide.active { opacity: 1; }
.hero__progress { position: absolute; z-index: 3; bottom: 1.6rem; inset-inline-end: calc(max(var(--gutter), 1.5rem) + 90px); display: flex; align-items: center; gap: 1.1rem; color: #fff; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.hero__dots { display: flex; gap: .5rem; }
.hero__dots i { display: block; width: 30px; height: 3px; background: rgba(255,255,255,.4); position: relative; overflow: hidden; }
.hero__dots i.on::after { content: ''; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: heroFill 4s linear forwards; }
html[dir="rtl"] .hero__dots i.on::after { transform-origin: right; }
@keyframes heroFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: auto; padding: calc(var(--header-h) + 2rem) var(--gutter) 0; gap: 2.5rem; }
    .hero__media { min-height: 54vh; margin-inline: calc(var(--gutter) * -1); }
    .hero__media { margin-inline-end: calc(var(--gutter) * -1); }
    .hero__slider, .hero__bar, html[dir="rtl"] .hero__slider, html[dir="rtl"] .hero__bar { clip-path: none; translate: none; }
    .hero__progress { inset-inline-end: max(var(--gutter), 1.5rem); }
    .hero__bar { display: none; }
}

/* ---------- page hero ---------- */
.phero { position: relative; background: #14161A; color: var(--on-ink); --on-ink: #F2EFE9; --on-ink-mute: #B4B8BE; padding: calc(var(--header-h) + clamp(3.5rem, 8vw, 6.5rem)) 0 clamp(4rem, 8vw, 7rem); overflow: hidden; }
.phero::before { content: ''; position: absolute; inset: auto 0 0 0; height: 10px; z-index: 2; background: linear-gradient(90deg, var(--red) 0 84%, var(--green) 84% 100%); }
html[dir="rtl"] .phero::before { background: linear-gradient(270deg, var(--red) 0 84%, var(--green) 84% 100%); }
.phero .wrap { position: relative; z-index: 1; }
.phero h1 { font-size: clamp(2.75rem, 7vw, 6rem); font-weight: 800; letter-spacing: -0.035em; line-height: .98; margin: 0; max-width: 14ch; color: var(--on-ink); text-wrap: balance; text-transform: none; }
html[lang="ar"] .phero h1 { font-family: 'Cairo', sans-serif; letter-spacing: 0; line-height: 1.25; max-width: 16ch; }
.phero .lead { color: var(--on-ink-mute); margin: 1.5rem 0 0; max-width: 44ch; }
.phero--photo { background-size: cover; background-position: center; }
.phero--photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,22,26,.55), rgba(20,22,26,.9)); }

/* ---------- project tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; }
.tile { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3.1; background: #14161A; color: #fff; text-decoration: none; }
.tile--wide { grid-column: span 2; aspect-ratio: 16 / 9.4; }
@media (max-width: 760px) { .tile--wide { grid-column: auto; aspect-ratio: 4 / 3.1; } }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s var(--ease); }
.tile:hover img { transform: scale(1.06); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20,22,26,.92)); }
.tile__cap { position: absolute; z-index: 1; inset: auto 0 0 0; padding: 1.4rem 1.5rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.tile__title { font: 800 1.45rem/1.1 var(--f-display); letter-spacing: -0.01em; margin: 0; }
html[lang="ar"] .tile__title { font-family: 'Cairo', sans-serif; }
.tile__tag { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--red); color: #fff; padding: .3rem .65rem; flex: none; }
html[lang="ar"] .tile__tag { letter-spacing: 0; }
.tile__go { position: absolute; z-index: 1; inset-block-start: 1rem; inset-inline-end: 1rem; width: 44px; height: 44px; background: #fff; color: #14161A; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .3s var(--ease); }
.tile:hover .tile__go, .tile:focus-visible .tile__go { opacity: 1; transform: none; }
html[dir="rtl"] .tile__go i { transform: scaleX(-1); }

/* ---------- chips (filters) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.chip { font: 700 .85rem/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; padding: .85rem 1.3rem; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
html[lang="ar"] .chip { letter-spacing: 0; font-family: 'Cairo', sans-serif; font-size: .95rem; }
.chip:hover { border-color: var(--red); color: var(--red-d); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- split rows (services) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split + .split { margin-top: clamp(3rem, 8vw, 6rem); }
.split--flip .split__media { order: -1; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.split__media::after { content: ''; position: absolute; inset-block-end: -14px; inset-inline-start: -14px; width: 36%; height: 8px; background: var(--red); }
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.checklist li { display: flex; gap: .9rem; align-items: flex-start; font-weight: 600; }
.checklist i { color: var(--green); margin-top: .35rem; flex: none; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--flip .split__media { order: 0; } }

/* ---------- service cards (no icon-card grid: numbered-free, image-led rows) ---------- */
.svc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 1.25rem; }
.svc { position: relative; display: flex; flex-direction: column; gap: .9rem; padding: 2rem 1.75rem 1.75rem; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), border-color .3s ease, box-shadow .35s var(--ease); }
.svc::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--red) 0 84%, var(--green) 84% 100%); transform: scaleX(.18); transform-origin: left; transition: transform .6s var(--ease); }
html[dir="rtl"] .svc::before { transform-origin: right; }
.svc::after { content: ''; position: absolute; inset-block-end: 14px; inset-inline-end: 14px; width: 16px; height: 16px; border-bottom: 2px solid var(--line); border-inline-end: 2px solid var(--line); transition: border-color .3s ease; }
.svc:hover { transform: translateY(-6px); border-color: var(--ink); box-shadow: 0 18px 40px -22px rgba(0,0,0,.45); }
.svc:hover::before { transform: scaleX(1); }
.svc:hover::after { border-color: var(--red); }
.svc__n { font: 800 3.6rem/1 var(--f-display); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--ink); opacity: .3; transition: opacity .3s ease, color .3s ease, -webkit-text-stroke-color .3s ease; }
.svc:hover .svc__n { opacity: 1; color: var(--red); -webkit-text-stroke-color: var(--red); }
.svc__t { margin: 0; }
.svc__b { display: flex; flex-direction: column; gap: 1.25rem; flex: 1; }
.svc__d { color: var(--mute); margin: 0; line-height: 1.7; }
.svc__f { list-style: none; margin: auto 0 0; padding: 1.1rem 0 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: .5rem; }
.svc__f li { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 700; padding: .4rem .75rem; background: var(--paper); border: 1px solid var(--line); }
.svc__f li::before { content: ''; width: 6px; height: 6px; background: var(--green); flex: none; }
@media (prefers-reduced-motion: reduce) { .svc, .svc::before { transition: none; } .svc:hover { transform: none; } }

/* ---------- feature (ongoing project) ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.feature video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 10; object-fit: cover; }
.badge { display: inline-block; background: var(--red); color: #fff; font: 700 .8rem/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; padding: .45rem .8rem; margin-bottom: 1.2rem; }
html[lang="ar"] .badge { letter-spacing: 0; font-family: 'Cairo', sans-serif; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; margin: 1.6rem 0 0; padding: 1.4rem 0 0; border-top: 1px solid #3A3E44; }
.facts dt { font-size: .85rem; color: var(--on-ink-mute); margin: 0 0 .2rem; }
.facts dd { margin: 0; font-weight: 700; font-size: 1.05rem; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta { text-align: start; }
.cta__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2rem 3rem; }
.cta h2 { max-width: 20ch; }

/* ---------- accordion ---------- */
.acc { border-top: 2px solid var(--ink); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.5rem 0; font: 700 clamp(1.1rem, 2vw, 1.35rem)/1.3 var(--f-display); }
html[lang="ar"] .acc__item summary { font-family: 'Cairo', sans-serif; }
.acc__item summary::-webkit-details-marker { display: none; }
.acc__item summary i { flex: none; width: 40px; height: 40px; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; transition: transform .3s var(--ease), background .2s ease, color .2s ease; }
.acc__item[open] summary i { transform: rotate(45deg); background: var(--red); border-color: var(--red); color: #fff; }
.acc__item summary:hover { color: var(--red-d); }
.acc__a { padding: 0 0 1.6rem; color: var(--mute); max-width: 70ch; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.3rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .5rem; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field textarea, .field select {
    width: 100%; font: 500 1rem/1.4 var(--f-body); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); padding: 1rem 1.1rem; border-radius: 0; transition: border-color .2s ease, box-shadow .2s ease;
}
html[lang="ar"] .field input, html[lang="ar"] .field textarea { font-family: 'Cairo', sans-serif; }
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #7B7F86; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(210,55,47,.18); }
.field.has-error input, .field.has-error textarea { border-color: var(--red-d); }
.field__err { color: var(--red-d); font-size: .9rem; font-weight: 600; }
.alert { padding: 1rem 1.2rem; border: 2px solid var(--green); color: var(--ink); background: rgba(46,125,70,.1); font-weight: 600; }
.alert--err { border-color: var(--red); background: rgba(210,55,47,.08); }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact__list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.6rem; }
.contact__list li { display: grid; grid-template-columns: 52px 1fr; gap: 1rem; align-items: start; }
.contact__ico { width: 52px; height: 52px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; }
.contact__list h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.contact__list a { color: var(--ink); font-weight: 600; text-decoration-color: var(--red); text-underline-offset: 4px; }
.contact__list p { margin: 0; color: var(--mute); }
.contact__form { background: #fff; padding: clamp(1.5rem, 4vw, 2.75rem); border-top: 6px solid var(--red); }
html.dark-mode .contact__form, body.dark-mode .contact__form { background: var(--paper-2); }
.map { margin-top: 2rem; aspect-ratio: 16 / 10; border: 0; width: 100%; background: var(--paper-2); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* ---------- logos ---------- */
.logo-group + .logo-group { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.logo-group h2 { margin: 0 0 1.5rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .9rem; border-bottom: 2px solid var(--ink); }
.logo-group h2 span { font-size: .95rem; font-weight: 600; color: var(--mute); }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 1rem; }
.logo-cell { background: #fff; height: 130px; display: flex; align-items: center; justify-content: center; padding: 1.2rem 1.5rem; border: 1px solid var(--line); transition: border-color .25s ease, transform .25s var(--ease); }
.logo-cell:hover { border-color: var(--red); transform: translateY(-3px); }
.logo-cell img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-cell span { font-weight: 800; text-align: center; color: #14161A; line-height: 1.2; }

/* ---------- about ---------- */
.about-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-intro__media { position: relative; }
.about-intro__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.about-intro__media::before { content: ''; position: absolute; inset-block-start: -14px; inset-inline-end: -14px; width: 45%; height: 45%; background: linear-gradient(var(--red) 0 78%, var(--green) 78% 100%); z-index: -1; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.pillar { padding: clamp(1.75rem, 4vw, 3rem); background: #14161A; color: var(--on-ink); }
.pillar--red { background: var(--red); color: #fff; }
.pillar h3 { margin: 0 0 1rem; }
.pillar p { margin: 0; color: inherit; opacity: .9; line-height: 1.7; }
@media (max-width: 860px) { .about-intro, .pillars { grid-template-columns: 1fr; } }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; }
.numbers div { border-top: 3px solid var(--red); padding-top: 1rem; }
.numbers b { display: block; font: 800 clamp(2.5rem, 5vw, 4rem)/1 var(--f-display); letter-spacing: -0.03em; }
.numbers span { color: var(--on-ink-mute); font-weight: 500; }

/* ---------- footer ---------- */
.sf { background: #14161A; color: var(--on-ink); padding: 0; margin: 0; border: 0; position: relative; overflow: hidden; }
.sf__top { padding-block: clamp(3.5rem, 8vw, 6rem); border-bottom: 1px solid #2B2F35; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 2rem 3rem; }
.sf__top h2 { max-width: 16ch; color: var(--on-ink); }
.sf__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 2.5rem; padding-block: 3.5rem; }
.sf h4 { font: 700 .85rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink-mute); margin: 0 0 1.2rem; }
html[lang="ar"] .sf h4 { letter-spacing: 0; font-family: 'Cairo', sans-serif; font-size: 1rem; }
.sf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.sf a { color: var(--on-ink); text-decoration: none; }
.sf ul a:hover { color: var(--red-l); }
.sf p { color: var(--on-ink-mute); margin: 1rem 0 0; max-width: 34ch; }
.sf__logo { display: inline-block; }
.sf__logo img { height: 58px; display: block; }
.sf__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.5rem 2rem; border-top: 1px solid #2B2F35; color: var(--on-ink-mute); font-size: .9rem; }
.sf__social { display: flex; gap: .5rem; }
.sf__social a { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #3A3E44; transition: background .2s ease, border-color .2s ease; }
.sf__social a:hover { background: var(--red); border-color: var(--red); }
.sf__stripe { height: 8px; background: linear-gradient(90deg, var(--red) 0 82%, var(--green) 82% 100%); }
@media (max-width: 900px) { .sf__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sf__cols { grid-template-columns: 1fr; } }

/* ---------- project detail ---------- */
.pd-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem 2rem; margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.25); }
.pd-meta dt { font-size: .85rem; color: var(--on-ink-mute); margin: 0 0 .2rem; }
.pd-meta dd { margin: 0; font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: .75rem; }
.gallery a { display: block; overflow: hidden; grid-column: span 4; aspect-ratio: 4 / 3; background: #14161A; }
.gallery a:nth-child(5n+1) { grid-column: span 8; aspect-ratio: 16 / 9.2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.gallery a:hover img { transform: scale(1.05); }
@media (max-width: 760px) { .gallery a, .gallery a:nth-child(5n+1) { grid-column: span 12; aspect-ratio: 4 / 3; } }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(10,11,13,.96); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 2px solid #fff; color: #fff; width: 48px; height: 48px; cursor: pointer; font-size: 1.1rem; }
.lightbox .lb-close { top: 1.2rem; inset-inline-end: 1.2rem; }
.lightbox .lb-prev { inset-inline-start: 1.2rem; top: 50%; }
.lightbox .lb-next { inset-inline-end: 1.2rem; top: 50%; }
.lightbox button:hover { background: var(--red); border-color: var(--red); }

/* ---------- misc ---------- */
.sr-skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 2000; background: var(--red); color: #fff; padding: .8rem 1.2rem; font-weight: 700; text-decoration: none; transition: top .2s ease; }
.sr-skip:focus { top: 1rem; }
.sh__cta-li { display: none; }
@media (max-width: 1060px) { .sh__cta-li { display: block; margin-top: 1rem; } .sh__cta-m { width: 100%; } .sh__links .sh__cta-m { color: #fff; border-bottom: 2px solid transparent; padding: 1rem 1.9rem; font-size: .9rem; } }

/* ---------- logo: vector mark (public/images/logo.svg) ---------- */
.sh__logo img, .sf__logo img { width: auto; display: block; }
.sh__logo { background: none; padding: 0; }
.sf__logo { background: none; padding: 0; }
.sf__logo img { height: 46px; }

/* navbar: follows the theme (light bar in light mode, dark bar in dark mode) */
.sh, .sh.sh--solid, .sh.is-scrolled { background: var(--paper); color: var(--ink); border-bottom-color: var(--line); }
.sh__icon:hover, .sh.sh--solid .sh__icon:hover, .sh.is-scrolled .sh__icon:hover { color: var(--red); }

/* ---------- partners showcase ---------- */
.pshow__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.pshow__item { margin: 0; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.pshow__item--wide { grid-column: 1 / -1; }
.pshow__item img { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .pshow__grid { grid-template-columns: 1fr; } }

/* ---------- page hero: photo, oversized type, column grid (no scripts, one image) ---------- */

/* ---------- page hero: photo-free, CSS 3D scene ---------- */
.ph { position: relative; isolation: isolate; color: #F2EFE9; min-height: clamp(360px, 54vh, 540px); display: flex; align-items: flex-end; padding: calc(var(--header-h) + 3rem) 0 clamp(2.5rem, 6vw, 4.5rem); overflow: hidden;
    background: radial-gradient(60% 90% at 85% 20%, rgba(210,55,47,.22), transparent 70%), radial-gradient(50% 70% at 5% 100%, rgba(46,125,70,.16), transparent 70%), #14161A; }
.ph::before { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 10px; z-index: 3; background: linear-gradient(90deg, var(--red) 0 84%, var(--green) 84% 100%); }
html[dir="rtl"] .ph::before { background: linear-gradient(270deg, var(--red) 0 84%, var(--green) 84% 100%); }
.ph__grid { position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: .12; background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px calc(100% / 12)); mask-image: linear-gradient(0deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(0deg, #000, transparent 85%); }
.ph__in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 6vw, 5rem); align-items: end; }
.ph__t { margin: 0; font-size: clamp(2.6rem, 7.2vw, 6rem); font-weight: 800; letter-spacing: -0.035em; line-height: .98; text-wrap: balance; text-transform: none; color: #F2EFE9; }
html[lang="ar"] .ph__t { font-family: 'Cairo', sans-serif; letter-spacing: 0; line-height: 1.2; }
.ph__lead { margin: 0; color: #D5D8DC; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.65; max-width: 44ch; padding-inline-start: 1.25rem; border-inline-start: 3px solid var(--red); }

/* scene: transform/opacity only, no images, no blur */
.ph__scene { position: absolute; z-index: -1; inset-block: 0; inset-inline-end: 0; width: min(46%, 560px); perspective: 1000px; pointer-events: none; display: grid; place-items: center; }
/* simple variant: type + grid only */
.ph--plain { min-height: clamp(280px, 40vh, 400px); }
.ph--plain .ph__scene { display: none; }
.ph--plain .ph__in { grid-template-columns: minmax(0, 1fr); }
.ph--plain .ph__t { max-width: 18ch; }

/* mobile: smaller, static, behind the text */
@media (max-width: 800px) {
    .ph { min-height: 0; padding-top: calc(var(--header-h) + 2.5rem); }
    .ph__in { grid-template-columns: 1fr; }
    .ph__scene { display: none; }
    .ph__grid { opacity: .08; }
}

/* pages without a hero: clear the fixed header */
.section--top { padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* CAD line drawings (SVG, stroke-draw on load; static on mobile) */
.ph--scene .ph__in { grid-template-columns: minmax(0, 1fr); }
.ph--scene .ph__in > * { max-width: min(100%, 52%); }
.ph--scene .ph__t { font-size: clamp(2.4rem, 5.6vw, 5rem); }
.ph__scene:has(.ph__svg) { padding: calc(var(--header-h) + 1rem) 1.5rem 2.8rem; width: min(50%, 620px); }
.ph__svg { width: 100%; height: auto; max-height: 100%; overflow: visible; }
.cad path, .cad circle { fill: none; stroke: rgba(242,239,233,.78); stroke-width: 1.3; stroke-linecap: square; stroke-linejoin: miter; }
.cad path[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: cadDraw 1.8s var(--ease) forwards; animation-delay: calc(var(--d, 0) * .8s); }
.cad .dim { stroke: #FF6B5F; stroke-width: 1; }
.cad .acc { stroke: #5BC27D; }
.cad .fill { fill: rgba(210,55,47,.5); stroke: var(--red); }
.cad .axis { stroke: rgba(242,239,233,.22); stroke-width: 1; stroke-dasharray: 6 3 1 3; }
.cad .t { font: 600 8.5px/1 ui-monospace, 'SFMono-Regular', Consolas, monospace; fill: #FF8A80; letter-spacing: .06em; opacity: 0; animation: cadFade .8s ease forwards; animation-delay: calc(var(--d, 0) * .8s); }
.cad .t.big { font: 800 20px/1 var(--f-display); fill: #fff; letter-spacing: .3em; }
@keyframes cadDraw { to { stroke-dashoffset: 0; } }
@keyframes cadFade { to { opacity: 1; } }
@media (max-width: 800px) {
    .ph--scene .ph__in > * { max-width: 100%; }
    .ph__scene:has(.ph__svg) { display: none; }
    .cad path[pathLength] { animation: none; stroke-dashoffset: 0; }
    .cad .t { animation: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .cad path[pathLength] { animation: none; stroke-dashoffset: 0; } .cad .t { animation: none; opacity: 1; } }

.sf__logo img { height: 56px; }
html.dark-mode .sh__logo img { height: 46px; }

/* service category links + projects filter anchor */
.svc-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
#filter { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.tiles__empty { margin: 0 0 1.5rem; padding: 1.25rem 1.5rem; border: 1px dashed var(--line); color: var(--mute); font-weight: 600; }
[hidden] { display: none !important; }

.cad .red { stroke: #E0453B; stroke-width: 1.5; }
.cad .fin { fill: rgba(242,239,233,.1); }
.cad .win { fill: rgba(91,194,125,.28); }
