/* ================================================================
   ALUCEMA — HOJA DE ESTILOS
   CSS propio y autocontenido: no depende de ningún framework ni CDN
   de terceros para el layout (solo las tipografías de Google Fonts,
   que tienen una alternativa de sistema si no cargan). Esto hace que
   el sitio se vea igual en el navegador, en una vista previa aislada
   o dentro de un contenedor Docker sin salida a internet.

   Índice:
     1. Reset y variables de marca
     2. Utilidades de layout (contenedor, grillas)
     3. Accesibilidad (skip-link, foco)
     4. Navbar + menú móvil
     5. Hero
     6. Secciones generales (títulos, eyebrows)
     7. Quiénes somos
     8. Servicios
     9. Propuesta de valor
    10. Galería
    11. Compromiso
    12. Contacto / formulario
    13. Footer
    14. Botón volver arriba
    15. Animaciones de scroll-reveal
    16. Breakpoints responsive

   Cómo integrar animaciones adicionales (ver también script.js):
   - Toda animación de aparición usa la clase ".reveal" + ".is-visible",
     controlada por un IntersectionObserver en script.js.
   - Para añadir una animación nueva: crea una clase (p.ej. ".reveal-left")
     con su transición y estado inicial aquí, y agrégala a la lista de
     selectores que observa el IntersectionObserver en script.js.
   - Respetamos prefers-reduced-motion: si el usuario lo activa, las
     animaciones se desactivan automáticamente (sección 15).
   ================================================================ */

/* ----------------------------------------------------------------
   1. RESET Y VARIABLES DE MARCA
   ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --steel-deep: #0B2C52;
  --steel-mid: #3E6C96;
  --steel-light: #9FC3DE;
  --graphite: #1B2027;
  --steel-gray: #8C8E95;
  --bone: #F4F8FB;
  --white: #FFFFFF;
  --line: rgba(11, 44, 82, 0.14);
  --line-light: rgba(255, 255, 255, 0.18);
  --danger: #C0392B;

  --font-display: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-cond: 'IBM Plex Sans Condensed', system-ui, -apple-system, sans-serif;

  --container-w: 1180px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--graphite);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4, p, dl, dd, dt, ul, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* ----------------------------------------------------------------
   2. UTILIDADES DE LAYOUT
   ---------------------------------------------------------------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}

.hidden {
  display: none !important;
}

/* ----------------------------------------------------------------
   3. ACCESIBILIDAD
   ---------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--steel-deep);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
  font-family: var(--font-cond);
  font-weight: 600;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--steel-mid);
  outline-offset: 3px;
}

/* ----------------------------------------------------------------
   4. NAVBAR + MENÚ MÓVIL
   ---------------------------------------------------------------- */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--steel-deep);
  transition: box-shadow 0.3s ease;
}
.nav-bar.is-scrolled {
  box-shadow: 0 8px 24px rgba(11, 44, 82, 0.28);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #fff;
}
.brand-tag {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel-light);
  margin-top: 4px;
}

/* Isotipo oficial (extraído del manual de marca), versión clara para
   fondos oscuros como la navbar y el footer. */
.brand-mark {
  height: 38px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.weld-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 2px solid var(--steel-light);
  border-radius: 3px;
  flex-shrink: 0;
}
.weld-mark::before,
.weld-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background: #fff;
}
.weld-mark::before { transform: translate(-50%, -50%) rotate(45deg); }
.weld-mark::after { transform: translate(-50%, -50%) rotate(-45deg); }

.nav-menu {
  display: none;
  align-items: center;
  gap: 36px;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9D8E4;
}

.nav-link {
  position: relative;
  padding: 6px 0;
  display: inline-block;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--steel-light);
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}
.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.nav-phone {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--steel-light);
  white-space: nowrap;
}

.burger {
  background: none;
  border: none;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}
.burger-line {
  width: 22px;
  height: 2px;
  background: #fff;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger[aria-expanded="true"] .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] .burger-line:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  background: var(--steel-deep);
  border-top: 1px solid var(--line-light);
}
.mobile-menu-list li a {
  display: block;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C9D8E4;
}
.mobile-menu-cta {
  padding: 20px 24px;
}

