/* =========================================================
   JMC ENERGY — GLOBAL STYLES
   ========================================================= */

:root {
  --color-bg: #0b0d10;
  --color-bg-soft: #12151a;
  --color-surface: #161a20;
  --color-surface-2: #1c2128;
  --color-text: #f4f5f7;
  --color-text-muted: #a3a8b3;
  --color-border: rgba(255, 255, 255, 0.08);

  --color-gold: #ffc83d;
  --color-gold-soft: #ffe7a3;
  --color-gold-deep: #f7931e;
  --color-green: #34d399;
  --color-blue: #38bdf8;

  --grad-gold: linear-gradient(135deg, #ffe27a 0%, #ffc83d 45%, #f7931e 100%);
  --grad-dark: linear-gradient(180deg, #0b0d10 0%, #12151a 100%);
  --grad-glass: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 999px;

  --shadow-soft: 0 20px 60px -20px rgba(0,0,0,0.6);
  --shadow-gold: 0 10px 40px -10px rgba(255, 200, 61, 0.35);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1240px;
  --nav-h: 84px;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

html, body {
  background: var(--color-bg);
  color: var(--color-text);
}

body {
  font-family: "Poppins", "Tajawal", "Segoe UI", sans-serif;
  line-height: 1.65;
  background-image:
    radial-gradient(circle at 18% 8%, rgba(255,200,61,0.10), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(56,189,248,0.07), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(52,211,153,0.06), transparent 45%);
}

html[lang="ar"] body { font-family: "Tajawal", "Poppins", sans-serif; }

/* noise texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Containers / Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { position: relative; padding: 110px 0; }
.section-sm { padding: 70px 0; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
p { color: var(--color-text-muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--grad-gold);
  border-radius: 2px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; }

.gradient-text {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head { max-width: 700px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
  isolation: isolate;
  overflow: hidden;
}
.btn-primary {
  background: var(--grad-gold);
  color: #1a1305;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 50px -10px rgba(255,200,61,0.55); }
.btn-outline {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
}
.btn-outline:hover { border-color: var(--color-gold); color: var(--color-gold); transform: translateY(-3px); }
.btn-sm { padding: 12px 24px; font-size: 0.85rem; }

/* magnetic wrapper */
.magnetic { display: inline-block; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), height 0.4s var(--ease);
}
.navbar.scrolled {
  height: 70px;
  background: rgba(11,13,16,0.75);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px -20px rgba(0,0,0,0.6);
  border-bottom: 1px solid var(--color-border);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.15rem; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--grad-gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #1a1305; font-size: 1.1rem;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}
.brand-mark span { position: relative; z-index: 1; }
.brand-text small { display: block; font-size: 0.65rem; color: var(--color-text-muted); font-weight: 500; letter-spacing: 0.08em; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--grad-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
  border-radius: 2px;
}
html[lang="ar"] .nav-links a::after { transform-origin: right; }
.nav-links a:hover, .nav-links a.active { color: var(--color-text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.lang-switch button {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all 0.3s;
}
.lang-switch button.active { background: var(--grad-gold); color: #1a1305; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 1101;
}
.burger span { height: 2px; width: 100%; background: var(--color-text); border-radius: 2px; transition: 0.3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(11,13,16,0.98);
  backdrop-filter: blur(20px);
  z-index: 1090;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-size: 1.6rem; font-weight: 600; }
.mobile-menu .lang-switch { margin-top: 20px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,13,16,0.55) 0%, rgba(11,13,16,0.85) 70%, var(--color-bg) 100%),
    url("https://images.unsplash.com/photo-1509391366360-2e959784a276?q=80&w=2000&auto=format&fit=crop") center/cover no-repeat;
  z-index: -3;
}
.hero-glow {
  position: absolute;
  top: -20%; inset-inline-end: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(255,200,61,0.35), transparent 65%);
  filter: blur(40px);
  z-index: -2;
  animation: glow-pulse 8s ease-in-out infinite;
}
@keyframes glow-pulse { 0%,100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.15); opacity: 1; } }

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -1;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 75%);
  animation: grid-move 30s linear infinite;
}
@keyframes grid-move { to { background-position: 60px 60px; } }

