/* =========================================================================
   Perla Hub — Pearl-themed luxury design system
   ========================================================================= */

:root {
  /* Pearl iridescent palette */
  --pearl-100: #FBF7FF;
  --pearl-200: #F2E8FF;
  --pearl-300: #E2D2FF;
  --pearl-400: #C8B5F5;
  --pearl-500: #A38BE6;
  --pearl-pink: #FFD0E8;
  --pearl-blue: #B8E0FF;
  --pearl-cyan: #B8FFF0;
  --pearl-lavender: #D4C4FF;

  /* Depth / midnight */
  --abyss-900: #04060F;
  --abyss-800: #080C1C;
  --abyss-700: #0E132A;
  --abyss-600: #181E3D;
  --abyss-500: #232A52;

  /* Accents */
  --gold-400: #FFE082;
  --gold-500: #FFC857;
  --gold-600: #E8A93D;

  /* Text */
  --text-primary: #F4EFFF;
  --text-secondary: #B8B0D6;
  --text-muted: #7A7595;

  /* Surfaces & borders */
  --surface-glass: rgba(20, 22, 50, 0.55);
  --surface-glass-strong: rgba(28, 30, 60, 0.75);
  --border-pearl: rgba(226, 210, 255, 0.18);
  --border-pearl-strong: rgba(226, 210, 255, 0.35);

  /* Gradients */
  --gradient-pearl: linear-gradient(135deg, #FFD0E8 0%, #D4C4FF 25%, #B8E0FF 50%, #B8FFF0 75%, #FFD0E8 100%);
  --gradient-pearl-text: linear-gradient(120deg, #FFD0E8, #D4C4FF, #B8E0FF, #FBF7FF, #FFE082);
  --gradient-abyss: radial-gradient(ellipse at top, #181E3D 0%, #080C1C 45%, #04060F 100%);

  /* Shadows */
  --shadow-pearl: 0 8px 32px rgba(163, 139, 230, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-pearl-strong: 0 12px 48px rgba(212, 196, 255, 0.35), 0 4px 16px rgba(184, 224, 255, 0.18);
  --shadow-gold: 0 8px 32px rgba(255, 200, 87, 0.22);

  /* Sizing */
  --container: 1280px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pearl: 100%;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pearl: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 200ms;
  --dur-med: 450ms;
  --dur-slow: 900ms;

  /* Layout */
  --nav-h: 76px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'DM Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--abyss-900);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Arabic / RTL */
html[lang="ar"] body { font-family: 'Tajawal', 'Cairo', system-ui, sans-serif; }
html[dir="rtl"] { direction: rtl; }

/* Chinese / Japanese */
html[lang="zh"] body { font-family: 'Noto Sans SC', 'PingFang SC', 'Inter', sans-serif; }
html[lang="ja"] body { font-family: 'Noto Sans JP', 'Hiragino Sans', 'Inter', sans-serif; }

/* =========================================================================
   Cosmic background: nebula + stars
   ========================================================================= */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(163, 139, 230, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 30%, rgba(184, 224, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(255, 208, 232, 0.10), transparent 60%),
    var(--gradient-abyss);
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 23% 18%, #fff 50%, transparent),
    radial-gradient(1px 1px at 67% 42%, #fff 50%, transparent),
    radial-gradient(1px 1px at 89% 72%, #fff 50%, transparent),
    radial-gradient(1px 1px at 12% 88%, #fff 50%, transparent),
    radial-gradient(1px 1px at 47% 28%, #fff 50%, transparent),
    radial-gradient(1px 1px at 78% 14%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 34% 67%, #fff 50%, transparent),
    radial-gradient(1px 1px at 91% 31%, #fff 50%, transparent),
    radial-gradient(1px 1px at 5% 53%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 58% 81%, #fff 50%, transparent);
  background-size: 100% 100%;
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
  animation: starTwinkle 8s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.55; }
}

/* =========================================================================
   Layout helpers
   ========================================================================= */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.section {
  padding-block: clamp(80px, 12vw, 140px);
  position: relative;
}

.section-head {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-500);
  padding: 6px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.12), rgba(255, 208, 232, 0.08));
  border: 1px solid rgba(255, 200, 87, 0.25);
  margin-bottom: 18px;
}

.h-display {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

html[lang="ar"] .h-display { font-family: 'Tajawal', sans-serif; font-weight: 800; }
html[lang="zh"] .h-display, html[lang="ja"] .h-display { font-family: inherit; font-weight: 700; }

.h-section {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.15;
  margin-bottom: 14px;
}
html[lang="ar"] .h-section { font-family: 'Tajawal', sans-serif; font-weight: 700; }

.lead {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin-inline: auto;
}

.gradient-text {
  background: var(--gradient-pearl-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerText 6s linear infinite;
}

@keyframes shimmerText {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* =========================================================================
   Navbar
   ========================================================================= */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: var(--nav-h);
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(4, 6, 15, 0.55);
  border-bottom: 1px solid var(--border-pearl);
  transition: background var(--dur-med) var(--ease);
}

.nav.scrolled { background: rgba(4, 6, 15, 0.85); }

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand-pearl {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, #fff 0%, #FBF7FF 15%, #D4C4FF 45%, #A38BE6 75%, #5A4D8C 100%);
  box-shadow:
    inset -2px -3px 8px rgba(90, 77, 140, 0.5),
    inset 2px 3px 6px rgba(255, 255, 255, 0.6),
    0 0 16px rgba(212, 196, 255, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.35);
  position: relative;
  flex-shrink: 0;
}

.brand-pearl::after {
  content: '';
  position: absolute;
  top: 12%;
  left: 18%;
  width: 28%;
  height: 22%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.95), transparent 70%);
  border-radius: 50%;
  filter: blur(1px);
}

.brand-text { font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.4rem; letter-spacing: 0.01em; }
.brand-text .accent { color: var(--gold-500); }
html[lang="ar"] .brand-text { font-family: 'Tajawal', sans-serif; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
  position: relative;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-pearl);
  transform: scaleX(0);
  transition: transform var(--dur-med) var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }

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

/* Language picker */
.lang-picker {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 22, 50, 0.5);
  border: 1px solid var(--border-pearl);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}
.lang-btn:hover { border-color: var(--border-pearl-strong); background: rgba(40, 42, 80, 0.6); }
.lang-flag { font-size: 1rem; }
.lang-caret { width: 10px; height: 10px; opacity: 0.6; }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 200px;
  background: var(--surface-glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-pearl);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-pearl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--dur-fast) var(--ease);
  max-height: 70vh;
  overflow-y: auto;
}
.lang-picker.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: background var(--dur-fast) var(--ease);
}
.lang-option:hover { background: rgba(163, 139, 230, 0.12); color: var(--text-primary); }
.lang-option.active { background: rgba(255, 200, 87, 0.10); color: var(--gold-400); }
.lang-option .lang-name { flex: 1; }
.lang-option .lang-native { color: var(--text-muted); font-size: 0.8rem; }

/* CTA button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-pearl);
  background-size: 200% 200%;
  color: var(--abyss-900);
  box-shadow: var(--shadow-pearl-strong);
  animation: pearlShift 6s linear infinite;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(212, 196, 255, 0.5); }

@keyframes pearlShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.btn-ghost {
  background: rgba(20, 22, 50, 0.5);
  color: var(--text-primary);
  border: 1px solid var(--border-pearl);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: rgba(40, 42, 80, 0.6); border-color: var(--border-pearl-strong); transform: translateY(-2px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--abyss-900);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(255, 200, 87, 0.4); }

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-pearl);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text { max-width: 620px; }

.hero h1 {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}
html[lang="ar"] .hero h1 { font-family: 'Tajawal', sans-serif; font-weight: 800; line-height: 1.15; }

.hero p {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 60px;
  display: flex;
  gap: clamp(20px, 4vw, 48px);
}
.hero-stat { display: flex; flex-direction: column; }
.hero-stat .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  background: var(--gradient-pearl-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerText 6s linear infinite;
}
.hero-stat .label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* 3D Pearl in hero */
.hero-pearl-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.pearl {
  width: clamp(260px, 38vw, 460px);
  height: clamp(260px, 38vw, 460px);
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 32% 28%,
      #fff 0%,
      #FBF7FF 8%,
      #FFD0E8 22%,
      #D4C4FF 42%,
      #B8E0FF 62%,
      #A38BE6 82%,
      #4A3D7A 100%);
  box-shadow:
    inset -20px -30px 70px rgba(74, 61, 122, 0.6),
    inset 15px 25px 50px rgba(255, 255, 255, 0.5),
    0 0 80px rgba(212, 196, 255, 0.45),
    0 0 160px rgba(184, 224, 255, 0.25),
    0 30px 80px rgba(0, 0, 0, 0.6);
  animation: pearlFloat 7s ease-in-out infinite, pearlRotateGlow 18s linear infinite;
}

.pearl::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 14%;
  width: 38%;
  height: 28%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.3) 50%, transparent 75%);
  border-radius: 50%;
  filter: blur(2px);
  animation: shineMove 7s ease-in-out infinite;
}

