/* ================= FONT FACE SETUP ================= */
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-Thin.ttf') format('truetype'); font-weight: 100; }
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-ExtraLight.ttf') format('truetype'); font-weight: 200; }
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-Light.ttf') format('truetype'); font-weight: 300; }
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-Regular.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-Medium.ttf') format('truetype'); font-weight: 500; }
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-SemiBold.ttf') format('truetype'); font-weight: 600; }
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-Bold.ttf') format('truetype'); font-weight: 700; }
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-ExtraBold.ttf') format('truetype'); font-weight: 800; }
@font-face { font-family: 'Lexend'; src: url('assets/fonts/lexend/Lexend-Black.ttf') format('truetype'); font-weight: 900; }

@font-face { font-family: 'Bahij'; src: url('assets/fonts/bahij/Bahij-Roman.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Bahij'; src: url('assets/fonts/bahij/Bahij-Light.ttf') format('truetype'); font-weight: 300; }
@font-face { font-family: 'Bahij'; src: url('assets/fonts/bahij/Bahij-Bold.ttf') format('truetype'); font-weight: 700; }

/* ================= TOKENS ================= */
:root {
  /* Default Dark Mode */
  --bg-main: #0d1524;
  --bg-card: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #a0aaba;
  
  --coral: #E8695C;
  --coral-soft: #F5897D;
  --mint: #4FC2B9;
  --plum: #824696;

  --radius-card: 24px;
  --radius-pill: 100px;
  
  --font-main: 'Lexend', 'Inter', sans-serif;
  --font-pashto: 'Bahij', 'Noto Naskh Arabic', serif;
  
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-btn: 0 8px 24px rgba(232, 105, 92, 0.3);
}

/* ================= LIGHT MODE THEME ================= */
[data-theme="light"] {
  --bg-main: #f5f7fa;
  --bg-card: rgba(255, 255, 255, 0.7);
  --border-light: rgba(0, 0, 0, 0.08);
  --text-main: #0a111f;
  --text-muted: #55606e;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ================= GLOBAL ================= */
/* Added -webkit-tap-highlight-color to remove the default square box on mobile taps */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  -webkit-tap-highlight-color: transparent; 
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.001ms !important; } }

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  /* Reserve space for sticky navbar on mobile */
  padding-top: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ================= UTILITIES ================= */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; position: relative; }

.skip-link { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 12px 20px; z-index: 999; }
.skip-link:focus { left: 24px; top: 24px; border-radius: 8px; }