.hero-content { position: relative; z-index: 2; max-width: 880px; padding-top: var(--nav-h); }
.hero-content .eyebrow { color: var(--color-gold-soft); }
.hero-content h1 { margin-bottom: 24px; }
.hero-content h1 .line { display: block; overflow: hidden; }
.hero-content p { font-size: 1.15rem; max-width: 620px; margin-bottom: 40px; color: rgba(255,255,255,0.78); }
.hero-cta { display: flex; gap: 18px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--color-text-muted);
  z-index: 2;
}
.hero-scroll .dot-track {
  width: 1px; height: 50px; background: var(--color-border);
  position: relative; overflow: hidden;
}
.hero-scroll .dot-track::after {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 14px;
  background: var(--grad-gold);
  animation: scroll-dot 2.2s ease-in-out infinite;
}
@keyframes scroll-dot { 0% { top: -20px; } 60% { top: 50px; } 100% { top: 50px; } }

/* floating particles */
.particles { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--color-gold);
  opacity: 0.45;
  filter: blur(0.5px);
  animation: float-up linear infinite;
}
@keyframes float-up {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-110vh) translateX(40px); opacity: 0; }
}

/* sun rays (How Solar Works + hero accents) */
.sun {
  position: relative;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 80px 20px rgba(255,200,61,0.45);
  margin: 0 auto;
}
.sun::before, .sun::after {
  content: "";
  position: absolute; inset: -40px;
  border-radius: 50%;
  border: 1px dashed rgba(255,200,61,0.25);
  animation: spin 30s linear infinite;
}
.sun::after { inset: -70px; animation-duration: 50s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.rays { position: absolute; top: 50%; left: 50%; width: 0; height: 0; z-index: -1; transform: translate(-50%, -50%); }
.ray {
  position: absolute; top: 50%; left: 50%;
  width: 2px; height: 90px;
  background: linear-gradient(180deg, rgba(255,200,61,0.7), transparent);
  transform-origin: top center;
  animation: ray-pulse 3s ease-in-out infinite;
}
@keyframes ray-pulse { 0%,100% { opacity: 0.2; } 50% { opacity: 0.8; } }

/* ---------- Cards / Glass ---------- */
.glass {
  background: var(--grad-glass);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
}

.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx,50%) var(--my,50%), rgba(255,200,61,0.12), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-8px); border-color: rgba(255,200,61,0.3); box-shadow: var(--shadow-soft); }

.icon-box {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,200,61,0.18), rgba(255,200,61,0.04));
  color: var(--color-gold);
  margin-bottom: 22px;
  font-size: 1.6rem;
  border: 1px solid rgba(255,200,61,0.18);
}

/* ---------- Stats ---------- */
.stats-section { position: relative; }
.stat-card {
  text-align: center;
  padding: 40px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--grad-glass);
  backdrop-filter: blur(10px);
}
.stat-number {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  background: var(--grad-gold);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.stat-label { color: var(--color-text-muted); font-size: 0.92rem; margin-top: 10px; }

/* ---------- Vision / Mission ---------- */
.vm-card {
  padding: 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, rgba(255,200,61,0.07), rgba(255,255,255,0.02));
  position: relative;
  overflow: hidden;
}
.vm-card .icon-box { background: rgba(255,200,61,0.12); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding-top: 100px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-soft);
  overflow: hidden;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 50px; padding-bottom: 60px; }
