/* ============================================================
   HIDALGO PORTONES — Hoja de estilos única
   ------------------------------------------------------------
   Orden del archivo:
   1. Variables (colores, tipografía, medidas)
   2. Reset y base
   3. Utilidades (container, section, botones)
   4. Header y navegación
   5. Hero
   6. Barra de confianza
   7. Servicios
   8. Galería antes/después
   9. Reseñas
   10. Zonas
   11. Sobre nosotros
   12. CTA final
   13. Footer
   14. Botón flotante de WhatsApp
   15. Animaciones y responsive

   Para cambiar TODA la identidad visual alcanza con tocar el
   bloque 1 (variables).
   ============================================================ */

/* ---------- 1. VARIABLES ---------- */
:root {
  /* Grises oscuros */
  --negro:      #14171A;   /* fondo del hero y del footer */
  --carbon:     #1E2227;   /* fondo de secciones oscuras */
  --superficie: #272C33;   /* tarjetas sobre fondo oscuro */
  --borde:      #3A424C;

  /* Claros */
  --gris-claro: #F4F6F8;   /* fondo de secciones claras */
  --blanco:     #FFFFFF;

  /* Texto */
  --texto:        #FFFFFF;
  --texto-suave:  #AEB6BF;  /* sobre fondo oscuro */
  --texto-oscuro: #14171A;  /* sobre fondo claro */
  --texto-medio:  #58616B;  /* secundario sobre fondo claro */

  /* Acento naranja: color de marca */
  --naranja:       #FF6B1A;
  --naranja-hover: #E85A0C;
  --naranja-soft:  rgba(255, 107, 26, .12);

  /* Colores del isotipo, tomados del logo original.
     Las torres van más claras que el marrón del logo para que se lean
     sobre el fondo negro del header; el rojo también se aclaró un punto
     por el mismo motivo (el original es #B02020). */
  --logo-torres: #C9BEA6;
  --logo-techo:  #C93A2B;
  --logo-base:   #8A8378;
  --logo-fondo:  #14171A;

  /* Verde: SOLO para acciones de WhatsApp */
  --wa:       #25D366;
  --wa-hover: #1FB855;
  --wa-texto: #0A1F12;      /* texto oscuro sobre verde = buen contraste */

  /* Tipografía del sistema: 0 KB, sin requests, se ve nativa en cada equipo */
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Medidas */
  --ancho-max: 1180px;
  --radio:     14px;
  --radio-sm:  10px;
  --header-h:  64px;

  /* Sombras */
  --sombra:    0 6px 24px rgba(0, 0, 0, .18);
  --sombra-lg: 0 14px 40px rgba(0, 0, 0, .28);

  --transicion: .22s ease;
}

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

html {
  scroll-behavior: smooth;
  /* Compensa el header fijo cuando se salta a un ancla */
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 17px;
  line-height: 1.65;
  color: var(--texto-oscuro);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 6.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.13rem; font-weight: 700; }
p  { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* Foco visible para navegación con teclado (accesibilidad) */
:focus-visible {
  outline: 3px solid var(--naranja);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--naranja); color: var(--texto-oscuro);
  padding: 10px 16px; z-index: 999; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- 3. UTILIDADES ---------- */
.container {
  width: 100%;
  max-width: var(--ancho-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding: 72px 0; }
.section--light { background: var(--gris-claro); color: var(--texto-oscuro); }
.section--dark  { background: var(--carbon);     color: var(--texto); }

.section__head { max-width: 640px; margin: 0 auto 44px; text-align: center; }

.section__eyebrow {
  font-size: .8rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--naranja); margin-bottom: .6em;
}

.section__title { margin-bottom: .4em; }

.section__lead { color: var(--texto-medio); margin: 0; }
.section--dark .section__lead { color: var(--texto-suave); }

.section__cta { text-align: center; margin-top: 40px; }

.txt-accent { color: var(--naranja); }

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem;
  cursor: pointer;
  transition: background var(--transicion), transform var(--transicion),
              border-color var(--transicion), color var(--transicion);
  /* Área táctil mínima cómoda en mobile */
  min-height: 48px;
}
.btn:active { transform: translateY(1px); }

