/* ==========================================================================
   ALINA MAYER // MAYERISM
   Design System: Jeff Koons (Scale & Weight) + Andrey Kiselev (Grid & Index)
                  + Cargo Collective (Editorial Rhythm & Modernism)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=JetBrains+Mono:wght@300;400;500&family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg-primary: #0A0A0B;
  --bg-secondary: #121316;
  --bg-card: #18191E;
  --bg-elevated: #202229;
  --text-primary: #F4F4F5;
  --text-secondary: #A1A1AA;
  --text-muted: #52525B;
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent-vermilion: #E63946;
  --accent-gold: #D4AF37;
  --accent-concrete: #8E9299;
  
  --font-hero: 'Syne', sans-serif;
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Base resets & layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Subtle Film Grain Texture overlay */
.bg-grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}

/* Typography styles */
.font-hero { font-family: var(--font-hero); }
.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }

.text-monument {
  font-family: var(--font-hero);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 0.88;
}

.text-editorial {
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

.text-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Hairline Grid & Divider */
.border-hairline {
  border-color: var(--border-hairline);
}

.grid-line-x {
  border-bottom: 1px solid var(--border-hairline);
}

.grid-line-y {
  border-right: 1px solid var(--border-hairline);
}

/* ==========================================================================
   SCROLLYTELLING CORE STYLES (Video Background Scrubbing)
   ========================================================================== */

.scrolly-container {
  position: relative;
  width: 100%;
  height: 480vh; /* Scroll track distance */
  background: #000;
}

.scrolly-sticky-viewport {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Video canvas / background */
.scrolly-video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.scrolly-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  filter: contrast(1.1) brightness(0.9);
  transition: opacity 0.4s ease;
}

.scrolly-vimeo-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 ratio */
  min-height: 100vh;
  min-width: 177.77vh; /* 16:9 ratio */
  transform: translate(-50%, -50%);
  opacity: 0.6;
  pointer-events: none;
}

/* ==========================================================================
   GLOBAL FIXED VIDEO BACKGROUND & VIGNETTES
   ========================================================================== */

.fixed-video-vignette {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at center, rgba(10, 10, 11, 0.3) 0%, rgba(10, 10, 11, 0.85) 100%),
    linear-gradient(to bottom, rgba(10, 10, 11, 0.75) 0%, rgba(10, 10, 11, 0.2) 20%, rgba(10, 10, 11, 0.35) 70%, rgba(10, 10, 11, 0.95) 100%);
  z-index: 1;
}

/* Glassmorphic narrative panels */
.glass-panel {
  background: rgba(15, 16, 20, 0.74);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

/* Milestone floating cards: illuminate when scrolled into view */
.milestone-card {
  opacity: 0.32;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.5s ease, 
              box-shadow 0.5s ease;
}

.milestone-card.milestone-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 28px 60px -15px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   CARGO & KISELEV ARCHIVE GRID
   ========================================================================== */

.archive-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.archive-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

.archive-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #141518;
}

.archive-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: contrast(1.04) grayscale(0.2);
}

.archive-card:hover .archive-card-image {
  transform: scale(1.04);
  filter: contrast(1.08) grayscale(0);
}

/* Live Badge Pulse */
.badge-live-pulse {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-live-pulse::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #22C55E;
  box-shadow: 0 0 8px #22C55E;
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

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

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