/* ============================================
   Space4Build — main.css — Cyberpunk Edition
   Reset · Variables · Tipografía · Utilidades
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@400;600;700;900&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
  /* Fondos Cyberpunk */
  --bg-dark:        #080C14;
  --bg-surface:     #0A0F1A;
  --bg-card:        #0D1420;
  --bg-card-hover:  #111D2E;
  --bg-glass:       rgba(13, 20, 32, 0.75);

  /* Bordes */
  --border-color:   #1A2840;
  --border-glow:    rgba(0, 229, 255, 0.3);

  /* Textos */
  --text-main:      #E8F4FF;
  --text-muted:     #6A8BAC;
  --text-subtle:    #344D68;

  /* Acentos de Marca */
  --accent-purple:  #8B5CF6;
  --accent-cyan:    #00E5FF;
  --accent-pink:    #FF007A;
  --accent-green:   #00FF9C;
  --accent-amber:   #FFD600;

  /* Gradientes */
  --gradient-brand:     linear-gradient(135deg, #8B5CF6 0%, #00E5FF 100%);
  --gradient-brand-alt: linear-gradient(135deg, #FF007A 0%, #8B5CF6 100%);
  --gradient-card:      linear-gradient(145deg, #0D1420 0%, #080C14 100%);

  /* Glows */
  --glow-cyan:    0 0 16px rgba(0, 229, 255, 0.4), 0 0 50px rgba(0, 229, 255, 0.1);
  --glow-purple:  0 0 16px rgba(139, 92, 246, 0.4), 0 0 50px rgba(139, 92, 246, 0.1);
  --glow-magenta: 0 0 16px rgba(255, 0, 122, 0.4), 0 0 50px rgba(255, 0, 122, 0.1);

  /* Tipografía */
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Orbitron', 'Inter', sans-serif;
  --font-mono:    'Space Mono', ui-monospace, Menlo, monospace;

  /* Clip-paths */
  --clip-card: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --clip-btn:  polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));

  /* Espaciado */
  --max-width:  1200px;
  --section-py: 6rem;

  /* Radios (algunos elementos los ignoran por clip-path) */
  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --radius-full:9999px;

  /* Sombras */
  --shadow-card:     0 4px 28px rgba(0, 0, 0, 0.55);
  --shadow-glow:     0 0 40px rgba(0, 229, 255, 0.12);
  --shadow-glow-cyan: 0 0 40px rgba(0, 229, 255, 0.2);

  /* Transiciones */
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Scanlines Globales (efecto CRT sutil) ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.055) 3px,
    rgba(0, 0, 0, 0.055) 4px
  );
}

img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── Layout ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-py { padding: var(--section-py) 0; }

/* ─── Tipografía Display — Orbitron ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1rem, 2vw, 1.35rem); }
h4 { font-size: 0.9rem; font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }

p { color: var(--text-muted); }

/* ─── Utilidades ─── */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }

/* ─── Section Label — Terminal Style ─── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.18);
  padding: 0.32rem 0.85rem;
  border-radius: 0;
  clip-path: var(--clip-btn);
  margin-bottom: 1.25rem;
}

.section-label::before {
  content: '//';
  opacity: 0.45;
  font-weight: 400;
}

.section-label.cyan {
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.18);
}

.section-label.pink {
  color: var(--accent-pink);
  background: rgba(255, 0, 122, 0.06);
  border-color: rgba(255, 0, 122, 0.18);
}

.section-label.pink::before { content: '//'; color: rgba(255, 0, 122, 0.4); }

.section-header { margin-bottom: 3.5rem; }
.section-header p { max-width: 600px; margin: 1rem auto 0; font-size: 1.05rem; }

/* ─── Divider ─── */
.divider {
  width: 60px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 0;
  margin: 1.25rem auto 0;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-color); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* ─── Animate on scroll ─── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  :root { --section-py: 4rem; }
}
