/* Renueva y Colorea. Hoja de estilos única. */

@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colores tomados del logo y de las paredes de micrometal hechas por el propio equipo */
  --noche: #0B1530;      /* fondo del logo, cabecera y contacto */
  --noche-2: #070E22;    /* pie */
  --azul: #12306B;       /* azul del logo */
  --tinta: #13213F;      /* texto sobre claro */
  --gris: #4A5470;       /* texto secundario sobre claro */
  --yeso: #F2F2EE;       /* fondo claro, pared recién pintada */
  --blanco: #FFFFFF;
  --oro: #E2A00E;        /* dorado del logo: acciones */
  --oro-claro: #F0B935;
  --salvia: #5E6E63;     /* estuco verde del salón */
  --rosa: #D5C2C4;       /* estuco rosa del pasillo, aclarado */
  --wa: #25D366;         /* verde oficial de WhatsApp */
  --wa-hover: #1EBE5D;
  --wa-ink: #111B21;     /* texto oscuro de WhatsApp: el blanco sobre este verde no se lee */

  --gutter: clamp(16px, 4vw, 48px);
  --fs-display: clamp(min(2.125rem, 12vw), 1rem + 4.4vw, 4.75rem);
  --fs-h2: clamp(min(2rem, 10vw), 1.35rem + 2.4vw, 3.5rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  --fs-small: 0.9375rem;
  --section: clamp(80px, 9vw, 150px);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--azul) var(--yeso);
}

body {
  margin: 0;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  color: var(--tinta);
  background: var(--yeso);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

h1, h2, h3 {
  font-family: "Young Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; }

::selection { background: var(--oro); color: var(--noche); }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 4px; }
:where(.hero, .single, .contact, .site-footer, .mobile-bar) :focus-visible { outline-color: var(--oro); }
.finishes :focus-visible { outline-color: #fff; }

[id] { scroll-margin-top: 16px; }

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 20em) { .nowrap { white-space: nowrap; } }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.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 {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--oro);
  color: var(--noche);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.lead { font-size: var(--fs-lead); line-height: 1.45; max-width: 34em; text-wrap: pretty; }

/* Iconos y botones */
.icon { width: 1.25em; height: 1.25em; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 1.4em;
  border: 0;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease-out);
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(3, 8, 20, 0.22); }
  .btn-ghost:hover { box-shadow: inset 0 0 0 2px #fff, 0 10px 24px rgba(3, 8, 20, 0.22); }
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn-gold { background: var(--oro); color: var(--noche); }
.btn-gold:hover { background: var(--oro-claro); }
.btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px #fff; background: rgba(255, 255, 255, 0.06); }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { background: var(--wa-hover); }
.btn-light { background: #fff; color: var(--noche); }
.btn-light:hover { background: var(--yeso); }
.btn[disabled] { opacity: 0.7; cursor: progress; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Barra superior: teléfono e idiomas */
.topbar { background: #fff; color: var(--tinta); font-size: 0.9375rem; }
.topbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; min-height: 46px; }
.topbar-call { display: inline-flex; align-items: center; gap: 8px; color: var(--tinta); font-weight: 650; text-decoration: none; white-space: nowrap; }
.topbar-call:hover { text-decoration: underline; }
.lang { display: flex; gap: 4px; }
.lang a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 9px;
  border-radius: 8px;
  color: var(--tinta);
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}
.lang a:hover { background: rgba(18, 48, 107, 0.07); color: var(--tinta); }
.lang a[aria-current="page"] { background: rgba(18, 48, 107, 0.11); color: var(--tinta); }
.flag { width: 24px; height: 16px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(19, 33, 63, 0.18); }
.legal-lang { font-weight: 400; color: rgba(255, 255, 255, 0.64); }

/* Cabecera */
.site-header { position: relative; z-index: 20; background: #fff; color: var(--tinta); box-shadow: inset 0 -1px 0 rgba(19, 33, 63, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: center; gap: 24px; padding-block: 12px; }
.brand { display: block; flex: none; }
.brand img { width: 184px; }
.page-simple .brand img { width: 150px; }
.main-nav { display: none; }
.header-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--tinta);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.header-call:hover { text-decoration: underline; }
.header-cta { display: none; margin-left: auto; }

/* Portada */
.hero { background: var(--noche); color: #fff; padding-block: 28px 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.hero h1 { font-size: var(--fs-display); line-height: 1.02; }
.hero .lead { margin-top: 24px; color: #D9DEEA; }
.hero .actions { margin-top: 32px; }
.hero-note { margin-top: 24px; max-width: 34em; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.74); }
.hero-figure { margin-inline: calc(-1 * var(--gutter)); }
.hero-figure figcaption {
  padding: 12px var(--gutter) 28px;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.74);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.035); } to { transform: none; } }
