/* ============================================
   GRUPO CONSTRURAN — Persianas Aguascalientes
   styles.css — v2
   ============================================
   1. VARIABLES
   2. RESET Y BASE
   3. LAYOUT
   4. BOTONES
   5. HEADER
   6. HERO
   7. PILLARS
   8. PROCESS
   9. GALLERY
   10. CTA FINAL
   11. FOOTER
   12. WHATSAPP FAB
   13. ANIMACIONES
   14. RESPONSIVE TABLET (≤1024px)
   15. RESPONSIVE MOBILE (≤768px)
   16. ACCESIBILIDAD
   ============================================ */


/* ============================================
   1. VARIABLES
   ============================================ */
:root {
  /* Colores del logo Construran */
  --blue-dark:   #1A3557;   /* Azul oscuro — color institucional principal */
  --blue-mid:    #2A5298;   /* Azul medio — hover */
  --gold:        #F5A623;   /* Dorado/amarillo del logo — acento y CTA */
  --gold-dark:   #D4891A;   /* Dorado oscuro — hover del CTA */
  --bg:          #FFFFFF;
  --bg-alt:      #F4F6F9;
  --bg-dark:     #0F1F33;   /* Fondo secciones oscuras */
  --text:        #111827;
  --text-mid:    #4B5563;
  --text-light:  #9CA3AF;
  --border:      #E2E8F0;

  /* Tipografía — Poppins único */
  --font: 'Poppins', sans-serif;

  /* Escala */
  --h1:    clamp(2.5rem, 6vw, 4.4rem);
  --h2:    clamp(1.6rem, 3vw, 2.25rem);
  --h3:    1.1rem;
  --body:  1rem;
  --sm:    0.875rem;
  --xs:    0.75rem;

  /* Layout */
  --max-w:      1160px;
  --header-h:   68px;
  --py:         96px;
  --py-sm:      72px;
  --radius:     14px;
  --radius-sm:  8px;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(26,53,87,.07);
  --shadow-md: 0 8px 28px rgba(26,53,87,.11);

  /* Ease */
  --ease: cubic-bezier(.25,.46,.45,.94);
}


/* ============================================
   2. RESET Y BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ============================================
   3. LAYOUT
   ============================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: var(--h2);
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}


/* ============================================
   4. BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: var(--sm);
  font-weight: 600;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: background .25s var(--ease),
              transform .2s var(--ease),
              box-shadow .25s var(--ease);
  white-space: nowrap;
}

/* WhatsApp icon inside buttons */
.wa-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Header CTA */
.btn-primary {
  padding: 11px 22px;
  background: var(--gold);
  color: #fff;
  box-shadow: 0 3px 12px rgba(245,166,35,.35);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(245,166,35,.45);
}

/* Hero CTA */
.btn-hero {
  padding: 15px 36px;
  background: var(--gold);
  color: #fff;
  font-size: var(--body);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(245,166,35,.4);
}
.btn-hero:hover,
.btn-hero:focus-visible {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,166,35,.5);
}
.btn-hero .wa-icon { width: 20px; height: 20px; }

/* CTA Final */
.btn-cta-final {
  padding: 16px 44px;
  background: var(--gold);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(245,166,35,.4);
}
.btn-cta-final:hover,
.btn-cta-final:focus-visible {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,166,35,.5);
}
.btn-cta-final .wa-icon { width: 20px; height: 20px; }


/* ============================================
   5. HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header.scrolled {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  height: 44px;
  width: auto;
  transition: opacity .2s, filter .3s;
}
/* Logo blanco cuando header es transparente (sobre foto del hero) */
.site-header:not(.scrolled) .header-logo img {
  filter: brightness(0) invert(1);
}
.header-logo:hover img,
.header-logo:focus-visible img { opacity: .75; }


/* ============================================
   6. HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--header-h);
}

/* Imagen de fondo real */
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg-dark) url('assets/persianas01.jpg') center/cover no-repeat;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    /* Gradiente superior para proteger el logo */
    linear-gradient(
      to bottom,
      rgba(10,22,42,.55) 0%,
      rgba(10,22,42,.0) 18%
    ),
    /* Gradiente direccional principal */
    linear-gradient(
      105deg,
      rgba(10,22,42,.60) 0%,
      rgba(10,22,42,.42) 55%,
      rgba(10,22,42,.22) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 0 40px 60px;
  text-align: center;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: var(--xs);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  padding: 5px 14px;
  border: 1px solid rgba(245,166,35,.4);
  border-radius: 100px;
}

.hero h1 {
  font-size: var(--h1);
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255,255,255,.78);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}


/* ============================================
   7. PILLARS
   ============================================ */