.footer-col h4 { margin-bottom: 20px; font-size: 1rem; }
.footer-col p, .footer-col a { color: var(--color-text-muted); font-size: 0.92rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { transition: color 0.3s, padding 0.3s; }
.footer-col ul a:hover { color: var(--color-gold); padding-inline-start: 4px; }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 26px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: var(--color-text-muted); flex-wrap: wrap; gap: 12px;
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.social-row a:hover { background: var(--grad-gold); color: #1a1305; transform: translateY(-3px); border-color: transparent; }

/* ---------- Floating buttons ---------- */
.float-btns { position: fixed; bottom: 28px; inset-inline-end: 28px; z-index: 900; display: flex; flex-direction: column; gap: 14px; }
.fab {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.35s var(--ease);
}
.fab-whatsapp { background: #25D366; color: #08260f; }
.fab-top {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  opacity: 0; pointer-events: none; transform: translateY(20px);
}
.fab-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.fab:hover { transform: translateY(-4px) scale(1.06); }

/* ---------- Loading screen ---------- */
.loader {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-sun {
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 60px 15px rgba(255,200,61,0.5);
  animation: loader-pulse 1.4s ease-in-out infinite;
}
@keyframes loader-pulse { 0%,100% { transform: scale(0.85); } 50% { transform: scale(1.1); } }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 100px) 0 90px;
  overflow: hidden;
  text-align: center;
}
.page-hero .container { position: relative; z-index: 2; }
.breadcrumb { display: flex; gap: 10px; justify-content: center; color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--color-gold); }

/* ---------- Misc shared ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: 0.78rem; font-weight: 600;
  background: rgba(255,255,255,0.03);
  color: var(--color-gold);
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 60px 0;
}

.img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  position: relative;
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.img-frame:hover img { transform: scale(1.06); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--color-text); }
.form-group input, .form-group textarea {
  width: 100%; padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.03);
  color: var(--color-text);
  font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--color-gold); background: rgba(255,255,255,0.05);
}
.form-group textarea { resize: vertical; min-height: 140px; }

/* ---------- Timeline (About) ---------- */
.timeline { position: relative; padding-inline-start: 40px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--color-gold), transparent); }
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item::before {
  content: ""; position: absolute; inset-inline-start: -36px; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad-gold); box-shadow: 0 0 0 5px rgba(255,200,61,0.12);
}
.timeline-year { color: var(--color-gold); font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; }

/* ---------- Team ---------- */
.team-card { text-align: center; padding: 0; }
.team-photo { aspect-ratio: 1/1; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; position: relative; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); filter: grayscale(15%); }
.team-card:hover .team-photo img { transform: scale(1.08); filter: grayscale(0%); }
.team-info { padding: 24px; text-align: center; }
.team-info h4 { margin-bottom: 6px; }
.role-tag { display: inline-block; margin-top: 10px; padding: 5px 14px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; color: var(--color-gold); border: 1px solid rgba(255,200,61,0.25); background: rgba(255,200,61,0.06); }

/* ---------- How Solar Works ---------- */
.flow-step {
  display: grid; grid-template-columns: 70px 1fr; gap: 26px;
  padding: 30px; border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--grad-glass);
  position: relative;
}
.flow-step .step-num {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad-gold); color: #1a1305;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem;
}
.flow-line {
  position: absolute; inset-inline-start: 27px; top: 70px; bottom: -30px;
  width: 2px; background: linear-gradient(180deg, var(--color-gold), transparent);
}
.flow-step:last-child .flow-line { display: none; }

/* ---------- Logos grid (clients) ---------- */
.logo-box {
  height: 110px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  transition: all 0.35s var(--ease);
  font-weight: 700; color: var(--color-text-muted);
}
.logo-box:hover { border-color: var(--color-gold); color: var(--color-gold); transform: translateY(-4px); background: rgba(255,200,61,0.05); }

/* ---------- Map ---------- */
.map-frame { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); height: 380px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: invert(0.92) hue-rotate(180deg) brightness(0.95); }

/* ---------- Page transition overlay ---------- */
.page-transition {
  position: fixed; inset: 0; z-index: 1500;
  background: var(--color-gold);
  transform: scaleY(0); transform-origin: bottom;
  pointer-events: none;
}
.page-transition.active { animation: page-wipe 0.7s var(--ease) forwards; }
@keyframes page-wipe {
  0% { transform: scaleY(0); transform-origin: bottom; }
  50% { transform: scaleY(1); transform-origin: bottom; }
  50.01% { transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: top; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .lang-switch.desktop { display: none; }
  .burger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 70px 0; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .flow-step { grid-template-columns: 56px 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .card { padding: 26px; }
  .vm-card { padding: 30px; }
}

/* ---------- RTL specific tweaks ---------- */
html[dir="rtl"] .footer-col ul a:hover { padding-inline-start: 0; padding-inline-end: 4px; }
html[dir="rtl"] .timeline { padding-inline-start: 0; padding-inline-end: 40px; }
html[dir="rtl"] .hero-glow { inset-inline-end: auto; inset-inline-start: -10%; }

/* =========================================================
   CINEMATIC UPGRADE — LOADER / SPLIT TEXT / SECTION CHROME
   ========================================================= */

/* ---------- Loader v2 ---------- */
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-percent {
  font-size: 1rem; font-weight: 800; letter-spacing: 0.1em;
  color: var(--color-gold-soft); font-variant-numeric: tabular-nums;
}
.loader-label {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--color-text-muted);
}
html[lang="ar"] .loader-label { letter-spacing: 0; text-transform: none; }
body { clip-path: inset(0 0 0 0); }
body.loaded { animation: body-reveal 1s var(--ease) both; }
@keyframes body-reveal {
  0% { clip-path: inset(0 0 100% 0); }
  100% { clip-path: inset(0 0 0% 0); }
}

/* ---------- Split text reveal ---------- */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; }
.split-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--split-i, 0) * 45ms);
}
.split-ready.in-view .split-inner,
.in-view .split-ready .split-inner { transform: translateY(0); }