/* ----------------------------------------------------------------
   5. HERO
   ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--steel-deep);
}

.blueprint-grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 92%);
}
.blueprint-grid-faint {
  opacity: 0.06;
}

.hero-inner {
  position: relative;
  padding: 96px 24px 72px;
}

.hero-panel {
  position: relative;
  max-width: 660px;
  border: 1px solid var(--line-light);
  padding: 32px;
}

.frame-corners::before,
.frame-corners::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--steel-light);
  border-style: solid;
  border-width: 0;
}
.frame-corners::before {
  top: -2px;
  left: -2px;
  border-top-width: 3px;
  border-left-width: 3px;
}
.frame-corners::after {
  bottom: -2px;
  right: -2px;
  border-bottom-width: 3px;
  border-right-width: 3px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: 2.15rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.hero-lead {
  color: #C9D8E4;
  font-size: 17px;
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 34px;
}

.hero-quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.15rem;
  max-width: 640px;
  margin-top: 56px;
}

/* ----------------------------------------------------------------
   6. SECCIONES GENERALES
   ---------------------------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-mid);
  margin-bottom: 14px;
}
.eyebrow-light {
  color: var(--steel-light);
}
.eyebrow-center {
  justify-content: center;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--steel-deep);
  font-size: 1.7rem;
  line-height: 1.25;
}
.section-title-light {
  color: #fff;
}

.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}

/* ----------------------------------------------------------------
   7. QUIÉNES SOMOS
   ---------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.about-p {
  font-size: 16.5px;
  line-height: 1.7;
  color: #3c4650;
  margin-bottom: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding-top: 24px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--steel-deep);
  font-size: 1.8rem;
}
.stat-label {
  font-family: var(--font-cond);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-mid);
  margin-top: 4px;
}

/* ----------------------------------------------------------------
   8. SERVICIOS
   ---------------------------------------------------------------- */
.services {
  background: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  background: var(--white);
  padding: 40px 32px;
  transition: background-color 0.25s ease;
}
.service-card:hover {
  background: var(--bone);
}

.icon-box {
  width: 48px;
  height: 48px;
  color: var(--steel-mid);
  margin-bottom: 20px;
}
.icon-box svg {
  width: 100%;
  height: 100%;
}

.service-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--steel-deep);
  font-size: 19px;
  margin-bottom: 14px;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: #4b5561;
  line-height: 1.5;
}
.service-list li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--steel-mid);
}

/* ----------------------------------------------------------------
   9. PROPUESTA DE VALOR
   ---------------------------------------------------------------- */
.value-section {
  position: relative;
  overflow: hidden;
  background: var(--steel-deep);
  border-bottom: 1px solid var(--line);
}
.value-inner {
  position: relative;
}

.value-inner .section-title {
  max-width: 620px;
  margin-bottom: 44px;
}

.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #C9D8E4;
  font-size: 15.5px;
  line-height: 1.5;
}

.value-check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--steel-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  margin-top: 2px;
}

/* ----------------------------------------------------------------
   10. GALERÍA
   ---------------------------------------------------------------- */
.gallery {
  background: var(--white);
}

.gallery-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 44px;
}

.gallery-note {
  font-size: 13.5px;
  color: var(--steel-gray);
  max-width: 380px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
}
.gallery-fill,
.gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover .gallery-fill,
.gallery-item:hover .gallery-img {
  transform: scale(1.06);
}

.gallery-item figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 20px;
  background: linear-gradient(to top, rgba(11, 44, 82, 0.88), rgba(11, 44, 82, 0) 65%);
}
.gallery-tag {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-light);
}
.gallery-caption {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 17px;
  line-height: 1.3;
}

