/* CSS Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* CSS Custom Properties */
:root {
  --primary: #0A2540;
  --primary-dark: #081c2e;
  --accent: #00D4AA;
  --accent-hover: #00b391;
  --secondary: #6C63FF;
  --bg-primary: #F8F9FA;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #2A2D34;
  --text-secondary: #555555;
  --border-color: #e9ecef;
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Chromatic Aberration Effects */
  --rgb-offset: -2px 0 #ff0000, 2px 0 #00ffff;
  --glitch-shadow: 0 0 5px #ff0000, 0 0 10px #00ffff;
  --scan-line: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255, 0, 0, 0.03) 2px,
    rgba(255, 0, 0, 0.03) 4px
  );
  
  /* Z-Index Scale */
  --z-background: 10;
  --z-content: 20;
  --z-overlay: 30;
  --z-header: 9999;
  --z-cookie-banner: 9998;
}

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

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1.125rem;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 5rem 0;
}

.section-padding-small {
  padding: 3rem 0;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

/* Grid System */
.grid-container {
  display: grid;
  gap: 2rem;
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

.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);
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

/* Chromatic Aberration Utilities */
.chromatic-text {
  text-shadow: var(--rgb-offset);
  animation: glitch-text 3s infinite;
}

.glitch-element {
  filter: drop-shadow(-2px 0 #ff0000) drop-shadow(2px 0 #00ffff);
  animation: glitch-movement 2s infinite alternate;
}

.scan-lines::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--scan-line);
  pointer-events: none;
  opacity: 0.1;
  animation: scan-movement 2s linear infinite;
}

.vhs-effect {
  position: relative;
  overflow: hidden;
}

.vhs-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent
  );
  animation: vhs-scan 3s infinite;
}

/* Animations */
@keyframes glitch-text {
  0%, 100% { text-shadow: var(--rgb-offset); }
  25% { text-shadow: -3px 0 #ff0000, 1px 0 #00ffff; }
  50% { text-shadow: 1px 0 #ff0000, -3px 0 #00ffff; }
  75% { text-shadow: -1px 0 #ff0000, 3px 0 #00ffff; }
}

@keyframes glitch-movement {
  0% { transform: translateX(0); }
  20% { transform: translateX(-1px); }
  40% { transform: translateX(1px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

@keyframes scan-movement {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes vhs-scan {
  0% { left: -100%; }
  100% { left: 100%; }
}

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

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

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

/* Animation Classes */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.slide-in-left {
  opacity: 0;
  animation: slideInLeft 0.8s ease forwards;
}

.slide-in-right {
  opacity: 0;
  animation: slideInRight 0.8s ease forwards;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 3rem 0;
  }
  
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .flex-col-mobile {
    flex-direction: column;
  }
  
  .text-center-mobile {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section-padding {
    padding: 2rem 0;
  }
  
  h1 {
    font-size: 1.875rem;
  }
  
  h2 {
    font-size: 1.625rem;
  }
  
  p {
    font-size: 1rem;
  }
}