.pillars {
  padding: var(--py) 0;
  background: var(--bg);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar-card {
  padding: 40px 36px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(26,53,87,.07);
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.pillar-title {
  font-size: var(--h3);
  font-weight: 600;
  color: var(--blue-dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.pillar-text {
  font-size: var(--sm);
  color: var(--text-mid);
  line-height: 1.75;
}


.pillars-cta {
  text-align: center;
  margin-top: 48px;
}

.btn-pillars {
  padding: 14px 36px;
  font-size: var(--body);
}
.process {
  padding: var(--py) 0;
  background: var(--bg-dark);
}

.process .section-title { color: #fff; }

.process-steps {
  display: flex;
  align-items: flex-start;
  max-width: 860px;
  margin: 0 auto;
}

.process-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.process-divider {
  flex-shrink: 0;
  width: 64px;
  height: 1px;
  background: rgba(255,255,255,.18);
  margin-top: 26px;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.step-title {
  font-size: var(--h3);
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.step-text {
  font-size: var(--sm);
  color: rgba(255,255,255,.55);
  line-height: 1.75;
}


/* ============================================
   9. GALLERY
   ============================================ */
.gallery {
  padding: var(--py) 0;
  background: var(--bg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 24px;
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  transition: transform .3s var(--ease);
}
.gallery-item:hover { transform: scale(1.025); }

.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #cdd8eb 0%, #b0c4de 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-placeholder::after {
  content: 'Foto del trabajo';
  font-family: var(--font);
  font-size: var(--xs);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-dark);
  opacity: .45;
}


/* ============================================
   10. CTA FINAL
   ============================================ */
.cta-final {
  padding: var(--py) 0;
  background: var(--bg-alt);
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.cta-inner h2 {
  font-size: var(--h2);
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-inner p {
  font-size: 1.05rem;
  color: var(--text-mid);
  margin-bottom: 40px;
  font-weight: 300;
}


/* ============================================
   11. FOOTER
   ============================================ */
.site-footer {
  background: var(--blue-dark);
}

.footer-main {
  padding: 64px 0 52px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Columna marca */
.footer-brand img {
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.footer-tagline {
  font-size: var(--sm);
  color: rgba(255,255,255,.5);
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 14px;
}
.footer-social a {
  color: rgba(255,255,255,.4);
  transition: color .2s;
}
.footer-social a:hover,
.footer-social a:focus-visible { color: var(--gold); }

/* Columna contacto */
.footer-col-title {
  font-size: var(--sm);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: 24px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--sm);
  color: rgba(255,255,255,.65);
  line-height: 1.6;
}

.footer-contact-list svg { flex-shrink: 0; margin-top: 2px; }

.footer-link {
  color: rgba(255,255,255,.65);
  transition: color .2s;
}
.footer-link:hover,
.footer-link:focus-visible { color: var(--gold); }

/* Bottom bar */
.footer-bottom {
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: var(--xs);
  color: rgba(255,255,255,.28);
}


/* ============================================
   12. WHATSAPP FAB
   ============================================ */
.whatsapp-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37,211,102,.45);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.whatsapp-fab svg { width: 26px; height: 26px; }
.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37,211,102,.55);
}


/* ============================================
   13. ANIMACIONES
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger en grids */
.pillars-grid .pillar-card.reveal:nth-child(2) { transition-delay: 90ms; }
.pillars-grid .pillar-card.reveal:nth-child(3) { transition-delay: 180ms; }
.process-steps .process-step.reveal:nth-child(3) { transition-delay: 90ms; }
.process-steps .process-step.reveal:nth-child(5) { transition-delay: 180ms; }
.gallery-grid .gallery-item.reveal:nth-child(2) { transition-delay: 70ms; }
.gallery-grid .gallery-item.reveal:nth-child(3) { transition-delay: 140ms; }
.gallery-grid .gallery-item.reveal:nth-child(4) { transition-delay: 210ms; }


/* ============================================
   14. RESPONSIVE — TABLET (≤1024px)
   ============================================ */
@media (max-width: 1024px) {
  :root { --py: var(--py-sm); }

  .pillars-grid { grid-template-columns: repeat(2, 1fr); }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .process-steps {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }
  .process-divider {
    width: 1px;
    height: 36px;
    margin-top: 0;
  }
  .process-step { max-width: 380px; width: 100%; }
}


/* ============================================
   15. RESPONSIVE — MOBILE (≤768px)
   ============================================ */
@media (max-width: 768px) {
  :root {
    --header-h: 58px;
    --py-sm:    56px;
  }

  /* Hero mobile — texto a la izquierda, anclado abajo */
  .hero {
    align-items: flex-end;
    padding-bottom: 52px;
  }
  .hero-content {
    padding: 0 20px 0;
    max-width: 100%;
    text-align: left;
  }
  .hero-sub {
    margin-left: 0;
    margin-right: 0;
  }
  .hero h1 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
  .hero-sub { font-size: .95rem; }
  .hero-eyebrow { font-size: .68rem; }

  /* Section titles left on mobile */
  .section-title { text-align: left; margin-bottom: 36px; }

  /* Pillars: 1 col */
  .pillars-grid { grid-template-columns: 1fr; gap: 14px; }
  .pillar-card { padding: 28px 24px; }

  /* Gallery: 2 col */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 20px;
    gap: 8px;
  }

  /* CTA Final */
  .cta-inner { text-align: left; }
  .cta-inner h2 { font-size: 1.5rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Mostrar FAB en mobile */
  .whatsapp-fab { display: flex; }
}

@media (max-width: 380px) {
  .btn-primary { padding: 9px 16px; font-size: .78rem; }
  .btn-primary .wa-icon { width: 15px; height: 15px; }
}


/* ============================================
   16. ACCESIBILIDAD
   ============================================ */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { transform: none !important; }
}

@media (forced-colors: active) {
  .btn-primary, .btn-hero, .btn-cta-final { border: 2px solid ButtonText; }
}