.pearl::after {
  content: '';
  position: absolute;
  bottom: 12%;
  right: 16%;
  width: 18%;
  height: 14%;
  background: radial-gradient(ellipse, rgba(255, 208, 232, 0.6), transparent 70%);
  border-radius: 50%;
  filter: blur(3px);
}

@keyframes pearlFloat {
  0%, 100% { transform: translateY(0) rotateZ(0deg); }
  50% { transform: translateY(-22px) rotateZ(2deg); }
}

@keyframes pearlRotateGlow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes shineMove {
  0%, 100% { transform: translate(0, 0); opacity: 0.95; }
  50% { transform: translate(15%, 12%); opacity: 0.7; }
}

/* Orbit ring */
.pearl-orbit {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  border: 1px solid rgba(212, 196, 255, 0.18);
  animation: orbit 24s linear infinite;
  pointer-events: none;
}
.pearl-orbit::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 16px var(--gold-400);
  transform: translateX(-50%);
}

.pearl-orbit-2 {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 208, 232, 0.15);
  animation: orbitReverse 36s linear infinite;
  pointer-events: none;
}
.pearl-orbit-2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: 28%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pearl-blue);
  box-shadow: 0 0 12px var(--pearl-blue);
}

@keyframes orbit { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes orbitReverse { from { transform: rotate(0); } to { transform: rotate(-360deg); } }

.pearl-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(212, 196, 255, 0.22), transparent 60%);
  border-radius: 50%;
  z-index: -1;
  animation: glowPulse 5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* =========================================================================
   Services grid
   ========================================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.service-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-pearl);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(212, 196, 255, 0.08), transparent);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-pearl-strong);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(212, 196, 255, 0.18), rgba(184, 224, 255, 0.12));
  border: 1px solid var(--border-pearl);
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

