/* ============================================================
   Los 4 Fantásticos — Hoja de estilos
   ============================================================ */

/* ---------- Variables de tema ---------- */
:root {
  --cream: #f4efe2;
  --cream-soft: #ece6d6;
  --navy: #1b2a4e;
  --navy-deep: #131f3b;
  --navy-darker: #0f1830;
  --gold: #c4a14a;
  --gold-soft: #bfa153;
  --text: #1b2a4e;
  --text-muted: #5a6480;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(27, 42, 78, 0.12);

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* ---------- Utilidades ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ============================================================
   HERO (estilo Facebook: portada + logo superpuesto)
   ============================================================ */
.hero {
  position: relative;
  border-top: 3px solid var(--gold);
}

/* ---- Banner de portada ---- */
.hero__banner {
  position: relative;
  height: clamp(240px, 36vw, 420px);
  background: linear-gradient(135deg, var(--cream-soft), #ddd4bd);
  overflow: hidden;
}

.hero__banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__banner-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #9a937f;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

/* Oculta el marcador cuando la portada tiene imagen */
.hero__banner.has-img .hero__banner-placeholder {
  display: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(27, 42, 78, 0.18) 0%,
    rgba(27, 42, 78, 0) 50%,
    rgba(244, 239, 226, 0.15) 100%
  );
}

/* ---- Barra inferior con títulos ---- */
.hero__bar {
  position: relative;
  background: var(--cream);
  border-bottom: 3px solid var(--gold);
}

.hero__bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--navy), var(--gold), var(--navy));
}

.hero__brand {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px 26px 12px;
  display: flex;
  align-items: center;
  gap: 30px;
}

/* Logo superpuesto sobre el banner (como foto de perfil) */
.hero__logo {
  flex-shrink: 0;
  width: 215px;
  height: 215px;
  margin-top: -135px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, #efe9da);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 5px solid var(--cream);
}

.hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Agranda el logo para que llene mejor el círculo */
  transform: scale(1.32);
}

.hero__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.02;
  color: var(--navy);
  /* Usa números alineados con las mayúsculas para que el "4" no baje */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1, "smcp" 1;
}

.hero__tag {
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  color: var(--gold);
  margin-top: 6px;
}

/* ============================================================
   ENCABEZADOS DE SECCIÓN
   ============================================================ */
.section__eyebrow {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gold);
}

.section__title {
  text-align: center;
  font-family: var(--font-serif);
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  color: var(--navy);
  margin-top: 6px;
}

.section__rule {
  display: block;
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin: 18px auto 0;
}

/* ============================================================
   EQUIPO
   ============================================================ */
.team {
  padding: 80px 0 90px;
}

.team__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px rgba(27, 42, 78, 0.18);
}

.card__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--cream-soft);
  border: 1px dashed #c8bfa8;
  margin: 14px 14px 0;
  border-radius: 10px;
  overflow: hidden;
}

.card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #9a937f;
  font-size: 0.85rem;
}

/* Oculta el placeholder cuando la imagen tiene src cargado por JS */
.card__photo.has-img .card__placeholder,
.future__media.has-img .future__placeholder {
  display: none;
}

.card__body {
  padding: 20px 22px 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card__name {
  font-family: var(--font-serif);
  font-variant: small-caps;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--navy);
  /* Altura fija (≈3 líneas) para que el rol y el texto queden alineados
     en todas las tarjetas, sin importar la longitud del nombre. */
  min-height: calc(1.35rem * 1.2 * 3);
  display: flex;
  align-items: flex-start;
}

.card__role {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  margin: 8px 0 12px;
}

.card__desc {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card__link {
  margin-top: auto;
  padding-top: 18px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.card__link:hover {
  color: var(--navy);
  gap: 14px;
}

/* ============================================================
   MI FUTURO
   ============================================================ */
/* ============================================================
   PROYECTOS (carrusel)
   ============================================================ */
.projects {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #d7ddec;
  padding: 90px 0 100px;
}

.section__eyebrow--light {
  color: var(--gold);
}

.section__title--light {
  color: var(--white);
}

.badge {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
}

/* ---- Estructura del carrusel ---- */
.carousel {
  position: relative;
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.carousel__viewport {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Oculta la barra de scroll (sigue siendo deslizable) */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;
}

.carousel__track {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 6px;
}

/* Botones de navegación */
.carousel__btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(196, 161, 74, 0.5);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.carousel__btn:hover {
  background: var(--gold);
  color: var(--navy-deep);
  transform: scale(1.06);
}

.carousel__btn:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold);
}

/* ---- Tarjeta de proyecto ---- */
.project-card {
  flex: 0 0 calc((100% - 2 * 26px) / 3); /* 3 visibles en escritorio */
  scroll-snap-align: start;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(196, 161, 74, 0.28);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(196, 161, 74, 0.6);
}

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.96);
}

.project-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #5d688c;
  font-size: 0.85rem;
}

.project-card__media.has-img .project-card__placeholder {
  display: none;
}

.project-card__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card__title {
  font-family: var(--font-serif);
  font-variant: small-caps;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--white);
  margin: 16px 0 10px;
}

.project-card__desc {
  color: #aab3cb;
  font-size: 0.92rem;
  flex-grow: 1;
}

.project-card__status {
  margin-top: 18px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6f7ba0;
}

/* ---- Puntos indicadores ---- */
.carousel__dots {
  position: absolute;
  bottom: -34px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel__dot.is-active {
  background: var(--gold);
  transform: scale(1.25);
}

/* ============================================================
   PIE DE PÁGINA
   ============================================================ */
.footer {
  background: var(--navy-darker);
  color: #c7cee0;
  padding: 60px 0 30px;
}

.footer__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 48px;
}

.footer__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, #efe9da);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.footer__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer__name {
  font-family: var(--font-serif);
  font-variant: small-caps;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--white);
  /* Usa números alineados con las mayúsculas para que el "4" no baje */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1, "smcp" 1;
}

.footer__members {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.member__name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--white);
  margin-bottom: 16px;
  /* Altura fija (≈2 líneas) para alinear los iconos en todas las columnas */
  min-height: calc(0.95rem * 1.4 * 2);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.member__socials {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.member__socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: lowercase;
  transition: background 0.2s ease, transform 0.2s ease;
}

.member__socials a:hover {
  background: var(--gold);
  color: var(--navy-darker);
  transform: translateY(-3px);
}

.footer__contact {
  text-align: center;
  margin: 52px 0 28px;
  padding-top: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__contact-label {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  font-weight: 600;
  color: #7a85a8;
  margin-bottom: 10px;
}

.footer__contact-mail {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold);
  transition: color 0.2s ease;
}

.footer__contact-mail:hover {
  color: var(--white);
}

.footer__copy {
  text-align: center;
  font-size: 0.78rem;
  color: #5d688c;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .team__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* 2 tarjetas visibles en tablet */
  .project-card {
    flex-basis: calc((100% - 26px) / 2);
  }
  .footer__members {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 24px;
  }
}

@media (max-width: 560px) {
  .hero__brand {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  .hero__logo {
    width: 120px;
    height: 120px;
    margin-top: -75px;
  }
  .team {
    padding: 56px 0 64px;
  }
  .team__grid {
    grid-template-columns: 1fr;
  }
  /* 1 tarjeta visible en móvil */
  .project-card {
    flex-basis: 100%;
  }
  .carousel {
    gap: 8px;
  }
  .carousel__btn {
    width: 40px;
    height: 40px;
  }
  .footer__members {
    grid-template-columns: 1fr;
  }
}