/* Verde = siempre WhatsApp. Es la acción principal de toda la página. */
.btn--wa { background: var(--wa); color: var(--wa-texto); box-shadow: var(--sombra); }
.btn--wa:hover { background: var(--wa-hover); }

.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: var(--naranja); border-color: var(--naranja); color: var(--texto-oscuro); }

.btn--lg { padding: 17px 30px; font-size: 1.08rem; }
.btn--sm { padding: 9px 16px; font-size: .92rem; min-height: 42px; }

.btn .icon { width: 1.3em; height: 1.3em; }

/* ---------- 4. HEADER ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 23, 26, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: var(--texto);
}

.header__inner {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--header-h);
}

.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }

/* El isotipo va suelto sobre el fondo oscuro, sin recuadro:
   así se lee como parte del diseño y no como un sello pegado.
   El `color` define el tono de las torres (usan currentColor). */
.logo__mark {
  display: grid; place-items: center;
  width: 42px; height: 37px;
  color: var(--logo-torres);
}

/* El nombre va en mayúsculas y todo junto, como en el logo de la marca.
   En el HTML está escrito "HidalgoPortones" y las mayúsculas las pone el CSS:
   así los lectores de pantalla lo pronuncian bien en vez de deletrearlo. */
.logo__text {
  font-weight: 500; font-size: .97rem; letter-spacing: .02em; line-height: 1.1;
  text-transform: uppercase;
}
.logo__text strong { font-weight: 800; color: var(--naranja); }

.nav { display: flex; gap: 26px; font-size: .96rem; font-weight: 600; }
.nav a { color: var(--texto-suave); transition: color var(--transicion); }
.nav a:hover { color: var(--naranja); }

.burger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px; padding: 0 10px;
}
.burger span {
  height: 2px; background: var(--texto); border-radius: 2px;
  transition: transform var(--transicion), opacity var(--transicion);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  background: var(--negro);
  color: var(--texto);
  padding: 84px 0 76px;
  overflow: hidden;
}

/* Fondo generado con CSS: no pesa nada y no hay imagen que esperar.
   Si querés una foto de fondo, reemplazá este bloque por:
   background: url("../assets/img/hero.jpg") center/cover no-repeat; */
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 78% 12%, rgba(255, 107, 26, .20), transparent 65%),
    radial-gradient(700px 500px at 8% 92%, rgba(255, 107, 26, .09), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 46px);
  pointer-events: none;
}

.hero__inner { position: relative; max-width: 780px; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--naranja-soft);
  color: var(--naranja);
  border: 1px solid rgba(255, 107, 26, .35);
  padding: 7px 15px; border-radius: 999px;
  font-size: .87rem; font-weight: 700;
  margin-bottom: 22px;
}

.hero__title { margin-bottom: .3em; }

/* Lema de la marca. En cursiva, igual que en el logo. */
.hero__tagline {
  font-size: clamp(1.05rem, 3vw, 1.32rem);
  font-style: italic;
  font-weight: 600;
  color: var(--naranja);
  margin-bottom: .8em;
}

