/* ═══════════════════════════════════════
   TOKENS – Paleta Tribeca
═══════════════════════════════════════ */
:root {
  --navy:        #172B46;
  --navy-deep:   #0f1e32;
  --white:       #FFFFFF;
  --gray-light:  #F2F4F6;
  --gray:        #374151;
  --gray-mid:    #6B7280;
  --blue:        #477DA8;
  --blue-dark:   #34618a;
  --blue-soft:   #e8f0f7;

  --font: 'Segoe UI', Arial, sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 4px rgba(23,43,70,.08);
  --shadow: 0 4px 16px rgba(23,43,70,.12);
  --shadow-md: 0 8px 28px rgba(23,43,70,.16);
  --transition: .22s ease;
}

/* ═══════════════════════════════════════
   RESET
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--gray); background: var(--navy); line-height: 1.7; }
main, footer { background: var(--white); }
img  { max-width: 100%; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(23,43,70,.18);
  transition: box-shadow var(--transition);
}
.navbar__container {
  max-width: 1140px; margin: 0 auto; padding: 0 1.5rem;
  height: 66px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar__logo {
  display: flex; align-items: center; gap: .75rem; color: var(--white);
}
.navbar__logo-img {
  height: 44px; width: auto;
  filter: brightness(0) invert(1);
}
.navbar__logo-text {
  display: flex; flex-direction: column; gap: 2px; align-items: stretch;
}
.navbar__logo-name {
  font-size: 1.15rem; font-weight: 500; letter-spacing: 8px; line-height: 1;
  text-align: center;
}
.navbar__logo-sub {
  font-size: .46rem; letter-spacing: 1px; color: rgba(255,255,255,.65);
  text-transform: uppercase; font-weight: 400;
  text-align: justify; text-align-last: justify;
}
.navbar__logo-city {
  font-size: .42rem; letter-spacing: 3px; color: rgba(255,255,255,.5);
  text-transform: uppercase; font-weight: 400; text-align: center;
}

/* Botón CTA en navbar */
.navbar__cta {
  display: inline-block;
  padding: .45rem 1.1rem;
  background: var(--white); color: var(--navy);
  border-radius: var(--radius); font-size: .82rem; font-weight: 700;
  letter-spacing: .3px; white-space: nowrap;
  border: 2px solid var(--white);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.navbar__cta:hover {
  background: var(--gray-light); border-color: var(--gray-light); transform: translateY(-1px);
}
.navbar__menu { display: flex; gap: 2rem; }
.navbar__link {
  color: rgba(255,255,255,.8); font-size: .875rem; font-weight: 500;
  letter-spacing: .4px; padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.navbar__link:hover,
.navbar__link.active { color: var(--white); border-bottom-color: var(--blue); }

/* hamburger */
.navbar__hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.navbar__hamburger span {
  display: block; width: 26px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all var(--transition);
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: stretch; justify-content: flex-start;
  background: linear-gradient(150deg, #0f1e32 0%, #172B46 50%, #1e3a5f 100%);
  padding-top: 66px;
  overflow: hidden;
}
/* Imagen separada para poder animar con Ken Burns */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../img/hero.jpg') center / cover no-repeat;
  z-index: 0;
  animation: kenBurns 12s cubic-bezier(.25,.46,.45,.94) both;
  will-change: transform;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(8,18,36,.88) 0%, rgba(8,18,36,.70) 50%, rgba(8,18,36,.15) 100%);
  z-index: 1;
}
.hero__content {
  position: relative; z-index: 2;
  width: 100%; max-width: 1140px; padding: 2rem 1.5rem 7rem max(4rem, 7vw);
  display: flex; flex-direction: column; justify-content: center; gap: 2.5rem;
  align-items: flex-start;
  min-height: inherit;
  flex: 1;
}

/* Logo dentro del hero */
.hero__logo-block {
  display: flex; align-items: center; gap: 1.2rem;
}
.hero__logo-img {
  height: 80px; width: auto;
  filter: brightness(0) invert(1);
}
.hero__logo-text {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.hero__logo-name {
  font-size: 1.6rem; font-weight: 500; letter-spacing: 10px; color: var(--white); line-height: 1;
}
.hero__logo-sub {
  font-size: .58rem; letter-spacing: 3.5px; color: rgba(255,255,255,.75); text-transform: uppercase; font-weight: 400;
}
.hero__logo-city {
  font-size: .54rem; letter-spacing: 3.5px; color: rgba(255,255,255,.55); text-transform: uppercase; font-weight: 400;
}

/* Texto abajo a la izquierda */
.hero__bottom { max-width: 560px; }
.hero__title {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 800; line-height: 1.15; color: var(--white);
  margin-bottom: 1rem;
}
.hero__slogan {
  font-size: clamp(.88rem, 2vw, 1.05rem);
  color: rgba(255,255,255,.78); margin-bottom: 2rem; line-height: 1.65;
}
.hero__buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   BOTONES
═══════════════════════════════════════ */
.btn {
  display: inline-block; padding: .9rem 2.2rem;
  border-radius: var(--radius); font-size: .95rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn--primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn--outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn--outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* ═══════════════════════════════════════
   CIFRAS / STATS BAR
═══════════════════════════════════════ */
.stats-bar { background: var(--navy-deep); padding: 2.2rem 1.5rem; }
.stats-bar__inner {
  max-width: 900px; margin: 0 auto;
  display: flex; justify-content: center; align-items: center;
  gap: 0; flex-wrap: wrap;
}
.stat {
  display: flex; flex-direction: column; align-items: center;
  padding: .8rem 3rem; flex: 1; min-width: 140px;
}
.stat__num {
  font-size: 2.2rem; font-weight: 800; color: var(--white);
  letter-spacing: -1px; line-height: 1;
}
.stat__lbl { font-size: .8rem; color: rgba(255,255,255,.55); margin-top: .3rem; letter-spacing: .5px; }
.stat__divider { width: 1px; height: 40px; background: rgba(255,255,255,.12); }

/* ═══════════════════════════════════════
   SECCIONES GENÉRICAS
═══════════════════════════════════════ */
.section { padding: 5.5rem 0; }
.section--white { background: var(--white); }
.section--light { background: var(--gray-light); }
.section--navy  { background: var(--navy); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* etiqueta pequeña sobre el título */
.tag {
  display: inline-block;
  font-size: .75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--blue); background: var(--blue-soft);
  padding: .3rem .9rem; border-radius: 20px; margin-bottom: 1rem;
}
.tag--light {
  color: rgba(255,255,255,.7); background: rgba(255,255,255,.1);
}

.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--navy); font-weight: 700; line-height: 1.25;
  margin-bottom: 1rem;
}
.section__title--white { color: var(--white); }
.section__sub {
  font-size: 1.05rem; color: var(--gray-mid); max-width: 660px;
  line-height: 1.75; margin-bottom: 3rem;
}

/* ═══════════════════════════════════════
   QUIÉNES SOMOS
═══════════════════════════════════════ */
/* stretch: la columna visual iguala la altura del bloque de texto */
.about__grid {
  /* minmax: el texto nunca baja de 460px (lo que necesita el titulo para
     caber en 2 lineas); la imagen se queda con el resto del ancho. */
  display: grid; grid-template-columns: minmax(460px, 1fr) 1.25fr;
  gap: 4rem; align-items: stretch;
}
.about__text p { margin-bottom: 1.1rem; font-size: 1.03rem; line-height: 1.8; }
.about__text .section__title { margin-top: .5rem; }

.values { display: flex; flex-direction: column; gap: .65rem; margin-top: 1.5rem; }
.values li {
  display: flex; align-items: center; gap: .7rem;
  font-size: .95rem; color: var(--gray);
}
.values__check {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  font-size: .7rem; font-weight: 700; flex-shrink: 0;
}

.about__visual {
  border-radius: var(--radius-lg); overflow: hidden;
  min-height: 340px;
  /* margen vertical: recorta algo de alto y centra la foto respecto al texto */
  margin: 1.75rem 0;
}
.about__foto {
  display: block; width: 100%; height: 100%; object-fit: cover;
}

/* ═══════════════════════════════════════
   SERVICIOS
═══════════════════════════════════════ */
.services__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem;
}
.service-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid #e5eaf0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.service-card__img {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
}
.service-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.service-card:hover .service-card__img img { transform: scale(1.04); }