.eyebrow { font-family: var(--font-main); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mint); margin-bottom: 12px; }
.gradient-text { background: linear-gradient(135deg, var(--coral-soft), var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ================= FOCUS STATES (Accessibility & Shape Matching) ================= */
/* Ensures the focus outline perfectly matches rounded corners and circles */
a:focus-visible,
button:focus-visible,
.icon-link:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

/* Remove default browser outline for mouse clicks, keep for keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ================= SCROLL REVEAL ================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-up { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

/* ================= NAVIGATION ================= */
.nav-wrap {
  position: sticky;
  top: 0; /* stick to very top */
  z-index: 100;
  padding: 12px 24px 0 24px; /* top padding for safe area, will be overridden on mobile */
  display: flex;
  justify-content: center;
  background: transparent; /* let the nav bar blur behind */
}
.site-nav {
  width: 100%; max-width: 1120px; display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light); border-radius: var(--radius-pill);
  padding: 8px 8px 8px 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav-left { display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { border-radius: 50%; width: 32px; height: 32px; object-fit: contain; }
.logo-dark-nav { display: block; }
.logo-light-nav { display: none; }
[data-theme="light"] .logo-dark-nav { display: none; }
[data-theme="light"] .logo-light-nav { display: block; }

.brand__word { font-family: var(--font-main); font-weight: 600; font-size: 15px; display: flex; flex-direction: column; line-height: 1.1; }
.brand__word em { font-style: normal; font-weight: 400; font-size: 10px; color: var(--text-muted); letter-spacing: 0.05em; }

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

.nav-links { display: flex; gap: 4px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-muted); padding: 8px 16px; border-radius: var(--radius-pill); transition: color 0.2s ease, background 0.2s ease; }
.nav-links a:hover { color: var(--text-main); background: rgba(255,255,255,0.08); }

.nav-actions { display: flex; gap: 6px; align-items: center; }
.icon-link { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--text-main); display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.2s; cursor: pointer; border: none; }
.icon-link:hover { background: var(--mint); color: #fff; transform: scale(1.05); }
/* Added :active state for a satisfying press effect */
.icon-link:active { transform: scale(0.92); }
.icon-link ion-icon { font-size: 18px; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.icon-link:hover ion-icon { transform: rotate(-10deg) scale(1.1); }

/* Theme Toggle Styling */
.theme-toggle { background: rgba(255,255,255,0.08); color: var(--text-main); position: relative; overflow: hidden; }
.theme-toggle ion-icon { font-size: 18px; position: absolute; top: 50%; left: 50%; transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease; }
.theme-toggle .sun-icon { opacity: 0; transform: translate(-50%, -50%) rotate(-90deg) scale(0.5); }
.theme-toggle .moon-icon { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
[data-theme="light"] .theme-toggle .sun-icon { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
[data-theme="light"] .theme-toggle .moon-icon { opacity: 0; transform: translate(-50%, -50%) rotate(90deg) scale(0.5); }

/* FIX: Prevent generic icon-link hover from removing translate(-50%, -50%) centering */
.theme-toggle:hover ion-icon { transform: translate(-50%, -50%) rotate(-10deg) scale(1.1); }
.theme-toggle:hover .sun-icon { transform: translate(-50%, -50%) rotate(-90deg) scale(0.5); }
[data-theme="light"] .theme-toggle:hover .sun-icon { transform: translate(-50%, -50%) rotate(-10deg) scale(1.1); }
[data-theme="light"] .theme-toggle:hover .moon-icon { transform: translate(-50%, -50%) rotate(90deg) scale(0.5); }

.nav-toggle { display: none; position: relative; width: 40px; height: 40px; background: rgba(255,255,255,0.08); border: none; border-radius: 50%; cursor: pointer; align-items: center; justify-content: center; transition: background 0.25s ease, transform 0.2s ease; }
.nav-toggle:hover { transform: scale(1.05); }
.nav-toggle:active { transform: scale(0.92); }
.nav-toggle span { position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; background: var(--text-main); border-radius: 2px; transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease; }
.nav-toggle span:nth-child(1) { transform: translate(-50%, -50%) translateY(-4px); }
.nav-toggle span:nth-child(2) { transform: translate(-50%, -50%) translateY(4px); }
.nav-toggle.is-active { background: rgba(255,255,255,0.14); }
.nav-toggle.is-active span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

/* ================= SUPER MODERN FULL SCREEN MOBILE DRAWER ================= */
@media (max-width: 860px) {
  .nav-wrap {
    padding: env(safe-area-inset-top, 12px) 12px 0 12px; /* use safe area for top */
    top: 0;
  }
  .site-nav {
    padding: 6px 6px 6px 14px;
    min-height: 50px;
    border-radius: 40px;
    /* CRITICAL: Remove backdrop-filter so it no longer creates a
       containing block that traps position:fixed children */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: relative;
    isolation: isolate; /* stacking context WITHOUT creating a containing block */
  }
  /* Pseudo-element restores the blur effect safely */
  .site-nav::after {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
  }
  .nav-right { gap: 6px; }

  /* The Menu Overlay - Covers 100% of the screen */
  .nav-links {
    position: fixed; top: 0; left: 0; 
    width: 100vw; width: 100dvw;
    height: 100vh; height: 100dvh;          /* dvh prevents clipping by mobile browser UI */
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px;
    background: rgba(13, 21, 36, 0.92);
    backdrop-filter: blur(36px);
    -webkit-backdrop-filter: blur(36px);
    z-index: 200;
    opacity: 0; visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    border: none; border-radius: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 80px) 24px 160px 24px; /* safe area + clearance */
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  [data-theme="light"] .nav-links { background: rgba(245, 247, 250, 0.96); }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: scale(1); }

  .nav-links a {
    font-size: 26px; font-weight: 600; letter-spacing: 0.02em;
    padding: 14px 0; color: var(--text-main);
    position: relative; transition: color 0.3s ease, transform 0.2s ease;
    transform: translateY(20px);
    opacity: 0;
  }
  .nav-links.is-open a { transform: translateY(0); opacity: 1; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease; }
  .nav-links.is-open a:nth-child(1) { transition-delay: 0.08s; }
  .nav-links.is-open a:nth-child(2) { transition-delay: 0.14s; }
  .nav-links.is-open a:nth-child(3) { transition-delay: 0.20s; }
  .nav-links.is-open a:nth-child(4) { transition-delay: 0.26s; }

  .nav-links a:hover { color: var(--mint); background: transparent; transform: scale(1.05); }
  .nav-links a:active { color: var(--coral-soft); transform: scale(0.98); }

  /* Close button for the drawer */
  .nav-toggle {
    display: flex; z-index: 260; width: 46px; height: 46px;
    background: var(--bg-main); border: 1px solid var(--border-light);
    position: relative;
    flex-shrink: 0;
  }
  .nav-toggle span {
    width: 18px;
    height: 2.5px;
  }
  .nav-toggle span:nth-child(1) { transform: translate(-50%, -50%) translateY(-5px); }
  .nav-toggle span:nth-child(2) { transform: translate(-50%, -50%) translateY(5px); }
  .nav-toggle.is-active span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

  /* Floating action bar inside the drawer: WhatsApp, Telegram, Theme toggle */
  .nav-actions {
    position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
    transform: translate(-50%, 28px);
    display: flex; gap: 14px; align-items: center;
    padding: 14px 22px; border-radius: var(--radius-pill);
    background: var(--bg-card); border: 1px solid var(--border-light);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    z-index: 210;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.4s ease 0.1s, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s, visibility 0.4s;
  }
  .nav-links.is-open ~ .nav-actions,
  .nav-actions.is-visible {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
  }
  .nav-actions .icon-link {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.25s, transform 0.25s;
    border: none;
    cursor: pointer;
  }
  .nav-actions .icon-link ion-icon { font-size: 24px; }
  .nav-actions .icon-link:hover {
    background: var(--mint);
    color: #fff;
    transform: scale(1.06);
  }
  .nav-actions .icon-link:active {
    transform: scale(0.92);
  }
  /* Theme toggle inside the action bar */
  .nav-actions .theme-toggle {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
  }
  .nav-actions .theme-toggle ion-icon {
    position: absolute;
    top: 50%; left: 50%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    font-size: 24px;
  }
  .nav-actions .theme-toggle .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.5);
  }
  .nav-actions .theme-toggle .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  [data-theme="light"] .nav-actions .theme-toggle .sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  [data-theme="light"] .nav-actions .theme-toggle .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.5);
  }
  /* FIX: Mobile theme toggle hover centering */
  .nav-actions .theme-toggle:hover ion-icon { transform: translate(-50%, -50%) rotate(-10deg) scale(1.1); }
  .nav-actions .theme-toggle:hover .sun-icon { transform: translate(-50%, -50%) rotate(-90deg) scale(0.5); }
  [data-theme="light"] .nav-actions .theme-toggle:hover .sun-icon { transform: translate(-50%, -50%) rotate(-10deg) scale(1.1); }
  [data-theme="light"] .nav-actions .theme-toggle:hover .moon-icon { transform: translate(-50%, -50%) rotate(90deg) scale(0.5); }

  /* Extra small screens */
  @media (max-width: 400px) {
    .nav-actions {
      bottom: calc(env(safe-area-inset-bottom, 0px) + 48px);
      padding: 10px 16px;
      gap: 10px;
    }
    .nav-actions .icon-link {
      width: 46px; height: 46px;
    }
    .nav-actions .icon-link ion-icon { font-size: 20px; }
    .nav-links {
      padding: calc(env(safe-area-inset-top, 0px) + 70px) 16px 140px 16px;
    }
    .nav-links a {
      font-size: 22px;
      padding: 12px 0;
    }
  }

  /* FIX: Landscape Mode - Group links and action bar at the bottom */
  @media (orientation: landscape) {
    .nav-links {
      justify-content: flex-end; /* Bottom align to sit directly above the action bar */
      padding-top: calc(env(safe-area-inset-top, 0px) + 80px);
      padding-bottom: 110px;
      gap: 4px;
    }
    .nav-links a {
      font-size: 20px;
      padding: 8px 0;
    }
    .nav-actions {
      bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
      padding: 8px 16px;
      gap: 10px;
    }
    .nav-actions .icon-link {
      width: 42px; height: 42px;
    }
    .nav-actions .icon-link ion-icon {
      font-size: 18px;
    }
    .nav-actions .theme-toggle ion-icon {
      font-size: 18px;
    }
  }

  /* FIX: When landscape height grows (tablets/foldables in the 770-860px
     width band), flex-end leaves a large empty gap at the top instead of
     hugging the bottom. Center the links instead so extra space is
     distributed evenly rather than accumulating above them. */
  @media (orientation: landscape) and (min-height: 420px) {
    .nav-links {
      justify-content: center;
      padding-top: calc(env(safe-area-inset-top, 0px) + 90px);
      padding-bottom: 130px;
      gap: 10px;
    }
  }
}

