/* ============================================
   BASE.CSS — Design Tokens, Reset, Typography
   Zyronix Technical Club
   ============================================ */

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

/* ── CSS Custom Properties ──────────────────── */
:root {
  /* ── Background System ── */
  --clr-bg:            #050505;
  --clr-bg-secondary:  #0A0A0A;
  --clr-surface:       #0A0A0A;
  --clr-surface-2:     #111111;
  --clr-surface-3:     #161616;
  --clr-border:        #1A1A1A;
  --clr-border-hover:  rgba(255, 26, 26, 0.35);

  /* ── Primary Accent — Red (25% usage) ── */
  --clr-primary:       #FF1A1A;
  --clr-primary-light: #FF3B3B;
  --clr-primary-dark:  #B30000;
  --clr-primary-tint:  rgba(255, 26, 26, 0.10);
  --clr-primary-tint2: rgba(255, 26, 26, 0.05);

  /* ── Secondary Accent — Blue (5% usage only) ── */
  --clr-secondary:     #00C2FF;
  --clr-secondary-dim: rgba(0, 194, 255, 0.08);

  /* ── Text ── */
  --clr-text:          #FFFFFF;
  --clr-text-muted:    #B3B3B3;
  --clr-text-dim:      #6B6B6B;

  /* ── Gradients (red family only — NO red+blue mixed) ── */
  --gradient-primary:  linear-gradient(135deg, #FF1A1A, #B30000);
  --gradient-accent:   linear-gradient(135deg, #FF3B3B, #7A0000);
  --gradient-surface:  linear-gradient(135deg, #0A0A0A, #111111);
  --gradient-glow:     radial-gradient(ellipse at center, rgba(255,26,26,0.12) 0%, transparent 70%);
  --gradient-hero:     radial-gradient(ellipse at 20% 50%, rgba(255,26,26,0.10) 0%, transparent 60%),
                       radial-gradient(ellipse at 80% 30%, rgba(0,0,0,0) 0%, transparent 60%);

  /* Fonts */
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radii */
  --radius-sm:   0.375rem;
  --radius-md:   0.75rem;
  --radius-lg:   1rem;
  --radius-xl:   1.5rem;
  --radius-2xl:  2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-glow:    0 0 10px #FF1A1A, 0 0 20px #FF1A1A;
  --shadow-glow-sm: 0 0 10px rgba(255, 26, 26, 0.4);
  --shadow-card:    0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-card-hover: 0 20px 50px rgba(255, 26, 26, 0.18);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

svg {
  max-width: 100%;
}

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

ul, ol {
  list-style: none;
}

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

/* ── Typography Scale ───────────────────────── */
.text-xs    { font-size: 0.75rem;  line-height: 1.5; }
.text-sm    { font-size: 0.875rem; line-height: 1.5; }
.text-base  { font-size: 1rem;     line-height: 1.6; }
.text-lg    { font-size: 1.125rem; line-height: 1.6; }
.text-xl    { font-size: 1.25rem;  line-height: 1.4; }
.text-2xl   { font-size: 1.5rem;   line-height: 1.35; }
.text-3xl   { font-size: 1.875rem; line-height: 1.3; }
.text-4xl   { font-size: 2.25rem;  line-height: 1.2; }
.text-5xl   { font-size: 3rem;     line-height: 1.15; }
.text-6xl   { font-size: 3.75rem;  line-height: 1.1; }
.text-7xl   { font-size: 4.5rem;   line-height: 1.05; }

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

.gradient-text-accent {
  background: linear-gradient(135deg, #FF3B3B, #FF8080);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Keyframe Animations ────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(255,26,26,0.3); }
  50%       { box-shadow: 0 0 20px rgba(255,26,26,0.6), 0 0 40px rgba(255,26,26,0.2); }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}

@keyframes borderGlow {
  0%, 100% { border-color: #1A1A1A; }
  50%       { border-color: rgba(255,26,26,0.40); }
}

/* ── Scroll-Reveal Classes ──────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

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

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ── Scrollbar Styling ──────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--clr-bg);
}
::-webkit-scrollbar-thumb {
  background: #3A0000;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-primary-dark);
}

/* ── Selection ──────────────────────────────── */
::selection {
  background: rgba(255, 26, 26, 0.30);
  color: #fff;
}