.service-card__body { padding: 1.5rem 1.6rem 1.8rem; }

.service-card__title {
  font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: .5rem;
}
.service-card p { font-size: .93rem; line-height: 1.7; color: var(--gray-mid); }

/* CTA al pie de servicios */
.services__cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  margin-top: 3.5rem; padding: 2.5rem 2.8rem;
  background: var(--navy); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.services__cta-text h3 {
  font-size: 1.2rem; font-weight: 700; color: var(--white); margin-bottom: .4rem;
}
.services__cta-text p { font-size: .93rem; color: rgba(255,255,255,.65); }

@media (max-width: 680px) {
  .services__cta { flex-direction: column; text-align: center; align-items: flex-start; }
  .services__cta .btn { width: 100%; text-align: center; }
}

/* ═══════════════════════════════════════
   POR QUÉ ELEGIRNOS
═══════════════════════════════════════ */
.why__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.why-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg); padding: 2rem 1.5rem;
  transition: background var(--transition);
}
.why-card:hover { background: rgba(255,255,255,.1); }
.why-card__icon {
  width: 48px; height: 48px; margin-bottom: 1.1rem;
  background: var(--blue); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800; color: var(--white);
  letter-spacing: -.5px;
}
.why-card__icon svg { width: 24px; height: 24px; }
.why-card h3 { color: var(--white); font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.why-card p  { color: rgba(255,255,255,.6); font-size: .9rem; line-height: 1.7; }

/* ═══════════════════════════════════════
   TESTIMONIOS
═══════════════════════════════════════ */
.testimonials__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.testimonial {
  background: var(--gray-light); border-radius: var(--radius-lg);
  padding: 2rem 1.8rem; position: relative;
  border: 1px solid #e5eaf0;
}
.testimonial__quote {
  font-size: 4rem; font-weight: 900; color: var(--blue);
  opacity: .25; line-height: .8; margin-bottom: .5rem;
  font-family: Georgia, serif;
}
.testimonial p { font-size: .97rem; line-height: 1.75; color: var(--gray); margin-bottom: 1.2rem; }
.testimonial footer { border-top: 1px solid #dde3ea; padding-top: .9rem; }
.testimonial strong { display: block; font-size: .95rem; color: var(--navy); }
.testimonial span { font-size: .82rem; color: var(--gray-mid); }

/* ═══════════════════════════════════════
   FORMULARIOS
═══════════════════════════════════════ */
.form {
  display: flex; flex-direction: column; gap: 1rem;
  max-width: 700px; margin-top: 2rem;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__aviso {
  padding: .9rem 1.2rem; border-radius: var(--radius);
  font-size: .95rem; font-weight: 500; border-left: 4px solid;
}
.form__aviso--ok     { background: #e8f5ec; color: #1b6b3a; border-color: #2e9e5b; }
.form__aviso--error  { background: #fdeaea; color: #9b2222; border-color: #d04545; }
.form__aviso--espera { background: #fdf4e3; color: #8a5a12; border-color: #d99a2b; }

.form__consent {
  display: flex; align-items: flex-start; gap: .65rem;
  font-size: .9rem; line-height: 1.5; color: var(--gray-mid);
  cursor: pointer;
}
.form__consent input {
  width: auto; flex-shrink: 0; margin-top: .15rem;
  accent-color: var(--blue); cursor: pointer;
}
.form__consent a { color: var(--blue); text-decoration: underline; }

/* Campo trampa anti-bots: fuera de pantalla, nunca visible ni enfocable.
   Se evita display:none porque algunos bots ignoran esos campos. */
.form__trampa {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}
/* El checkbox se excluye: no debe heredar el ancho ni el relleno de un campo */
.form input:not([type="checkbox"]),
.form select,
.form textarea {
  width: 100%; padding: .85rem 1.1rem;
  border: 1.5px solid #d1d9e0; border-radius: var(--radius);
  font-size: .95rem; font-family: var(--font); color: var(--gray);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(71,125,168,.12);
}
.form textarea { resize: vertical; }

.form__file-label {
  display: flex; align-items: center; gap: .8rem; cursor: pointer;
}
.form__file-label input[type="file"] { display: none; }
.form__file-btn {
  padding: .55rem 1.1rem; border-radius: var(--radius);
  border: 1.5px dashed var(--blue); color: var(--blue);
  font-size: .88rem; font-weight: 600;
  transition: background var(--transition);
}
.form__file-label:hover .form__file-btn { background: var(--blue-soft); }
.form__file-hint { font-size: .82rem; color: var(--gray-mid); }

/* ═══════════════════════════════════════
   CONTACTO
═══════════════════════════════════════ */
.contact__grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 3rem; align-items: start; margin-top: 2rem;
}
.contact__map { order: -1; }
.contact__map-foto {
  display: block; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow);
}
.contact__map-foto img {
  display: block; width: 100%; height: auto;
  transition: transform .5s ease;
}
.contact__map-foto:hover img { transform: scale(1.03); }

.contact__map-inner[hidden] { display: none; }
.contact__map-inner {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  min-height: 340px; padding: 2rem;
  background: var(--blue-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}
.contact__map-pin { width: 44px; height: 44px; color: var(--blue); }
.contact__map-address {
  font-size: 1.05rem; font-weight: 500; color: var(--navy); line-height: 1.6;
}
/* Se cualifica con .contact__item para ganar a la regla generica
   de enlaces de contacto, que si no impone su color y el subrayado */
.contact__item a.contact__maps-link {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: .6rem; padding: .5rem 1rem;
  background: var(--blue); color: var(--white);
  border-radius: var(--radius);
  font-size: .85rem; font-weight: 600; text-decoration: none;
  transition: background var(--transition);
}
.contact__item a.contact__maps-link:hover {
  background: var(--navy); color: var(--white); text-decoration: none;
}
.contact__maps-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.contact__info { display: flex; flex-direction: column; gap: 1.4rem; }

.contact__item { display: flex; align-items: flex-start; gap: 1rem; }
.contact__item-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--blue-soft); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.contact__item-icon svg { width: 18px; height: 18px; }
.contact__item-label {
  display: block; font-size: .75rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--gray-mid); margin-bottom: .2rem;
}
.contact__item a,
.contact__item span:not(.contact__item-label) {
  font-size: .97rem; color: var(--navy); font-weight: 500;
}
.contact__item a:hover { color: var(--blue); text-decoration: underline; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer {
  background: var(--navy-deep);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.footer__inner { max-width: 1140px; margin: 0 auto; }
.footer__brand {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 4px;
  color: var(--white); margin-bottom: .5rem;
}
.footer__copy { font-size: .82rem; color: rgba(255,255,255,.4); }
.footer__legal {
  margin-top: .8rem;
  display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap;
  font-size: .78rem; color: rgba(255,255,255,.3);
}
.footer__legal a { color: rgba(255,255,255,.45); transition: color var(--transition); }
.footer__legal a:hover { color: rgba(255,255,255,.8); }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about__visual { min-height: 200px; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__map { order: 0; }
}

@media (max-width: 1024px) {
  .navbar__menu {
    display: none; flex-direction: column;
    position: absolute; top: 66px; left: 0; right: 0;
    background: var(--navy); padding: 1rem 1.5rem 1.5rem; gap: .8rem;
  }
  .navbar__menu.is-open { display: flex; }
  .navbar__hamburger { display: flex; }
  .navbar__cta { text-align: center; }

  .navbar__logo-city { display: none; }
  .hero__logo-block { display: none; }

  /* Imagen vertical propia para movil: ya trae el degradado azul
     incrustado, por eso aqui se anula el overlay (si no, doble capa). */
  /* Hero algo mas bajo: al acercarse la proporcion de la pantalla a la de
     la foto, cover recorta menos ancho y la escena se ve mas alejada. */
  .hero { min-height: 88svh; }
  .hero::before {
    background-image: url('../img/hero-movil.jpg');
    background-position: center center;
  }
  .hero__overlay { background: none; }

  .hero__buttons { flex-direction: column; align-items: stretch; }
  .hero__content { padding: 2rem 1.5rem 3rem 1.5rem; }
  .hero__logo-img { height: 56px; }
  .hero__logo-name { font-size: 1.15rem; }
  /* Anchos distintos por elemento: el titulo estrecho para que rompa
     pronto, los botones a todo lo ancho para que quepan en una linea. */
  .hero__bottom { max-width: 100%; }
  .hero__title  { font-size: 1.8rem; line-height: 1.2; max-width: 14rem; }
  .hero__slogan { font-size: .88rem; max-width: 14rem; }
  .about__visual { display: none; }
}

@media (max-width: 768px) {
  .form__row { grid-template-columns: 1fr; }

  .stats-bar__inner { gap: 0; }
  .stat { padding: .8rem 1.5rem; min-width: 120px; }
  .stat__divider { display: none; }

  .why__grid { grid-template-columns: 1fr 1fr; }
  .testimonials__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .why__grid { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════
   ANIMACIONES
═══════════════════════════════════════ */

/* Ken Burns: zoom suave sobre la foto del hero */
@keyframes kenBurns {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

/* Entradas del hero */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__logo-block {
  animation: fadeDown .8s cubic-bezier(.16,1,.3,1) both;
}
.hero__title {
  animation: fadeUp .85s .28s cubic-bezier(.16,1,.3,1) both;
}
.hero__slogan {
  animation: fadeUp .85s .44s cubic-bezier(.16,1,.3,1) both;
}
.hero__buttons {
  animation: fadeUp .85s .58s cubic-bezier(.16,1,.3,1) both;
}

/* Scroll-reveal: estado inicial */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s cubic-bezier(.16,1,.3,1),
              transform .65s cubic-bezier(.16,1,.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Accesibilidad: sin movimiento */
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero__logo-block,
  .hero__title,
  .hero__slogan,
  .hero__buttons { animation: none !important; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
