/* =====================================================================
   INSTAHOGAR · Hoja de estilos
   Concepto: casa mediterránea renovada. Foto protagonista, textos breves,
   mucho aire, azul petróleo como base y terracota solo en acciones.
   Para cambiar colores, tipografías o espaciados, edita :root.
   ===================================================================== */

:root {
  color-scheme: light;

  /* Color */
  --paper: #FBF9F6;        /* blanco cálido: fondo general */
  --stone: #F2EFEA;        /* gris muy claro cálido: secciones alternas */
  --line: #E3DED6;         /* filetes y bordes */
  --white: #FFFFFF;
  --ink: #2B3033;          /* gris antracita: texto */
  --ink-soft: #5B6267;     /* texto secundario */
  --petrol: #1E4D58;       /* azul petróleo: color principal */
  --petrol-deep: #163B44;
  --petrol-night: #12262C; /* pie de página */
  --viewer: #0C1A1E;       /* fondo del visor de fotos */
  --petrol-wash: #E5EDED;  /* fondo suave para iconos */
  --terra: #A9522F;        /* terracota: botones y detalles */
  --terra-hover: #924526;
  --terra-light: #E0956F;  /* terracota sobre fondos oscuros */
  --on-dark: #F4F1EC;
  --on-dark-soft: #C3CDCE;
  --on-dark-muted: #92A6A9;
  --shade: 14, 32, 37;     /* RGB del velo sobre la foto de portada */

  /* Tipografía */
  --font-display: "Instrument Sans", "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-h1: clamp(2.7rem, 1.55rem + 4.6vw, 5.25rem);
  --fs-h2: clamp(2.05rem, 1.45rem + 2.4vw, 3.4rem);
  --fs-h3: 1.4rem;
  --fs-lead: clamp(1.08rem, 1rem + .35vw, 1.28rem);
  --fs-body: 1.0625rem;
  --fs-small: .875rem;

  /* Espacio y forma */
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 64px;
  --section-y: clamp(80px, 10vw, 140px);
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(22, 40, 46, .05), 0 12px 32px -16px rgba(22, 40, 46, .18);
  --ease: cubic-bezier(.22, .7, .2, 1);
}

@media (min-width: 960px) {
  :root { --header-h: 76px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.section { padding-block: var(--section-y); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--petrol);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

/* Foco visible y con contraste en fondos claros y oscuros */
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--on-dark); }
[tabindex="-1"]:focus { outline: none; }

/* ---------- Etiquetas y textos ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--terra);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  flex: none;
  background: currentColor;
}
.eyebrow--light { color: var(--on-dark); }
.eyebrow--light::before { background: var(--terra-light); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: var(--terra);
  color: var(--white);
  font: 600 1rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s, border-color .25s, color .25s, box-shadow .3s, transform .3s var(--ease);
}
.btn .icon { width: 20px; height: 20px; }
.btn:hover {
  background: var(--terra-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -14px rgba(146, 69, 38, .75);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn .icon-arrow { transition: transform .3s var(--ease); }
.btn:hover .icon-arrow { transform: translateX(3px); }

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .62);
  color: var(--white);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .12);
  border-color: var(--white);
  box-shadow: none;
}

.btn-lg { min-height: 58px; padding: 0 30px; font-size: 1.05rem; }

/* ---------- Cabecera ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--paper);
}

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(251, 249, 246, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled,
.site-header.menu-open {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(22, 40, 46, .45);
}
.site-header.menu-open { background: var(--paper); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  color: var(--petrol);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--petrol);
  color: var(--white);
}
.brand-mark .icon { width: 19px; height: 19px; stroke-width: 1.8; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.btn-call {
  min-height: 44px;
  padding: 0 16px;
  gap: 8px;
  background: var(--petrol);
  font-size: .95rem;
}
.btn-call .icon { width: 18px; height: 18px; }
.btn-call:hover { background: var(--petrol-deep); box-shadow: 0 12px 24px -14px rgba(30, 77, 88, .7); }
.call-long { display: none; }

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; }
.menu-toggle .i-close { display: none; }
.menu-open .menu-toggle .i-open { display: none; }
.menu-open .menu-toggle .i-close { display: block; }

.nav-list > li > a,
.nav-sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: 500 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.nav-sub-toggle .icon { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.nav-sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }

.submenu a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.submenu a .icon { width: 20px; height: 20px; color: var(--petrol); }
.submenu a:hover { background: var(--stone); color: var(--petrol); }
.submenu li:first-child a { font-weight: 600; color: var(--petrol); }

.nav-call { display: none; }
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(18, 38, 44, .38);
  animation: fade-in .25s ease both;
}

/* Menú móvil y tableta */
@media (max-width: 959.98px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100svh - var(--header-h) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 28px 40px -28px rgba(22, 40, 46, .45);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
  }
  .menu-open .main-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .25s, transform .3s var(--ease), visibility 0s;
  }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list > li > a,
  .nav-sub-toggle {
    width: 100%;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 4px;
    border-radius: 0;
    font-size: 1.15rem;
  }
  .nav-sub-toggle .icon { width: 20px; height: 20px; }
  .submenu { display: none; padding: 0 0 14px; }
  .nav-sub-toggle[aria-expanded="true"] + .submenu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .submenu li:first-child { grid-column: 1 / -1; }
  .submenu a { background: var(--stone); }
  .nav-call { display: block; margin-top: 24px; }
  .nav-call .btn { width: 100%; }
}