.gallery-1 { background: linear-gradient(155deg, #14406E, #0B2C52 60%, #08213D); }
.gallery-2 { background: linear-gradient(155deg, #3E6C96, #163254 60%, #0B2C52); }
.gallery-3 { background: linear-gradient(155deg, #1B2027, #0B2C52 60%, #14406E); }
.gallery-4 { background: linear-gradient(155deg, #26445F, #122A42 60%, #0B2C52); }
.gallery-5 { background: linear-gradient(155deg, #4b5561, #1B2027 60%, #0B2C52); }
.gallery-6 { background: linear-gradient(155deg, #3E6C96, #0B2C52 55%, #1B2027); }

/* ----------------------------------------------------------------
   11. COMPROMISO
   ---------------------------------------------------------------- */
.commitment {
  background: var(--bone);
}
.commitment-inner {
  max-width: 780px;
  text-align: center;
}
.commitment-text {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--steel-deep);
  font-size: 1.4rem;
  line-height: 1.45;
}

/* ----------------------------------------------------------------
   12. CONTACTO / FORMULARIO
   ---------------------------------------------------------------- */
.contact {
  background: var(--white);
  border-bottom: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.contact-lead {
  font-size: 16.5px;
  line-height: 1.7;
  color: #3c4650;
  max-width: 460px;
  margin: 20px 0 36px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 15px;
  color: #3c4650;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-list a {
  transition: color 0.2s ease;
}
.contact-list a:hover {
  color: var(--steel-mid);
}
.contact-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--steel-mid);
}
.contact-icon svg {
  width: 100%;
  height: 100%;
}

.form-panel {
  background: var(--bone);
  border: 1px solid var(--line);
  padding: 32px 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-row .field {
  margin-bottom: 0;
}

.field label {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-deep);
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--graphite);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 11px 13px;
  width: 100%;
  transition: border-color 0.2s ease;
}
.field textarea {
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--steel-mid);
  outline: none;
}

.field-error {
  display: none;
  font-size: 12.5px;
  color: var(--danger);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}
.field.has-error .field-error {
  display: block;
}

.form-success {
  display: none;
  margin-top: 18px;
  font-size: 14px;
  color: #1e6b3a;
  background: #e7f5ec;
  border: 1px solid #bfe3cb;
  padding: 12px 14px;
  border-radius: 2px;
}
.form-success.is-visible {
  display: block;
}
.form-error {
  display: none;
  margin-top: 18px;
  font-size: 14px;
  color: var(--danger);
  background: #fdecea;
  border: 1px solid #f2c4bf;
  padding: 12px 14px;
  border-radius: 2px;
}
.form-error.is-visible {
  display: block;
}
.form-error a {
  color: var(--steel-deep);
  font-weight: 600;
  text-decoration: underline;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.btn-solid:disabled {
  opacity: .6;
  cursor: wait;
}

/* ----------------------------------------------------------------
   BOTONES (usados en navbar, hero y formulario)
   ---------------------------------------------------------------- */
.btn-solid,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 2px;
  border: none;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-solid {
  background: #fff;
  color: var(--steel-deep);
}
.btn-solid:hover {
  background: var(--steel-light);
  transform: translateY(-1px);
}
.btn-solid.btn-dark {
  background: var(--steel-deep);
  color: #fff;
  margin-top: 6px;
}
.btn-solid.btn-dark:hover {
  background: var(--steel-mid);
}
.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  background: transparent;
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.btn-block {
  display: flex;
  width: 100%;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ----------------------------------------------------------------
   13. FOOTER
   ---------------------------------------------------------------- */
.site-footer {
  background: var(--graphite);
  color: #9aa3ac;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding: 56px 24px;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-mark {
  height: 26px;
  width: auto;
  display: block;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: 20px;
}
.footer-brand-tag {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-mid);
  margin: 6px 0 14px;
}
.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  max-width: 260px;
}

.footer-heading {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}
.footer-list a {
  transition: color 0.2s ease;
}
.footer-list a:hover {
  color: #fff;
}

.footer-bottom-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 24px;
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* ----------------------------------------------------------------
   14. BOTÓN VOLVER ARRIBA
   ---------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--steel-deep);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
  z-index: 40;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--steel-mid);
}

/* ----------------------------------------------------------------
   15. SCROLL-REVEAL
   Controlado por IntersectionObserver en script.js: cuando un
   elemento .reveal entra en pantalla se le agrega .is-visible.
   ---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.service-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.service-card.reveal:nth-child(4) { transition-delay: 0.24s; }

.gallery-item.reveal:nth-child(2) { transition-delay: 0.06s; }
.gallery-item.reveal:nth-child(3) { transition-delay: 0.12s; }
.gallery-item.reveal:nth-child(4) { transition-delay: 0.18s; }
.gallery-item.reveal:nth-child(5) { transition-delay: 0.24s; }
.gallery-item.reveal:nth-child(6) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .gallery-fill, .gallery-img, .back-to-top, .nav-link::after, .btn-solid, .btn-outline {
    transition: none;
  }
}

/* ----------------------------------------------------------------
   16. RESPONSIVE
   ---------------------------------------------------------------- */

/* Tablet en adelante (≥640px) */
@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Escritorio (≥768px) */
@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
  .hero-inner {
    padding: 120px 40px 96px;
  }
  .hero-panel {
    padding: 40px;
  }
  .hero-title {
    font-size: 3rem;
  }
  .hero-lead {
    font-size: 19px;
  }
  .section {
    padding: 100px 0;
  }
  .section-title {
    font-size: 2.15rem;
  }
  .commitment-text {
    font-size: 1.6rem;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Escritorio grande (≥1024px) */
@media (min-width: 1024px) {
  .nav-menu,
  .nav-actions {
    display: flex;
  }
  .burger {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .value-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
  }
}

/* ======================================================================
   HERO CON GALERÍA, FONDOS CON FOTO Y SLIDERS DE "NUESTROS TRABAJOS"
   ====================================================================== */

/* ---------- HERO: dos columnas (texto | galeria de fotos) ---------- */
.hero-inner-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  grid-template-areas: "panel photo" "quote .";
  column-gap: 34px;
  row-gap: 26px;
  align-items: stretch;
}
.hero-inner-gallery .hero-panel { grid-area: panel; }
.hero-inner-gallery .hero-quote { grid-area: quote; margin-top: 0; }
.hero-inner-gallery .hero-art {
  grid-area: photo;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  position: relative;
  overflow: hidden;
}
.hero-inner-gallery .photo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 11px;
  box-sizing: border-box;
  overflow: hidden;
}
.photo-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1E3F63;
  box-shadow: 0 18px 44px rgba(0,0,0,0.5);
}
.slide-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #1E3F63;
  opacity: 0;
  transition: opacity .8s ease;
  z-index: 1;
}
.slide-img.on { opacity: 1; }

.slide-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 11px 16px 10px;
  background: linear-gradient(to top, rgba(11,44,82,0.9), rgba(11,44,82,0));
  opacity: 0; transition: opacity .5s ease;
  z-index: 4;
}
.slide-caption.on { opacity: 1; }
.slide-caption span {
  font-family: var(--font-cond); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: #fff;
}
.slide-count {
  position: absolute; top: 11px; right: 11px; z-index: 4;
  font-family: var(--font-cond); font-weight: 600; font-size: 11px;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.75);
  background: rgba(11,44,82,0.55); padding: 3px 9px; border-radius: 2px;
  transition: opacity .4s ease;
}

