/* =========================================================
   كفايات روبوتكس — Hero screen
   Faithful rebuild of Figma node 2153:230
   Tokens:
     أساسي (primary indigo)   #2A1E59
     سكندري (accent lime)      #ACD91A
     نص ثانوي / border         #6B6790
     تينت بنفسجي               #EEEDF6
     نصوص/بورد (subtext)       #E2E8F5
     scrim base                #0A0E1A
   Font: Tajawal (500 / 700)
   ========================================================= */

:root {
  --primary:  #2a1e59;
  --accent:   #acd91a;
  --border:   #6b6790;
  --tint:     #eeedf6;
  --subtext:  #e2e8f5;
  --scrim:    10, 14, 26;      /* #0A0E1A */
  /* Poetsen One first for ALL text (per request): English renders in Poetsen One,
     while Arabic falls back to Tajawal per-glyph (Poetsen One is Latin-only) */
  --font: "Poetsen One", "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Poetsen One", "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

/* headings use the display font (English → Poetsen One, Arabic → Tajawal) */
.hero__title,
.article__heading,
.article__facts-title,
.gallery__title,
.whyus__title,
.whyus-card__title,
.howitworks__title,
.howitworks__step-title,
.pricing__title,
.faq__title,
.faq__q,
.contact__title,
.contact__form-title,
.program__title,
.program__outcomes-title,
.location__title,
.location__info-title,
.location__map-card-title,
.footer__col-title,
.stats__num {
  font-family: var(--font-display);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

/* offset anchored sections so they aren't hidden under the fixed header */
#home, #whyus, #how, #gallery, #pricing, #faq, #location, #contact {
  scroll-margin-top: 104px;
}

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

body {
  font-family: var(--font);
  background: #0a0e1a;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* =========================================================
   Hero shell
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  height: 781px;          /* exact Figma frame height */
  overflow: hidden;
  isolation: isolate;
  background: #05070f;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;                         /* image fallback, behind the video */
  background: url("../assets/hero-bg.png") center 30% / cover no-repeat;
  background-color: #05070f;
}

/* hero background video (plays behind the scrim + content) */
.hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* text scrim — Figma node 2144:155 (right-side darkening)
   + a soft centre vignette so the headline stays legible */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 46%,
      rgba(var(--scrim), 0.45), rgba(var(--scrim), 0) 70%),
    linear-gradient(to right,
      rgba(var(--scrim), 0) 0%,
      rgba(var(--scrim), 0) 75%,
      rgba(var(--scrim), 0.72) 100%),
    linear-gradient(to bottom,
      rgba(var(--scrim), 0.35) 0%,
      rgba(var(--scrim), 0) 22%);
}

/* =========================================================
   Nav (pill) — Figma node 2144:208 / 209
   ========================================================= */
