/* css/styles.css — Glass Aurora Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+Arabic:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&family=Satisfy&display=swap');

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════ */
:root {
  /* Core palette */
  --color-primary: #FF3E9A;
  --color-primary-light: #FF6FB5;
  --color-primary-dark: #D62A7A;
  --color-accent: #7B61FF;
  --color-accent-dim: rgba(123, 97, 255, 0.1);
  --color-accent-secondary: #00D4AA;

  /* Backgrounds — Soft, dreamy, light */
  --color-bg: #FFF5FA;
  --color-bg-pure: #FFFFFF;
  --color-bg-card: rgba(255, 255, 255, 0.55);
  --color-bg-card-hover: rgba(255, 255, 255, 0.75);
  --color-surface: rgba(255, 255, 255, 0.4);

  /* Text */
  --color-text: #1a1a2e;
  --color-text-secondary: rgba(26, 26, 46, 0.55);
  --color-text-muted: rgba(26, 26, 46, 0.3);

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.6);
  --color-border-hover: rgba(255, 62, 154, 0.3);
  --color-border-subtle: rgba(255, 62, 154, 0.08);

  /* Social */
  --color-twitch: #9146FF;
  --color-youtube: #FF0000;
  --color-instagram: #E1306C;
  --color-tiktok: #69C9D0;
  --color-twitter: #1DA1F2;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 50%, var(--color-primary-dark) 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.3) 100%);
  --gradient-aurora: linear-gradient(135deg, 
    #FFF5FA 0%, 
    #FFE8F5 15%, 
    #F5E6FF 30%,
    #E8F0FF 50%, 
    #F0FFF5 65%,
    #FFF5E8 80%,
    #FFF5FA 100%
  );
  --gradient-section-fade: linear-gradient(180deg, transparent 0%, var(--color-bg) 100%);

  /* Shadows */
  --shadow-sm: 0 4px 20px rgba(255, 62, 154, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 40px rgba(255, 62, 154, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 64px rgba(255, 62, 154, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 30px rgba(255, 62, 154, 0.2);
  --shadow-glow-strong: 0 0 60px rgba(255, 62, 154, 0.35);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.8);

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  /* Typography */
  --font-sans: 'Outfit', 'Noto Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-cursive: 'Satisfy', cursive;

  /* Spacing */
  --section-gap: clamp(5rem, 10vh, 8rem);
  --container-max: 1200px;
  --container-padding: clamp(1.25rem, 4vw, 3rem);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ═══════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ═══════════════════════════════════════════════════
   AURORA MESH BACKGROUND
   ═══════════════════════════════════════════════════ */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--color-bg);
}

.aurora-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  will-change: transform;
  animation: auroraFloat 20s ease-in-out infinite alternate;
}

.aurora-bg .blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 111, 181, 0.35) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.aurora-bg .blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(123, 97, 255, 0.25) 0%, transparent 70%);
  top: 30%;
  right: -10%;
  animation-delay: -5s;
  animation-duration: 25s;
}

.aurora-bg .blob-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.2) 0%, transparent 70%);
  bottom: 10%;
  left: 20%;
  animation-delay: -10s;
  animation-duration: 22s;
}

.aurora-bg .blob-4 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(255, 200, 100, 0.15) 0%, transparent 70%);
  bottom: -15%;
  right: 25%;
  animation-delay: -15s;
  animation-duration: 28s;
}

@keyframes auroraFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(15px, -15px) scale(1.02); }
}

/* Subtle grain texture for premium feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s var(--ease-out-quart);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ═══════════════════════════════════════════════════
   CUSTOM SCROLLBAR
   ═══════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 62, 154, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 62, 154, 0.4);
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 62, 154, 0.2) transparent;
}

/* ═══════════════════════════════════════════════════
   CUSTOM CURSOR
   ═══════════════════════════════════════════════════ */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: normal;
  transition: width 0.3s var(--ease-spring),
              height 0.3s var(--ease-spring),
              background 0.3s,
              opacity 0.3s;
  transform: translate(-50%, -50%);
  will-change: transform;
  opacity: 0.8;
  box-shadow: 0 0 12px rgba(255, 62, 154, 0.4);
}

.cursor-dot.hovering {
  width: 44px;
  height: 44px;
  background: rgba(255, 62, 154, 0.08);
  border: 1.5px solid rgba(255, 62, 154, 0.4);
  box-shadow: 0 0 20px rgba(255, 62, 154, 0.15);
  opacity: 1;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 62, 154, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 0.3s;
}

@media (hover: none) and (pointer: coarse) {
  .cursor-dot,
  .cursor-glow {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════ */
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.05;
  color: var(--color-text);
}

.heading-display {
  font-size: clamp(3.5rem, 10vw, 8rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  font-weight: 900;
  line-height: 0.9;
}

.heading-xl {
  font-size: clamp(2.5rem, 6vw, 5rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-weight: 900;
  line-height: 0.95;
}

.heading-lg {
  font-size: clamp(1.75rem, 4vw, 3rem);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.heading-md {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
}

.heading-sm {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-secondary);
}

.heading-section {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

.cursive-xl {
  font-family: var(--font-cursive);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-primary);
  font-weight: 400;
  text-transform: none;
}

.cursive-md {
  font-family: var(--font-cursive);
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 400;
}

/* BiDi Isolation */
[dir="rtl"], [dir="auto"] {
  unicode-bidi: isolate;
}

:dir(rtl) {
  text-align: right;
}

.heading-display:dir(rtl),
.heading-xl:dir(rtl),
.heading-lg:dir(rtl),
.heading-md:dir(rtl),
.heading-sm:dir(rtl),
.heading-section:dir(rtl) {
  text-align: right;
}

/* ═══════════════════════════════════════════════════
   PRELOADER
   ═══════════════════════════════════════════════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 0.6s var(--ease-out-expo),
              visibility 0.6s;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  font-family: var(--font-cursive);
  font-size: 3rem;
  color: var(--color-primary);
  opacity: 0;
  transform: translateY(20px);
}

.preloader-bar {
  width: 120px;
  height: 2px;
  background: rgba(255, 62, 154, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar-inner {
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width 0.3s;
}

/* ═══════════════════════════════════════════════════
   SECTION UTILITIES
   ═══════════════════════════════════════════════════ */
.section {
  position: relative;
  padding: var(--section-gap) 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .cursor-dot,
  .cursor-glow {
    display: none !important;
  }

  .aurora-bg .blob {
    animation: none !important;
  }
}
