/* ═══════════════════════════════════════════════════════════════
   JAIME GARCÍA — PORTFOLIO
   style.css

   ÍNDICE
   1.  Variables y tokens
   2.  Reset y base
   3.  Tipografía global
   4.  Utilidades
   5.  Navegación
   6.  Hero
   7.  Sección About
   8.  Galería — cabecera y filtros
   9.  Galería — grid e items
   10. Placeholders de color (mientras no hay fotos reales)
   11. Lightbox
   12. Contacto
   13. Footer
   14. Animaciones
   15. Responsive
═══════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────
   1. VARIABLES Y TOKENS
   Cambia aquí los colores, fuentes y espaciados
   para redirigir toda la estética de la web
───────────────────────────────────────────── */
:root {
  /* Paleta principal */
  --bg:           #0a0a0a;   /* fondo global */
  --surface:      #141414;   /* tarjetas, nav con scroll */
  --surface-2:    #1c1c1c;   /* placeholders */
  --border:       #222220;   /* bordes sutiles */

  /* Texto */
  --text:         #e8e4dc;   /* texto principal */
  --text-muted:   #7a7570;   /* texto secundario */
  --text-dim:     #3d3b38;   /* texto muy apagado */

  /* Acento — color ámbar extraído de tus atardeceres */
  --accent:       #c8923a;
  --accent-hover: #d9a050;
  --accent-dim:   #6b4e1f;

  /* Tipografía */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Espaciado base */
  --padding-page: 48px;
  --gap-grid:     3px;

  /* Transiciones */
  --transition-fast:   0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow:   0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* ─────────────────────────────────────────
   2. RESET Y BASE
───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  font-family: var(--font-body);
}

ul { list-style: none; }


/* ─────────────────────────────────────────
   3. TIPOGRAFÍA GLOBAL
───────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 300;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
}


/* ─────────────────────────────────────────
   4. UTILIDADES
───────────────────────────────────────────── */

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Proporciones para placeholders y fotos */
.ratio-tall       { aspect-ratio: 2 / 3; }
.ratio-ultra-tall { aspect-ratio: 9 / 16; }
.ratio-wide       { aspect-ratio: 3 / 2; }
.ratio-square     { aspect-ratio: 1 / 1; }


/* ─────────────────────────────────────────
   5. NAVEGACIÓN
───────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--padding-page);
  background: linear-gradient(to bottom,
    rgba(10, 10, 10, 0.95) 0%,
    transparent 100%);
  transition:
    backdrop-filter var(--transition-medium),
    background var(--transition-medium);
}

/* Nav con fondo cuando se hace scroll */
#nav.scrolled {
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 10, 0.85);
  border-bottom: 1px solid var(--border);
}

/* Logo */
.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text);
}

.nav-logo-dot {
  color: var(--accent);
}

/* Links de sección */
.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text);
}

/* Toggle de idioma */
.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border-radius: 4px;
  padding: 3px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 3px;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--accent);
  color: #0a0a0a;
}


/* ─────────────────────────────────────────
   6. HERO
───────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* IMAGEN DE FONDO DEL HERO
   Sustituye el gradiente por tu imagen real:
   background-image: url('../img/hero.jpg');
   La imagen ideal es la Torre con el sol rojo centrado (IMG_4770)
*/
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 65% 40%, #3a1a05 0%, transparent 55%),
    radial-gradient(ellipse at 30% 75%, #1a0f05 0%, transparent 40%),
    linear-gradient(135deg, #0a0a0a 0%, #1a1008 50%, #0a0a0a 100%);
  background-size: cover;
  background-position: center;
}

/* Gradiente sobre la imagen de fondo para legibilidad del texto */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      rgba(10, 10, 10, 1)   0%,
      rgba(10, 10, 10, 0.4) 40%,
      rgba(10, 10, 10, 0.1) 100%),
    linear-gradient(to right,
      rgba(10, 10, 10, 0.5) 0%,
      transparent 60%);
  z-index: 1;
}

/* Contenido del hero */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--padding-page) 72px;
  max-width: 680px;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  max-width: 380px;
  line-height: 1.75;
}

/* Indicador de scroll animado */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  right: var(--padding-page);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-scroll::after {
  content: '';
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-dim), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}


/* ─────────────────────────────────────────
   7. SECCIÓN ABOUT
───────────────────────────────────────────── */
.about {
  padding: 120px var(--padding-page);
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 32px;
}

.about-body {
  color: var(--text-muted);
  line-height: 1.85;
}

.about-body p + p {
  margin-top: 16px;
}

