/* ===== شايب & الدنا – مهندسون ومعماريون ===== */
:root {
  --ink: #15171d;
  --ink-2: #1e2129;
  --ink-3: #2a2e38;
  --paper: #ffffff;
  --tint: #f5f4f1;
  --line: #e4e2dc;
  --text: #2b2d33;
  --muted: #6b6e76;
  --on-dark: #e9eaee;
  --on-dark-muted: #a3a7b2;

  /* ألوان الشعار */
  --c-red: #e52421;
  --c-orange: #f39200;
  --c-yellow: #ffd500;
  --c-green: #95c11f;
  --c-blue: #3fa9f5;
  --c-purple: #a1288a;
  --accent: #f39200;
  --grad: linear-gradient(90deg, var(--c-purple), var(--c-red), var(--c-orange), var(--c-yellow), var(--c-green), var(--c-blue));

  --radius: 14px;
  --shadow: 0 10px 30px rgba(21, 23, 29, .12);
  --head: "Cairo", "Tajawal", system-ui, sans-serif;
  --body: "Tajawal", "Cairo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.35; margin: 0 0 .5em; color: var(--ink); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-tint { background: var(--tint); }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--head); font-weight: 700; font-size: .9rem;
  letter-spacing: .02em; color: var(--c-yellow); margin-bottom: .8em;
}
.eyebrow::before { content: ""; width: 34px; height: 4px; border-radius: 2px; background: var(--grad); }
.eyebrow.dark { color: var(--c-purple); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.section-head { max-width: 720px; margin-bottom: 40px; }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  font: 700 1rem var(--head); text-decoration: none;
  color: var(--ink); background: var(--c-yellow);
  padding: 12px 28px; border-radius: 999px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 213, 0, .35); }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px #fff; }
.btn-sm { padding: 8px 20px; font-size: .95rem; }
:focus-visible { outline: 3px solid var(--c-blue); outline-offset: 3px; }