.js .hero-copy > * { animation: rise 0.75s var(--ease-out) both; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.js .hero-figure .ba-hero .ba-img { animation: settle 1.4s var(--ease-out) both; }

/* Comparador antes / después */
.ba {
  --pos: 50%;
  --r: 0.75;
  --h: min(76svh, 820px);
  position: relative;
  width: calc(var(--h) * var(--r));
  max-width: 100%;
  aspect-ratio: var(--r);
  overflow: hidden;
  border-radius: 12px;
  background: #1A2340;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
/* Con JavaScript, la portada empieza en el "antes" y el rodillo la pinta (main.js) */
.js .ba[data-intro] { --pos: 100%; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
/* El separador es un rodillo de pintura: al arrastrarlo, "pinta" el después */
.ba-handle {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: var(--pos);
  width: 12px;
  margin-left: -6px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 2px, rgba(255, 255, 255, 0) 2px 5px),
    linear-gradient(90deg, #9C6604 0%, #E2A00E 28%, #FFD979 50%, #E2A00E 72%, #9C6604 100%);
  box-shadow: 0 0 0 1px rgba(11, 21, 48, 0.35), 0 8px 22px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}
.ba-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border-radius: 50%;
  background: var(--noche) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E2A00E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 0 0 3px var(--oro), 0 8px 20px rgba(0, 0, 0, 0.38);
  transition: transform 0.2s var(--ease-out);
}
.ba:active .ba-handle::after { transform: scale(0.92); }
.ba-tag {
  position: absolute;
  top: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(11, 21, 48, 0.78);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  pointer-events: none;
}
.ba-tag-before { left: 12px; }
.ba-tag-after { right: 12px; }
.ba { margin-inline: auto; }
.ba-hero { width: 100%; max-height: 80svh; border-radius: 0; }
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.ba { cursor: ew-resize; }
.ba:has(.ba-range:focus-visible) { outline: 3px solid var(--azul); outline-offset: 4px; }
.hero .ba:has(.ba-range:focus-visible) { outline-color: var(--oro); }

/* Secciones */
.section { padding-block: var(--section); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { max-width: 36em; color: var(--gris); }

/* Antes y después */
.projects-list { display: none; }
.js .projects-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-tab {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 6px 14px 6px 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background-color 0.2s ease;
}
.project-tab img { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; flex: none; }
.project-tab strong {
  display: block;
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.2;
}
.project-tab > span > span { display: none; }
.project-tab { background: rgba(255, 255, 255, 0.45); }
.project-tab:hover { background: rgba(255, 255, 255, 0.8); }
.project-tab[aria-selected="true"] { background: var(--blanco); }
.project-tab { position: relative; }
.project-tab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--oro);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out);
}
.project-tab[aria-selected="true"]::after { transform: scaleX(1); }
.projects-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.project { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.project-panel + .project-panel { margin-top: 48px; }
.js .project-panel + .project-panel { margin-top: 0; }
.js .project-panel[hidden] { display: none; }
.project figcaption { max-width: 40em; }
.project figcaption strong { font-weight: 700; }

/* Un solo responsable */
.single { background: var(--azul); color: #fff; }
.single-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }
.single .lead { margin-top: 24px; color: #E3E8F4; }
.single-copy p + p { margin-top: 20px; max-width: 36em; color: rgba(255, 255, 255, 0.86); }
.agenda-intro { margin-bottom: 12px; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.78); }
.agenda-list li {
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(min(1.75rem, 9vw), 1.2rem + 2vw, 2.75rem);
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.6);
}
.agenda-list s { position: relative; display: inline-block; text-decoration: none; }
.agenda-list s::after {
  content: "";
  position: absolute;
  left: -0.08em;
  right: -0.08em;
  top: 54%;
  height: max(3px, 0.07em);
  background: var(--oro);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}
