/* =====================================================================
   Faman Inversiones — hoja de estilos editorial
   Complementa TailwindCSS (CDN) con detalles de marca que no se logran
   solo con utilidades: tipografía fina, firma visual del "horizonte" y
   micro-interacciones institucionales.
   ===================================================================== */

:root {
  --forest: #1B3A2E;
  --forest-deep: #122720;
  --forest-light: #2F5744;
  --gold: #B08D3D;
  --gold-light: #D9BE85;
  --warm-50: #FAF7F1;
  --ink: #17191B;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  -webkit-font-smoothing: antialiased;
}

/* Foco visible accesible en toda la interfaz */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* -------------------- Layout general -------------------- */
.section-padding { padding-top: 6rem; padding-bottom: 6rem; }
@media (max-width: 768px) {
  .section-padding { padding-top: 4rem; padding-bottom: 4rem; }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
}

/* -------------------- Header -------------------- */
#site-header {
  background: transparent;
}
#site-header[data-state='scrolled'] {
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(23,25,27,0.06);
}
#site-header[data-state='scrolled'] .nav-link,
#site-header[data-state='scrolled'] #menu-toggle {
  color: var(--forest-deep);
}
#site-header[data-state='top'] .nav-link {
  color: var(--warm-50);
}
#site-header[data-state='top'] #menu-toggle {
  color: var(--warm-50);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  transition: color .25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%;
  height: 1px;
  background: var(--gold);
  transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }

.nav-link-mobile {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: var(--forest-deep);
  font-size: 1rem;
}

/* -------------------- Botones -------------------- */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 2px;
  transition: all .25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--forest-deep);
}
.btn-primary:hover { background: var(--gold-light); }

.btn-secondary {
  background: transparent;
  color: var(--warm-50);
  border: 1px solid rgba(250,247,241,0.5);
}
.btn-secondary:hover { border-color: var(--gold-light); color: var(--gold-light); }

.btn-ghost {
  background: transparent;
  color: var(--forest-deep);
  border: 1px solid rgba(23,25,27,0.15);
}
.btn-ghost:hover { border-color: var(--forest); color: var(--forest); }

/* -------------------- Cards -------------------- */
.card-institucional {
  background: #fff;
  border: 1px solid rgba(23,25,27,0.05);
  border-radius: 3px;
  padding: 2rem;
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s cubic-bezier(.16,1,.3,1);
}
.card-institucional:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -28px rgba(18,39,32,0.18);
}
.card-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem; height: 3rem;
  border-radius: 999px;
  background: rgba(27,58,46,0.08);
  color: var(--forest);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.card-transparencia {
  background: #fff;
  border-radius: 2px;
  padding: 1.75rem;
  border: 1px solid rgba(23,25,27,0.06);
}

/* -------------------- Proceso (sección Proyecto) -------------------- */
.proceso-paso { position: relative; padding-top: 1rem; border-top: 1px solid rgba(250,247,241,0.15); }
.proceso-numero {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold-light);
  opacity: 0.85;
}

/* -------------------- Divisor horizonte (firma visual) -------------------- */
.divisor-horizonte { line-height: 0; margin-top: -1px; }

/* -------------------- Avances / Swiper -------------------- */
.avance-slide {
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.avance-slide img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.avance-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(18,39,32,0.85), transparent);
  color: var(--warm-50);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
}
.swiper-nav-btn {
  width: 2.5rem; height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(23,25,27,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--forest-deep);
  transition: all .2s ease;
}
.swiper-nav-btn:hover { background: var(--forest); color: var(--warm-50); border-color: var(--forest); }

/* -------------------- FAQ acordeón -------------------- */
.faq-item {
  background: #fff;
  border-radius: 2px;
  border: 1px solid rgba(23,25,27,0.06);
  overflow: hidden;
}
.faq-pregunta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: var(--forest-deep);
}
.faq-icono { transition: transform .25s ease; color: var(--gold); }
.faq-item[data-abierto='true'] .faq-icono { transform: rotate(45deg); }
.faq-respuesta { padding: 0 1.5rem 1.25rem; color: rgba(23,25,27,0.7); font-size: 0.95rem; line-height: 1.6; }

/* -------------------- Formulario -------------------- */
.campo { display: flex; flex-direction: column; gap: 0.4rem; }
.campo label { font-size: 0.8rem; font-weight: 600; color: var(--forest-deep); }
.campo input,
.campo select,
.campo textarea {
  border: 1px solid rgba(23,25,27,0.15);
  border-radius: 2px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  background: #fff;
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--forest);
}
.campo-error { font-size: 0.75rem; color: #B3261E; min-height: 1rem; }
.campo-checkbox { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.8rem; color: rgba(23,25,27,0.7); }
.campo-checkbox input { margin-top: 0.2rem; }

/* -------------------- CTA final -------------------- */
.cta-final-caja {
  background: var(--forest-deep);
  border-radius: 4px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: flex-start;
  justify-content: space-between;
}
@media (min-width: 1024px) {
  .cta-final-caja { flex-direction: row; align-items: center; }
}

/* -------------------- Footer -------------------- */
.footer-icon {
  width: 2.25rem; height: 2.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(250,247,241,0.15);
  color: rgba(250,247,241,0.8);
  transition: all .2s ease;
}
.footer-icon:hover { border-color: var(--gold-light); color: var(--gold-light); }

/* -------------------- Loader inicial -------------------- */
.loader-linea {
  width: 48px; height: 2px;
  background: rgba(23,25,27,0.1);
  position: relative;
  overflow: hidden;
  display: block;
}
.loader-linea::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--gold);
  animation: loader-mov 1s ease-in-out infinite;
}
@keyframes loader-mov {
  0% { left: -100%; }
  50% { left: 0; }
  100% { left: 100%; }
}

/* -------------------- Modal -------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(18,39,32,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal-caja {
  background: #fff; border-radius: 4px; padding: 2rem;
  max-width: 32rem; width: 100%; position: relative;
}
.modal-cerrar {
  position: absolute; top: 1rem; right: 1rem;
  color: rgba(23,25,27,0.5);
}
