/* ==========================================================================
   Asesoría Arenas Albero — hoja de estilos principal
   --------------------------------------------------------------------------
   Índice:
     1. Variables (colores, tipografía, espaciado)
     2. Reset y estilos base
     3. Utilidades (contenedor, botones, textos)
     4. Cabecera y menú
     5. Hero (portada)
     6. Áreas de servicio (tarjetas)
     7. Páginas interiores: servicios.html (bandas por área y tareas) y banda de contacto
     8. Página de contacto (datos y formulario)
     9. Sobre nosotros y páginas legales
    10. Pie de página
    11. Responsive (tablet y móvil)
   ========================================================================== */


/* 1. VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Colores. El rojo es el del logotipo de Arenas Albero. */
  --color-accent:       #D8281F;   /* rojo corporativo */
  --color-accent-dark:  #AA0A0A;   /* rojo oscuro para hover/activo */
  --color-text:         #1B1B1B;   /* texto principal */
  --color-text-muted:   #6B6B6B;   /* texto secundario */
  --color-bg:           #FFFFFF;   /* fondo de página */
  --color-surface:      #F7F7F5;   /* fondo de bloques suaves */
  --color-border:       #E4E4E1;   /* líneas y separadores */

  /* Tipografía */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Medidas */
  --container-max: 1180px;
  --container-pad: 24px;
  --header-height: 76px;
  --radius: 4px;

  /* Transiciones */
  --ease: 200ms ease;

  /* Curvas de movimiento (más marcadas que las de serie del navegador) */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;              /* 16px */
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Foco visible para navegación con teclado */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}


/* 3. UTILIDADES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* Enlace "saltar al contenido": oculto hasta que recibe el foco */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 8px 12px;
  background: var(--color-accent);
  color: #fff;
  z-index: 200;
}
.skip-link:focus {
  top: 16px;
}

/* Texto pequeño en mayúsculas sobre los títulos */
.eyebrow {
  font-size: 0.8125rem;         /* 13px */
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  font-size: 0.9375rem;         /* 15px */
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease),
              transform 160ms var(--ease-out);
  white-space: nowrap;
}
/* Respuesta al pulsar: el botón se encoge un poco */
.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-dark);
}

.btn--ghost {
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--ghost:hover {
  border-color: var(--color-text);
}

/* Botón blanco para usar sobre fondo rojo */
.btn--light {
  background: #fff;
  color: var(--color-accent);
}
.btn--light:hover {
  background: #F6E9E8;
}

/* Botón con borde blanco para usar sobre fotografía oscura */
.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
.btn--outline-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Variante clara del texto pequeño (sobre fondo oscuro) */
.eyebrow--light {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
}
.eyebrow--light::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--color-accent);
}

/* Cabecera de sección: texto pequeño + título */
.section-head {
  max-width: 640px;
}
.section-title {
  margin-top: 16px;
  font-size: clamp(1.75rem, 3vw, 2.375rem);   /* entre 28px y 38px */
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}


/* 4. CABECERA Y MENÚ
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;             /* se mantiene fija al hacer scroll */
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease);
}

/* Clase añadida por JS cuando la página se ha desplazado */
.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 32px;
}

/* Logotipo */
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand__logo {
  height: 46px;                 /* altura del logo en la cabecera */
  width: auto;
}

/* Menú */
.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 0.9375rem;         /* 15px */
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--ease);
}

/* Subrayado fino que aparece al pasar el ratón o en la página activa */
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}
.site-nav__link:hover::after,
.site-nav__link.is-active::after {
  transform: scaleX(1);
}

/* Submenú desplegable de "Servicios"
   - Escritorio: se abre al pasar el ratón, con el teclado (foco) o al pulsar la flecha
   - Móvil: se abre como acordeón al pulsar la flecha (ver sección Responsive) */
.has-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  transition: color var(--ease);
}
.dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--ease);
}
.has-dropdown:hover .dropdown-toggle,
.has-dropdown.is-open .dropdown-toggle {
  color: var(--color-accent);
}
.has-dropdown.is-open .dropdown-toggle svg {
  transform: rotate(180deg);   /* la flecha apunta hacia arriba con el submenú abierto */
}

.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: -12px;
  min-width: 250px;
  padding: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
  transform-origin: 24px top;   /* se despliega desde el enlace "Servicios" */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.97);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 200ms;
}