@media (max-width: 399.98px) {
  .call-short { display: none; }
  .btn-call { width: 46px; padding: 0; }
  .brand-name { font-size: 1rem; letter-spacing: .12em; }
}

/* Escritorio */
@media (min-width: 960px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
  }
  .brand { justify-self: start; margin-right: 0; }
  .header-actions { justify-self: end; }
  .menu-toggle { display: none; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-list > li > a:hover,
  .nav-sub-toggle:hover,
  .nav-sub-toggle[aria-expanded="true"] { background: var(--petrol-wash); color: var(--petrol); }
  .has-sub { position: relative; }
  .submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    width: 248px;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, -6px);
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .submenu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
  .nav-sub-toggle[aria-expanded="true"] + .submenu {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
    transition: opacity .2s, transform .25s var(--ease), visibility 0s;
  }
  .submenu li:first-child a { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 4px; }
}
@media (min-width: 1100px) {
  .call-long { display: inline; }
  .call-short { display: none; }
}

/* ---------- Inicio (portada) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, calc(92svh - var(--header-h)), 820px);
  overflow: hidden;
  background: var(--petrol-deep);
  color: var(--white);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 50%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top,
    rgba(var(--shade), .86) 0%,
    rgba(var(--shade), .6) 40%,
    rgba(var(--shade), .16) 74%,
    rgba(var(--shade), .06) 100%);
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  padding-block: 48px 56px;
}
.hero h1 {
  max-width: 11ch;
  color: var(--white);
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: -0.032em;
}
.hero-lead {
  max-width: 33rem;
  color: rgba(255, 255, 255, .9);
  font-size: var(--fs-lead);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

@media (max-width: 479.98px) {
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; }
}
@media (min-width: 900px) {
  .hero { align-items: center; }
  .hero-media img { object-position: 50% 50%; }
  .hero-shade {
    background: linear-gradient(90deg,
      rgba(var(--shade), .8) 0%,
      rgba(var(--shade), .58) 36%,
      rgba(var(--shade), .14) 66%,
      rgba(var(--shade), 0) 100%);
  }
  .hero-content { padding-block: 96px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content > * { animation: rise .9s var(--ease) both; }
  .hero-content > :nth-child(2) { animation-delay: .08s; }
  .hero-content > :nth-child(3) { animation-delay: .16s; }
  .hero-content > :nth-child(4) { animation-delay: .24s; }
  .hero-media img { animation: settle 1.8s var(--ease) both; }
}

/* ---------- Intro ---------- */
.intro-grid { display: grid; gap: 44px; align-items: center; }
.intro-figure {
  aspect-ratio: 1 / 1;
  max-width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.intro-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.intro-text { display: flex; flex-direction: column; gap: 22px; max-width: 34rem; min-width: 0; }
.intro-text h2 { font-size: var(--fs-h2); }

.pillars { margin-top: 10px; border-top: 1px solid var(--line); }
.pillars li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 1.06rem;
  font-weight: 500;
}
.pillar-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 12px;
  background: var(--petrol-wash);
  color: var(--petrol);
}
.pillar-icon .icon { width: 24px; height: 24px; }

