/* Modern CSS Framework for NFC Hannover - 2024/2025 Design System */

/* ============================================
   1. CSS Variables & Design Tokens
   ============================================ */
:root {
  /* Enhanced Color Palette */
  --primary-green: #124540;
  --primary-green-rgb: 18, 69, 64;
  --primary-green-light: #1a5f57;
  --primary-green-lighter: #2a7a70;
  --primary-green-dark: #0d332e;
  
  --accent-golden: #a77722;
  --accent-golden-rgb: 167, 119, 34;
  --accent-golden-light: #c4922c;
  --accent-golden-lighter: #d4a955;
  --accent-golden-dark: #8a611a;
  
  /* Neutral Colors */
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-lighter) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-golden) 0%, var(--accent-golden-lighter) 100%);
  --gradient-mesh: radial-gradient(at 40% 20%, rgba(167, 119, 34, 0.3) 0px, transparent 50%),
                   radial-gradient(at 80% 0%, rgba(42, 122, 112, 0.2) 0px, transparent 50%),
                   radial-gradient(at 0% 50%, rgba(18, 69, 64, 0.3) 0px, transparent 50%);
  
  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Animation Timings */
  --transition-fast: 150ms;
  --transition-base: 250ms;
  --transition-slow: 500ms;
  --transition-slower: 750ms;
  
  /* Easing Functions */
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-glow: 0 0 20px rgba(167, 119, 34, 0.5);
  --shadow-glow-strong: 0 0 40px rgba(167, 119, 34, 0.8);
}

/* ============================================
   2. Modern Layout Systems
   ============================================ */

/* Bento Grid System */
.bento-grid {
  display: grid;
  gap: 1.5rem;
  grid-auto-flow: dense;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.bento-item {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  transition: all var(--transition-base) var(--ease-out-expo);
}

.bento-item--large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-item--wide {
  grid-column: span 2;
}

.bento-item--tall {
  grid-row: span 2;
}

@media (max-width: 768px) {
  .bento-item--large,
  .bento-item--wide {
    grid-column: span 1;
  }
}

/* Magazine Layout */
.magazine-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.magazine-feature {
  grid-column: 1;
}

.magazine-sidebar {
  grid-column: 2;
  position: sticky;
  top: 2rem;
}

@media (max-width: 1024px) {
  .magazine-layout {
    grid-template-columns: 1fr;
  }
  
  .magazine-feature,
  .magazine-sidebar {
    grid-column: 1;
  }
  
  .magazine-sidebar {
    position: static;
  }
}

/* ============================================
   3. Advanced Card Designs
   ============================================ */

/* Glassmorphic Card */
.card-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem;
  transition: all var(--transition-base) var(--ease-out-expo);
}

/* Dark mode support for card-glass */
.dark .card-glass {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.3);
}

.card-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.dark .card-glass:hover {
  background: rgba(31, 41, 55, 0.9);
}

/* Neumorphic Card */
.card-neu {
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  box-shadow: 20px 20px 60px #d1d1d1, -20px -20px 60px #ffffff;
  border-radius: 20px;
  padding: 2rem;
  transition: all var(--transition-base) var(--ease-out-expo);
}

.card-neu:active {
  box-shadow: inset 20px 20px 60px #d1d1d1, inset -20px -20px 60px #ffffff;
}

/* 3D Tilt Card */
.card-tilt {
  transform-style: preserve-3d;
  transition: transform var(--transition-base) var(--ease-out-expo);
  border-radius: 20px;
  position: relative;
}

.card-tilt-content {
  transform: translateZ(60px);
  transition: transform var(--transition-base) var(--ease-out-expo);
}

.card-tilt:hover {
  transform: rotateX(10deg) rotateY(10deg);
}

/* Gradient Border Card */
.card-gradient-border {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 2rem;
}

.card-gradient-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-accent);
  border-radius: 20px;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card-gradient-border:hover::before {
  opacity: 1;
}