/* Zona invisible entre el enlace y el panel para que no se cierre al mover el ratón */
.dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown__link {
  display: block;
  padding: 10px 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color var(--ease), color var(--ease);
}
.dropdown__link:hover,
.dropdown__link:focus-visible {
  background: var(--color-surface);
  color: var(--color-accent);
}

/* Botón de teléfono en la cabecera: un poco más compacto que los botones normales */
.site-nav__cta {
  min-height: 42px;
  padding: 0 20px;
  font-size: 0.875rem;
}

/* Botón hamburguesa: oculto en escritorio */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;          /* alinea visualmente con el borde del contenedor */
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text);
  transition: transform var(--ease), opacity var(--ease);
}
/* Animación a "X" cuando el menú está abierto */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* 5. HERO (PORTADA)
   -------------------------------------------------------------------------- */
/* Fotografía a pantalla completa con capa oscura semitransparente encima.
   Para cambiar la foto, sustituir la ruta de background-image. */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(calc(100vh - var(--header-height)), 780px);
  padding: 120px 0;
  color: #fff;
  background-color: #1B1B1B;
  background-image: url("../assets/img/hero-oficina.jpg");
  background-size: cover;
  background-position: 70% center;   /* mantiene la "A" de la pared a la derecha del texto */
  background-repeat: no-repeat;
  isolation: isolate;
}

/* Capa de transparencia: más oscura a la izquierda (donde está el texto) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(16, 16, 16, 0.86) 0%,
    rgba(16, 16, 16, 0.66) 50%,
    rgba(16, 16, 16, 0.38) 100%
  );
}

.hero__content {
  max-width: 660px;
}

.hero__title {
  margin-top: 24px;
  font-size: clamp(2.75rem, 5.2vw, 4.5rem);   /* entre 44px y 72px según el ancho */
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__lead {
  max-width: 540px;
  margin-top: 28px;
  font-size: 1.125rem;          /* 18px */
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}


/* 6. ÁREAS DE SERVICIO (TARJETAS)
   -------------------------------------------------------------------------- */
.services {
  padding: 104px 0 112px;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.services__grid > li {
  display: flex;                /* para que la tarjeta ocupe toda la altura de la celda */
}

/* Tarjeta (es un enlace <a> a su apartado en servicios.html) */
.service-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 32px 28px 32px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.service-card:hover {
  border-color: #CFCFCB;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

/* "Más información": se subraya al pasar por la tarjeta */
.service-card__more {
  margin-top: auto;             /* siempre al pie de la tarjeta */
  padding-top: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--ease);
}
.service-card:hover .service-card__more {
  text-decoration-color: var(--color-accent);
}

/* Icono: SVG de línea sobre un cuadrado suave */
.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: #FBEDEC;          /* rojo muy diluido */
  color: var(--color-accent);
}
.service-card__icon svg {
  width: 26px;
  height: 26px;
}