@media (min-width: 900px) {
  .intro-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(48px, 7vw, 112px);
  }
  .intro-figure { aspect-ratio: 4 / 5; }
}

/* ---------- Servicios ---------- */
.services { background: var(--stone); }

.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(44px, 6vw, 76px);
}
.section-head-title { display: flex; flex-direction: column; gap: 18px; }
.section-head h2 { font-size: var(--fs-h2); }
.section-head .lead { max-width: 30rem; }
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 64px;
  }
}

.service-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px 32px;
}
@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 72px 36px; }
}

.service { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ph--service {
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}
.ph--service img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.service:hover .ph--service img { transform: scale(1.035); }

.service-body { display: flex; flex: 1; flex-direction: column; gap: 10px; }
.service-title { display: flex; align-items: center; gap: 12px; font-size: var(--fs-h3); }
.service-title .icon { width: 26px; height: 26px; color: var(--petrol); }
.service-body p { color: var(--ink-soft); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 44px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--terra);
  font-weight: 600;
  text-decoration: none;
}
.link-arrow .label {
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .35s var(--ease);
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.link-arrow:hover .label { background-size: 100% 1.5px; }
.link-arrow:hover .icon { transform: translateX(3px); }

.ai-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(44px, 6vw, 64px);
  color: var(--ink-soft);
  font-size: var(--fs-small);
}
.ai-note .icon { width: 18px; height: 18px; color: var(--petrol); }

/* ---------- Trabajos (fotografías reales) ---------- */
.section-head-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}
.real-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--petrol);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
}
.real-chip .icon { width: 18px; height: 18px; }

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 28px;
}
.work { min-width: 0; }

/* Tableta: 2 columnas. La primera foto ocupa todo el ancho y, si una foto
   se queda sola al final, también. */
@media (min-width: 640px) and (max-width: 899.98px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work--wide,
  .work:last-child:nth-child(even) { grid-column: 1 / -1; }
  .work:last-child:nth-child(even) .work-link { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
}
/* Ordenador: 3 fotos por fila bajo la foto ancha. Si al añadir fotos sobran
   una o dos al final, se reparten la fila para que no quede ningún hueco. */
@media (min-width: 900px) {
  .work-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 44px 28px; }
  .work { grid-column: span 2; }
  .work--wide,
  .work:last-child:nth-child(3n+2) { grid-column: 1 / -1; }
  .work:last-child:nth-child(3n+2) .work-link { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
  .work:last-child:nth-child(3n),
  .work:nth-last-child(2):nth-child(3n+2) { grid-column: span 3; }
}
.work figure { display: flex; flex-direction: column; gap: 14px; }

.work-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--petrol-wash);
  cursor: zoom-in;
}
@media (min-width: 640px) {
  .work--wide .work-link { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
}
.work-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.work--wide .work-link img { object-position: 50% 30%; }
.work-link:hover img { transform: scale(1.035); }

.work-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(251, 249, 246, .92);
  color: var(--petrol);
  box-shadow: 0 6px 16px -8px rgba(18, 38, 44, .5);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s, transform .3s var(--ease);
}
.work-zoom .icon { width: 18px; height: 18px; }
.work-link:hover .work-zoom,
.work-link:focus-visible .work-zoom { opacity: 1; transform: none; }
@media (hover: none) {
  .work-zoom { opacity: 1; transform: none; }
}

.work figcaption {
  max-width: 44rem;
  color: var(--ink-soft);
  font-size: .97rem;
  line-height: 1.5;
}
.work--wide figcaption { font-size: 1.02rem; }

/* Visor de fotos */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: calc(64px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  border: 0;
  overflow: hidden;
  background: var(--viewer);
  color: var(--on-dark);
}
.lightbox[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  animation: fade-in .25s ease both;
}
.lightbox::backdrop { background: transparent; }
.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 0;
}
.lb-img {
  display: block;
  width: auto;
  max-width: min(100%, 1400px);
  height: auto;
  max-height: calc(100% - 3.5rem);
  min-height: 0;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
}
.lb-caption {
  max-width: 46rem;
  color: var(--on-dark-soft);
  font-size: .97rem;
  line-height: 1.5;
  text-align: center;
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.lb-count {
  min-width: 4.5ch;
  color: var(--on-dark-soft);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.lb-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.lb-btn .icon { width: 22px; height: 22px; }
.lb-btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); }
.lb-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
}
.lightbox :focus-visible { outline-color: var(--on-dark); }