/* ---------- Big section numbers ---------- */
.section-number {
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, rgba(255,200,61,0.18), rgba(255,200,61,0.02));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(255,200,61,0.18);
  position: absolute;
  top: -0.4em; inset-inline-start: -0.05em;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.section-head { position: relative; z-index: 1; }

/* ---------- Animated divider ---------- */
.divider-line { position: relative; overflow: hidden; }
.divider-line::after {
  content: "";
  position: absolute; inset: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  animation: divider-sweep 5s ease-in-out infinite;
}
@keyframes divider-sweep {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(250%); }
  100% { transform: translateX(250%); }
}

/* ---------- Magnetic buttons ---------- */
.btn { will-change: transform; }
.magnetic { transition: transform 0.2s var(--ease); }

/* =========================================================
   PINNED STORY SECTION (Home)
   ========================================================= */
.pin-story {
  position: relative;
  padding: 90px 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg);
}
.pin-story-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 80% 50%, rgba(255,200,61,0.08), transparent 60%);
  transition: background 0.6s var(--ease);
}
.pin-story .container { position: relative; z-index: 2; width: 100%; }
.pin-story-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.pin-story-left {
  display: flex; flex-direction: column; gap: 56px;
}
.pin-story-item {
  display: flex; flex-direction: column; justify-content: center;
}
.pin-story-item .big-num {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  background: var(--grad-gold);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 6px;
}
.pin-story-item h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 14px; }
.pin-story-progress { display: none; }

.pin-story-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.pin-story-visual img { width: 100%; height: 100%; object-fit: cover; }
.pin-story-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11,13,16,0.85) 100%), radial-gradient(circle at 70% 20%, rgba(255,200,61,0.35), transparent 55%);
}
.pin-story-visual .sun-orb {
  position: absolute; top: 14%; inset-inline-end: 14%;
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 60px 16px rgba(255,200,61,0.55);
  z-index: 2;
  animation: glow-pulse 6s ease-in-out infinite;
}

@media (max-width: 860px) {
  .pin-story-grid { grid-template-columns: 1fr; gap: 40px; }
  .pin-story-left { gap: 40px; }
  .pin-story-visual { aspect-ratio: 16/10; }
}

/* =========================================================
   STATS — HORIZONTAL CONNECTED LINE
   ========================================================= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.stats-row::before {
  content: "";
  position: absolute;
  top: 38px; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold) 15%, var(--color-gold) 85%, transparent);
  z-index: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease) 0.1s;
  opacity: 0.45;
}
html[dir="rtl"] .stats-row::before { transform-origin: right; }
.stats-row.in-view::before { transform: scaleX(1); }
.stat-block {
  position: relative;
  text-align: center;
  padding: 0 18px;
}
.stat-block::before {
  content: "";
  position: absolute; top: 30px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-gold);
  box-shadow: 0 0 0 6px rgba(255,200,61,0.08);
  z-index: 1;
}
.stat-block .stat-number {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-top: 70px;
  justify-content: center;
}
.stat-block .stat-label {
  max-width: 200px; margin-inline: auto;
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); row-gap: 60px; }
  .stats-row::before { display: none; }
}

/* =========================================================
   SERVICES — RESPONSIVE GRID (no pinning / horizontal scroll)
   ========================================================= */
