/* ============================================
   GLOBAL.CSS - Estilos compartidos
   ============================================ */

/* =====================================
   1. VARIABLES CSS
   ===================================== */
:root {
  /* Colores principales */
  --color-bg: #FFFFFF;
  --color-bg-secondary: #F9F9F9;
  --color-text: #1D1D1D;
  --color-text-secondary: #514E4E;
  --color-border: #1F1F1F;
  
  /* Colores de marca */
  --color-yellow: #E8FF5D;
  --color-purple: #8657E2;
  --color-mint: #B5FFE0;
  
  /* Tipografía */
  --font-sans: "DM Sans", sans-serif;
  --font-mono: "DM Mono", monospace;
  --font-serif: "Lora", serif;
  
  /* Jerarquía tipográfica equilibrada */
  --text-h1: 40px;         /* Títulos principales */
  --text-h2: 28px;         /* Subtítulos de sección */
  --text-h3: 24px;         /* Subtítulos pequeños */
  --text-body: 20px;       /* Párrafos normales */
  --text-small: 18px;      /* Texto secundario */
  --text-meta: 16px;       /* Labels, metadata */
  
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  
  /* Espaciado */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 80px;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --radius-2xl: 64px;
  
  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* =====================================
   2. RESET Y BASE
   ===================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =====================================
   3. JERARQUÍA TIPOGRÁFICA GLOBAL
   ===================================== */

/* Headings principales */
h1, .hero-title {
  color: var(--color-border);
  font-family: var(--font-sans);
  font-size: var(--text-h1);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  margin-bottom: 16px;
}

h2, .section-title {
  color: var(--color-border);
  font-family: var(--font-sans);
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  margin-bottom: 16px;
}

h3 {
  color: var(--color-border);
  font-family: var(--font-sans);
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  margin-bottom: 12px;
}

h4 {
  color: var(--color-border);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Párrafos y texto */
p, .section-description {
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  margin-bottom: 16px;
}

p:last-child {
  margin-bottom: 0;
}

/* Clases específicas para Hero */
.hero-meta {
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: var(--weight-regular);
  line-height: 1.5;
  margin-bottom: 24px;
}

.hero-meta .year {
  font-style: italic;
  font-weight: 300;
}

.hero-meta .info {
  font-weight: 200;
}

.hero-description {
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-description strong {
  font-weight: 700;
}

.hero-description .semibold {
  font-weight: var(--weight-semibold);
}

/* Énfasis y utilidades de texto */
strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

/* =====================================
   4. NAVBAR
   ===================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(249, 249, 249, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 1px solid rgba(29, 29, 29, 0.1);
}

.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  height: 40px;
  width: auto;
  display: block;
  background: none !important;
  border-radius: 0;
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--text-meta);
  font-weight: var(--weight-regular);
  transition: opacity var(--transition-fast);
}

.nav-links a:hover {
  opacity: 0.6;
}

.nav-cta {
  background: var(--color-mint);
  color: var(--color-border);
  padding: 8px 16px;
  border-radius: 40px;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  font-weight: var(--weight-medium);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-cta:hover {
  background: var(--color-text);
  color: #fff;
}

/* =====================================
   DROPDOWN NAVIGATION
   ===================================== */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--text-meta);
  font-weight: var(--weight-regular);
  transition: opacity var(--transition-fast);
  cursor: pointer;
}

.nav-dropdown-trigger:hover {
  opacity: 0.6;
}

.dropdown-arrow {
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Puente invisible para mantener hover */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 20px; /* ← Cubre el gap de 16px + extra */
  background: transparent;
  pointer-events: auto;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid rgba(29, 29, 29, 0.1);
  border-radius: 12px;
  padding: 8px;
  min-width: 240px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
  transform: translateX(-50%) translateY(-8px);
  z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 12px 16px;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-meta);
  font-weight: var(--weight-regular);
  border-radius: 8px;
  transition: background-color var(--transition-fast);
  white-space: nowrap;
}

.dropdown-item:hover {
  background: var(--color-bg-secondary);
}

/* Responsive - Mobile & Tablet */
@media (max-width: 1024px) {
  /* Remover el puente en mobile */
  .nav-dropdown::after {
    display: none;
  }
  
  .nav-dropdown-menu {
    left: auto;
    right: 0;
    transform: none;
    top: calc(100% + 12px);
  }
  
  .nav-dropdown.active .nav-dropdown-menu {
    transform: translateY(0);
  }
  
  .nav-dropdown-menu {
    transform: translateY(-8px);
  }
}