/* ================= BUTTONS ================= */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-main); font-weight: 600; font-size: 15px; padding: 14px 28px; border-radius: var(--radius-pill); border: 1px solid transparent; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); } /* Added active press effect */
.btn--primary { background: linear-gradient(135deg, var(--coral), #c94b45); color: #fff; box-shadow: var(--shadow-btn); }
.btn--primary:hover { box-shadow: 0 12px 32px rgba(232, 105, 92, 0.4); }
.btn-shimmer { position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); animation: shimmer 3s infinite; }
@keyframes shimmer { 100% { left: 100%; } }
.btn--glass { background: var(--bg-card); backdrop-filter: blur(8px); border: 1px solid var(--border-light); color: var(--text-main); }
.btn--glass:hover { background: rgba(255,255,255,0.12); }
.btn--community:active { transform: scale(0.97); }

/* ================= HERO ================= */
.hero { min-height: 90vh; display: flex; align-items: center; padding-top: 80px; overflow: hidden; position: relative; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(800px 600px at 10% 30%, rgba(79,194,185,0.15), transparent 70%), radial-gradient(600px 400px at 90% 70%, rgba(232,105,92,0.12), transparent 70%); transition: opacity 0.4s ease; }
[data-theme="light"] .hero-bg { opacity: 0.5; }

/* ======= LIGHT SWEEP ANIMATION ======= */
.hero-light-sweep {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.08) 45%, transparent 50%);
  background-size: 300% 100%;
  animation: sweepLight 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes sweepLight {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; position: relative; z-index: 1; }