.services-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.service-slide {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.service-slide .img-frame { aspect-ratio: 4/3; margin-bottom: 24px; }
.service-slide .card-num {
  font-size: 0.8rem; font-weight: 800; color: var(--color-gold);
  letter-spacing: 0.2em; margin-bottom: 10px; text-transform: uppercase;
}

@media (max-width: 1100px) {
  .services-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .services-rail { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================
   VISION / MISSION — STICKY SPLIT
   ========================================================= */
.split-vm {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}
.split-vm-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 60px);
  align-self: start;
  height: fit-content;
}
.split-vm-sticky .bg-icon {
  position: absolute;
  font-size: 16rem;
  opacity: 0.05;
  top: -2rem; inset-inline-start: -2rem;
  z-index: -1;
  line-height: 1;
  pointer-events: none;
}
.split-vm-panels { display: flex; flex-direction: column; gap: 28px; }
.split-vm-panels .vm-card { position: relative; }
.split-vm-panels .vm-card .rays { opacity: 0.5; }

@media (max-width: 860px) {
  .split-vm { grid-template-columns: 1fr; gap: 30px; }
  .split-vm-sticky { position: relative; top: 0; }
}

/* =========================================================
   TEAM — EDITORIAL CARDS + FILTERS
   ========================================================= */
.team-filters {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 50px;
}
.team-filter {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: 0.82rem; font-weight: 600;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.03);
  transition: all 0.3s var(--ease);
}
.team-filter:hover { color: var(--color-text); border-color: rgba(255,200,61,0.3); }
.team-filter.active { background: var(--grad-gold); color: #1a1305; border-color: transparent; }

.team-editorial {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: transform 0.6s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.team-editorial::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background: linear-gradient(140deg, rgba(255,200,61,0.5), transparent 40%, transparent 60%, rgba(255,200,61,0.3)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.5s var(--ease);
  pointer-events: none; z-index: 3;
}
.team-editorial:hover { transform: translateY(-10px); box-shadow: var(--shadow-soft); }
.team-editorial:hover::before { opacity: 1; }
.team-editorial .team-photo {
  aspect-ratio: 3/4;
  border-radius: 0;
  clip-path: inset(0 0 0 0);
}
.team-editorial .team-photo img {
  transform: scale(1.12);
  transition: transform 1.1s var(--ease), filter 1.1s var(--ease);
}
.team-editorial:hover .team-photo img { transform: scale(1); }
.team-editorial .team-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11,13,16,0.92) 100%);
}
.team-editorial .team-info {
  position: absolute; inset-inline-start: 0; bottom: 0; inset-inline-end: 0;
  text-align: start;
  padding: 24px 26px;
  z-index: 2;
}
.team-editorial .team-info h4 {
  font-size: 1.25rem;
  overflow: hidden;
}
.team-editorial .role-tag {
  margin-top: 10px;
  margin-inline-start: 0;
  background: rgba(11,13,16,0.55);
  backdrop-filter: blur(6px);
}

/* =========================================================
   PROJECTS — EDITORIAL MASONRY
   ========================================================= */
.projects-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.projects-masonry .proj-card:nth-child(3n+1) { grid-row: span 2; }
.proj-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  min-height: 280px;
  isolation: isolate;
}
.projects-masonry .proj-card:nth-child(3n+1) { min-height: 590px; }
.proj-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.2s var(--ease);
  z-index: -1;
}
.proj-card:hover img { transform: scale(1.18); }
.proj-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(11,13,16,0.95) 100%);
  z-index: 0;
  transition: background 0.5s var(--ease);
}
.proj-card-body {
  position: absolute; inset-inline-start: 0; inset-inline-end: 0; bottom: 0;
  padding: 28px;
  z-index: 1;
}
.proj-card-body h3 { margin-bottom: 8px; }
.proj-card-body p {
  max-height: 0; opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease), margin-top 0.5s var(--ease);
}
.proj-card:hover .proj-card-body p { max-height: 120px; opacity: 1; margin-top: 10px; }
.proj-tag {
  position: absolute; top: 20px; inset-inline-start: 20px; z-index: 2;
  padding: 6px 16px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-bg);
  background: var(--grad-gold);
  border-radius: var(--radius-full);
}
html[lang="ar"] .proj-tag { letter-spacing: 0; text-transform: none; }

@media (max-width: 1024px) {
  .projects-masonry { grid-template-columns: repeat(2, 1fr); }
  .projects-masonry .proj-card:nth-child(3n+1) { grid-row: span 1; min-height: 280px; }
}
@media (max-width: 640px) {
  .projects-masonry { grid-template-columns: 1fr; }
  .projects-masonry .proj-card:nth-child(3n+1) { min-height: 280px; }
  .proj-card-body p { max-height: none; opacity: 1; margin-top: 10px; }
}