.service-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
html[lang="ar"] .service-card h3 { font-family: 'Tajawal', sans-serif; font-weight: 700; }

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* =========================================================================
   Projects
   ========================================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-pearl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: transform var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.project-card:hover { transform: translateY(-6px); border-color: var(--border-pearl-strong); }

.project-cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--abyss-700), var(--abyss-600));
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.project-cover-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(212, 196, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform var(--dur-slow) var(--ease);
}
.project-card:hover .project-cover-shine { transform: translateX(100%); }

.project-cover img {
  width: 38%;
  max-width: 160px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
  transition: transform var(--dur-med) var(--ease);
}
.project-card:hover .project-cover img { transform: scale(1.05); }

.project-body { padding: 24px 26px 26px; flex: 1; display: flex; flex-direction: column; }

.project-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-tag {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 196, 255, 0.10);
  border: 1px solid rgba(212, 196, 255, 0.18);
  color: var(--pearl-300);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.project-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 8px;
}
html[lang="ar"] .project-card h3 { font-family: 'Tajawal', sans-serif; font-weight: 700; }

.project-card p { color: var(--text-secondary); font-size: 0.93rem; margin-bottom: 16px; }

.project-card .more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-500);
  font-size: 0.9rem;
  font-weight: 600;
}
.project-card .more svg { width: 14px; height: 14px; transition: transform var(--dur-fast) var(--ease); }
.project-card:hover .more svg { transform: translateX(4px); }
html[dir="rtl"] .project-card:hover .more svg { transform: translateX(-4px) scaleX(-1); }
html[dir="rtl"] .project-card .more svg { transform: scaleX(-1); }

/* =========================================================================
   Process timeline
   ========================================================================= */
.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  counter-reset: step;
}

.process-step {
  background: var(--surface-glass);
  border: 1px solid var(--border-pearl);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  position: relative;
  backdrop-filter: blur(20px);
  counter-increment: step;
}

.process-step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 18px;
  inset-inline-end: 24px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 600;
  background: var(--gradient-pearl-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerText 6s linear infinite;
}

.process-step h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 30px;
}

.process-step p { color: var(--text-secondary); font-size: 0.9rem; }

/* =========================================================================
   CTA banner
   ========================================================================= */
.cta-banner {
  background:
    linear-gradient(135deg, rgba(212, 196, 255, 0.10), rgba(184, 224, 255, 0.08), rgba(255, 208, 232, 0.10)),
    var(--abyss-700);
  border: 1px solid var(--border-pearl-strong);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(212, 196, 255, 0.15), transparent 30%);
  animation: rotateBg 14s linear infinite;
  pointer-events: none;
}

@keyframes rotateBg { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.cta-banner > * { position: relative; z-index: 1; }

.cta-banner h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin-bottom: 14px;
}
html[lang="ar"] .cta-banner h2 { font-family: 'Tajawal', sans-serif; font-weight: 800; }