.hero__sub {
  font-size: clamp(1.02rem, 2.4vw, 1.18rem);
  color: var(--texto-suave);
  max-width: 620px;
  margin-bottom: 32px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__note {
  margin-top: 22px; font-size: .92rem; color: var(--texto-suave);
}

/* ---------- 6. BARRA DE CONFIANZA ---------- */
.trust {
  background: var(--naranja);
  color: var(--texto-oscuro);
  padding: 22px 0;
}

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

.trust__item { display: flex; flex-direction: column; line-height: 1.3; }
.trust__item strong { font-size: 1.08rem; font-weight: 800; }
.trust__item span { font-size: .87rem; opacity: .8; }

/* ---------- 7. SERVICIOS ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--blanco);
  border: 1px solid #E3E7EB;
  border-radius: var(--radio);
  padding: 28px 24px;
  transition: transform var(--transicion), box-shadow var(--transicion),
              border-color var(--transicion);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
  border-color: var(--naranja);
}

.card__icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  background: var(--naranja-soft);
  color: var(--naranja);
  border-radius: 12px;
  margin-bottom: 18px;
}
.card__icon svg { width: 27px; height: 27px; }

.card h3 { margin-bottom: .4em; }
.card p { color: var(--texto-medio); font-size: .96rem; margin: 0; }

/* La tarjeta destacada (automatización) es el servicio con más demanda */
.card--featured { border-color: var(--naranja); box-shadow: 0 0 0 3px var(--naranja-soft); }

/* ---------- 8. GALERÍA ANTES / DESPUÉS ---------- */
/* --- Antes / después ---
   Las dos fotos van lado a lado. No se usa un comparador deslizante
   porque para eso las dos tomas tienen que estar sacadas desde el mismo
   lugar; con encuadres distintos, lado a lado se entiende mucho mejor. */
.ba-card { margin: 0 0 34px; }

.ba-card figcaption {
  margin-top: 12px;
  font-size: .93rem;
  color: var(--texto-suave);
  font-weight: 600;
  text-align: center;
}

.ba-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ba-shot {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--superficie);
}

.ba-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.ba-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(20, 23, 26, .82);
  color: var(--texto);
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  pointer-events: none;
}
.ba-tag--ok { background: var(--naranja); color: var(--texto-oscuro); }

/* Grilla simple de trabajos */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.gallery__item { margin: 0; }

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radio-sm);
  transition: transform var(--transicion);
}
.gallery__item:hover img { transform: scale(1.03); }

.gallery__item figcaption {
  margin-top: 10px; font-size: .88rem; color: var(--texto-suave);
}

/* ---------- 9. RESEÑAS ---------- */
.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.review {
  margin: 0;
  background: var(--blanco);
  border: 1px solid #E3E7EB;
  border-radius: var(--radio);
  padding: 26px 24px;
  display: flex; flex-direction: column;
}

.review__stars { display: flex; gap: 3px; color: var(--naranja); margin-bottom: 14px; }
.review__stars svg { width: 17px; height: 17px; }

.review p {
  font-size: .97rem; color: var(--texto-oscuro); flex: 1;
}

.review footer { display: flex; flex-direction: column; line-height: 1.35; }
.review footer strong { font-weight: 700; }
.review footer span { font-size: .87rem; color: var(--texto-medio); }

/* ---------- 10. ZONAS ---------- */
.zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.zone {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 24px 22px;
}

.zone h3 {
  display: flex; align-items: center; gap: 8px;
  color: var(--naranja);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--borde);
}

.zone ul {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px;
  font-size: .93rem; color: var(--texto-suave);
}

/* ---------- 11. SOBRE NOSOTROS ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.about__media img {
  width: 100%;
  aspect-ratio: 1 / 1;   /* la foto es vertical: en cuadrado se pierde menos */
  object-fit: cover;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}

.about__text p { color: var(--texto-medio); }

.about__list { margin-top: 24px; display: grid; gap: 11px; }
.about__list li {
  display: flex; align-items: center; gap: 11px;
  font-weight: 600; font-size: .97rem;
}
.about__list .icon { color: var(--naranja); width: 20px; height: 20px; }

/* ---------- 12. CTA FINAL ---------- */
.cta-final {
  background: var(--naranja);
  color: var(--texto-oscuro);
  padding: 68px 0;
  text-align: center;
}

.cta-final__inner { max-width: 640px; margin-inline: auto; }
.cta-final h2 { margin-bottom: .35em; }
.cta-final p { margin-bottom: 26px; opacity: .88; }

.cta-final__alt { margin: 22px 0 0; font-size: .95rem; opacity: .9; }
.cta-final__alt a { font-weight: 800; text-decoration: underline; }