.comet-wrap { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.comet {
  position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle, #FFFBF0 0%, #FFD37A 45%, transparent 72%);
  box-shadow: 0 0 18px 6px rgba(255,211,122,.95), 0 0 38px 14px rgba(255,157,61,.55);
  opacity: 0; left: -8%; top: 10%;
}
.comet::after {
  content: ""; position: absolute; right: 100%; top: 50%;
  width: 90px; height: 3px; transform: translateY(-50%);
  background: linear-gradient(to left, rgba(255,211,122,0.85), rgba(255,211,122,0));
  filter: blur(1px);
}
.comet.fly { animation: cometFly 1.5s cubic-bezier(.3,.6,.4,1); }
@keyframes cometFly {
  0%   { opacity: 0; left: -8%;  top: 6%;  }
  12%  { opacity: 1; }
  50%  { opacity: 1; left: 46%;  top: 48%; }
  88%  { opacity: 1; }
  100% { opacity: 0; left: 106%; top: 92%; }
}

.stack-wrap { position: absolute; inset: 0; z-index: 3; opacity: 0; transition: opacity 1.3s ease; }
.stack-wrap.on { opacity: 1; }
.stack-wrap.settle { transition: opacity 1.8s ease; }
.stack-wrap.settle.dim { opacity: 0.5; }
.stack-photo {
  position: absolute; width: 76%; height: 60%; left: 12%; top: 20%;
  object-fit: cover; border: 6px solid #EFE7D8;
  box-shadow: 0 12px 26px rgba(0,0,0,0.45);
  filter: url(#duotoneFilter) contrast(1.05) brightness(1.02);
}
.stack-photo:nth-child(1) { transform: rotate(-7deg) translate(-18px, 8px); z-index: 1; }
.stack-photo:nth-child(2) { transform: rotate(4deg) translate(-4px, -9px); z-index: 2; }
.stack-photo:nth-child(3) { transform: rotate(-3deg) translate(11px, 10px); z-index: 3; }
.stack-photo:nth-child(4) { transform: rotate(6deg) translate(20px, -5px); z-index: 4; }
.stack-photo:nth-child(5) { transform: rotate(-4deg) translate(30px, 14px); z-index: 5; }
.stack-photo:nth-child(6) { transform: rotate(3deg) translate(-28px, -10px); z-index: 6; }
.stack-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  height: 30%; width: auto; z-index: 10; opacity: 0;
  transition: opacity 1.1s ease;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.55));
}
.stack-logo.on { opacity: 1; }