.hero-copy { max-width: 520px; }
.hero-badge { display: inline-block; background: var(--bg-card); border: 1px solid var(--border-light); padding: 6px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 24px; }
.hero-copy h1 { font-size: clamp(44px, 6vw, 72px); font-weight: 700; line-height: 1.05; margin-bottom: 20px; }
.hero-sub { font-size: 17px; color: var(--text-muted); max-width: 440px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero Stage */
.hero-stage { position: relative; height: 400px; display: flex; justify-content: center; align-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3; }
.orb--1 { width: 300px; height: 300px; background: var(--coral-soft); top: -10%; left: -10%; animation: float 12s infinite alternate; }
.orb--2 { width: 200px; height: 200px; background: var(--mint); bottom: -10%; right: -10%; animation: float 15s infinite alternate-reverse; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(30px, -30px) scale(1.1); } }

.hero-icon-card { position: absolute; width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,0.1); backdrop-filter: blur(8px); border: 1px solid var(--border-light); padding: 10px; animation: floatIcon 6s ease-in-out infinite; }
.hero-icon-card img { width: 100%; height: 100%; object-fit: contain; opacity: 0; animation: iconPopIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.hc--1 { top: 0; left: 0; animation-delay: -1s; }
.hc--2 { bottom: 10%; right: 10%; animation-delay: -4s; }
.hc--3 { top: 20%; right: 0; animation-delay: -7s; }
.hc--1 img { animation-delay: 0.15s; }
.hc--2 img { animation-delay: 0.35s; }
.hc--3 img { animation-delay: 0.55s; }
@keyframes floatIcon { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-15px) rotate(3deg); } }
@keyframes iconPopIn { 0% { opacity: 0; transform: scale(0.4) rotate(-15deg); } 100% { opacity: 1; transform: scale(1) rotate(0deg); } }

