/* =========================================================
   Gloditec — Estilos complementarios a Tailwind CSS
   Aquí solo va lo que Tailwind (utilidades) no resuelve bien:
   animaciones custom, fondos decorativos y estados de header.
   ========================================================= */

html {
  scroll-behavior: smooth;
}

/* ---------- Accesibilidad: saltar al contenido ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  background: #B08D3E;
  color: #0B1220;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 12px 12px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

body {
  font-family: 'Inter', sans-serif;
}
h1, h2, h3, h4, .font-heading {
  font-family: 'Poppins', sans-serif;
}

/* ---------- Preloader ---------- */
#preloader {
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Header ---------- */
#site-header {
  color: #fff;
}
#site-header [data-nav-text] { color: #fff; }
#site-header [data-nav-subtext] { color: #cbd5e1; }
#site-header .nav-link {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color 0.25s ease;
}
#site-header .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #B08D3E;
  transition: width 0.25s ease;
}
#site-header .nav-link:hover,
#site-header .nav-link.is-active {
  color: #ffffff;
}
#site-header .nav-link:hover::after,
#site-header .nav-link.is-active::after {
  width: 100%;
}
#site-header #menu-toggle {
  color: #fff;
}

/* Estado "scrolled": fondo sólido claro para legibilidad */
#site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -15px rgba(11, 18, 32, 0.25);
}
#site-header.is-scrolled [data-nav-text] { color: #0B1220; }
#site-header.is-scrolled [data-nav-subtext] { color: #64748b; }
#site-header.is-scrolled .nav-link { color: #1e2939; }
#site-header.is-scrolled .nav-link:hover,
#site-header.is-scrolled .nav-link.is-active { color: #0B1220; }
#site-header.is-scrolled #menu-toggle { color: #0B1220; }

/* Menú móvil */
#mobile-menu.is-open {
  max-height: 30rem;
}
.mobile-link {
  color: #e2e8f0;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.mobile-link:hover {
  color: #B08D3E;
  padding-left: 0.5rem;
}

/* Icono hamburguesa -> X */
#menu-toggle.is-open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle.is-open .bar:nth-child(2) { opacity: 0; }
#menu-toggle.is-open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Fondos decorativos Hero ---------- */
.hero-gradient {
  background:
    radial-gradient(60% 60% at 15% 20%, rgba(176,141,62,0.18) 0%, rgba(176,141,62,0) 60%),
    radial-gradient(50% 50% at 85% 80%, rgba(44,62,88,0.55) 0%, rgba(44,62,88,0) 60%),
    linear-gradient(160deg, #0B1220 0%, #121a2b 50%, #0B1220 100%);
}
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 75%);
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 75%);
}

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

/* ---------- Tipografía de sección ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #B08D3E;
  margin-bottom: 0.75rem;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: #B08D3E;
  display: inline-block;
}
.section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
  color: #0B1220;
  margin-bottom: 1.25rem;
}

/* ---------- Tarjetas / badges reutilizables ---------- */
.icon-badge {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  background: rgba(176,141,62,0.12);
  color: #8f7130;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(176,141,62,0.5);
  background: rgba(255,255,255,0.06);
}

.step-number {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 9999px;
  background: #0B1220;
  color: #B08D3E;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #faf6ec;
  position: relative;
  z-index: 1;
}

/* Tarjeta de división (generada por JS, enlaza a su propia página) */
.division-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(11,18,32,0.06);
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.division-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -20px rgba(11,18,32,0.25);
  border-color: rgba(176,141,62,0.4);
}
/* División "Próximamente": opaca, sin hover y sin poder darle clic (ver main.js, se
   renderiza como <div> sin href para estas divisiones, esto es un refuerzo visual) */
div.division-card.is-soon {
  opacity: 0.55;
  filter: grayscale(0.5);
  pointer-events: none;
  cursor: default;
}
.division-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.division-card-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.division-badge-soon {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 1;
  background: #0B1220;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
}
.division-card-body {
  padding: 1.75rem;
}
.division-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2C3E58;
  background: rgba(44,62,88,0.08);
  border-radius: 9999px;
  padding: 0.25rem 0.7rem;
  margin: 0 0.4rem 0.4rem 0;
}

/* ---------- Proyectos / galería (home) ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}
.project-item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(11,18,32,0.06);
}
.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-item:hover img {
  transform: scale(1.06);
}
.project-item-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(to top, rgba(11,18,32,0.85), transparent);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
}
.project-item-empty {
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 2px dashed rgba(11,18,32,0.15);
}
.project-item-empty .project-item-label {
  position: static;
  background: none;
  color: #64748b;
  text-align: center;
  padding: 0 1rem;
}
.project-item-empty-icon {
  font-size: 1.75rem;
}

/* Estado vacío de toda la sección de Proyectos (cuando ninguna división tiene galería activa) */
.project-empty-state {
  border: 2px dashed rgba(11,18,32,0.12);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
}
.project-empty-state .project-item-empty-icon {
  display: block;
  margin-bottom: 1rem;
}

/* ---------- Formulario ---------- */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2C3E58;
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: #0B1220;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: #B08D3E;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(176,141,62,0.12);
}
.form-input.is-invalid {
  border-color: #dc2626;
}

/* ---------- Footer ---------- */
.footer-link {
  color: #94a3b8;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-link:hover {
  color: #B08D3E;
  padding-left: 4px;
}
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.15);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.25s ease;
}
.social-icon:hover {
  background: #B08D3E;
  border-color: #B08D3E;
  color: #0B1220;
  transform: translateY(-3px);
}

/* Contexto claro (sección Contacto usa iconos oscuros) */
#contacto .social-icon {
  color: #2C3E58;
  border-color: rgba(44,62,88,0.2);
}
#contacto .social-icon:hover {
  color: #0B1220;
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Back to top ---------- */
#back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Scrollbar sutil (opcional, estético) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #d7b96a; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #B08D3E; }
