/* ============================================
   PartyMaze AI - Liquid Glass Design System
   ============================================ */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Glass Effect Variables */
  --glass-bg-1: rgba(255, 255, 255, 0.10);
  --glass-bg-2: rgba(255, 255, 255, 0.06);
  --glass-bg-3: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-blur-strong: 24px;
  --glass-blur-medium: 16px;
  --glass-blur-light: 8px;
  
  /* Border Radius Standards */
  --radius-2xl: 1.5rem;      /* 24px - Primary radius for cards, buttons */
  --radius-full: 9999px;     /* Full circle for badges, avatars */
  
  /* Color Palette */
  --color-primary: #00f5ff;       /* Cyan */
  --color-secondary: #ff006e;     /* Magenta */
  --color-accent: #ffbe0b;        /* Yellow */
  --color-text-primary: rgba(255, 255, 255, 0.95);
  --color-text-secondary: rgba(255, 255, 255, 0.75);
  --color-text-muted: rgba(255, 255, 255, 0.5);
  
  /* Transitions */
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.6s;
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.45);
}

/* ============================================
   Global Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  background-attachment: fixed;
  color: var(--color-text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--transition-smooth);
}

a:hover {
  color: var(--color-secondary);
}

/* ============================================
   Liquid Glass Effect Classes
   ============================================ */

/* Glass Level 1 - Strongest (Navigation, Modals, CTAs) */
.glass-1 {
  background: var(--glass-bg-1);
  backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  transition: all var(--duration-normal) var(--transition-smooth);
}

.glass-1::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--transition-smooth);
  pointer-events: none;
}

.glass-1:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), inset 0 0 30px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.glass-1:hover::before {
  opacity: 1;
}

/* Glass Level 2 - Medium (Feature Cards, Content Blocks) */
.glass-2 {
  background: var(--glass-bg-2);
  backdrop-filter: blur(var(--glass-blur-medium)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur-medium)) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--transition-smooth);
}

.glass-2:hover {
  background: var(--glass-bg-1);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Glass Level 3 - Subtle (Background Decorations, Overlays) */
.glass-3 {
  background: var(--glass-bg-3);
  backdrop-filter: blur(var(--glass-blur-light)) saturate(120%);
  -webkit-backdrop-filter: blur(var(--glass-blur-light)) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-2xl);
}

/* ============================================
   Button Styles
   ============================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-2xl);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 16px rgba(0, 245, 255, 0.3);
  transition: all var(--duration-normal) var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 245, 255, 0.5);
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--glass-bg-1);
  backdrop-filter: blur(var(--glass-blur-medium));
  -webkit-backdrop-filter: blur(var(--glass-blur-medium));
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 2rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  cursor: pointer;
  transition: all var(--duration-normal) var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Animation Keyframes
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

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

/* Animation Utility Classes */
.animate-fade-in-up {
  animation: fadeInUp 0.8s var(--transition-smooth) forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s var(--transition-smooth) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.6s var(--transition-bounce) forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.7s var(--transition-smooth) forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.7s var(--transition-smooth) forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ============================================
   Utility Classes
   ============================================ */

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* Focus Styles for Accessibility */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

/* Selection Styles */
::selection {
  background-color: var(--color-primary);
  color: #000000;
}

::-moz-selection {
  background-color: var(--color-primary);
  color: #000000;
}

/* ============================================
   Responsive Utilities
   ============================================ */

/* Mobile: < 640px */
@media (max-width: 639px) {
  .mobile-hide {
    display: none !important;
  }
  
  html {
    font-size: 14px;
  }
}

/* Tablet: 640px - 1024px */
@media (min-width: 640px) and (max-width: 1023px) {
  .tablet-hide {
    display: none !important;
  }
}

/* Desktop: >= 1024px */
@media (min-width: 1024px) {
  .desktop-only {
    display: block;
  }
  
  .desktop-hide {
    display: none !important;
  }
}

/* ============================================
   Fallback Support (Non-supporting Browsers)
   ============================================ */
@supports not (backdrop-filter: blur(20px)) {
  .glass-1,
  .glass-2,
  .glass-3 {
    background: rgba(30, 30, 60, 0.85);
  }
  
  .btn-secondary {
    background: rgba(30, 30, 60, 0.9);
  }
}

/* ============================================
   Scrollbar Styling (Webkit Browsers)
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 12, 41, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-bg-1);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
  background-clip: padding-box;
}

/* ============================================
   Hero Section Styles
   ============================================ */
#hero {
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 245, 255, 0.08), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 0, 110, 0.08), transparent 50%);
}

/* Maze Grid Visualization */
.maze-cell {
  aspect-ratio: 1;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s var(--transition-smooth);
  position: relative;
}

.maze-cell.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

.maze-cell.active::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(255, 0, 110, 0.2));
  border-radius: 0.25rem;
}

/* Animate maze cells on hover */
.maze-grid:hover .maze-cell.active {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Hero Section Responsive Typography */
#hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

#hero p {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

/* Mobile Adjustments for Hero */
@media (max-width: 767px) {
  #hero {
    padding-top: 6rem;
    min-height: auto;
  }
  
  #hero .text-content {
    text-align: center;
  }
  
  #hero .flex.flex-col.sm\\:flex-row {
    flex-direction: column;
  }
  
  #hero .flex.flex-wrap {
    justify-content: center;
  }
}

/* ============================================
   Performance & Accessibility Enhancements
   ============================================ */

/* Reduced Motion Support */
@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;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .glass-1,
  .glass-2,
  .glass-3 {
    border: 2px solid rgba(255, 255, 255, 0.5);
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  .scroll-indicator {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  section {
    page-break-inside: avoid;
  }
}

/* Additional Responsive Refinements */
@media (max-width: 639px) {
  /* Smaller padding on mobile */
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  /* Smaller glass card padding */
  .glass-1,
  .glass-2 {
    padding: 1.5rem;
  }
  
  /* Touch-friendly button sizing */
  button,
  .btn-primary,
  .btn-secondary {
    min-height: 44px;
    min-width: 44px;
  }
}

@media (min-width: 1920px) {
  /* Larger screens - constrain max width */
  .container {
    max-width: 1400px;
  }
}
