/* ===== Design tokens ===== */
:root {
  --c-bg: #ffffff;
  --c-bg-alt: #f1f5f9;
  --c-dark: #0b1220;
  --c-dark-2: #111a2e;
  --c-text: #0f172a;
  --c-muted: #64748b;
  --c-border: #e2e8f0;
  --c-primary: #0ea5e9;
  --c-primary-dark: #0284c7;
  --c-accent: #f59e0b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.15);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.container--narrow { width: min(780px, 100% - 2.5rem); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: .75rem;
}
.accent {
  background: linear-gradient(90deg, var(--c-primary), #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s, background .2s, box-shadow .2s, color .2s, border-color .2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: 0 8px 20px rgba(14,165,233,.35); }
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: rgba(14,165,233,.08); border-color: var(--c-primary); color: var(--c-primary); }
.btn--sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* ===== Header ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  color: #fff;
  transition: background .3s, box-shadow .3s, color .3s;
}
.header.is-scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--c-border);
  color: var(--c-text);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; }
.logo__img { height: 32px; width: auto; }
.logo__img--dark { display: none; }
.header.is-scrolled .logo__img--light, .header.menu-open .logo__img--light { display: none; }
.header.is-scrolled .logo__img--dark, .header.menu-open .logo__img--dark { display: block; }
.nav { display: flex; align-items: center; gap: 1.8rem; font-weight: 500; font-size: .95rem; }
.nav a:not(.btn) { opacity: .85; transition: opacity .2s, color .2s; }
.nav a:not(.btn):hover { opacity: 1; color: var(--c-primary); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .3s, opacity .3s; }
.header .nav-toggle { color: inherit; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  color: #fff;
  background: radial-gradient(ellipse at 70% 30%, #1e3a5f 0%, var(--c-dark) 60%);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__grid {
  position: absolute;
  inset: -50% -10% 0;
  background-image:
    linear-gradient(rgba(56,189,248,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.12) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(60deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 10%, transparent 80%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 80%);
  animation: grid-move 6s linear infinite;
}
@keyframes grid-move { to { background-position: 0 60px; } }

.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.hero__lead { font-size: 1.15rem; color: #cbd5e1; max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 3rem; }
.hero__stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 2.5rem; flex-wrap: wrap; }
.hero__stats strong { display: block; font-size: 2rem; font-weight: 800; }
.hero__stats span { color: #94a3b8; font-size: .9rem; }

.hero__inner > * { min-width: 0; }
.hero__visual { position: relative; display: grid; place-items: center; isolation: isolate; }
.hero__photo {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
  animation: hover 5s ease-in-out infinite;
}
.hero__photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.hero__hud {
  position: absolute;
  inset: 1rem;
  pointer-events: none;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.hero__hud::before, .hero__hud::after {
  content: "";
  position: absolute;
  width: 28px; height: 28px;
  border: 2px solid rgba(255,255,255,.7);
}
.hero__hud::before { top: 0; inset-inline-start: 0; border-inline-end: 0; border-bottom: 0; }
.hero__hud::after { bottom: 0; inset-inline-end: 0; border-inline-start: 0; border-top: 0; }
.hero__hud span { position: absolute; }
.hero__rec { top: .35rem; inset-inline-end: .2rem; display: flex; align-items: center; gap: .4rem; }
.hero__rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: blink 1.2s steps(2) infinite; }
.hero__alt { bottom: .35rem; inset-inline-start: .2rem; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hover { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero__scan {
  position: absolute;
  bottom: -30%;
  z-index: -1;
  width: 60%;
  height: 50%;
  background: linear-gradient(to bottom, rgba(56,189,248,.35), transparent);
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
  animation: scan 4s ease-in-out infinite;
  opacity: .6;
}
@keyframes scan { 0%,100% { opacity: .25; } 50% { opacity: .65; } }

/* ===== Trust bar ===== */
.trust { background: var(--c-dark-2); color: #94a3b8; padding: 1.2rem 0; font-size: .9rem; }
.trust__inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.trust__inner > span { color: #fff; font-weight: 600; }
.trust ul { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 2rem; padding: 0; margin: 0; }
.trust li::before { content: "✓ "; color: var(--c-primary); font-weight: 700; }

/* ===== Sections ===== */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--alt { background: var(--c-bg-alt); }
.section--dark { background: var(--c-dark); color: #fff; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 3.5rem; }
.section__head p { color: var(--c-muted); font-size: 1.1rem; }

/* ===== Service cards ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  font-size: 1.6rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(14,165,233,.15), rgba(34,211,238,.15));
  margin-bottom: 1.2rem;
}
.card p { color: var(--c-muted); }
.card__list { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.card__list li { padding: .25rem 0; }
.card__list li::before { content: "→ "; color: var(--c-primary); font-weight: 700; }

/* ===== Industries ===== */
.industries { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.industry {
  display: flex; align-items: center; gap: .9rem;
  background: var(--c-bg);
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.industry span { font-size: 1.6rem; }

/* ===== Process ===== */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem; counter-reset: step; }
.step { position: relative; padding-top: 1rem; border-top: 3px solid var(--c-border); }
.step::before { content: ""; position: absolute; top: -3px; inset-inline-start: 0; width: 40%; height: 3px; background: var(--c-primary); }
.step__num { font-size: 2.6rem; font-weight: 800; color: var(--c-primary); opacity: .25; display: block; }
.step p { color: var(--c-muted); }

/* ===== Portfolio ===== */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter {
  font: inherit; font-weight: 600; font-size: .9rem;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.filter.is-active, .filter:hover { background: var(--c-text); color: #fff; border-color: var(--c-text); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; gap: 1rem; }
.shot {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform .4s, opacity .4s;
}
.shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), transparent 55%); }
.shot:hover { transform: scale(1.02); }
.shot figcaption { position: absolute; inset-inline-start: 1.2rem; bottom: 1rem; z-index: 1; color: #fff; }
.shot figcaption strong { display: block; font-size: 1.1rem; }
.shot figcaption span { font-size: .85rem; opacity: .85; }
.shot.is-hidden { display: none; }
.shot--1 { grid-row: span 2; background-image: linear-gradient(160deg, #0ea5e9 0%, #1e40af 45%, #f59e0b 100%); }
.shot--2 { background-image: repeating-linear-gradient(45deg, #475569 0 18px, #64748b 18px 36px), linear-gradient(#334155, #334155); }
.shot--3 { background-image: linear-gradient(135deg, #312e81, #db2777 50%, #facc15); }
.shot--4 { background-image: linear-gradient(180deg, #38bdf8, #a7f3d0 60%, #65a30d); }
.shot--5 { grid-column: span 2; background-image: linear-gradient(120deg, #0f172a, #334155 50%, #94a3b8); }
.shot--6 { background-image: radial-gradient(circle at 30% 40%, #d6a76c, #92400e 70%); }

/* ===== Pricing ===== */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; align-items: stretch; }
.plan {
  position: relative;
  display: flex; flex-direction: column;
  padding: 2.2rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
}
.plan__price { font-size: 2.6rem; font-weight: 800; margin: .3rem 0; }
.plan__price span { font-size: .9rem; font-weight: 500; color: var(--c-muted); }
.plan__desc { color: var(--c-muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 2rem; flex: 1; }
.plan li { padding: .45rem 0; border-bottom: 1px dashed var(--c-border); }
.plan li::before { content: "✓"; color: var(--c-primary); font-weight: 700; margin-inline-end: .6rem; }
.plan--featured { background: var(--c-dark); color: #fff; border-color: var(--c-dark); box-shadow: var(--shadow-lg); transform: scale(1.03); }
.plan--featured .plan__desc, .plan--featured .plan__price span { color: #94a3b8; }
.plan--featured li { border-color: rgba(255,255,255,.12); }
.plan__badge {
  position: absolute; top: -12px; inset-inline-end: 1.5rem;
  background: var(--c-accent); color: #1f1300;
  font-size: .75rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ===== Testimonials ===== */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.quote { margin: 0; background: var(--c-bg); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.quote p { font-size: 1.05rem; }
.quote footer { color: var(--c-muted); font-weight: 600; font-size: .9rem; }

/* ===== FAQ ===== */
.faq details { border-bottom: 1px solid var(--c-border); padding: 1.2rem 0; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.08rem;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--c-primary); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--c-muted); margin: .8rem 0 0; }

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
.contact__info p { color: #cbd5e1; font-size: 1.1rem; }
.contact__list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.contact__list li { display: flex; align-items: center; gap: .8rem; color: #e2e8f0; }
.contact__list a:hover { color: var(--c-primary); }
.contact__list span {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: rgba(255,255,255,.06);
}

.form { background: var(--c-dark-2); padding: 2rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.08); display: grid; gap: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: grid; gap: .4rem; font-size: .88rem; font-weight: 500; color: #cbd5e1; }
.form input, .form select, .form textarea {
  font: inherit;
  color: #fff;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: .75rem .9rem;
  transition: border-color .2s, box-shadow .2s;
  color-scheme: dark;
}
.form select option { color: var(--c-text); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(14,165,233,.25); }
.form .is-invalid { border-color: #f87171; }
.form__status { margin: 0; font-size: .95rem; min-height: 1.4em; }
.form__status.is-success { color: #4ade80; }
.form__status.is-error { color: #f87171; }

/* ===== Footer ===== */
.footer { background: #060b15; color: #64748b; padding: 1.8rem 0; font-size: .9rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 1.5rem; }
.footer a:hover { color: #fff; }
.footer__credit { width: 100%; font-size: .78rem; opacity: .7; }
.footer__credit a { text-decoration: underline; }

/* ===== Language switch ===== */
.lang-switch {
  font-weight: 600;
  padding: .35rem .8rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: .85;
}
.lang-switch:hover { opacity: 1; color: var(--c-primary); }

/* ===== Arabic / RTL ===== */
:root:lang(ar) { --font: "Tajawal", "Inter", system-ui, "Segoe UI", Tahoma, sans-serif; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.35; }
:lang(ar) .eyebrow { letter-spacing: 0; text-transform: none; font-size: .9rem; }
:lang(ar) .plan__badge { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .card__list li::before { content: "← "; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.plan--featured.reveal.is-visible { transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__actions, .hero__stats { justify-content: center; }
  .hero__visual { order: -1; max-width: 420px; margin: 0 auto; }
  .contact { grid-template-columns: 1fr; gap: 2.5rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .shot--5 { grid-column: span 1; }
  .plan--featured, .plan--featured.reveal.is-visible { transform: none; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    color: var(--c-text);
    padding: 1rem 1.25rem 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform .35s ease;
  }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--c-border); }
  .nav .btn { margin-top: 1rem; }
  .nav.is-open { transform: translateY(0); }
  .header.menu-open { background: #fff; color: var(--c-text); }
  .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); }
}

@media (max-width: 600px) {
  .form__row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .shot--1 { grid-row: span 1; }
  .hero__stats { gap: 1.5rem; }
  .footer__inner { justify-content: center; text-align: center; }
}

/* ===== WhatsApp widget ===== */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  inset-inline-end: 1.5rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: .6rem;
  height: 58px;
  padding-inline: .9rem 1.2rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, .4);
  transition: transform .2s, box-shadow .2s;
}
.wa-float svg { width: 32px; height: 32px; flex-shrink: 0; }
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(37, 211, 102, .5); }
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #25d366;
  animation: wa-pulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes wa-pulse { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }

@media (max-width: 600px) {
  .wa-float { width: 56px; height: 56px; padding: 0; justify-content: center; bottom: 1rem; inset-inline-end: 1rem; }
  .wa-float__label { display: none; }
}

/* ===== Social links ===== */
.social { display: flex; align-items: center; gap: .5rem; margin-top: 2rem; }
.social__label { color: #cbd5e1; font-weight: 600; margin-inline-end: .3rem; }
.social__link {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  color: #e2e8f0;
  transition: background .2s, color .2s, transform .2s;
}
.social__link svg { width: 16px; height: 16px; }
.social__link:hover { background: var(--c-primary); color: #fff; transform: translateY(-2px); }
.social--footer { margin: 0; gap: .5rem; }
.social--footer .social__link { width: 26px; height: 26px; border-radius: 7px; }
.social--footer .social__link svg { width: 13px; height: 13px; }