/* ======= 3 GLOWING ORBITING BADGES ======= */
.hero-logo-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroLogoIntro 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes heroLogoIntro {
  0% { opacity: 0; transform: scale(0.55) rotate(-12deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.hero-logo-glow {
  position: absolute; top: 50%; left: 50%; width: 220px; height: 220px; transform: translate(-50%, -50%); border-radius: 50%;
  background: conic-gradient(from 0deg, #F57B76, #49BDB0, #184D65, #F57B76);
  filter: blur(42px); opacity: 0.22; z-index: 1; pointer-events: none;
  animation: auraSpin 9s linear infinite, auraPulse 4s ease-in-out infinite;
}
[data-theme="light"] .hero-logo-glow { opacity: 0.16; }
@keyframes auraSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes auraPulse { 0%, 100% { opacity: 0.16; } 50% { opacity: 0.28; } }

.orbit-ring { position: absolute; top: 50%; left: 50%; width: 0; height: 0; z-index: 5; animation: orbitSpin var(--duration, 16s) linear infinite; }
.orbit-anchor { position: absolute; top: 0; left: 0; transform: translateY(calc(-1 * var(--radius))); }
.orbit-badge {
  position: absolute; top: 0; left: 0; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.5), var(--badge-color) 68%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 0 14px 2px var(--badge-color), 0 0 34px 8px var(--badge-glow);
  opacity: 0; animation: counterSpin var(--duration, 16s) linear infinite, badgeFadeIn 0.6s ease forwards, badgePulse 3s ease-in-out infinite;
  animation-delay: 0s, 0.5s, 0.5s; will-change: transform;
}
@keyframes badgeFadeIn { to { opacity: 1; } }
@keyframes badgePulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }

.ring-1 { --radius: 148px; --duration: 15s; }
.ring-1 .orbit-badge { --badge-color: #F57B76; --badge-glow: rgba(245, 123, 118, 0.55); }
.ring-2 { --radius: 112px; --duration: 20s; animation-direction: reverse; }
.ring-2 .orbit-badge { --badge-color: #49BDB0; --badge-glow: rgba(73, 189, 176, 0.55); animation-direction: reverse, normal, normal; }
.ring-3 { --radius: 78px; --duration: 11.5s; }
.ring-3 .orbit-badge { --badge-color: #184D65; --badge-glow: rgba(24, 77, 101, 0.6); width: 38px; height: 38px; margin: -19px 0 0 -19px; font-size: 17px; }

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

.hero-logo-card {
  width: 98px; height: 98px; border-radius: 50%;
  background: var(--bg-card); backdrop-filter: blur(16px); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(255, 255, 255, 0.05);
  animation: logoGlowCatch 6s ease-in-out infinite;
  overflow: hidden; position: relative; z-index: 10; transition: background 0.4s ease;
}
@keyframes logoGlowCatch {
  0%, 100% { box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 0 40px rgba(255,255,255,0.05), 0 0 45px rgba(245,123,118,0.28); }
  33% { box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 0 40px rgba(255,255,255,0.05), 0 0 45px rgba(73,189,176,0.28); }
  66% { box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 0 40px rgba(255,255,255,0.05), 0 0 50px rgba(24,77,101,0.32); }
}
.hero-logo-card img { width: 75%; height: 75%; object-fit: contain; }

.logo-dark-hero { opacity: 1; }
.logo-light-hero { opacity: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
[data-theme="light"] .logo-dark-hero { opacity: 0; }
[data-theme="light"] .logo-light-hero { opacity: 1; }

.hero-fade { position: absolute; bottom: 0; left: 0; width: 100%; height: 100px; background: linear-gradient(to top, var(--bg-main), transparent); pointer-events: none; transition: background 0.4s ease; }

@media (max-width: 920px) { 
  .hero { min-height: auto; text-align: center; padding-top: 120px; } 
  .hero-grid { grid-template-columns: 1fr; gap: 40px; } 
  .hero-copy { max-width: 100%; display: flex; flex-direction: column; align-items: center; } 
  .hero-actions { justify-content: center; } 
  .hero-stage { height: 250px; margin-top: 20px; } 
  .orb--1, .orb--2 { display: none; } 
  .hero-icon-card { width: 40px; height: 40px; } 
  .hero-logo-wrapper { width: 220px; height: 220px; }
  .hero-logo-glow { width: 160px; height: 160px; }
  .ring-1 { --radius: 105px; }
  .ring-2 { --radius: 80px; }
  .ring-3 { --radius: 55px; }
  .orbit-badge { width: 34px; height: 34px; margin: -17px 0 0 -17px; font-size: 15px; }
  .ring-3 .orbit-badge { width: 30px; height: 30px; margin: -15px 0 0 -15px; font-size: 13px; }
  .hero-logo-card { width: 72px; height: 72px; }
}

/* ================= APPS ================= */
.section-header { max-width: 560px; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 600; line-height: 1.1; }
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.app-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 32px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-card); transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.4s ease; position: relative; }
.app-card:hover { transform: translateY(-6px); background: rgba(255,255,255,0.08); }
.app-card.flagship { grid-column: 1 / -1; flex-direction: row; padding: 32px 40px; align-items: center; gap: 32px; }

.app-icon { width: 64px; height: 64px; flex-shrink: 0; border-radius: 16px; background: rgba(255,255,255,0.05); padding: 12px; display: flex; align-items: center; justify-content: center; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.app-icon img, .app-icon-lg img { width: 100%; height: 100%; object-fit: contain; }
.app-icon-lg { width: 120px; height: 120px; flex-shrink: 0; background: rgba(255,255,255,0.05); border-radius: 20px; padding: 20px; display: flex; align-items: center; justify-content: center; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.app-card:hover .app-icon,
.app-card:hover .app-icon-lg { transform: rotate(-4deg) scale(1.06); }

.app-content { display: flex; flex-direction: column; flex: 1; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.app-header h3 { font-family: var(--font-main); font-weight: 600; font-size: 18px; }
.flagship .app-header h3 { font-size: 24px; }

.badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-light); background: rgba(255,255,255,0.05); display: inline-flex; align-items: center; gap: 6px; }
.badge--live { color: var(--mint); border-color: rgba(79, 194, 185, 0.3); }
.badge--live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: liveDotPulse 1.8s ease-in-out infinite; }
.badge--dev { color: var(--coral-soft); border-color: rgba(245, 137, 125, 0.3); }
@keyframes liveDotPulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(79,194,185,0.5); } 50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(79,194,185,0); } }

.app-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.flagship .app-desc { font-size: 16px; max-width: 500px; }

.app-meta { display: flex; gap: 16px; font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.app-meta strong { color: var(--text-main); font-weight: 500; }

.app-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.app-tags span { font-size: 12px; font-weight: 500; color: var(--text-muted); padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-light); }

.app-link { margin-top: auto; font-weight: 500; font-size: 14px; color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 0.2s, gap 0.2s; display: inline-flex; align-items: center; gap: 4px; }
.app-link:hover { border-bottom-color: var(--accent); gap: 8px; }
.app-link.disabled { color: var(--text-muted); cursor: default; border-bottom: none; pointer-events: none; }
.app-link.disabled:hover { gap: 4px; border-bottom: none; }
.link-arrow { font-size: 16px; transition: transform 0.2s ease; }
a:hover .link-arrow { transform: translateX(3px); }

@media (max-width: 940px) { .apps-grid { grid-template-columns: 1fr 1fr; } .app-card.flagship { flex-direction: row; } }
@media (max-width: 700px) { 
  .apps-grid { grid-template-columns: 1fr; } 
  .app-card.flagship { flex-direction: column; align-items: flex-start; padding: 24px; } 
  .app-icon-lg { width: 80px; height: 80px; padding: 12px; }
}

/* ================= ABOUT ================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 600; margin-bottom: 20px; line-height: 1.1; }
.about-text p { font-size: 17px; color: var(--text-muted); line-height: 1.7; }
.about-text p:not(:last-child) { margin-bottom: 16px; }

.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 24px; text-align: center; transition: background 0.4s ease, transform 0.3s ease; }
.stat:hover { transform: translateY(-4px); }
.stat dt { font-family: var(--font-main); font-size: 36px; font-weight: 600; color: var(--coral-soft); display: block; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.stat:hover dt { transform: scale(1.1); }
.stat dd { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ================= COMMUNITY ================= */
.community-card {
  position: relative; isolation: isolate; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-card); padding: 48px;
  display: flex; align-items: center; gap: 40px; color: #fff;
  background: linear-gradient(135deg, #F57B76 0%, #E8695C 24%, #824696 62%, #184D65 100%);
  background-size: 220% 220%; animation: communityGradientShift 12s ease infinite;
  box-shadow: 0 24px 60px rgba(130, 70, 150, 0.35), var(--shadow-card);
}
@keyframes communityGradientShift { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }
.community-card::before, .community-card::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(10px); }
.community-card::before { width: 260px; height: 260px; top: -100px; right: -60px; background: radial-gradient(circle, rgba(255,255,255,0.28), transparent 70%); }
.community-card::after { width: 220px; height: 220px; bottom: -110px; left: -50px; background: radial-gradient(circle, rgba(24,77,101,0.5), transparent 70%); }
.community-card > * { position: relative; z-index: 1; }

