/*
Theme Name:  Morico Child
Theme URI:   https://morico.studio
Description: Morico Game Studio – premium child theme for Hello Elementor
Author:      Morico Studio
Author URI:  https://morico.studio
Template:    hello-elementor
Version:     1.0.0
License:     GPL-2.0-or-later
Text Domain: morico-child
Tags:        gaming, arabic, rtl, elementor, dark
*/

/* ============================================================
   CORE BRAND TOKENS
   ============================================================ */
:root {
  /* Brand Colors */
  --morico-black:      #0A0A0A;
  --morico-red:        #E8192C;
  --morico-white:      #FFFFFF;
  --morico-crimson:    #8B0000;
  --morico-gold:       #D4A84B;
  --morico-gray-dark:  #1A1A1A;
  --morico-gray-mid:   #2A2A2A;
  --morico-gray-light: #B0B0B0;

  /* Semantic aliases */
  --bg-primary:     var(--morico-black);
  --bg-card:        var(--morico-gray-dark);
  --bg-elevated:    var(--morico-gray-mid);
  --text-primary:   var(--morico-white);
  --text-secondary: var(--morico-gray-light);
  --accent:         var(--morico-red);
  --accent-deep:    var(--morico-crimson);
  --accent-gold:    var(--morico-gold);

  /* Gradients */
  --grad-hero:    linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.6) 60%, #0A0A0A 100%);
  --grad-red:     linear-gradient(135deg, var(--morico-red) 0%, var(--morico-crimson) 100%);
  --grad-gold:    linear-gradient(135deg, var(--morico-gold) 0%, #A07830 100%);
  --grad-card:    linear-gradient(180deg, transparent 50%, rgba(10,10,10,0.95) 100%);
  --grad-glow-r:  radial-gradient(ellipse at center, rgba(232,25,44,0.15) 0%, transparent 70%);

  /* Shadows */
  --shadow-card:     0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow-red: 0 0 40px rgba(232,25,44,0.4), 0 0 80px rgba(232,25,44,0.15);
  --shadow-glow-gold:0 0 30px rgba(212,168,75,0.35);

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;
  --space-2xl: 10rem;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Transitions */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:    cubic-bezier(0.64, 0, 0.78, 0);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast:  0.15s var(--ease-out);
  --t-base:  0.35s var(--ease-out);
  --t-slow:  0.6s  var(--ease-out);

  /* Z-index layers */
  --z-bg:       -1;
  --z-base:      0;
  --z-card:      10;
  --z-sticky:    100;
  --z-overlay:   200;
  --z-modal:     300;
  --z-cursor:    9999;

  /* Typography */
  --font-arabic:  'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-english: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-display: 'Bebas Neue', 'Oswald', 'Impact', sans-serif;

  /* Nav height */
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--morico-black);
  color: var(--morico-white);
  font-family: var(--font-arabic);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.ltr,
body[lang="en"] {
  font-family: var(--font-english);
  direction: ltr;
  text-align: left;
}

body.rtl,
body[lang="ar"] {
  direction: rtl;
  text-align: right;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul,ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* Selection */
::selection {
  background: var(--morico-red);
  color: var(--morico-white);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--morico-black); }
::-webkit-scrollbar-thumb {
  background: var(--morico-red);
  border-radius: 3px;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-red);
  z-index: var(--z-cursor);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--morico-red);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-arabic);
  font-weight: 900;
  line-height: 1.2;
  color: var(--morico-white);
}

.en h1,.en h2,.en h3 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

.text-red    { color: var(--morico-red); }
.text-gold   { color: var(--morico-gold); }
.text-muted  { color: var(--morico-gray-light); }
.text-center { text-align: center; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-arabic);
  transition: var(--t-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
}

/* Sweep animation */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  transform: translateX(-100%);
  transition: transform 0.4s var(--ease-out);
}
.btn:hover::before { transform: translateX(0); }

/* Primary */
.btn-primary {
  background: var(--grad-red);
  color: var(--morico-white);
  box-shadow: 0 4px 20px rgba(232,25,44,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-red);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--morico-white);
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover {
  border-color: var(--morico-white);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

/* Gold */
.btn-gold {
  background: var(--grad-gold);
  color: var(--morico-black);
  box-shadow: 0 4px 20px rgba(212,168,75,0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-gold);
}

/* Size variants */
.btn-lg { padding: 1.1rem 2.5rem; font-size: 1.125rem; }
.btn-sm { padding: 0.6rem 1.4rem; font-size: 0.875rem; }

/* Play button */
.btn-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: var(--t-base);
}
.btn-play::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 18px;
  border-color: transparent transparent transparent var(--morico-white);
  margin-right: -3px;
}
.btn-play:hover {
  background: var(--morico-red);
  border-color: var(--morico-red);
  box-shadow: var(--shadow-glow-red);
  transform: scale(1.1);
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.container-wide  { max-width: 1440px; }
.container-narrow{ max-width: 900px; }

/* ============================================================
   SECTION BASE
   ============================================================ */
.section {
  padding-block: var(--space-xl);
  position: relative;
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-title .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--morico-red);
  margin-bottom: 0.75rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--grad-red);
  border-radius: 2px;
  margin-block: var(--space-sm);
}

/* ============================================================
   VISIBILITY HELPERS
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ============================================================
   NOISE OVERLAY
   ============================================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: var(--z-overlay);
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* ============================================================
   BADGE / TAG
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-mafia   { background: rgba(232,25,44,0.15); color: var(--morico-red); border: 1px solid rgba(232,25,44,0.3); }
.badge-good    { background: rgba(212,168,75,0.15); color: var(--morico-gold); border: 1px solid rgba(212,168,75,0.3); }
.badge-soon    { background: rgba(255,255,255,0.1); color: var(--morico-gray-light); border: 1px solid rgba(255,255,255,0.15); }

/* ============================================================
   ANIMATED BORDER GLOW
   ============================================================ */
@keyframes borderGlow {
  0%,100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.glow-border {
  position: relative;
}
.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--morico-red), var(--morico-crimson), transparent, var(--morico-red));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderGlow 2s ease-in-out infinite;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--morico-black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--morico-white);
  letter-spacing: 0.1em;
}

.loader-logo span { color: var(--morico-red); }

.loader-bar {
  width: 200px;
  height: 2px;
  background: var(--morico-gray-mid);
  border-radius: 1px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: var(--grad-red);
  border-radius: 1px;
  animation: loaderFill 1.5s var(--ease-inout) forwards;
}

@keyframes loaderFill {
  from { width: 0%; }
  to   { width: 100%; }
}
