/* ============================================================
   Abdullah Al-Azzaz & Partner Co. (AAP) — stylesheet
   Tokens: brand navy / cool white / logo blue (2 tints).
   Space Grotesk + Manrope (EN), Cairo + Tajawal (AR).
   See /NOTES.md for the design rationale.
   ============================================================ */

:root {
  /* deep brand navy — dark sections (was near-black) */
  --ink: #0a2540;
  --ink-soft: #123a5e;
  --ink-line: #1e4a70;
  /* cool near-white — light sections (was warm cream) */
  --paper: #f4f8fb;
  --paper-soft: #e8f1f8;
  --paper-line: #d3e3ee;
  /* logo blue, sampled from the real mark — primary accent + CTAs */
  --brand: #0b7dd1;
  --brand-dark: #085c9c;
  --brand-tint: #e4f1fb;
  --brand-light: #4fb6e8;
  --steel: #57626d;
  --steel-light: #8a97a3;
  --white: #ffffff;

  --font-display-en: "Space Grotesk", sans-serif;
  --font-body-en: "Manrope", sans-serif;
  --font-display-ar: "Cairo", sans-serif;
  --font-body-ar: "Tajawal", sans-serif;

  --container: 1240px;
  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(.19,1,.22,1);
}

:root[lang="en"] {
  --font-display: var(--font-display-en);
  --font-body: var(--font-body-en);
}
:root[lang="ar"] {
  --font-display: var(--font-display-ar);
  --font-body: var(--font-body-ar);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; }

.wrap { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 780px) { .wrap { padding-inline: 32px; } }

.skip-link {
  position: fixed; inset-inline-start: 12px; top: -60px; z-index: 999;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  transition: top .2s var(--ease); font-weight: 600;
}
.skip-link:focus { top: 12px; }

section.section { padding-block: 76px; }
@media (min-width: 900px) { section.section { padding-block: 112px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--brand-light); display: inline-block; }
:root[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; }
.eyebrow-light { color: var(--brand-light); }