@media (max-width: 860px) {
  .hero-inner-gallery { grid-template-columns: 1fr; grid-template-areas: "panel" "photo" "quote"; }
  .hero-inner-gallery .hero-art { min-height: 320px; }
}

/* ---------- FOOTER: mismo azul que la cabecera, no el grafito oscuro original ---------- */
.site-footer {
  background: var(--steel-deep);
}
.about.has-bg {
  position: relative;
  overflow: hidden;
}
.about-bg-img {
  position: absolute; inset: 0;
  /* Degradado de marca: se ve siempre debajo; si fondos.css declara una
     foto para esta sección, la foto se pinta encima. */
  background-image: linear-gradient(155deg, #14406E 0%, #0B2C52 55%, #08213D 100%);
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  filter: grayscale(0.2) brightness(1.05);
  transform: scale(1.02);
  z-index: 0;
}
.about-overlay {
  position: absolute; inset: 0;
  background: rgba(244,248,251,0.68);
  z-index: 1;
}
.about.has-bg .container { position: relative; z-index: 2; }
.about.has-bg .about-p {
  color: var(--steel-deep);
  font-weight: 500;
}

/* ---------- NUESTRO COMPROMISO con imagen de fondo (Playa La Herradura) ---------- */
.commitment.has-bg {
  position: relative;
  overflow: hidden;
}
.commitment-bg-img {
  position: absolute; inset: 0;
  background-image: url("assets/img/fondos/compromiso-la-herradura.webp"), linear-gradient(155deg, #14406E, #0B2C52);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(1.5px) grayscale(0.25) brightness(1.05);
  transform: scale(1.03);
  z-index: 0;
}
.commitment-overlay {
  position: absolute; inset: 0;
  background: rgba(244,248,251,0.66);
  z-index: 1;
}
.commitment.has-bg .container { position: relative; z-index: 2; }

/* ---------- SERVICIOS: cada recuadro es una imagen completa ----------
   La imagen ya trae el título y los ítems del servicio. El mismo texto
   queda en el HTML dentro de .visually-hidden para Google y lectores
   de pantalla (no se ve en pantalla). */
.service-card--img {
  padding: 0;
  background: var(--steel-deep);
  overflow: hidden;
}
.service-card--img:hover { background: var(--steel-deep); }
.service-img {
  width: 100%;
  height: auto;
  aspect-ratio: 776 / 488;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card--img:hover .service-img { transform: scale(1.03); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- NUESTROS TRABAJOS: imagen simple o slider ---------- */
.gallery-item { position: relative; }
.gallery-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.gallery-slider {
  position: absolute; inset: 0; overflow: hidden;
}
.slider-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease;
}
.slider-img.on { opacity: 1; }
.slider-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px; z-index: 5;
}
.slider-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transition: background-color .3s ease, transform .3s ease;
}
.slider-dot.on { background: #fff; transform: scale(1.25); }

/* ----------------------------------------------------------------
   SEGURIDAD
   ---------------------------------------------------------------- */
.safety-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.safety-photo-frame {
  border: 1px solid var(--line);
  padding: 8px;
  background: #fff;
}
.safety-photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3.1;
  object-fit: cover;
}
.safety-caption {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-mid);
  margin-top: 10px;
}
.safety-checks {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.safety-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #3c4650;
}
.safety-checks .chk {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--steel-deep);
  color: #fff;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
@media (max-width: 860px) {
  .safety-grid { grid-template-columns: 1fr; }
  .safety-checks { grid-template-columns: 1fr; }
}