.service-card__title {
  margin-top: 24px;
  font-size: 1.125rem;          /* 18px */
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service-card__text {
  margin-top: 10px;
  font-size: 0.9375rem;         /* 15px */
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* Tarjeta de llamada a la acción (fondo rojo) */
.service-card--cta {
  justify-content: center;
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.service-card--cta:hover {
  border-color: var(--color-accent);
  box-shadow: 0 10px 30px rgba(216, 40, 31, 0.25);
}
.service-card--cta .service-card__title {
  margin-top: 0;
  font-size: 1.375rem;          /* 22px */
}
.service-card--cta .service-card__text {
  color: rgba(255, 255, 255, 0.85);
}
.service-card--cta .btn {
  align-self: flex-start;
  margin-top: 24px;
}


/* 7. PÁGINAS INTERIORES (servicios.html)
   -------------------------------------------------------------------------- */

/* Encabezado de página interior */
.page-head {
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--color-border);
}
.page-head__title {
  margin-top: 16px;
  font-size: clamp(2.25rem, 4vw, 3.25rem);    /* entre 36px y 52px */
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.page-head__lead {
  max-width: 600px;
  margin-top: 20px;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* Índice de áreas bajo el encabezado de servicios.html */
.area-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.area-index__link {
  display: inline-block;
  padding: 9px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: border-color var(--ease), color var(--ease);
}
.area-index__link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Banda de cada área: fotografía a todo el ancho con capa oscura.
   La foto se define en el HTML con style="background-image: url(...)". */
.photo-band {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 460px;
  padding: 96px 0;
  color: #fff;
  background-color: #1B1B1B;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
  scroll-margin-top: var(--header-height);   /* que el ancla no quede bajo la cabecera */
}
.photo-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(16, 16, 16, 0.84) 0%,
    rgba(16, 16, 16, 0.62) 55%,
    rgba(16, 16, 16, 0.32) 100%
  );
}

.photo-band__content {
  max-width: 640px;
}

.photo-band__title {
  margin-top: 0;
  font-size: clamp(2.125rem, 4vw, 3.25rem);   /* entre 34px y 52px */
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.photo-band__lead {
  max-width: 560px;
  margin-top: 20px;
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

/* Lista de tareas de cada área */
.tasks {
  padding: 80px 0 96px;
}

.tasks__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 64px;
  align-items: start;
}

.tasks__title {
  font-size: 1.375rem;          /* 22px */
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.tasks__text {
  margin-top: 14px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.tasks__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
}

.tasks__list li {
  position: relative;
  padding-left: 30px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Marca de verificación roja delante de cada tarea (SVG incrustado, sin archivos) */
.tasks__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #FBEDEC;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.3 2.6 2.6L12 5.6' fill='none' stroke='%23D8281F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}


/* Banda de llamada a la acción (final de servicios.html) */
.cta-band {
  background: var(--color-accent);
  color: #fff;
  padding: 56px 0;
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.cta-band__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.cta-band__text {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.85);
}


/* 8. PÁGINA DE CONTACTO
   -------------------------------------------------------------------------- */
.contact {
  padding: 88px 0 104px;
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 72px;
  align-items: start;
}

.contact__item + .contact__item {
  margin-top: 32px;
}

.contact__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.contact__value {
  margin-top: 8px;
  font-style: normal;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.55;
}
.contact__value a:hover {
  color: var(--color-accent);
}

/* Enlace a Google Maps (texto rojo subrayado) */
.link-map {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(216, 40, 31, 0.35);
  transition: text-decoration-color var(--ease);
}
.link-map:hover {
  text-decoration-color: var(--color-accent);
}

/* Formulario */
.form {
  padding: 40px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.form__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form__label {
  font-size: 0.875rem;
  font-weight: 600;
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(216, 40, 31, 0.12);
}

.form__textarea {
  min-height: 150px;
  resize: vertical;
}

/* Casilla de privacidad */
.form__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.form__check input {
  margin-top: 3px;
  accent-color: var(--color-accent);
}
.form__check a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Campo trampa anti-spam: fuera de pantalla */
.form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mensaje de resultado */
.form__status {
  display: none;
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}
.form__status.is-success {
  display: block;
  background: #EAF5EE;
  color: #1F6B3B;
}
.form__status.is-error {
  display: block;
  background: #FBEDEC;
  color: var(--color-accent-dark);
}


/* 9. SOBRE NOSOTROS Y PÁGINAS LEGALES
   -------------------------------------------------------------------------- */

/* Banda de portada más alta (sobre-nosotros.html) */
.photo-band--tall {
  min-height: 560px;
}
.photo-band--tall .photo-band__title {
  margin-top: 0;
  font-size: clamp(2.5rem, 4.8vw, 4rem);      /* entre 40px y 64px */
}

/* Nuestra historia: título a la izquierda, texto largo a la derecha */
.story {
  padding: 104px 0 88px;
}
.story__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 72px;
  align-items: start;
}
.story__text p {
  font-size: 1.0625rem;         /* 17px */
  line-height: 1.8;
  color: var(--color-text-muted);
}
.story__text p + p {
  margin-top: 22px;
}

/* Tres premisas */
.pillars {
  padding: 0 0 104px;
}
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.pillar {
  padding-top: 24px;
  border-top: 2px solid var(--color-text);
}
.pillar__num {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}
.pillar__title {
  margin-top: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pillar__text {
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* Botones y enlaces dentro de una banda con foto */
.photo-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.photo-band__link {
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  transition: text-decoration-color var(--ease);
}
.photo-band__link:hover {
  text-decoration-color: #fff;
}

/* Textos legales */
.legal {
  padding: 48px 0 104px;
}
.legal__inner {
  max-width: 760px;
  margin-left: 0;                /* alineado al lado izquierdo del contenedor */
}
.legal h2 {
  margin-top: 36px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.legal h2:first-child {
  margin-top: 0;
}
.legal p,
.legal ul {
  margin-top: 14px;
  line-height: 1.75;
  color: var(--color-text-muted);
}
.legal ul {
  list-style: disc;
  padding-left: 22px;
}
.legal li + li {
  margin-top: 6px;
}
.legal strong {
  color: var(--color-text);
  font-weight: 600;
}
.legal a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* 10. PIE DE PÁGINA
   -------------------------------------------------------------------------- */
.site-footer {
  padding-top: 72px;
  background: #1B1B1B;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

.site-footer__logo {
  height: 60px;
  width: auto;
}

.site-footer__desc {
  max-width: 280px;
  margin-top: 20px;
  line-height: 1.65;
}

/* Redes sociales (bloque comentado en el HTML hasta que exista el perfil de LinkedIn) */
.site-footer__social {
  display: flex;
  gap: 18px;
  margin-top: 22px;
}
.site-footer__social a {
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}
.site-footer__social a:hover {
  text-decoration-color: #fff;
}

.site-footer__heading {
  margin-bottom: 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.site-footer__address {
  margin-bottom: 14px;
  font-style: normal;
  line-height: 1.65;
}

.site-footer__list li + li {
  margin-top: 10px;
}

.site-footer a {
  transition: color var(--ease);
}
.site-footer a:hover {
  color: #fff;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 22px;
  padding-bottom: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}


/* 11. RESPONSIVE
   -------------------------------------------------------------------------- */

/* Tablet y móvil: menú desplegable */
@media (max-width: 900px) {
  :root {
    --header-height: 68px;
  }

  .brand__logo {
    height: 40px;
  }

  .nav-toggle {
    display: flex;
  }

  /* El menú se convierte en un panel bajo la cabecera */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--container-pad) 24px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);

    /* Oculto por defecto; JS añade .is-open */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding: 14px 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--color-border);
  }
  .site-nav__link::after {
    display: none;              /* sin subrayado animado en móvil */
  }
  .site-nav__link.is-active {
    color: var(--color-accent);
  }

  .site-nav__cta {
    margin-top: 20px;
    min-height: 48px;
  }

  /* Submenú de Servicios como acordeón dentro del panel */
  .has-dropdown {
    flex-wrap: wrap;
    gap: 0;
  }
  .has-dropdown .site-nav__link {
    flex: 1;
  }
  .dropdown-toggle {
    width: 44px;
    height: 49px;               /* misma altura que la fila del enlace (incluido su borde) */
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
  }
  .dropdown-toggle svg {
    width: 16px;
    height: 16px;
  }
  .dropdown {
    position: static;
    display: none;              /* oculto salvo que tenga .is-open en el padre */
    width: 100%;
    min-width: 0;
    padding: 4px 0 8px 16px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .dropdown::before {
    display: none;
  }
  .has-dropdown.is-open .dropdown {
    display: block;
  }
  /* En móvil no se abre con hover ni con foco, solo con la flecha */
  .has-dropdown:hover:not(.is-open) .dropdown,
  .has-dropdown:focus-within:not(.is-open) .dropdown {
    display: none;
  }
  .dropdown__link {
    padding: 10px 0;
    font-size: 1rem;
    color: var(--color-text-muted);
  }
  .dropdown__link:hover,
  .dropdown__link:focus-visible {
    background: none;
  }

  /* Hero más compacto y capa oscura uniforme */
  .hero {
    min-height: 0;
    padding: 88px 0 96px;
    background-position: center;
  }
  .hero::before {
    background: rgba(16, 16, 16, 0.72);
  }

  /* Tarjetas en dos columnas */
  .services {
    padding: 80px 0 88px;
  }
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 44px;
  }

  /* Página de servicios: bandas más bajas y tareas en una columna */
  .page-head {
    padding: 64px 0 44px;
  }
  .photo-band {
    min-height: 0;
    padding: 72px 0;
  }
  .photo-band::before {
    background: rgba(16, 16, 16, 0.7);
  }
  .tasks {
    padding: 56px 0 64px;
  }
  .tasks__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .cta-band__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Contacto y Sobre nosotros en una columna */
  .contact__grid,
  .story__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .photo-band--tall {
    min-height: 0;
    padding: 96px 0;
  }
  .story {
    padding: 72px 0 64px;
  }
  .pillars {
    padding-bottom: 72px;
  }
  .pillars__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Pie de página en dos columnas */
  .site-footer {
    padding-top: 56px;
  }
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* Móvil */
@media (max-width: 560px) {
  :root {
    --container-pad: 20px;
  }

  .hero {
    padding: 56px 0 64px;
  }
  .hero__lead {
    font-size: 1.0625rem;
  }
  .hero__actions .btn {
    flex: 1 1 100%;             /* botones a ancho completo */
  }

  /* Tarjetas en una columna */
  .services {
    padding: 64px 0 72px;
  }
  .services__grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 36px;
  }
  .service-card {
    padding: 26px 22px 30px;
  }

  /* Formulario: campos en una columna y menos relleno */
  .form {
    padding: 24px 20px 28px;
  }
  .form__row {
    grid-template-columns: 1fr;
  }
  .form__submit {
    width: 100%;
  }

  /* Tareas en una sola columna */
  .tasks__list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Pie de página en una columna */
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .site-footer__bottom {
    flex-direction: column;
  }
}

/* Respeta la preferencia de "reducir movimiento" del usuario */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
  }
}


/* 12. MOVIMIENTO Y DETALLES
   --------------------------------------------------------------------------
   Todo el movimiento usa solo transform y opacity (fluido en cualquier
   dispositivo) y se desactiva si el usuario prefiere reducir el movimiento.
   Las clases .reveal / .is-visible las añade js/main.js. */

/* Entrada escalonada del texto de las portadas al cargar la página */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__content > *,
.photo-band__content > * {
  animation: rise 700ms var(--ease-out) both;
}
.hero__content > :nth-child(2),
.photo-band__content > :nth-child(2) { animation-delay: 90ms; }
.hero__content > :nth-child(3),
.photo-band__content > :nth-child(3) { animation-delay: 180ms; }
.hero__content > :nth-child(4),
.photo-band__content > :nth-child(4) { animation-delay: 270ms; }

/* Zoom lento de la fotografía de fondo (efecto Ken Burns) al aparecer la banda.
   La foto se pinta en un pseudoelemento que hereda el fondo de la sección. */
.hero::after,
.photo-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: inherit;
  transform: scale(1.08);
}
@keyframes kenburns {
  to { transform: scale(1); }
}
.hero.is-visible::after,
.photo-band.is-visible::after {
  animation: kenburns 6s var(--ease-out) forwards;
}

/* Aparición de bloques al hacer scroll (una sola vez) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);   /* escalonado, lo calcula el JS */
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cabecera compacta al hacer scroll: el logo se reduce ligeramente */
.brand__logo {
  transform-origin: left center;
  transition: transform 220ms var(--ease-out);
}
.site-header.is-scrolled .brand__logo {
  transform: scale(0.86);
}

/* Cifras de inicio (años de experiencia, áreas, año de fundación) */
.facts {
  border-bottom: 1px solid var(--color-border);
}
.facts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.fact {
  padding: 40px 32px;
  border-left: 1px solid var(--color-border);
}
.fact:first-child {
  padding-left: 0;
  border-left: 0;
}
.fact__num {
  display: block;
  font-size: 2.75rem;           /* 44px */
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;   /* los dígitos no bailan al contar */
}
.fact__label {
  display: block;
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* Numeral grande en cada banda de la página de servicios */
.photo-band__num {
  position: absolute;
  right: 4vw;
  bottom: -0.12em;
  z-index: 0;
  font-size: clamp(9rem, 20vw, 17rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.28);
  pointer-events: none;
  user-select: none;
}
.photo-band__content {
  position: relative;
  z-index: 1;
}

/* Tarjetas de servicio: el icono se rellena de rojo y la flecha avanza */
.service-card__icon {
  transition: background-color 200ms ease, color 200ms ease;
}
.service-card__more::after {
  content: "\2192";             /* flecha hacia la derecha */
  display: inline-block;
  margin-left: 6px;
  transition: transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .service-card:hover .service-card__icon {
    background: var(--color-accent);
    color: #fff;
  }
  .service-card:hover .service-card__more::after {
    transform: translateX(4px);
  }
}

/* Tablet y móvil */
@media (max-width: 900px) {
  .photo-band__num {
    display: none;
  }
  .facts__grid {
    grid-template-columns: 1fr;
  }
  .fact {
    padding: 22px 0;
    border-left: 0;
    border-top: 1px solid var(--color-border);
  }
  .fact:first-child {
    border-top: 0;
  }
  .fact__num {
    font-size: 2.25rem;
  }
}

/* Movimiento reducido: sin desplazamientos ni zoom, solo fundidos breves */
@media (prefers-reduced-motion: reduce) {
  .hero__content > *,
  .photo-band__content > * {
    animation: none;
  }
  .hero::after,
  .photo-band::after {
    transform: none;
    animation: none !important;
  }
  .reveal {
    transform: none;
    transition: opacity 200ms ease;
  }
  .site-header.is-scrolled .brand__logo {
    transform: none;
  }
}