.cta-banner p { color: var(--text-secondary); max-width: 560px; margin-inline: auto; margin-bottom: 28px; }

.cta-banner-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =========================================================================
   Contact section
   ========================================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.contact-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-pearl);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--dur-med) var(--ease);
}
.contact-card + .contact-card { margin-top: 14px; }
.contact-card:hover { border-color: var(--border-pearl-strong); transform: translateX(4px); }
html[dir="rtl"] .contact-card:hover { transform: translateX(-4px); }

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.15), rgba(255, 208, 232, 0.10));
  border: 1px solid rgba(255, 200, 87, 0.25);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.contact-value { font-size: 1.05rem; font-weight: 600; }

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  border-top: 1px solid var(--border-pearl);
  padding: 50px 0 30px;
  margin-top: 80px;
  background: rgba(4, 6, 15, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about p { color: var(--text-secondary); font-size: 0.9rem; max-width: 320px; margin-top: 14px; }

.footer-col h5 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-500);
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color var(--dur-fast) var(--ease);
}
.footer-col ul a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border-pearl);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 22, 50, 0.5);
  border: 1px solid var(--border-pearl);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease);
}
.footer-social a:hover { color: var(--gold-400); border-color: var(--gold-500); }
.footer-social svg { width: 18px; height: 18px; }

/* =========================================================================
   Reveal on scroll
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }

/* =========================================================================
   Responsive — mobile-first refinements
   ========================================================================= */

/* iOS safe-area padding */
@supports (padding: max(0px)) {
  .container { padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
}

/* Tablet / large mobile */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-text { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; flex-wrap: wrap; gap: 24px; }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }

  .pearl { width: clamp(220px, 50vw, 360px); height: clamp(220px, 50vw, 360px); }
}

/* Mobile breakpoint */
@media (max-width: 720px) {
  :root { --nav-h: 64px; }

  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }

  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    inset-inline: 0;
    background: rgba(4, 6, 15, 0.96);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-pearl);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
  }
  .nav-links.mobile-open a { font-size: 1rem; padding: 6px 0; }

  /* Tighten nav actions */
  .nav-actions { gap: 8px; }
  .nav-actions .btn:not(.menu-toggle) { padding: 9px 14px; font-size: 0.85rem; }
  .nav-actions .btn-primary { display: none; }   /* CTA hidden, accessible from menu */
  .lang-btn { padding: 7px 10px; font-size: 0.78rem; }

  /* Lighter sections on tiny screens */
  .section { padding-block: clamp(60px, 14vw, 100px); }

  /* Hero */
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 24px); padding-bottom: 60px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .hero p { font-size: 1rem; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 1.6rem; }

  /* Smaller pearl on mobile */
  .pearl { width: clamp(180px, 65vw, 280px); height: clamp(180px, 65vw, 280px); }
  .pearl-orbit-2 { display: none; }

  /* Service / feature / project cards */
  .service-card, .feature-tile { padding: 24px; }
  .project-card { border-radius: var(--radius-md); }

  /* Buttons */
  .btn { padding: 11px 22px; font-size: 0.9rem; }
  .btn-lg { padding: 13px 28px; font-size: 0.98rem; }

  /* Process numbers */
  .process-step::before { font-size: 1.7rem; }

  /* CTA banner */
  .cta-banner { padding: 32px 22px; border-radius: var(--radius-lg); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
  .footer { padding: 36px 0 24px; margin-top: 50px; }

  /* Lang menu — right edge alignment for RTL */
  .lang-menu { inset-inline-end: 0; min-width: 170px; }
}

/* Tiny phones */
@media (max-width: 380px) {
  .container { padding-inline: 16px; }
  .nav-actions .btn:not(.menu-toggle):not(.lang-btn) { display: none; }
  .hero h1 { font-size: 1.85rem; }
  .h-display { font-size: 2rem; }
  .h-section { font-size: 1.75rem; }
  .eyebrow { font-size: 0.72rem; letter-spacing: 0.15em; }
}

/* Landscape phone — keep hero tight */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { min-height: auto; padding-block: calc(var(--nav-h) + 20px) 40px; }
  .hero-grid { gap: 24px; }
  .pearl { width: 180px; height: 180px; }
}

/* =========================================================================
   Utility
   ========================================================================= */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.divider-pearl {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-pearl-strong), transparent);
  margin: 40px 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--abyss-900); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--pearl-400), var(--abyss-600));
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--pearl-300); }

/* Selection */
::selection { background: var(--pearl-300); color: var(--abyss-900); }