/* ============================================
   4. Advanced Animations
   ============================================ */

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow) var(--ease-out-expo);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all var(--transition-slow) var(--ease-out-expo);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all var(--transition-slow) var(--ease-out-expo);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-slow) var(--ease-out-expo);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Parallax Effect */
.parallax-container {
  position: relative;
  overflow: hidden;
}

.parallax-element {
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Morphing Blob Animation */
@keyframes morph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

.blob {
  animation: morph 8s ease-in-out infinite;
  background: var(--gradient-accent);
  filter: blur(40px);
  opacity: 0.7;
}

/* Floating Animation */
@keyframes float-up-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float-animation {
  animation: float-up-down 4s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse-grow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

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

/* Text Reveal Animation */
@keyframes text-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.text-reveal {
  animation: text-reveal 1s var(--ease-out-expo) forwards;
}

/* Gradient Animation */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animate {
  background: linear-gradient(-45deg, var(--primary-green), var(--primary-green-lighter), var(--accent-golden), var(--accent-golden-lighter));
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

/* Number Counter Animation */
.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

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

.counter-animate {
  animation: count-up 0.5s var(--ease-out-expo) forwards;
}

/* ============================================
   5. Interactive Elements
   ============================================ */

/* Magnetic Button */
.btn-magnetic {
  position: relative;
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  background: var(--gradient-accent);
  color: white;
  font-weight: 600;
  overflow: hidden;
  transition: transform var(--transition-fast) var(--ease-out-expo);
}

.btn-magnetic:hover {
  transform: scale(1.05);
}

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

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

/* Ripple Effect Button */
.btn-ripple {
  position: relative;
  overflow: hidden;
  padding: 1rem 2rem;
  border-radius: 12px;
  background: var(--primary-green);
  color: white;
  font-weight: 600;
  transition: all var(--transition-base) var(--ease-out-expo);
}

.btn-ripple:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: ripple-effect 0.6s ease-out;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Hover Lift Effect */
.hover-lift {
  transition: all var(--transition-base) var(--ease-out-expo);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

/* Hover Glow Effect */
.hover-glow {
  transition: all var(--transition-base) var(--ease-out-expo);
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow);
}

/* ============================================
   6. Modern Hero Styles
   ============================================ */

.hero-modern {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(18, 69, 64, 0.9) 0%, 
    rgba(18, 69, 64, 0.7) 50%, 
    rgba(167, 119, 34, 0.4) 100%);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, white 0%, var(--accent-golden-lighter) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

/* Split Hero Layout */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  align-items: center;
}

.hero-split-content {
  padding: 4rem;
}

.hero-split-visual {
  position: relative;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr;
  }
  
  .hero-split-visual {
    height: 50vh;
  }
}

/* ============================================
   7. Timeline Component
   ============================================ */

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  padding: 2rem 0;
}

.timeline-content {
  position: relative;
  width: 45%;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base) var(--ease-out-expo);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--accent-golden);
  border: 4px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }
  
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
    margin-right: 0 !important;
  }
  
  .timeline-dot {
    left: 20px;
  }
}

/* ============================================
   8. Noise Texture Overlay
   ============================================ */

.noise-texture {
  position: relative;
}

.noise-texture::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ============================================
   9. Utility Classes
   ============================================ */

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

/* Dark mode: Use golden gradient for better visibility */
.dark .text-gradient-primary {
  background: linear-gradient(135deg, #d4a955 0%, #a77722 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Dark mode: Ensure accent is visible */
.dark .text-gradient-accent {
  background: linear-gradient(135deg, #d4a955 0%, #c4922c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Backdrop Filters */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.backdrop-blur-md {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.backdrop-blur-lg {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Aspect Ratios */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-portrait {
  aspect-ratio: 3 / 4;
}

/* Overflow Patterns */
.mask-fade-bottom {
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.mask-fade-edges {
  -webkit-mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
}

/* ============================================
   10. Responsive Helpers
   ============================================ */

@media (max-width: 640px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .hide-tablet {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  .hide-desktop {
    display: none !important;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Disable animations for reduced motion preference */
@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;
  }
}