/* ===== Header ===== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s;
}
.site-header.is-scrolled { background: rgba(255,255,255,.97); box-shadow: 0 2px 18px rgba(0,0,0,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 52px; width: auto; background: #fff; border-radius: 10px; padding: 4px 8px; }
.is-scrolled .brand img { padding: 0; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) {
  font-family: var(--head); font-weight: 600; text-decoration: none; color: #fff;
  position: relative; padding: 6px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px; border-radius: 2px;
  background: var(--grad); transform: scaleX(0); transition: transform .25s;
}
.nav a:not(.btn):hover::after, .nav a.is-current::after { transform: scaleX(1); }
.is-scrolled .nav a:not(.btn) { color: var(--ink); }
.nav-toggle { display: none; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  min-width: 44px; height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  font: 700 .95rem var(--head); color: #fff; background: transparent;
  border: 2px solid rgba(255,255,255,.7); transition: .2s;
}
.lang-toggle:hover { background: rgba(255,255,255,.12); }
.is-scrolled .lang-toggle { color: var(--ink); border-color: var(--line); }
.is-scrolled .lang-toggle:hover { border-color: var(--ink); background: transparent; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; overflow: hidden; padding-top: 110px;
}
.hero-slides, .hero-shade { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 7s linear;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero-shade { background: linear-gradient(to left, rgba(21,23,29,.92) 0%, rgba(21,23,29,.7) 45%, rgba(21,23,29,.25) 100%), linear-gradient(to top, rgba(21,23,29,.9), transparent 45%); }
[dir="ltr"] .hero-shade { background: linear-gradient(to right, rgba(21,23,29,.92) 0%, rgba(21,23,29,.7) 45%, rgba(21,23,29,.25) 100%), linear-gradient(to top, rgba(21,23,29,.9), transparent 45%); }
.hero-content { position: relative; max-width: 1200px; padding-bottom: 40px; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 7vw, 5rem); font-weight: 800; margin-bottom: .3em; max-width: 14ch; }
[lang="en"] .hero h1 { line-height: 1.12; max-width: 16ch; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 620px; color: #dfe1e6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.stats {
  position: relative; list-style: none; margin: 0 0 40px; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.2);
}
.stats li { padding: 22px 0 0; }
.stats strong { display: block; font: 800 clamp(1.6rem, 3vw, 2.3rem) var(--head); color: #fff; line-height: 1.2; }
.stats span { color: var(--on-dark-muted); font-size: .95rem; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-media { position: relative; }
.about-media > img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; filter: saturate(.8); }
.about-badge {
  position: absolute; inset-inline-start: -24px; bottom: -24px;
  background: #fff; padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.vision {
  margin-top: 28px; padding: 22px 26px; border-radius: var(--radius);
  background: var(--tint); border-inline-start: 5px solid var(--c-orange);
}
.vision h3 { margin-bottom: .3em; }
.vision p { margin: 0; }

.goals-title { margin-top: 80px; font-size: 1.6rem; }
.goals { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.goals li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; overflow: hidden; }
.goals li::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.goals li:nth-child(1)::before { background: var(--c-purple); }
.goals li:nth-child(2)::before { background: var(--c-red); }
.goals li:nth-child(3)::before { background: var(--c-orange); }
.goals li:nth-child(4)::before { background: var(--c-green); }
.goals li:nth-child(5)::before { background: var(--c-blue); }
.goals span { font: 800 1.8rem var(--head); color: var(--line); display: block; line-height: 1; margin-bottom: 10px; }
.goals p { margin: 0; font-size: .98rem; }

/* ===== Services ===== */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service {
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .25s, border-color .25s;
}
.service:hover { transform: translateY(-4px); border-color: var(--c-orange); }
.service svg { width: 44px; height: 44px; fill: none; stroke: var(--c-yellow); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.service:nth-child(4n+2) svg { stroke: var(--c-blue); }
.service:nth-child(4n+3) svg { stroke: var(--c-green); }
.service:nth-child(4n) svg { stroke: #e86bc9; }
.service p { color: var(--on-dark-muted); margin: 0; font-size: .97rem; }

/* ===== Portfolio ===== */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font: 600 .95rem var(--head); padding: 8px 20px; border-radius: 999px; cursor: pointer; transition: .2s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--tint); aspect-ratio: 4/3; border: 0; padding: 0; text-align: start; font: inherit;
}
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover img { transform: scale(1.06); }
.card-info {
  position: absolute; inset: auto 0 0 0; padding: 50px 20px 16px; color: #fff;
  background: linear-gradient(to top, rgba(21,23,29,.92), transparent);
}
.card-info h3 { color: #fff; font-size: 1.08rem; margin: 0; }
.card-info span { font-size: .88rem; color: #cfd2d9; }
.card-count {
  position: absolute; top: 12px; inset-inline-end: 12px; background: rgba(21,23,29,.75); color: #fff;
  font-size: .8rem; padding: 2px 10px; border-radius: 999px;
}
.card.is-hidden { display: none; }

/* ===== International ===== */
.intl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.intl article { background: #fff; border-radius: var(--radius); padding: 24px 20px; border: 1px solid var(--line); }
.intl .country { font: 700 .85rem var(--head); color: var(--c-purple); display: block; margin-bottom: 8px; }
.intl h3 { font-size: 1.05rem; }
.intl p { font-size: .93rem; color: var(--muted); margin: 0; }

/* ===== Projects table ===== */
.table-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.table-tools input, .table-tools select, .contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; font-size: 1rem; color: var(--text); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
.table-tools input { flex: 1 1 280px; }
.count { color: var(--muted); font-size: .95rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); max-height: 640px; overflow-y: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 880px; }
.ptable th {
  position: sticky; top: 0; background: var(--ink); color: #fff; font-family: var(--head);
  font-weight: 700; text-align: start; padding: 12px 14px; white-space: nowrap;
}
.ptable td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.ptable tbody tr:nth-child(even) { background: #fafaf8; }
.ptable tbody tr:hover { background: #fff7e6; }
.ptable td:first-child { color: var(--muted); }
.ptable td:nth-child(2) { font-weight: 700; color: var(--ink); }
.status { display: inline-block; font-size: .82rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.status.done { background: #eaf5d6; color: #4a6b05; }
.status.wip { background: #fff1d6; color: #9a5a00; }

/* ===== Team ===== */
.founders { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 56px; }
.founder { display: flex; gap: 22px; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius); padding: 24px; }
.founder img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 4px var(--ink), 0 0 0 7px var(--c-orange); }
.founder .role { color: var(--c-yellow); font-weight: 700; margin-bottom: .6em; }
.founder p { color: var(--on-dark-muted); font-size: .97rem; }
.founder p:last-child { margin: 0; }
.sub-title { font-size: 1.25rem; margin: 0 0 18px; }
.people { list-style: none; padding: 0; margin: 0 0 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.people li { padding: 16px 18px; border-radius: 12px; background: var(--ink-2); border-inline-start: 4px solid var(--c-blue); }
.people li:nth-child(3n+2) { border-color: var(--c-green); }
.people li:nth-child(3n) { border-color: var(--c-purple); }
.people strong { display: block; color: #fff; font-family: var(--head); }
.people span { color: var(--on-dark-muted); font-size: .92rem; }
.tools { border-top: 1px solid var(--ink-3); padding-top: 32px; }
.tools p { color: var(--on-dark-muted); }
.tools ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tools li { font: 600 .9rem var(--head); direction: ltr; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--ink-3); color: #fff; }

/* ===== Credentials ===== */
.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cred { background: #fff; border-radius: var(--radius); padding: 30px; border: 1px solid var(--line); }
.cred-num { font: 800 2rem var(--head); display: block; margin-bottom: 6px; }
.cred:first-child .cred-num { color: var(--c-orange); }
.cred:last-child .cred-num { color: var(--c-blue); }
.cred p { margin: 0; color: var(--muted); }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.contact-list svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--c-purple); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 3px; }
.contact-list a { font-weight: 700; text-decoration: none; }
.contact-list a:hover { color: var(--c-purple); }
.contact-list small { color: var(--muted); align-self: center; }
.contact-list li > span { flex: 1; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/9; }
.map iframe { width: 100%; height: 100%; border: 0; }
.contact-form { background: var(--tint); border-radius: var(--radius); padding: clamp(24px, 4vw, 36px); display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-weight: 700; font-family: var(--head); font-size: .95rem; }
.contact-form input, .contact-form select, .contact-form textarea { font-family: var(--body); font-weight: 400; width: 100%; }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.form-note { margin: 0; color: var(--muted); font-size: .92rem; min-height: 1.5em; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 44px 0; border-top: 4px solid transparent; border-image: var(--grad) 1; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer-inner img { background: #fff; padding: 6px 10px; border-radius: 10px; }
.footer-inner p { margin: 0; }
.footer-inner .copy { margin-inline-start: auto; font-size: .9rem; }
.footer-inner .credit { flex-basis: 100%; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; text-align: center; }
.credit a { color: #fff; font-weight: 700; text-decoration: none; }
.credit a:hover, .credit a:focus-visible { text-decoration: underline; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,11,14,.95);
  display: flex; align-items: center; justify-content: center; padding: 20px 70px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 1200px; width: 100%; text-align: center; }
.lightbox img { max-height: 78vh; margin: 0 auto; border-radius: 8px; object-fit: contain; }
.lightbox figcaption { color: #fff; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; align-items: baseline; }
.lightbox figcaption strong { font-family: var(--head); font-size: 1.1rem; }
.lightbox figcaption span, .lightbox figcaption em { color: #aeb2bc; font-style: normal; font-size: .92rem; }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer;
  width: 50px; height: 50px; border-radius: 50%; font-size: 2rem; line-height: 1; display: grid; place-items: center;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 18px; inset-inline-end: 18px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { inset-inline-start: 12px; }
.lb-next { inset-inline-end: 12px; }
.lb-prev::before { content: "\203A"; }
.lb-next::before { content: "\2039"; }
[dir="ltr"] .lb-prev::before { content: "\2039"; }
[dir="ltr"] .lb-next::before { content: "\203A"; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: opacity .01s; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .goals { grid-template-columns: repeat(2, 1fr); }
  .intl { grid-template-columns: repeat(2, 1fr); }
  .people { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-toggle {
    display: grid; gap: 5px; background: rgba(255,255,255,.95); border: 0; border-radius: 10px;
    padding: 12px 10px; cursor: pointer;
  }
  .lang-toggle, .is-scrolled .lang-toggle { background: rgba(255,255,255,.95); color: var(--ink); border-color: transparent; }
  .header-actions { gap: 10px; }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: .25s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 76px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 16px 20px; box-shadow: 0 12px 24px rgba(0,0,0,.12);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a:not(.btn) { color: var(--ink); padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; text-align: center; }
  .about-grid, .contact-grid, .founders, .creds { grid-template-columns: 1fr; }
  .about-media > img { aspect-ratio: 16/10; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .gallery, .services, .goals, .intl, .people { grid-template-columns: 1fr; }
  .founder { flex-direction: column; }
  .about-badge { inset-inline-start: 12px; bottom: -18px; padding: 12px; }
  .about-badge img { width: 80px; }
  .lightbox { padding: 16px; }
  .lb-nav { top: auto; bottom: 18px; transform: none; }
  .footer-inner .copy { margin-inline-start: 0; }
}
