/* ============================================
   SPYDEY OFFICIAL — Design System
   index.css | Foundation & Variables
   ============================================ */

/* === IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Oswald:wght@400;500;600;700&display=swap');

/* === CSS RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* === CSS VARIABLES (DARK MODE DEFAULT) === */
:root {
  /* Backgrounds */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;

  /* Accent Colors */
  --accent-red: #e63946;
  --accent-red-hover: #ff4757;
  --accent-red-glow: rgba(230, 57, 70, 0.3);
  --accent-red-subtle: rgba(230, 57, 70, 0.1);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #999999;
  --text-muted: #666666;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);

  /* Shadows */
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-red-glow);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Layout */
  --container-max: 1200px;
  --nav-height: 72px;
}

/* === LIGHT MODE === */
[data-theme='light'] {
  --bg-primary: #f0f0f0;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8e8e8;
  --text-primary: #0a0a0a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --glass-bg: rgba(0, 0, 0, 0.03);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-bg-hover: rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
  --accent-red-glow: rgba(230, 57, 70, 0.2);
  --accent-red-subtle: rgba(230, 57, 70, 0.06);
}

/* === UTILITY CLASSES === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 60px;
  text-align: center;
}

.section-title span {
  color: var(--accent-red);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: -40px auto 60px;
}

/* Glass Card Base */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-smooth);
}

.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--accent-red-glow);
  box-shadow: var(--shadow-glow);
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent-red);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  background: var(--accent-red-hover);
  box-shadow: 0 0 30px var(--accent-red-glow), 0 0 60px rgba(230, 57, 70, 0.15);
  transform: translateY(-2px);
}

.btn-primary:hover::before {
  opacity: 1;
}

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

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  transition: all var(--transition-smooth);
}

.btn-outline:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  box-shadow: 0 0 20px var(--accent-red-subtle);
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--accent-red);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red-hover);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-red) var(--bg-primary);
}

/* === SELECTION === */
::selection {
  background: var(--accent-red);
  color: white;
}

::-moz-selection {
  background: var(--accent-red);
  color: white;
}

/* === FOCUS STYLES === */
:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

/* === TEXT UTILITIES === */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .section {
    padding: 80px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .section-subtitle {
    margin: -24px auto 40px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    margin-bottom: 32px;
    letter-spacing: 1px;
  }

  .section-subtitle {
    margin: -16px auto 32px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 48px 0;
  }

  .section-title {
    margin-bottom: 24px;
  }
}