.nav {
  position: fixed;                    /* sticks to the top while scrolling */
  top: 40px;                          /* Figma: pill at y=40 */
  left: 0;
  right: 0;
  z-index: 900;                       /* above videos/iframe (they composite over low z-index); lightbox stays at 1000 */
  /* side gap centres a 1152px pill; shrinking it to 0 grows the bar to full width.
     Animating only padding + top (no transform/width swap) makes the morph smooth. */
  padding-inline: max(24px, calc((100% - 1152px) / 2));
  transition: top 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__inner {
  height: 85px;
  border: 1px solid var(--border);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 24px;
  backdrop-filter: blur(2px);
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              backdrop-filter 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* condensed, FULL-WIDTH opaque bar once the page is scrolled
   (only `top` + the nav's side padding animate → smooth expand) */
.nav.is-scrolled {
  top: 0;
  padding-inline: 0;
}
.nav.is-scrolled .nav__inner {
  height: 68px;
  border-radius: 0;
  border-inline: 0;
  border-top: 0;
  border-color: rgba(107, 103, 144, 0.4);
  background: rgba(10, 14, 26, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  /* bar spans the viewport, but the content stays aligned to the 1152 grid */
  padding-inline: max(24px, calc((100% - 1152px) / 2));
}
.nav.is-scrolled .nav__logo img { height: 42px; transition: height 0.35s ease; }

/* logo (rightmost in RTL) */
.nav__logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 18px;
  color: var(--tint);
  white-space: nowrap;
}
.nav__links a {
  font-weight: 500;
  color: var(--tint);
  opacity: 0.92;
  transition: opacity 0.2s ease, color 0.2s ease;
  position: relative;
  padding: 4px 0;
}
.nav__links a:hover { opacity: 1; }
.nav__links a.is-active { font-weight: 700; opacity: 1; }

/* CTA (leftmost in RTL) — node 2144:212 */
.nav__cta {
  flex-shrink: 0;
  width: 128px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--tint);
  font-size: 18px;
  font-weight: 700;
  /* physical radii from Figma: tl20 tr10 br20 bl10 */
  border-radius: 20px 10px 20px 10px;
  transition: transform 0.18s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.nav__cta:hover {
  filter: brightness(1.12);
  box-shadow: 0 8px 24px rgba(42, 30, 89, 0.5);
  transform: translateY(-1px);
}

/* language toggle + CTA grouped as one unit */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* language toggle */
.nav__lang {
  flex-shrink: 0;
  height: 40px;
  min-width: 48px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 12px 8px 12px 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease;
}
.nav__lang:hover {
  background: var(--accent);
  color: #10240a;
  transform: translateY(-1px);
}

/* mobile burger — hidden on desktop */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__burger span {
  width: 26px;
  height: 2px;
  background: var(--tint);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* =========================================================
   Hero content — Figma node 2144:156
   ========================================================= */
.hero__content {
  position: absolute;
  top: 302px;                         /* Figma: content block at y=302 */
  left: 50%;
  transform: translateX(-50%);
  width: 797px;
  max-width: calc(100% - 128px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  text-align: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.hero__title {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.18;
  color: #fff;
  white-space: nowrap;
}

.hero__sub {
  margin: 0;
  max-width: 685px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--subtext);
  text-align: right;
}

/* actions row — node 2144:160 (filled right, outline left) */
.hero__actions {
  display: flex;
  align-items: center;
  gap: 40px;
}

.btn {
  min-width: 210px;
  width: auto;
  height: 60px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  /* physical radii from Figma: tl25 tr10 br25 bl10 */
  border-radius: 25px 10px 25px 10px;
  transition: transform 0.18s ease, box-shadow 0.25s ease, filter 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn--filled {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.btn--filled:hover {
  filter: brightness(1.14);
  box-shadow: 0 12px 30px rgba(42, 30, 89, 0.5);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn--outline:hover {
  background: var(--accent);
  color: #10240a;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(172, 217, 26, 0.35);
}

/* =========================================================
   Floating drone — Figma node 2271:940 (image 17)
   ========================================================= */
.hero__drone {
  position: absolute;
  left: max(24px, calc(50% - 580px));
  top: 534px;                         /* Figma: y=534 */
  width: 156px;
  height: auto;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
  animation: droneBob 5s ease-in-out infinite;
}
@keyframes droneBob {
  0%, 100% { transform: translateY(-6px); }
  50%      { transform: translateY(8px); }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero__drone { animation: none; }
}

@media (max-width: 1200px) {
  .hero__content { max-width: calc(100% - 48px); }
  .hero__title { font-size: clamp(26px, 4.4vw, 40px); white-space: normal; }
  .hero__drone { left: 16px; top: 560px; width: 130px; }
}

@media (max-width: 900px) {
  .nav__inner { height: 72px; padding: 0 14px; }
  .nav__links { display: none; }         /* collapse links */
  .nav__burger { display: flex; }
  .nav__logo img { height: 42px; }

  .hero__sub { font-size: 18px; }
  .hero__drone { width: 118px; top: auto; bottom: 40px; left: 24px; }

  /* mobile dropdown */
  .nav__links.is-open {
    display: flex;
    position: absolute;
    top: 80px;
    inset-inline: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 18px 22px;
    background: rgba(10, 14, 26, 0.96);
    border: 1px solid var(--border);
    border-radius: 20px;
    z-index: 20;
  }
  .nav__links.is-open a { padding: 8px 0; font-size: 19px; }
}

/* phones: hero becomes static & auto-height so nothing overlaps */
@media (max-width: 760px) {
  .hero {
    height: auto;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    padding: 24px 18px 48px;
  }
  /* relative (not static) keeps the nav in flow but restores its z-index:900
     stacking context, so the open mobile menu sits above the hero instead of
     behind it (nav__inner's backdrop-filter would otherwise trap it) */
  .nav { position: relative; z-index: 900; transform: none; width: 100%; max-width: 100%; }
  .hero__content {
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin-top: 70px;
    gap: 40px;
  }
  .hero__drone { position: static; margin: 34px auto 0; }
}

@media (max-width: 560px) {
  .hero__actions { flex-direction: column; gap: 16px; width: 100%; }
  .btn { width: 100%; max-width: 340px; padding: 0 20px; white-space: normal; line-height: 1.3; }
  .hero__sub { text-align: center; }
  .nav__cta { width: 108px; height: 42px; font-size: 16px; }
}

/* =========================================================
   Drone cursor — the mouse flies a drone (desktop / fine pointer only)
   ========================================================= */
.drone-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 56px;
  height: auto;
  z-index: 2000;                 /* flies above everything, incl. the video lightbox */
  pointer-events: none;          /* never blocks clicks */
  will-change: transform;
  opacity: 0;                    /* revealed on first mouse move */
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
  transition: opacity 0.25s ease;
}
.drone-cursor.is-on { opacity: 1; }

/* the native arrow stays visible ON TOP of the drone (OS always paints it above
   the page), while the drone trails just under/behind the pointer */