.agenda.is-armed s::after { transform: scaleX(0); }
.agenda.is-armed li.is-struck s::after { transform: scaleX(1); }
.agenda-one {
  margin-top: 20px;
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(min(1.75rem, 9vw), 1.2rem + 2vw, 2.75rem);
  line-height: 1.2;
}
.agenda-label { display: block; }
.agenda-one a { color: var(--oro); text-decoration: none; }
.agenda-one a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Qué hacemos */
.service-row { display: grid; gap: 32px; align-items: center; }
.service-row + .service-row { margin-top: clamp(72px, 8vw, 128px); }
.service-text { order: -1; }
.service-text p { margin-top: 16px; max-width: 34em; }
.list-cols { display: grid; gap: 10px 32px; margin-top: 24px; }
.list-cols li { position: relative; padding-left: 22px; line-height: 1.4; }
.list-cols li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--oro);
}
.list-note { margin-top: 20px; max-width: 34em; color: var(--gris); }
.media-pair { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; align-items: end; }
.media-pair img { width: 100%; object-fit: cover; }
.media-pair .m-tall { aspect-ratio: 4 / 5; }
.media-pair .m-wide { aspect-ratio: 4 / 3; margin-bottom: 18%; }
.media-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.media-trio img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.media-trio img:nth-child(2) { transform: translateY(14%); }

/* Pintura y acabados */
.finishes { background: var(--salvia); color: #fff; }
.finishes-grid { display: grid; gap: 48px; align-items: center; }
.finishes .lead { margin-top: 24px; color: #EEF2EF; }
.finish-list li::before { background: #fff; }
.swatches { display: grid; gap: 20px; }
.swatch-wall { position: relative; overflow: hidden; border-radius: 8px; cursor: crosshair; touch-action: pan-y; }
.swatch img { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; transition: transform 0.6s var(--ease-out), filter 0.6s ease; }
.swatch-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--lx, 30%) var(--ly, 40%), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 38%),
    linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22));
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.swatch-wall.is-lit::after { opacity: 1; }
.swatch-wall.is-lit img { transform: scale(1.06); filter: contrast(1.15) saturate(1.05); }
.swatch figcaption, .swatch-note { margin-top: 8px; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.88); }

/* Cómo trabajamos */
.process h2 { margin-bottom: clamp(32px, 4vw, 56px); }
.steps-wrap { position: relative; }
.steps { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; counter-reset: paso; }
.steps li { position: relative; padding-left: 76px; counter-increment: paso; }
.steps li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.625rem;
  line-height: 1;
  color: var(--azul);
  background: var(--yeso);
  box-shadow: inset 0 0 0 2px var(--azul);
  transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.steps li.is-reached::before { background: var(--oro); color: var(--noche); box-shadow: inset 0 0 0 2px var(--oro); }
.steps h3 { padding-top: 14px; }
.steps p { margin-top: 10px; max-width: 30em; }
/* Línea que se rellena al bajar por los pasos (main.js la coloca entre el primer y el último número) */
.steps-line { display: none; }
.js .steps-line {
  display: block;
  position: absolute;
  left: var(--lx, 27px);
  top: var(--ly, 28px);
  width: var(--lw, 2px);
  height: var(--lh, 0);
  background: rgba(18, 48, 107, 0.2);
}
.steps-line span {
  position: absolute;
  inset: 0;
  background: var(--oro);
  transform-origin: left top;
  transform: scaleY(var(--p, 0));
}
.steps-wrap.is-row .steps-line span { transform: scaleX(var(--p, 0)); }

/* Opiniones: cada opinión es una carta de color, con los colores de sus paredes de micrometal y de su logo */
.reviews { background: var(--rosa); }
.reviews-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); }
.marquee-toggle {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--noche);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s var(--ease-out);
}
.marquee-toggle[hidden] { display: none; }
.marquee-toggle:hover { background: var(--azul); }
.marquee-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.marquee-toggle .i-play { display: none; fill: currentColor; stroke: none; }
.marquee-toggle[aria-pressed="true"] .i-pause { display: none; }
.marquee-toggle[aria-pressed="true"] .i-play { display: block; }