@media (max-width: 768px) {
  .nav-dropdown-menu {
    min-width: 200px;
    font-size: 14px;
  }
  
  .dropdown-item {
    padding: 10px 14px;
    font-size: 14px;
  }
}

/* =====================================
   5. MAIN CONTENT
   ===================================== */
main {
  margin-top: 100px;
  padding: 0 40px 80px;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================
   6. FOOTER (para casos de estudio)
   ===================================== */
footer {
  background: var(--color-bg-secondary);
  padding: 40px;
  margin: 80px 40px 40px;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.footer-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  width: auto;
  height: 25px;
}

.footer-socials {
  display: flex;
  gap: 24px;
}

.social-btn {
  width: 48px;
  height: 48px;
  background: black;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--color-mint);
}

.social-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition-fast);
}

.social-btn:hover svg {
  stroke: black;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-text {
  color: var(--color-text);
  font-size: 40px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.footer-cta {
  background: var(--color-mint);
  color: var(--color-border);
  padding: 8px 16px;
  border-radius: 40px;
  font-family: var(--font-mono);
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.footer-cta:hover {
  background: black;
  color: white;
}

.footer-cta-arrow {
  width: 16px;
  height: 16px;
  border: 2.4px solid currentColor;
  border-left: none;
  border-bottom: none;
  transform: rotate(45deg);
}

/* =====================================
   7. UTILIDADES
   ===================================== */

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: black;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 40px;
  text-decoration: none;
  font-size: var(--text-h3);
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  margin-bottom: 24px;
  transition: transform var(--transition-fast);
}

.back-button:hover {
  transform: scale(1.05);
}

/* =====================================
   8. RESPONSIVE - TABLET
   ===================================== */
@media (max-width: 1024px) {
  :root {
    --text-h1: 36px;
    --text-h2: 24px;
    --text-h3: 20px;
    --text-body: 18px;
    --text-small: 16px;
  }

  nav {
    padding: 20px 32px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  main {
    padding: 0 32px 80px;
  }

  footer {
    padding: 40px 32px;
    margin: 80px 32px 40px;
  }

  .footer-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-right {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .footer-text {
    font-size: 32px;
  }
}

/* =====================================
   9. RESPONSIVE - MOBILE
   ===================================== */
@media (max-width: 768px) {
  :root {
    --text-h1: 32px;
    --text-h2: 22px;
    --text-h3: 18px;
    --text-body: 16px;
    --text-small: 14px;
  }

  nav {
    padding: 16px 24px;
  }

  .nav-links {
    gap: 20px;
  }

  main {
    padding: 0 24px 60px;
    margin-top: 80px;
  }

  .back-button {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  footer {
    padding: 32px 24px;
    margin: 60px 24px 40px;
  }

  .footer-text {
    font-size: 28px;
  }

  .footer-cta {
    font-size: 18px;
    width: 100%;
    justify-content: center;
  }

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

@media (max-width: 480px) {
  :root {
    --text-h1: 28px;
    --text-h2: 20px;
    --text-h3: 16px;
    --text-body: 14px;
    --text-small: 13px;
  }

  nav {
    padding: 12px 16px;
  }

  .nav-logo {
    height: 32px;
  }

  .nav-cta {
    padding: 6px 12px;
    font-size: 14px;
  }

  main {
    padding: 0 16px 40px;
  }

  .back-button {
    width: 44px;
    height: 44px;
    font-size: 18px;
    margin-bottom: 16px;
  }

  footer {
    padding: 24px 16px;
    margin: 40px 16px 20px;
  }

  .footer-card {
    padding: 24px 16px;
  }

  .footer-text {
    font-size: 24px;
  }

  .footer-cta {
    font-size: var(--text-meta);
  }
  
  /* =====================================
   CUSTOM CURSOR
   ===================================== */
body {
  cursor: none;
}

.custom-cursor {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: #1F1F1F;
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
  z-index: 10000;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid #1F1F1F;
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
  z-index: 9999;
}

/* Estado hover en clickables */
body.cursor-hover .cursor-dot {
  width: 60px;
  height: 60px;
  background: #B5FFE0;
}

body.cursor-hover .cursor-outline {
  width: 60px;
  height: 60px;
  opacity: 0;
}

/* Ocultar en mobile */
@media (max-width: 1024px) {
  body {
    cursor: auto;
  }
  
  .custom-cursor {
    display: none;
  }
}
  
}