/* =========================================================
   CONTACT — FLOATING LABELS
   ========================================================= */
.field-float { position: relative; margin-bottom: 22px; }
.field-float input, .field-float textarea {
  width: 100%;
  padding: 24px 20px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.03);
  color: var(--color-text);
  font-family: inherit; font-size: 1rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.field-float input:focus, .field-float textarea:focus {
  outline: none; border-color: var(--color-gold); background: rgba(255,255,255,0.05);
}
.field-float textarea { resize: vertical; min-height: 140px; }
.field-float label {
  position: absolute;
  top: 16px; inset-inline-start: 20px;
  margin: 0; font-weight: 500; font-size: 0.95rem;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: all 0.25s var(--ease);
  background: transparent;
}
.field-float input:focus + label,
.field-float input:not(:placeholder-shown) + label,
.field-float textarea:focus + label,
.field-float textarea:not(:placeholder-shown) + label {
  top: 6px; font-size: 0.7rem; color: var(--color-gold); letter-spacing: 0.06em;
}
.field-float textarea ~ label { top: 16px; }
.field-float textarea:focus ~ label,
.field-float textarea:not(:placeholder-shown) ~ label { top: 6px; }

.btn-send-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.4s var(--ease);
}
.btn:hover .btn-send-arrow { transform: translateX(6px); }
html[dir="rtl"] .btn:hover .btn-send-arrow { transform: translateX(-6px) scaleX(-1); }
html[dir="rtl"] .btn-send-arrow { transform: scaleX(-1); }

/* =========================================================
   HOW SOLAR WORKS — PINNED FLOW
   ========================================================= */
.flow-pin {
  position: relative;
  padding: 70px 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.flow-pin-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: center;
  width: 100%;
}
.flow-pin-text { display: flex; flex-direction: column; gap: 48px; }
.flow-pin-step {
  display: flex; flex-direction: column; justify-content: center;
}
.flow-pin-step .step-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--color-gold); margin-bottom: 14px;
}
html[lang="ar"] .flow-pin-step .step-tag { letter-spacing: 0; text-transform: none; }
.flow-pin-step .step-icon { font-size: 2.4rem; margin-bottom: 14px; }

.flow-svg-wrap {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--grad-glass);
  overflow: hidden;
}
.flow-svg-wrap svg { width: 100%; height: 100%; }
.flow-node-label {
  font-size: 11px; font-weight: 700; fill: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.flow-path {
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 2.5;
  stroke-dasharray: 8 10;
  stroke-linecap: round;
  opacity: 0.25;
  transition: opacity 0.4s;
}
.flow-path.active {
  opacity: 1;
  animation: flow-dash 1.4s linear infinite;
}
@keyframes flow-dash { to { stroke-dashoffset: -36; } }
.flow-node {
  fill: var(--color-surface);
  stroke: var(--color-border);
  stroke-width: 1.5;
  transition: stroke 0.4s, fill 0.4s;
}
.flow-node.active { stroke: var(--color-gold); fill: rgba(255,200,61,0.12); }
.flow-sun-icon {
  fill: var(--color-surface);
  stroke: var(--color-border);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  transition: stroke 0.4s, fill 0.4s;
}
.flow-sun-icon.active {
  stroke: var(--color-gold);
  fill: rgba(255,200,61,0.12);
  animation: flow-sun-pulse 2.4s ease-in-out infinite;
}
@keyframes flow-sun-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.flow-progress { display: none; }

@media (max-width: 860px) {
  .flow-pin-grid { grid-template-columns: 1fr; gap: 36px; }
  .flow-pin-text { gap: 36px; }
  .flow-svg-wrap { aspect-ratio: 4/3.2; }
}

/* =========================================================
   PARALLAX HELPERS
   ========================================================= */
.parallax-layer { will-change: transform; }
.hero-bg, .pin-story-visual img, .img-frame img { will-change: transform; }

/* disable heavy decorative animations on small screens */
@media (max-width: 767px) {
  .particle, .ray, .hero-glow, .sun::before, .sun::after {
    animation: none !important;
  }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .split-inner, .reveal, .team-editorial, .proj-card img, .pin-story-item, .flow-pin-step,
  .particle, .ray, .hero-glow, .sun::before, .sun::after {
    transition: none !important; animation: none !important;
  }
  .split-inner { transform: none; }
  body.loaded { animation: none; }
}