.community-visual { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; gap: 12px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.25); backdrop-filter: blur(8px); border-radius: 20px; padding: 20px 24px; }
.community-logo { width: 80px; height: 80px; }

.community-text h3 { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-family: var(--font-main); font-weight: 600; font-size: 28px; margin-bottom: 12px; color: #fff; }
.ps-text { font-family: var(--font-pashto); font-size: 22px; font-weight: 700; color: #fff; direction: rtl; }
.community-card .eyebrow { color: rgba(255,255,255,0.8); }
.community-text p { color: rgba(255,255,255,0.88); max-width: 460px; margin-bottom: 24px; }

.btn--community { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.btn--community:hover { background: #fff; color: #824696; }

@media (max-width: 700px) { .community-card { flex-direction: column; text-align: center; padding: 32px; } .community-card::before, .community-card::after { display: none; } .community-text h3 { justify-content: center; } }

/* ================= CONTACT ================= */
.contact { position: relative; overflow: hidden; }
.contact-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(500px 400px at 10% 20%, rgba(232,105,92,0.08), transparent 70%), radial-gradient(600px 400px at 90% 80%, rgba(79,194,185,0.08), transparent 70%); transition: opacity 0.4s ease; }
[data-theme="light"] .contact-bg { opacity: 0.4; }

.contact-header { text-align: center; max-width: 560px; margin: 0 auto 48px; }
.contact-header h2 { font-weight: 600; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; margin-bottom: 12px; }
.contact-sub { color: var(--text-muted); font-size: 17px; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; transition: transform 0.3s ease, background 0.3s ease; }
.contact-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.08); }
.c-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--mint); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.c-icon ion-icon { font-size: 24px; }
.contact-card:hover .c-icon { transform: scale(1.15) rotate(-6deg); }
.c-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.c-value { display: none; }
.contact-card:last-child .c-value { display: block; font-size: 15px; font-weight: 400; color: var(--text-main); word-break: break-word; overflow-wrap: anywhere; max-width: 100%; margin-top: -4px; }

@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ================= FOOTER ================= */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border-light); transition: border-color 0.4s ease; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text-main); }
.footer-copy { font-size: 13px; color: var(--text-muted); width: 100%; text-align: center; padding-top: 16px; border-top: 1px solid var(--border-light); margin-top: 8px; transition: border-color 0.4s ease; }

@media (max-width: 600px) { .footer-inner { flex-direction: column; align-items: flex-start; } .footer-links { width: 100%; } }