/* Tarjetas de equipo */
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.stat-card {
  background: var(--surface);
  padding: 32px;
  border: 1px solid var(--border);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-unit {
  font-size: 24px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.4;
}


/* ─────────────────────────────────────────
   8. GALERÍA — CABECERA Y FILTROS
───────────────────────────────────────────── */
.gallery-section {
  padding: 80px var(--padding-page) 120px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-count {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* Botones de filtro */
.gallery-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 20px;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
  font-weight: 500;
}


/* ─────────────────────────────────────────
   9. GALERÍA — GRID E ITEMS
───────────────────────────────────────────── */
.gallery-grid {
  columns: 3;
  column-gap: var(--gap-grid);
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--gap-grid);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
}

/* Oculto por filtro */
.gallery-item.hidden {
  display: none;
}

/* La foto o el placeholder */
.gallery-placeholder {
  width: 100%;
  display: block;
  transition: transform var(--transition-slow);
}

/* Cuando hay imagen real dentro del placeholder */
.gallery-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:hover .gallery-placeholder {
  transform: scale(1.03);
}

/* Overlay con título al hacer hover */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(10, 10, 10, 0.88) 0%,
    transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-medium);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.03em;
}

.gallery-caption small {
  display: block;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}


/* ─────────────────────────────────────────
   10. PLACEHOLDERS DE COLOR
   Simulan el tono de cada tipo de foto
   mientras no tienes las imágenes subidas.
   Elimina esta sección cuando tengas las fotos reales.
───────────────────────────────────────────── */

/* Astrofotografía */
.ph-astro-dark {
  background: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 50%, #16213e 100%);
}

.ph-astro-red {
  background: linear-gradient(135deg, #0d0d1a 0%, #1a0a0a 50%, #2d1010 100%);
}

.ph-astro-blue {
  background: linear-gradient(135deg, #050510 0%, #0a0a20 50%, #0a1020 100%);
}

/* Atardeceres */
.ph-sun-orange {
  background: linear-gradient(to top,
    #0a0a0a 0%, #3a1a05 30%, #c8923a 70%, #e8b060 100%);
}

.ph-sun-red {
  background: linear-gradient(to top,
    #0a0a0a 0%, #2a0a05 40%, #8a3010 80%, #c04020 100%);
}

/* Macro */
.ph-macro-red {
  background: linear-gradient(135deg, #0a0305 0%, #1a0508 50%, #0a0305 100%);
}

.ph-macro-green {
  background: linear-gradient(135deg, #080a08 0%, #101410 50%, #0a0f0a 100%);
}


/* ─────────────────────────────────────────
   11. LIGHTBOX
───────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 32px;
  line-height: 1;
  transition: color var(--transition-fast);
  z-index: 201;
}

.lightbox-close:hover {
  color: var(--text);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Imagen real en el lightbox */
.lightbox-content img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

/* Placeholder cuando no hay imagen */
.lightbox-ph {
  width: min(700px, 85vw);
  height: min(480px, 58vh);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.1em;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Información bajo la imagen */
.lightbox-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lightbox-info h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 300;
}

.lightbox-info p {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Línea de equipo técnico — en color acento */
.lightbox-gear {
  color: var(--accent) !important;
  font-size: 11px !important;
  letter-spacing: 0.06em !important;
}


/* ─────────────────────────────────────────
   12. CONTACTO
───────────────────────────────────────────── */
.contact {
  padding: 120px var(--padding-page);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 20px;
}

.contact-sub {
  color: var(--text-muted);
  margin-bottom: 48px;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ─────────────────────────────────────────
   13. FOOTER
───────────────────────────────────────────── */
footer {
  padding: 28px var(--padding-page);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

footer p,
footer a {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

footer a:hover {
  color: var(--accent);
}


/* ─────────────────────────────────────────
   14. ANIMACIONES
───────────────────────────────────────────── */

/* Scroll indicator en el hero */
@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

/* Fade-in al hacer scroll (controlado por main.js) */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    transition: none;
  }
  .hero-scroll::after {
    animation: none;
  }
  .gallery-placeholder {
    transition: none;
  }
}


/* ─────────────────────────────────────────
   15. RESPONSIVE
───────────────────────────────────────────── */

/* Tablet */
@media (max-width: 900px) {
  :root {
    --padding-page: 32px;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 52px;
    padding: 80px var(--padding-page);
  }

  .gallery-grid {
    columns: 2;
  }
}

/* Móvil */
@media (max-width: 600px) {
  :root {
    --padding-page: 20px;
  }

  #nav {
    padding: 18px var(--padding-page);
  }

  .nav-links {
    display: none; /* se puede añadir menú hamburguesa si se quiere */
  }

  .hero-content {
    padding: 0 var(--padding-page) 56px;
  }

  .hero-scroll {
    right: var(--padding-page);
  }

  .gallery-grid {
    columns: 1;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .contact {
    padding: 80px var(--padding-page);
  }

  footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
