/* ============================================
   LIQUID GLASS & AI CINEMA - Layout
   Grid, Containers, Background Effects
   ============================================ */

/* ========================================
   PAGE WRAPPER
   ======================================== */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-gradient);
  overflow-x: hidden;
}

/* ========================================
   BACKGROUND EFFECTS
   ======================================== */
.page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--bg-radial);
  pointer-events: none;
  z-index: 0;
}

/* Light Rays Effect */
.page-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.page-bg__rays {
  position: absolute;
  top: -50%;
  left: 50%;
  width: 200%;
  height: 200%;
  transform: translateX(-50%);
  background:
    conic-gradient(
      from 0deg at 50% 50%,
      transparent 0deg,
      rgba(var(--color-blue-rgb), 0.03) 10deg,
      transparent 20deg,
      transparent 30deg,
      rgba(var(--color-purple-rgb), 0.02) 40deg,
      transparent 50deg
    );
  animation: lightRaysSpin 120s linear infinite;
  opacity: 0.5;
  will-change: transform;
}

@keyframes lightRaysSpin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

/* Ambient Glow Orbs */
.page-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: orbFloat 20s ease-in-out infinite;
  will-change: transform;
  transition: transform 0.1s linear;
}

.page-bg__orb--blue {
  top: 10%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: var(--color-blue);
  animation-delay: 0s;
}

.page-bg__orb--purple {
  bottom: 20%;
  left: 5%;
  width: 300px;
  height: 300px;
  background: var(--color-purple);
  animation-delay: -7s;
}

.page-bg__orb--teal {
  top: 60%;
  right: 20%;
  width: 250px;
  height: 250px;
  background: var(--color-teal);
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    transform: translate(-30px, -20px) scale(1.05);
  }
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main {
  position: relative;
  z-index: var(--z-base);
  padding-top: var(--header-height);
}

/* ========================================
   CONTAINERS
   ======================================== */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--lg { max-width: var(--container-lg); }
.container--xl { max-width: var(--container-xl); }
.container--2xl { max-width: var(--container-2xl); }
.container--full { max-width: 100%; }

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding-block: var(--space-16);
  position: relative;
}

.section--sm { padding-block: var(--space-8); }
.section--lg { padding-block: var(--space-24); }
.section--xl { padding-block: var(--space-32); }

.section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section__subtitle {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-blue);
  margin-bottom: var(--space-4);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__description {
  max-width: 600px;
  margin-inline: auto;
  font-size: var(--text-lg);
  color: var(--text-muted);
}

/* ========================================
   GRID SYSTEM
   ======================================== */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.grid--auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ========================================
   FLEXBOX UTILITIES
   ======================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ========================================
   SPACING UTILITIES
   ======================================== */
.m-auto { margin: auto; }
.mx-auto { margin-inline: auto; }
.my-auto { margin-block: auto; }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.px-4 { padding-inline: var(--space-4); }
.px-6 { padding-inline: var(--space-6); }
.px-8 { padding-inline: var(--space-8); }

.py-4 { padding-block: var(--space-4); }
.py-6 { padding-block: var(--space-6); }
.py-8 { padding-block: var(--space-8); }

/* ========================================
   TEXT UTILITIES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-blue { color: var(--color-blue); }
.text-purple { color: var(--color-purple); }
.text-teal { color: var(--color-teal); }

/* Gradient Text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text--alt {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow Text */
.text-glow {
  text-shadow:
    0 0 20px rgba(var(--color-blue-rgb), 0.5),
    0 0 40px rgba(var(--color-blue-rgb), 0.3);
}

.text-glow--purple {
  text-shadow:
    0 0 20px rgba(var(--color-purple-rgb), 0.5),
    0 0 40px rgba(var(--color-purple-rgb), 0.3);
}

/* ========================================
   DISPLAY UTILITIES
   ======================================== */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

/* ========================================
   POSITION UTILITIES
   ======================================== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* ========================================
   OVERFLOW
   ======================================== */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* ========================================
   MISC UTILITIES
   ======================================== */
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }
.cursor-pointer { cursor: pointer; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 40px rgba(var(--color-blue-rgb), 0.4));
  }
  50% {
    filter: drop-shadow(0 0 60px rgba(var(--color-purple-rgb), 0.6));
  }
}

.animate-fade-in { animation: fadeIn 0.5s var(--ease-out-expo); }
.animate-fade-in-up { animation: fadeInUp 0.6s var(--ease-out-expo); }
.animate-fade-in-down { animation: fadeInDown 0.6s var(--ease-out-expo); }
.animate-scale-in { animation: scaleIn 0.4s var(--ease-out-expo); }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glowPulse 4s ease-in-out infinite; }

/* Scroll Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="delay-1"] { transition-delay: 0.1s; }
[data-reveal="delay-2"] { transition-delay: 0.2s; }
[data-reveal="delay-3"] { transition-delay: 0.3s; }
[data-reveal="delay-4"] { transition-delay: 0.4s; }