h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); line-height: 1.12; margin-bottom: 18px; }
.on-dark { color: var(--white); }
.section-lead { max-width: 640px; color: var(--steel); font-size: 1.05rem; margin-bottom: 44px; }
.section-lead.on-dark { color: #c3cad2; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  font-family: var(--font-display); transition: transform .25s var(--ease), background .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -8px rgba(11,125,209,.45); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost-light { border: 1.5px solid rgba(255,255,255,.55); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 9px 18px; font-size: .82rem; }
.btn-block { width: 100%; }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============================================================ HEADER */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 90;
  background: rgba(10,37,64,0); transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header.is-scrolled { background: rgba(10,37,64,.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-badge {
  background: #fff; border-radius: 10px; padding: 4px 8px; display: inline-flex; align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.brand-badge img { width: 46px; height: auto; }
.brand-badge-lg img { width: 68px; }
.brand-name { display: none; flex-direction: column; line-height: 1.2; color: #fff; }
.brand-name strong { font-family: var(--font-display); font-size: .95rem; }
.brand-name small { font-size: .68rem; color: #aab2bb; }
@media (min-width: 640px) { .brand-name { display: flex; } }

.main-nav ul { display: none; align-items: center; gap: 28px; }
.main-nav a { color: #dfe4e9; font-size: .92rem; font-weight: 600; padding-block: 4px; position: relative; }
.main-nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: -4px; height: 2px; background: var(--brand-light); transform: scaleX(0); transition: transform .25s var(--ease); }
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }
@media (min-width: 1080px) { .main-nav ul { display: flex; } }

.header-actions { display: flex; align-items: center; gap: 10px; }
.tel-chip { display: none; align-items: center; gap: 6px; color: #dfe4e9; font-size: .85rem; font-weight: 600; }
@media (min-width: 900px) { .tel-chip { display: inline-flex; } }

.lang-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.3);
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .72rem; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.lang-toggle:hover { background: rgba(255,255,255,.12); }

.burger {
  width: 38px; height: 38px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { width: 20px; height: 2px; background: #fff; transition: transform .25s var(--ease), opacity .2s; }
@media (min-width: 1080px) { .burger { display: none; } }

.main-nav.is-open ul {
  display: flex; flex-direction: column; position: fixed; inset-inline: 0; top: 66px; bottom: 0;
  background: var(--ink); padding: 28px 24px; gap: 4px; overflow-y: auto; align-items: stretch;
}
.main-nav.is-open a { display: block; padding: 14px 4px; font-size: 1.15rem; border-bottom: 1px solid var(--ink-line); }
body.nav-open { overflow: hidden; }

/* ============================================================ HERO */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 16s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(10,12,14,.94) 0%, rgba(10,12,14,.72) 32%, rgba(10,12,14,.42) 60%, rgba(10,12,14,.55) 100%);
}

.hero-mark {
  position: absolute; inset-inline-end: -4%; top: 6%; width: min(52vw, 620px); height: auto; color: rgba(255,255,255,.14);
  z-index: 1; pointer-events: none;
}
.hero-mark .mark-circle, .hero-mark .mark-star {
  stroke-dasharray: 620; stroke-dashoffset: 620; animation: traceMark 2.6s var(--ease) .3s forwards;
}
.hero-mark .mark-star { animation-delay: .8s; }
@keyframes traceMark { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-mark .mark-circle, .hero-mark .mark-star { stroke-dashoffset: 0; } .hero-img { animation: none; transform: none; } }

.hero-inner { position: relative; z-index: 2; padding-block: 160px 64px; width: 100%; }
.eyebrow.on-dark, .hero .eyebrow { color: var(--brand-light); }
.hero-title { font-size: clamp(2.3rem, 1.5rem + 3.6vw, 4.6rem); line-height: 1.08; max-width: 16ch; margin-bottom: 22px; }
.hero-sub { max-width: 56ch; font-size: 1.1rem; color: #dfe4e9; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }

.hero-stats { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 700; color: #fff; }
.stat-label { font-size: .78rem; color: #aab2bb; max-width: 14ch; }
.stat-sep { width: 1px; height: 34px; background: rgba(255,255,255,.22); }

.scroll-cue { position: absolute; bottom: 20px; inset-inline-end: 50%; transform: translateX(50%); z-index: 2; }
.scroll-cue span { display: block; width: 22px; height: 34px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 999px; position: relative; }
.scroll-cue span::before { content:""; position:absolute; top:6px; inset-inline-start:50%; width:3px; height:6px; background:#fff; border-radius:2px; transform:translateX(-50%); animation: cueMove 1.8s ease-in-out infinite; }
@keyframes cueMove { 0%,100% { top:6px; opacity:1; } 60% { top:16px; opacity:0; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span::before { animation: none; } }

/* ============================================================ ABOUT */
.about-grid { display: grid; gap: 44px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: .85fr 1fr; align-items: center; gap: 64px; } }

.about-media { position: relative; }
.about-media img:first-child { border-radius: var(--radius); width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about-media-sm {
  position: absolute; width: 46%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-sm);
  bottom: -28px; inset-inline-start: -24px; border: 6px solid var(--paper); box-shadow: 0 14px 34px -12px rgba(0,0,0,.35);
}

.about-copy .lead { font-size: 1.12rem; color: var(--ink); margin-bottom: 16px; }
.about-copy p { color: var(--steel); margin-bottom: 16px; }
.about-copy .lead { color: var(--ink); }

.about-facts { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.about-facts li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: .95rem; }
.about-facts svg { flex: none; width: 22px; height: 22px; color: var(--brand); }

/* ============================================================ SERVICES */
.services { background: var(--paper); }
.service-note {
  display: flex; gap: 14px; align-items: flex-start; margin: 0 0 40px; padding: 16px 20px;
  background: var(--brand-tint); border: 1px solid var(--paper-line); border-radius: var(--radius-sm);
  color: var(--ink); max-width: 62ch;
}
.service-note svg { flex: none; width: 22px; height: 22px; color: var(--brand); margin-top: 2px; }
.service-note strong { font-weight: 700; }

.service-list { display: flex; flex-direction: column; border-top: 1px solid var(--paper-line); }
.service-row {
  display: flex; gap: 18px; align-items: flex-start; padding: 26px 0; border-bottom: 1px solid var(--paper-line);
}
.service-row svg { flex: none; width: 28px; height: 28px; color: var(--brand); margin-top: 3px; }
.service-row h3 { font-size: 1.12rem; margin-bottom: 5px; }
.service-row p { color: var(--steel); max-width: 62ch; }

@media (min-width: 780px) {
  .service-row { padding: 30px 0; gap: 26px; }
  .service-row h3 { font-size: 1.2rem; }
}

/* ============================================================ GALLERY */
.work { background: var(--paper-soft); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.chip {
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--paper-line); font-weight: 600; font-size: .85rem;
  color: var(--steel); background: transparent; transition: all .2s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1080px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-item {
  margin: 0; position: relative; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in;
  aspect-ratio: 4/5; background: var(--paper-line);
}
.gallery-item:nth-child(3n+1) { aspect-ratio: 4/5; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 14px 12px 10px;
  background: linear-gradient(0deg, rgba(0,0,0,.78), transparent);
  color: #fff; font-size: .78rem; font-weight: 600; opacity: 0; transform: translateY(6px);
  transition: opacity .25s, transform .25s;
}
.gallery-item:hover figcaption, .gallery-item:focus-within figcaption { opacity: 1; transform: translateY(0); }
.gallery-item.is-hidden { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8,9,10,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 78vh; border-radius: 8px; object-fit: contain; }
.lightbox p { color: #dfe4e9; font-size: .9rem; }
.lightbox-close { position: absolute; top: 18px; inset-inline-end: 22px; color: #fff; font-size: 2rem; line-height: 1; width: 44px; height: 44px; }

/* ============================================================ CERTIFICATIONS */
.certifications { background: var(--ink); }
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (min-width: 780px) { .cert-grid { grid-template-columns: repeat(4, 1fr); } }
.cert-card { margin: 0; background: var(--ink-soft); border: 1px solid var(--ink-line); border-radius: var(--radius); overflow: hidden; transition: transform .25s var(--ease), border-color .25s; }
.cert-card:hover { transform: translateY(-4px); border-color: var(--brand); }
.cert-thumb { aspect-ratio: 4/5; overflow: hidden; background: #fff; cursor: zoom-in; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cert-card figcaption { padding: 16px 16px 20px; }
.cert-card h3 { color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.cert-card p { color: var(--brand-light); font-size: .85rem; font-weight: 600; margin-bottom: 8px; }
.cert-meta { display: block; font-size: .74rem; color: var(--steel-light); }

.cert-plant-note {
  margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--ink-line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.cert-plant-note-text { display: flex; align-items: flex-start; gap: 12px; max-width: 56ch; }
.cert-plant-note-text svg { flex: none; width: 22px; height: 22px; color: var(--brand-light); margin-top: 2px; }
.cert-plant-note-text p { color: #dfe4e9; }
.cert-plant-badges { display: flex; gap: 12px; }
.cert-plant-badges img { height: 52px; width: auto; border-radius: 6px; background: #fff; padding: 8px 12px; }

/* ============================================================ CLIENTS — auto-scrolling logo marquee */
.clients { background: var(--ink); overflow: hidden; }
.marquee {
  position: relative; overflow-x: auto; overflow-y: hidden; cursor: grab;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee::-webkit-scrollbar { display: none; }
.marquee.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.marquee-track { display: flex; gap: 20px; width: max-content; padding-block: 4px; }
.marquee-track img {
  height: 84px; width: auto; flex: none; border-radius: var(--radius-sm); background: #fff;
  padding: 14px 22px; box-shadow: 0 8px 22px -12px rgba(0,0,0,.35);
}

/* ============================================================ QUOTE */
.quote {
  background:
    linear-gradient(var(--paper-soft), var(--paper-soft)) padding-box,
    repeating-linear-gradient(0deg, transparent 0 39px, var(--paper-line) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--paper-line) 39px 40px);
  background-blend-mode: normal;
}
.quote-grid { display: grid; gap: 44px; }
@media (min-width: 960px) { .quote-grid { grid-template-columns: .85fr 1fr; gap: 72px; } }
.quote-copy p { color: var(--steel); margin-bottom: 26px; max-width: 48ch; }

.quote-form { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 50px -22px rgba(10,37,64,.28); border: 1px solid var(--paper-line); }
.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--paper-line); border-radius: var(--radius-sm);
  background: var(--paper); transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; }
.field textarea { resize: vertical; }
.hp-field { position: absolute; inset-inline-start: -9999px; }
.form-note { font-size: .82rem; color: var(--steel); margin-top: 14px; text-align: center; }
.form-note a { color: var(--brand); font-weight: 700; }
.form-status { text-align: center; font-weight: 700; font-size: .88rem; margin-top: 10px; min-height: 1.2em; }
.form-status.is-error { color: var(--brand-dark); }
.form-status.is-ok { color: #1f7a4d; }

/* ============================================================ FOOTER */
.site-footer { background: var(--ink); color: #c3cad2; padding-block: 64px 28px; }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; } }
.footer-brand p { margin: 16px 0 18px; font-family: var(--font-display); font-size: 1.05rem; color: #fff; max-width: 26ch; }
.social-row { display: flex; gap: 10px; }
.social-row a { width: 38px; height: 38px; border: 1px solid var(--ink-line); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; transition: border-color .2s, color .2s; }
.social-row a:hover { border-color: var(--brand); color: var(--brand); }
.footer-col h4 { color: #fff; font-size: .92rem; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .9rem; transition: color .2s; }
.footer-col a:hover { color: var(--brand-light); }
.footer-col address { font-size: .9rem; line-height: 1.7; margin-bottom: 10px; }
.map-link { color: var(--brand-light); font-weight: 700; font-size: .85rem; }
.footer-bottom { border-top: 1px solid var(--ink-line); margin-top: 48px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .78rem; color: var(--steel-light); }

/* ============================================================ MISC */
::selection { background: var(--brand-light); color: var(--ink); }
