:root {
  /* Fonts */
  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Noto Sans', sans-serif;

  /* Light Theme Defaults */
  --bg-primary:    #FAF9F6;
  --bg-surface:    #FFFFFF;
  --text-primary:  #1C1C1C;
  --text-secondary:#5C5C5C;
  --accent-action: #055566;
  --action-text:   #FFFFFF;
  --border-color:  #E5E5E5;
}

[data-theme="dark"] {
  --bg-primary:    #022B33;
  --bg-surface:    #055566;
  --text-primary:  #F2F2F2;
  --text-secondary:#61C3A6; /* Mint for subtitles */
  --accent-action: #FFD166; /* Yellow for visibility */
  --action-text:   #022B33;
  --border-color:  #08687A;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
}

.text-balance {
  text-wrap: balance;
}

/* Spotlight Animation */
@keyframes spotlight {
  0% {
    opacity: 0;
    transform: translate(-72%, -62%) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -40%) scale(1);
  }
}

.animate-spotlight {
  animation: spotlight 2s ease .75s 1 forwards;
}

:root {
  --spotlight-color: rgba(5, 85, 102, 0.08); /* Petrol, very subtle for light mode */
}

[data-theme="dark"] {
  --spotlight-color: rgba(97, 195, 166, 0.15); /* Mint, glowing for dark mode */
}

.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-overlay {
  pointer-events: none;
  position: absolute;
  inset: -1px; /* -inset-px */
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--spotlight-color), transparent 40%);
  z-index: 0;
}

.spotlight-card:hover .spotlight-overlay {
  opacity: 1;
}

.spotlight-content {
  position: relative;
  z-index: 10;
}

/* Retro Grid Animation */
@keyframes grid-movement {
  0% { transform: translateY(0); }
  100% { transform: translateY(calc(var(--cell-size) * 1)); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-grid {
  animation: grid-movement 3s linear infinite;
}

.animate-spin-slow {
  animation: spin 3s linear infinite;
}

:root {
  --grid-angle: 65deg;
  --cell-size: 40px;
  --grid-opacity: 0.5;
  --grid-light-line: rgba(5, 85, 102, 0.1); /* Petrol low opacity */
  --grid-dark-line: rgba(97, 195, 166, 0.1); /* Mint low opacity */
}

.retro-grid-container {
  perspective: 200px;
  overflow: hidden;
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  pointer-events: none;
}

.retro-grid {
  position: absolute;
  inset: 0;
  transform: rotateX(var(--grid-angle));
  width: 300%;
  height: 300%;
  margin-left: -100%;
  transform-origin: center top;
  
  background-image: 
    linear-gradient(to right, var(--grid-light-line) 1px, transparent 0),
    linear-gradient(to bottom, var(--grid-light-line) 1px, transparent 0);
  background-size: var(--cell-size) var(--cell-size);
}

[data-theme="dark"] .retro-grid {
  background-image: 
    linear-gradient(to right, var(--grid-dark-line) 1px, transparent 0),
    linear-gradient(to bottom, var(--grid-dark-line) 1px, transparent 0);
}

/* Utility for hiding elements based on theme if needed outside of Tailwind */
.dark .light-only { display: none; }
.dark-only { display: none; }
.dark .dark-only { display: block; }