/* ---------- 13. FOOTER ---------- */
.footer { background: var(--negro); color: var(--texto-suave); padding: 56px 0 0; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
}

.footer__col h3 { color: var(--texto); font-size: 1rem; margin-bottom: 14px; }
.footer__col p { font-size: .93rem; margin: 14px 0 0; }

.logo--footer { margin-bottom: 4px; color: var(--texto); }

/* Con .footer__col a la izquierda le gana en especificidad
   a la regla general de los párrafos del footer */
.footer__col .footer__tagline {
  color: var(--naranja);
  font-style: italic;
  font-size: .93rem;
  margin: 8px 0 0;
}

.footer__list { display: grid; gap: 9px; font-size: .93rem; }
.footer__list a {
  display: inline-flex; align-items: center; gap: 9px;
  transition: color var(--transicion);
}
.footer__list a:hover { color: var(--naranja); }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 20px;
  text-align: center;
  font-size: .86rem;
}
.footer__bottom p { margin: 0; }

/* ---------- 14. BOTONES FLOTANTES ---------- */
/* La columna entera aparece y desaparece junta.
   Arranca oculta: el JS le agrega .is-visible al pasar el hero. */
.fabs {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  opacity: 0; transform: translateY(20px) scale(.9);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.fabs.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.fab {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px;
  font-weight: 800; font-size: 1rem;
  box-shadow: var(--sombra-lg);
  transition: background var(--transicion), transform var(--transicion), filter var(--transicion);
}
.fab:active { transform: translateY(1px); }

/* WhatsApp: el principal. Más grande y con texto. */
.fab--wa { background: var(--wa); color: var(--wa-texto); padding: 14px 20px; }
.fab--wa:hover { background: var(--wa-hover); }
.fab--wa svg { width: 26px; height: 26px; }

/* Instagram: secundario. Solo ícono, con el degradado de la marca,
   que es lo que lo hace reconocible al instante. */
.fab--ig {
  width: 48px; height: 48px;
  color: var(--blanco);
  background: radial-gradient(circle at 30% 107%,
              #FDCB5C 0%, #F1704B 32%, #DD2A7B 55%, #8134AF 76%, #515BD4 100%);
}
.fab--ig:hover { filter: brightness(1.1); }
.fab--ig svg { width: 24px; height: 24px; }

/* ---------- 15. ANIMACIONES ---------- */
/* Aparición suave al scrollear (la activa el IntersectionObserver del JS) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 30px; }
  .about__media { order: 2; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 760px) {
  .section { padding: 56px 0; }

  /* Menú mobile: el nav se despliega debajo del header */
  .burger { display: flex; }
  .header__cta span { display: none; }        /* en mobile queda solo el ícono */
  .header__cta { padding: 9px 12px; }

  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--negro);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    padding: 6px 20px 14px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .nav a:last-child { border-bottom: 0; }

  .hero { padding: 56px 0 52px; }
  .hero__actions .btn { width: 100%; }        /* CTA a todo el ancho en celular */

  .trust__grid { grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; }

  /* En celular el antes y el después van uno debajo del otro */
  .ba-pair { grid-template-columns: 1fr; gap: 12px; }

  /* En celular quedan los dos como círculos, para no tapar contenido */
  .fabs { right: 14px; bottom: 14px; gap: 9px; }
  .fab--wa { width: 56px; height: 56px; padding: 0; }
  .fab--ig { width: 44px; height: 44px; }
  .fab__label { display: none; }
}

@media (max-width: 460px) {
  .footer__grid { grid-template-columns: 1fr; }
  .zone ul { grid-template-columns: 1fr; }
}

/* Respeta la preferencia del sistema de reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Estilos para impresión (por si alguien imprime el presupuesto) */
@media print {
  .header, .fabs, .hero__bg, .section__cta { display: none !important; }
  body { color: #000; background: #fff; }
}