/* ---------- Franja de contacto ---------- */
.cta-band { background: var(--petrol); color: var(--on-dark); }
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  padding-block: clamp(64px, 8vw, 104px);
}
.cta-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cta-band h2 { color: var(--white); font-size: var(--fs-h2); }
.cta-band p { color: var(--on-dark-soft); font-size: var(--fs-lead); }
@media (max-width: 479.98px) {
  .cta-inner .btn { width: 100%; }
}
@media (min-width: 900px) {
  .cta-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; }
  .cta-inner .btn { flex: none; }
}

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: 48px; }
.contact-intro { display: flex; flex-direction: column; gap: 20px; max-width: 30rem; min-width: 0; }
.contact-intro h2 { font-size: var(--fs-h2); }

.contact-options { display: grid; gap: 20px; min-width: 0; }
@media (min-width: 640px) {
  .contact-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .contact-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 72px; align-items: start; }
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(24px, 3vw, 34px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--petrol-wash);
  color: var(--petrol);
}
.contact-icon .icon { width: 24px; height: 24px; }
.contact-card h3 {
  margin-top: 6px;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.contact-value {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + .7vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
.value-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--petrol);
  font: 600 .875rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.copy-btn .icon { width: 17px; height: 17px; }
.copy-btn .icon-done { display: none; }
.copy-btn:hover { background: var(--petrol-wash); border-color: var(--petrol-wash); }
.copy-btn.is-copied { background: var(--petrol); border-color: var(--petrol); color: var(--white); }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-done { display: block; }

.contact-actions { margin-top: auto; padding-top: 10px; }
.contact-actions .btn { width: 100%; }

/* ---------- Pie de página ---------- */
.site-footer {
  padding-top: clamp(56px, 7vw, 88px);
  background: var(--petrol-night);
  color: var(--on-dark-soft);
}
.footer-grid { display: grid; gap: 40px; padding-bottom: 48px; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
}
.brand--light { color: var(--white); }
.brand--light .brand-mark { background: rgba(255, 255, 255, .1); }
.legal-name { max-width: 30ch; margin-top: 18px; font-size: .95rem; line-height: 1.5; }
.footer-label {
  margin-bottom: 10px;
  color: var(--on-dark-muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.footer-links { display: flex; flex-direction: column; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--on-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer-links a .icon { width: 18px; height: 18px; color: var(--on-dark-muted); }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: var(--on-dark-muted);
  font-size: var(--fs-small);
}

/* ---------- Imágenes pendientes ----------
   Si falta un archivo en /img, se muestra este hueco en lugar de una imagen rota. */
.ph { background: var(--petrol-wash); }
.ph:not(.hero-media) { position: relative; }
.ph.is-missing img { display: none; }
.ph-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: linear-gradient(140deg, #E9EFEF 0%, #DAE5E5 100%);
  color: var(--petrol);
  text-align: center;
}
.ph-fallback .icon { width: 44px; height: 44px; stroke-width: 1.2; opacity: .75; }
.ph-fallback strong { font-size: .875rem; font-weight: 600; }
.ph-fallback code {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
}
.ph--hero .ph-fallback {
  align-items: flex-end;
  justify-content: flex-start;
  background: radial-gradient(120% 90% at 78% 28%, #2F6672 0%, #163B44 58%, #12262C 100%);
  color: rgba(255, 255, 255, .7);
}
.ph--hero .ph-fallback .icon { display: none; }
.ph--hero .ph-fallback code { color: rgba(255, 255, 255, .6); }

/* ---------- Animaciones ---------- */
[data-reveal] {
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
[data-reveal].is-pending { opacity: 0; transform: translateY(24px); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes settle {
  from { transform: scale(1.05); }
  to { transform: scale(1); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .service:hover .ph--service img { transform: none; }
}