/* Sin movimiento (o sin JavaScript): fila que se desliza con el dedo */
.marquee { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding-block: 6px 22px; }
.marquee-track { display: flex; width: max-content; }
.marquee-set { display: flex; align-items: stretch; gap: 20px; padding-inline: var(--gutter); }
/* Con movimiento: banda continua; se para al pasar el ratón, al tocarla o con el botón */
.marquee.is-running { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.marquee.is-running .marquee-set { padding-inline: 0 20px; }
.marquee.is-carousel { scroll-behavior: smooth; scrollbar-width: none; }
.marquee.is-carousel::-webkit-scrollbar { display: none; }
.marquee.is-carousel .marquee-track { padding-inline: var(--gutter); }
.marquee.is-carousel .marquee-set { padding-inline: 0 20px; }
.marquee.is-running .marquee-track { animation: marquee var(--marquee-dur, 80s) linear infinite; }
.marquee.is-paused .marquee-track, .marquee.is-held .marquee-track, .marquee.is-offscreen .marquee-track { animation-play-state: paused; }
@media (hover: hover) { .marquee.is-running:hover .marquee-track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* position: relative: el texto oculto de la puntuación (.sr-only) queda dentro de la carta y no ensancha la página */
.chip { position: relative; flex: none; width: 290px; max-width: calc(100vw - 2 * var(--gutter)); scroll-snap-align: start; }
.chip-s { width: 270px; }
.chip-l { width: 330px; }
.chip figure {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 rgba(19, 33, 63, 0.06), 0 14px 34px rgba(19, 33, 63, 0.14);
}
.chip blockquote { flex: 1; display: flex; align-items: center; margin: 0; padding: 26px 24px; background: var(--chip-bg); color: var(--chip-ink); }
.chip blockquote p { font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
.chip-s blockquote p { font-family: "Young Serif", Georgia, serif; font-size: 1.5rem; line-height: 1.2; }
.chip-m blockquote p { font-family: "Young Serif", Georgia, serif; font-size: 1.1875rem; line-height: 1.35; }
.chip figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 92px; padding: 14px 18px 16px; background: #fff; color: var(--tinta); }
.chip-who { min-width: 0; line-height: 1.3; }
.chip-who strong { display: block; font-weight: 700; }
.chip-who span { display: block; font-size: 0.875rem; color: var(--gris); }
.chip-score { flex: none; display: grid; justify-items: end; gap: 3px; font-size: 0.875rem; font-weight: 700; }
.stars {
  display: block;
  width: 80px;
  height: 15px;
  background: linear-gradient(90deg, var(--oro) calc(var(--s, 1) * 100%), #D6D3CB 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cpath d='M8 0l2.35 4.76 5.25.77-3.8 3.7.9 5.23L8 11.99l-4.7 2.47.9-5.23L.4 5.53l5.25-.77z'/%3E%3C/svg%3E") 0 0 / 16px 15px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cpath d='M8 0l2.35 4.76 5.25.77-3.8 3.7.9 5.23L8 11.99l-4.7 2.47.9-5.23L.4 5.53l5.25-.77z'/%3E%3C/svg%3E") 0 0 / 16px 15px repeat-x;
}
.chip-oro { --chip-bg: var(--oro); --chip-ink: var(--noche); }
.chip-azul { --chip-bg: var(--azul); --chip-ink: #fff; }
.chip-salvia { --chip-bg: var(--salvia); --chip-ink: #fff; }
.chip-noche { --chip-bg: var(--noche); --chip-ink: #fff; }
.chip-yeso { --chip-bg: var(--yeso); --chip-ink: var(--tinta); }
.chip-yeso figcaption { box-shadow: inset 0 1px 0 rgba(19, 33, 63, 0.08); }
.reviews-source { margin-top: clamp(24px, 3vw, 40px); max-width: 52em; font-size: var(--fs-small); }

/* Zona */
.zone-grid { display: grid; gap: 40px; align-items: center; }
.zone-copy h2 + p { margin-top: 16px; }
.towns { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-block: 20px; }
.towns li { padding: 6px 16px; border-radius: 999px; background: var(--blanco); font-weight: 600; transition: background-color 0.2s ease, color 0.2s ease; }
.towns li.is-hot { background: var(--oro); color: var(--noche); }
.map { background: #E6E7E1; border-radius: 12px; overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.map .ring { fill: none; stroke: rgba(18, 48, 107, 0.28); stroke-width: 2; stroke-dasharray: 6 9; }
.map .ring-label { font: 600 24px "Figtree", sans-serif; fill: rgba(18, 48, 107, 0.62); text-anchor: middle; }
.map .town circle { fill: var(--azul); transform-box: fill-box; transform-origin: center; transition: transform 0.25s var(--ease-out), fill 0.2s ease; }
.map .town.is-hot circle { fill: var(--oro); transform: scale(1.7); }
.map .town-home.is-hot circle { transform: scale(1.25); }
.map .town text { font: 650 32px "Figtree", sans-serif; fill: var(--tinta); text-anchor: middle; }
.map .town-home circle { fill: var(--oro); stroke: var(--azul); stroke-width: 5; }
.map .town-home text { font: 400 42px "Young Serif", Georgia, serif; }
.map .town-left text { text-anchor: end; dominant-baseline: central; }
@media (max-width: 639px) {
  .map .town text { font-size: 44px; }
  .map .town-home text { font-size: 56px; }
  .map .ring-label { font-size: 34px; }
  .map .town-below text { transform: translateY(14px); }
}

/* Preguntas */
.faq { background: var(--blanco); }
.faq-wrap { display: grid; gap: 32px; }
.faq-more { margin-top: 18px; max-width: 22em; color: var(--gris); }
.faq-more a { color: var(--tinta); font-weight: 650; text-decoration-color: var(--oro); text-decoration-thickness: 2px; }
.faq-more a:hover { color: var(--azul); }
.faq-list { display: grid; gap: 10px; }
.faq details { border-radius: 14px; background: var(--yeso); overflow: hidden; }
.faq summary {
  position: relative;
  padding: 20px 60px 20px 22px;
  font-weight: 650;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
  border-radius: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background:
    linear-gradient(var(--azul), var(--azul)) center / 16px 2.5px no-repeat,
    linear-gradient(var(--azul), var(--azul)) center / 2.5px 16px no-repeat;
  transition: transform 0.25s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: rgba(18, 48, 107, 0.05); }
.faq summary:focus-visible { outline-offset: -3px; }
.faq-a { padding: 0 22px 22px; }
.faq-a p { max-width: 46em; }

/* Contacto */
.contact { background: var(--noche); color: #fff; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: start; }
.contact .lead { margin-top: 20px; color: #D9DEEA; }
.contact .actions { margin-top: 28px; }
.contact-data { display: grid; gap: 16px; margin-top: 40px; }
.contact-data dt { font-size: var(--fs-small); color: rgba(255, 255, 255, 0.74); }
.contact-data dd { font-weight: 650; overflow-wrap: anywhere; }
.contact-data a { color: #fff; }
.contact-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: clamp(20px, 3vw, 40px);
  border-radius: 18px;
  background: #15234D;
  container-type: inline-size;
}
.form-intro { font-family: "Young Serif", Georgia, serif; font-size: var(--fs-h3); line-height: 1.2; }
.field label { display: block; margin-bottom: 6px; font-weight: 650; font-size: 0.9375rem; }
.optional { font-weight: 400; color: rgba(255, 255, 255, 0.74); }
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--tinta);
  font: inherit;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312306B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--oro); outline: none; }
.field [aria-invalid="true"] { border-color: #FF9E80; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@container (min-width: 470px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field-check { display: flex; align-items: flex-start; gap: 12px; font-size: 0.9375rem; }
.field-check input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--oro); }
.field-check input[aria-invalid="true"] { outline: 2px solid #FF9E80; outline-offset: 2px; }
.field-check + .field-error { margin-top: -8px; }
.field-check a { color: var(--oro); }
.field-error { margin-top: 6px; color: #FFD58A; font-weight: 650; font-size: 0.9375rem; }
.form-legal { font-size: 0.8125rem; line-height: 1.5; color: rgba(255, 255, 255, 0.74); }
.form-legal a { color: var(--oro); }
.btn-submit { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Pie */
.site-footer { background: var(--noche-2); color: rgba(255, 255, 255, 0.84); padding-block: 64px 104px; }
.footer-name {
  margin-bottom: 40px;
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(1.75rem, 1.2rem + 1.2vw, 2.375rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
}
.footer-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.footer-cols img { width: 208px; padding: 12px; margin-bottom: 16px; background: #fff; border-radius: 12px; }
.footer-title { margin-bottom: 8px; font-weight: 700; color: #fff; }
.footer-cols a { color: rgba(255, 255, 255, 0.88); }
.footer-cols a:hover { color: #fff; }
.copy { margin-top: 48px; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.64); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-bottom .copy { margin-top: 0; }
.credit { font-size: var(--fs-small); color: rgba(255, 255, 255, 0.64); }
.credit a { color: rgba(255, 255, 255, 0.88); text-decoration-color: rgba(226, 160, 14, 0.7); }
.credit a:hover { color: var(--oro); }

/* Botones flotantes: WhatsApp en todas las pantallas, llamada en móvil y tableta */
.floaters {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out), visibility 0s linear 0s;
}
/* main.js los oculta mientras se ve el texto de la portada (ya tiene sus botones) o la sección de
   contacto (botones y formulario). Con JavaScript empiezan ocultos para no parpadear al cargar;
   si main.js no llegara a ejecutarse, aparecen a los 3 segundos. */
.floaters.is-hidden { opacity: 0; transform: translateY(16px); visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s var(--ease-out), visibility 0s linear 0.25s; }
.js .floaters:not(.is-ready) { opacity: 0; visibility: hidden; animation: floaters-failsafe 0s 3s forwards; }
@keyframes floaters-failsafe { to { opacity: 1; visibility: visible; } }
.float-btn {
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s var(--ease-out), background-color 0.2s ease;
}
.float-btn:hover { transform: scale(1.06); }
.float-btn:focus-visible { outline: 3px solid var(--noche); outline-offset: 3px; box-shadow: 0 0 0 3px #fff, 0 8px 24px rgba(0, 0, 0, 0.28); }
.float-wa { width: 60px; height: 60px; background: var(--wa); color: #fff; }
.float-wa:hover { background: var(--wa-hover); }
.float-wa .icon { width: 32px; height: 32px; }
.float-call { width: 52px; height: 52px; background: var(--azul); color: #fff; }
.float-call .icon { width: 24px; height: 24px; }

/* Aviso de cookies (solo se muestra si se activa la analítica) */
.consent {
  position: fixed;
  left: 12px;
  right: 88px;
  bottom: 16px;
  z-index: 40;
  max-width: 560px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  color: var(--tinta);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.consent p { font-size: 0.9375rem; }
.consent .actions { margin-top: 14px; }
.consent .btn { min-height: 44px; }
.consent .btn-outline { background: var(--yeso); color: var(--tinta); }

/* Páginas legales y auxiliares */
.page-simple { background: var(--yeso); }
.page-simple main { padding-block: clamp(48px, 7vw, 96px); }
.legal { max-width: 46em; }
.legal h1 { font-size: var(--fs-h2); margin-bottom: 24px; }
.legal h2 { font-size: var(--fs-h3); margin: 40px 0 12px; }
.legal p, .legal li { margin-top: 12px; }
.legal ul { list-style: disc; padding-left: 1.4em; }
.legal .pending { background: #FFE9B3; padding: 0 4px; border-radius: 4px; }
.legal .updated { color: var(--gris); font-size: var(--fs-small); }
.back-link { display: inline-block; margin-top: 32px; font-weight: 650; }
.thanks h1 { font-size: var(--fs-display); max-width: 14ch; }
.thanks .lead { margin-top: 24px; }
.thanks .actions { margin-top: 32px; }

/* ≥ 640 px */
@media (min-width: 640px) {
  .list-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ≥ 768 px */
@media (min-width: 768px) {
  .chip { width: 340px; }
  .chip-s { width: 290px; }
  .chip-l { width: 430px; }
  .chip blockquote { padding: 30px 28px; }
  .chip-s blockquote p { font-size: 1.75rem; }
  .chip-m blockquote p { font-size: 1.3125rem; }
  .chip blockquote p { font-size: 1.0625rem; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .swatches { grid-template-columns: 1fr 1fr; }
  .swatch-note { grid-column: 1 / -1; }
}

/* ≥ 1024 px */
@media (min-width: 1024px) {
  body { font-size: 1.125rem; }
  .header-inner { justify-content: flex-start; gap: 32px; padding-block: 10px; }
  .brand img, .page-simple .brand img { width: 184px; }
  .header-cta { display: inline-flex; min-height: 46px; white-space: nowrap; }
  .site-footer { padding-block: 80px 48px; }
  .footer-cols { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); }
  .float-call { display: none; }
  .floaters { right: 24px; bottom: 24px; }
  .consent { left: 24px; right: auto; bottom: 24px; }
  .ba-hero { width: calc(var(--h) * var(--r)); max-height: none; }

  .hero { padding-block: clamp(40px, 5vh, 72px) clamp(56px, 8vh, 104px); }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(40px, 4vw, 72px);
  }
  .hero h1 { font-size: clamp(3rem, 4.4vw, 4.25rem); }
  .hero-figure { margin-inline: 0; }
  .hero-figure figcaption { padding: 12px 0 0; }
  .ba-hero { --h: min(66svh, 680px); max-width: 40vw; border-radius: 16px; }

  /* La barra superior se va con el scroll; la cabecera se queda, se oculta al bajar y vuelve al subir */
  .site-top { position: sticky; top: calc(-1 * var(--topbar-h, 46px)); z-index: 30; }
  .site-header { transition: background-color 0.3s ease, box-shadow 0.3s ease; }
  .site-top.is-stuck .site-header {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    backdrop-filter: blur(12px) saturate(1.3);
    box-shadow: 0 10px 30px rgba(3, 8, 20, 0.14);
  }
  html { scroll-padding-top: 140px; }
  [id] { scroll-margin-top: 0; }
  .project-tab::after { left: 0; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; transform: scaleY(0); }
  .project-tab[aria-selected="true"]::after { transform: scaleY(1); }

  .section-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; }

  .projects-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: start; }
  .js .projects-list {
    flex-direction: column;
    gap: 6px;
    overflow: visible;
    margin: 0;
    padding: 0;
    position: sticky;
    top: calc(24px + var(--header-offset, 0px));
    transition: top 0.35s var(--ease-out);
  }
  .js .projects-list { flex-wrap: nowrap; }
  .project-tab { padding: 10px; min-height: 0; background: transparent; }
  .project-tab img { width: 68px; height: 68px; }
  .project-tab strong { font-size: 1.25rem; }
  .project-tab > span > span { display: block; margin-top: 2px; font-size: 0.9375rem; line-height: 1.35; color: var(--gris); }
  .project .ba { --h: min(76svh, 640px); margin-inline: 0; }

  .single-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(56px, 7vw, 120px); align-items: center; }

  .service-row { grid-template-columns: 7fr 5fr; gap: clamp(48px, 6vw, 96px); }
  .service-row .service-text { order: 0; }
  .service-row-alt { grid-template-columns: 5fr 7fr; }

  .finishes-grid { grid-template-columns: 7fr 5fr; gap: clamp(56px, 7vw, 120px); }

  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
  .steps li { padding-left: 0; }
  .steps li::before { position: relative; }
  .steps h3 { padding-top: 0; margin-top: 20px; }

  .zone-grid { grid-template-columns: 5fr 7fr; gap: clamp(48px, 6vw, 104px); }

  .faq-wrap { grid-template-columns: 4fr 8fr; gap: clamp(48px, 6vw, 104px); align-items: start; }
  .faq-intro { position: sticky; top: calc(24px + var(--header-offset, 0px)); transition: top 0.35s var(--ease-out); }

  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 104px); }
}


/* ≥ 1200 px: menú completo. Umbral en em (75em): con la letra agrandada en el navegador, solo aparece si cabe */
@media (min-width: 75em) {
  .main-nav { display: block; margin-left: auto; }
  .main-nav ul { display: flex; gap: 28px; }
  .main-nav a { color: var(--tinta); font-weight: 550; font-size: 1rem; text-decoration: none; white-space: nowrap; }
  .main-nav a:hover { color: var(--azul); text-decoration: underline; }
  .main-nav a[aria-current="location"] { color: var(--azul); text-decoration: underline; text-decoration-color: var(--oro); text-decoration-thickness: 2px; text-underline-offset: 0.5em; }
  .header-cta { margin-left: 0; }
}

/* ≥ 1280 px: el texto de cada obra va al lado de la foto */
@media (min-width: 1280px) {
  .project { grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 32px; }
  .project.is-wide { grid-template-columns: minmax(0, 1fr); }
  .project figcaption { padding-bottom: 8px; }
}

/* ≤ 360 px (22.5em): números de los pasos más pequeños */
@media (max-width: 22.5em) {
  .steps li { padding-left: 60px; }
  .steps li::before { width: 44px; height: 44px; font-size: 1.3125rem; }
  .steps h3 { padding-top: 8px; }
}

/* ≤ 400 px (25em): banderas sin código de idioma */
@media (max-width: 25em) {
  .lang a > span[aria-hidden="true"] { display: none; }
  .lang a { padding-inline: 7px; }
}

/* Móvil en horizontal: botones flotantes en fila y más pequeños, para no tapar el contenido */
@media (max-height: 500px) and (orientation: landscape) {
  .floaters { flex-direction: row; gap: 10px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); }
  .float-wa { width: 50px; height: 50px; }
  .float-wa .icon { width: 27px; height: 27px; }
  .float-call { width: 46px; height: 46px; }
  .float-call .icon { width: 21px; height: 21px; }
}

/* Pantallas grandes: más ancho útil */
@media (min-width: 1600px) {
  .wrap { max-width: 1440px; }
}

/* ≤ 340 px (21.25em), p. ej. pantalla exterior de un móvil plegable: barra superior más compacta */
@media (max-width: 21.25em) {
  .topbar-inner { column-gap: 8px; }
  .lang { gap: 2px; }
  .lang a { padding-inline: 5px; }
}
/* ≤ 380 px (23.75em): en las páginas simples, el teléfono de la cabecera queda solo con el icono */
@media (max-width: 23.75em) {
  .header-call { min-width: 44px; min-height: 44px; justify-content: center; }
  .header-call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .ba[data-intro] { --pos: 50%; }
  .js .hero-copy > *, .js .hero-figure .ba-hero .ba-img, .marquee-track { animation: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Portada: 4:5 en móvil, 3:4 en escritorio */
.ba-hero { --r: 0.8; }
@media (min-width: 1024px) { .ba-hero { --r: 0.75; } }

/* Pie simple de páginas auxiliares */
.page-simple { min-height: 100svh; display: flex; flex-direction: column; }
.page-simple main { flex: 1; }
.page-simple .header-call { margin-left: auto; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer-simple { padding-block: 40px; }
.site-footer-simple p { font-size: var(--fs-small); }
.site-footer-simple a { color: rgba(255, 255, 255, 0.88); }
.site-footer-simple .copy { margin-top: 12px; }
.site-footer-simple .copy { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.page-simple .btn-light { box-shadow: inset 0 0 0 2px var(--tinta); background: transparent; color: var(--tinta); }
.page-simple .btn-light:hover { background: #fff; }

/* Más trabajos: parejas antes / después de obras con encuadres distintos (sin deslizador) */
.more-works { margin-top: clamp(56px, 7vw, 104px); }
.more-intro { margin-top: 8px; color: var(--gris); }
.pairs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px 32px; margin-top: 28px; }
.pair { margin: 0; }
.pair-imgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; border-radius: 12px; overflow: hidden; }
.pair-img { position: relative; }
.pair-img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.pair-tall .pair-img img { aspect-ratio: 3 / 4; }
.pair-img .ba-tag { top: 8px; }
.pair-img .ba-tag-before { left: 8px; }
.pair-img .ba-tag-after { right: 8px; }
.pair figcaption { margin-top: 12px; max-width: 40em; }
.pair figcaption strong { font-weight: 700; }
@media (min-width: 768px) {
  .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair-tall { grid-column: 1 / -1; max-width: calc(50% - 16px); }
}

/* Confirmación del formulario, en la misma página (el envío sigue en segundo plano) */
.form-done { display: grid; gap: 14px; justify-items: start; align-content: start; padding: clamp(20px, 3vw, 40px); border-radius: 18px; background: #15234D; }
.form-done h3 { font-size: var(--fs-h3); outline-offset: 4px; }
.form-done p { color: #D9DEEA; max-width: 34em; }
.form-done h3::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; margin-right: 0.45em; border-radius: 50%; background: var(--oro); vertical-align: 0.08em; }
.form-done[data-state="sending"] h3::before { animation: pulse 1.1s ease-in-out infinite; }
.form-done[data-state="ok"] h3::before { background: var(--wa); }
.form-done[data-state="fail"] h3::before { background: #F07167; }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .form-done[data-state="sending"] h3::before { animation: none; } }
