/* ==========================================================================
   REFORMAS HUELVA · J. VILLAVERDE
   Sistema: blanco cal + azul atlántico + terracota de teja.
   Bricolage Grotesque (titulares) + Instrument Sans (texto).
   ========================================================================== */

:root {
  /* Color */
  --mar: #0E2A3F;
  --mar-2: #133650;
  --mar-3: #1B4262;
  --line-dark: rgba(255, 255, 255, .13);
  --line-dark-2: rgba(255, 255, 255, .24);
  --on-dark: #F4F1EA;
  --on-dark-2: #AEBBC7;

  --cal: #F7F4EE;
  --cal-2: #EFE9DF;
  --arena: #E7DDCC;
  --ink: #13202D;
  --ink-2: #3A4652;
  --muted: #64707B;
  --line: rgba(19, 32, 45, .14);

  --teja: #B94E26;
  --teja-2: #A4431F;
  --teja-l: #E8906A;
  --teja-soft: #F6E3D8;
  --wa: #1FAF55;
  --wa-2: #178F45;
  --danger: #B3261E;
  --star: #F2A93B;

  /* Tipografía */
  --f-head: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Medidas */
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1280px;
  --sec: clamp(80px, 10vw, 148px);
  --r: 8px;
  --r-lg: 18px;
  --hdr-h: 70px;

  /* Movimiento */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 180ms;
  --t: 300ms;

  /* Capas */
  --z-hdr: 40;
  --z-mbar: 30;
  --z-menu: 50;
  --z-top: 100;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 8px); }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd, blockquote { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--teja); color: #fff; }

:focus-visible { outline: 3px solid var(--teja); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible, .hero :focus-visible, .ftr :focus-visible, .menu :focus-visible, .lb :focus-visible { outline-color: var(--teja-l); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.label { font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-lg { width: 30px; height: 30px; stroke-width: 1.6; }
.i-fill { fill: currentColor; stroke: none; }

.skip { position: absolute; left: 16px; top: -100px; z-index: var(--z-top); background: var(--teja); color: #fff; padding: 12px 18px; font-weight: 700; text-decoration: none; border-radius: var(--r); }
.skip:focus { top: 16px; }

.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: calc(var(--z-hdr) + 1); pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--teja-l); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Tipos ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px;
}
.eyebrow span { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--teja); color: #fff; letter-spacing: .04em; }
.eyebrow-light { color: var(--on-dark-2); }

.h2 {
  font-family: var(--f-head);
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  font-weight: 700; font-variation-settings: "opsz" 96;
  line-height: 1; letter-spacing: -.028em;
  text-wrap: balance;
}
.h2 em { font-style: normal; color: var(--teja); }
.dark .h2 em { color: var(--teja-l); }
.lead { font-size: clamp(1.06rem, 1.4vw, 1.2rem); line-height: 1.6; color: var(--ink-2); max-width: 56ch; }
.dark .lead { color: var(--on-dark-2); }

/* ---------- Botones ---------- */
.btn {
  --bh: 50px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--bh); padding: 0 22px;
  font-weight: 600; font-size: .98rem; text-decoration: none; white-space: nowrap;
  border-radius: 999px; border: 1px solid transparent;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn .i { transition: transform var(--t) var(--ease-out); }
.btn:hover .i-arrow { transform: translateX(3px); }
.btn-sm { --bh: 44px; padding: 0 18px; font-size: .92rem; }
.btn-lg { --bh: 58px; padding: 0 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-teja { background: var(--teja); color: #fff; }
.btn-teja:hover { background: var(--teja-2); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-2); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .5); background: rgba(14, 42, 63, .2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.btn-line { color: var(--ink); border-color: rgba(19, 32, 45, .3); background: transparent; }
.btn-line:hover { border-color: var(--ink); background: rgba(19, 32, 45, .04); }
.btn-ghost-dark { color: var(--on-dark); border-color: var(--line-dark-2); background: var(--mar-2); }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--f-head); font-weight: 800; font-size: 1.28rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-sub { white-space: nowrap; font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .72; margin-top: 5px; }

/* ---------- Cabecera ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-hdr); color: #fff;
  transition: background-color var(--t) ease, border-color var(--t) ease, transform var(--t) var(--ease-out), color var(--t) ease;
  border-bottom: 1px solid transparent;
}
.hdr.is-solid { background: rgba(247, 244, 238, .94); color: var(--ink); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); border-bottom-color: var(--line); }
.hdr.is-hidden { transform: translateY(-100%); }
.hdr-in { display: flex; align-items: center; gap: 24px; height: var(--hdr-h); }

.nav { display: none; margin-left: auto; }
.nav ul { display: flex; gap: 2px; }
.nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-size: .95rem; font-weight: 500; text-decoration: none; opacity: .88; border-radius: 999px;
  transition: opacity var(--t-fast) ease, background-color var(--t-fast) ease;
}
.nav a:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.hdr.is-solid .nav a:hover { background: rgba(19, 32, 45, .06); }
.nav a.is-current { opacity: 1; }
.nav a.is-current::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--teja-l); }
.hdr.is-solid .nav a.is-current::after { background: var(--teja); }

.hdr-cta { display: none; align-items: center; gap: 14px; }
.hdr-tel { white-space: nowrap; display: none; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: .95rem; text-decoration: none; font-variant-numeric: tabular-nums; }
.hdr-tel:hover { color: var(--teja-l); }
.hdr.is-solid .hdr-tel:hover { color: var(--teja); }

.burger { margin-left: auto; width: 48px; height: 48px; display: grid; place-content: center; gap: 7px; color: inherit; }
.burger span { display: block; width: 26px; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--t) var(--ease-out); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Menú móvil */
.menu {
  position: fixed; inset: 0; z-index: var(--z-menu); background: var(--mar); color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
  padding: calc(var(--hdr-h) + 20px) var(--gutter) max(24px, env(safe-area-inset-bottom));
  animation: menuIn var(--t) var(--ease-out);
}
.menu ol { display: grid; }
.menu li { border-bottom: 1px solid var(--line-dark); }
.menu a {
  display: flex; align-items: baseline; gap: 16px; padding: 14px 0; text-decoration: none;
  font-family: var(--f-head); font-size: clamp(2rem, 9vw, 2.9rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
}
.menu a span { font-family: var(--f-sans); font-size: .8rem; font-weight: 600; color: var(--teja-l); }
.menu-foot { display: grid; gap: 10px; margin-top: 28px; }
.menu-foot p { color: var(--on-dark-2); font-size: .92rem; margin-top: 6px; }
body.menu-open .hdr { background: var(--mar); color: #fff; border-bottom-color: var(--line-dark); z-index: calc(var(--z-menu) + 1); }
body.menu-open { overflow: hidden; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; background: var(--mar); overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.1s ease, transform 7s linear;
}
.hero-img.is-on { opacity: 1; transform: scale(1); }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 30, 45, .7) 0%, rgba(10, 30, 45, .12) 26%, rgba(10, 30, 45, .28) 52%, rgba(10, 30, 45, .93) 100%),
    linear-gradient(90deg, rgba(10, 30, 45, .6) 0%, rgba(10, 30, 45, 0) 72%);
}

.hero-in { padding-top: calc(var(--hdr-h) + 48px); padding-bottom: 28px; }
.hero-rating {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px 8px 10px; margin-bottom: 26px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: .9rem; font-weight: 500; text-decoration: none;
}
.hero-rating b { font-weight: 700; }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars .i { width: 16px; height: 16px; }
.hero-title {
  font-family: var(--f-head);
  font-size: clamp(3.3rem, 13vw, 9.4rem);
  font-weight: 800; font-variation-settings: "opsz" 96;
  line-height: .9; letter-spacing: -.045em;
  margin-bottom: 26px; text-wrap: balance;
}
.hero-title .line { display: block; }
.hero-title em { font-style: normal; color: var(--teja-l); }
.hero-lead { max-width: 44ch; font-size: clamp(1.06rem, 1.6vw, 1.3rem); line-height: 1.55; color: rgba(255, 255, 255, .88); margin-bottom: 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; flex: 1; max-width: 660px; }
.step { display: grid; gap: 10px; text-align: left; color: rgba(255, 255, 255, .62); min-height: 44px; padding-top: 6px; transition: color var(--t-fast) ease; }
.step:hover, .step.is-on { color: #fff; }
.step-bar { position: relative; display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .24); overflow: hidden; }
.step-bar span { position: absolute; inset: 0; background: var(--teja-l); transform: scaleX(0); transform-origin: 0 50%; }
.step.is-on .step-bar span { animation: stepFill var(--step-dur, 6.5s) linear forwards; }
.step.is-done .step-bar span { transform: scaleX(1); }
.hero.is-paused .step.is-on .step-bar span { animation-play-state: paused; }
.step-l { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.step-l b { color: var(--teja-l); font-weight: 700; margin-right: 6px; }
@keyframes stepFill { to { transform: scaleX(1); } }
.hero-place { display: none; color: rgba(255, 255, 255, .7); font-size: .88rem; align-items: center; gap: 8px; }

/* ---------- Cinta ---------- */
.band { background: var(--teja); color: #fff; }
.marquee { overflow: hidden; padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; width: max-content; }
.marquee-track li {
  display: flex; align-items: center; white-space: nowrap;
  font-family: var(--f-head); font-size: clamp(1.2rem, 2.3vw, 1.75rem); font-weight: 700; letter-spacing: -.01em;
  padding-right: 40px;
}
.marquee-track li::after { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); margin-left: 40px; }
.js .marquee.is-running .marquee-track { animation: marquee var(--mq-dur, 40s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { position: relative; padding-block: var(--sec); }
.dark { background: var(--mar); color: var(--on-dark); isolation: isolate; }
.sec-head { display: grid; gap: 0; margin-bottom: clamp(44px, 6vw, 76px); }
.sec-head .h2 { margin-bottom: 22px; }
.sec-head-row { align-items: end; }

/* Intro + cifras */
.intro-grid { display: grid; gap: 8px; }
.intro-t {
  font-family: var(--f-head);
  font-size: clamp(1.75rem, 3.5vw, 2.9rem);
  font-weight: 600; line-height: 1.14; letter-spacing: -.022em;
  text-wrap: pretty; max-width: 27ch;
}
.intro-t .muted { color: #8C959D; }
.stats { display: grid; grid-template-columns: 1fr; margin-top: clamp(52px, 7vw, 92px); border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.stat dd { font-family: var(--f-head); font-size: clamp(3.6rem, 8vw, 6.2rem); font-weight: 700; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; }
.stat dd small { font-size: .32em; letter-spacing: 0; color: var(--teja); font-weight: 700; }
.stat dt { font-size: .98rem; color: var(--muted); max-width: 30ch; }

/* ---------- Servicios ---------- */
.services .h2 { max-width: 15ch; }
.svc { border-top: 1px solid var(--line-dark); }
.svc-item { border-bottom: 1px solid var(--line-dark); }
.svc-head button {
  width: 100%; display: grid; grid-template-columns: 44px 1fr 24px; align-items: center; gap: 12px;
  min-height: 72px; padding: 18px 0; text-align: left; color: var(--on-dark-2);
  transition: color var(--t-fast) ease;
}
.svc-n { font-size: .82rem; font-weight: 700; color: var(--on-dark-2); transition: color var(--t-fast) ease; }
.svc-t { font-family: var(--f-head); font-size: clamp(1.4rem, 3vw, 1.95rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; }
.svc-head .i { transition: transform var(--t) var(--ease-out), color var(--t-fast) ease; }
.svc-head button:hover { color: var(--on-dark); }
.svc-item.is-on .svc-head button { color: var(--on-dark); }
.svc-item.is-on .svc-n { color: var(--teja-l); }
.svc-item.is-on .svc-head .i { transform: rotate(45deg); color: var(--teja-l); }

.svc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t) var(--ease-out); }
.svc-item.is-on .svc-body { grid-template-rows: 1fr; }
.svc-inner { overflow: hidden; min-height: 0; }
.svc-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mar-3); margin-bottom: 20px; border-radius: var(--r-lg); }
.svc-media img { width: 100%; height: 100%; object-fit: cover; }
.svc-tag { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(14, 42, 63, .78); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .04em; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.svc-tag.is-real { background: var(--teja); }
.svc-text { padding-bottom: 32px; }
.svc-text > p:first-child { color: var(--on-dark); font-size: 1.05rem; max-width: 60ch; }
.ticks { display: grid; gap: 10px; margin: 20px 0 22px; }
.ticks li { position: relative; padding-left: 30px; color: var(--on-dark-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%; background: rgba(232, 144, 106, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8906A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.svc-quote { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--mar-2); border: 1px solid var(--line-dark); color: var(--on-dark); font-size: .95rem; }
.svc-quote .i { color: var(--teja-l); margin-top: 2px; }
.svc-quote cite { display: block; font-style: normal; color: var(--on-dark-2); font-size: .84rem; margin-top: 2px; }

/* ---------- Humedades (detector) ---------- */
.damp { background: var(--teja-soft); }
.damp-grid { display: grid; gap: 40px; }
.damp .h2 { margin-bottom: 22px; }
.damp .lead { margin-bottom: 8px; }
.damp-note { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--ink-2); margin-top: 18px; }
.damp-note .i { color: var(--teja); width: 18px; height: 18px; }

.house { position: relative; background: #fff; border-radius: var(--r-lg); padding: clamp(16px, 3vw, 28px); box-shadow: 0 1px 0 rgba(19, 32, 45, .06), 0 24px 48px -28px rgba(19, 32, 45, .35); }
.house-svg { width: 100%; height: auto; display: block; }
.house-svg .h-wall { fill: #FBF8F3; stroke: var(--ink); stroke-width: 2.5; }
.house-svg .h-roof { fill: #D86B41; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.house-svg .h-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.house-svg .h-soft { fill: none; stroke: rgba(19, 32, 45, .28); stroke-width: 2; stroke-linecap: round; }
.house-svg .h-glass { fill: #CFE3EF; stroke: var(--ink); stroke-width: 2.5; }
.house-svg .h-tile { fill: #EEF3F6; stroke: rgba(19, 32, 45, .35); stroke-width: 1.5; }
.house-svg .h-ground { fill: #E7DDCC; }
.house-svg .h-drop { fill: #5AA6D6; opacity: .9; }
.hot { cursor: pointer; }
.hot circle.ring { fill: var(--teja); stroke: #fff; stroke-width: 4; transition: fill var(--t-fast) ease; }
.hot text { font: 700 22px/1 var(--f-sans); fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.hot .pulse { fill: none; stroke: var(--teja); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .hot:not(.is-on) .pulse { animation: pulse 2.4s ease-out infinite; }
.hot:nth-of-type(2n) .pulse { animation-delay: .8s !important; }
.hot:nth-of-type(3n) .pulse { animation-delay: 1.6s !important; }
.hot:hover circle.ring { fill: var(--teja-2); }
.hot.is-on circle.ring { fill: var(--ink); }
.hot:focus { outline: none; }
.hot:focus-visible circle.ring { stroke: var(--ink); stroke-width: 5; }
@keyframes pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }

.zones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.zone {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 8px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .93rem; font-weight: 600; color: var(--ink-2);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.zone b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--teja-soft); color: var(--teja); font-size: .82rem; }
.zone:hover { border-color: var(--ink); color: var(--ink); }
.zone[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.zone[aria-pressed="true"] b { background: var(--teja); color: #fff; }

.diag { margin-top: 18px; background: var(--mar); color: var(--on-dark); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 30px); display: grid; gap: 16px; }
.diag-empty { display: flex; gap: 14px; align-items: center; color: var(--on-dark-2); }
.diag-empty .i { color: var(--teja-l); }
.diag-k { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teja-l); margin-bottom: 4px; }
.diag-t { font-family: var(--f-head); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.diag-cols { display: grid; gap: 16px; }
.diag-cols p:not(.diag-k) { color: var(--on-dark-2); }
.diag-cols ul { display: grid; gap: 6px; }
.diag-cols li { position: relative; padding-left: 20px; color: var(--on-dark); }
.diag-cols li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--teja-l); }
.diag-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 16px; border-top: 1px solid var(--line-dark); }
.diag-foot small { color: var(--on-dark-2); font-size: .84rem; }
.diag.is-swap { animation: diagIn var(--t) var(--ease-out); }
@keyframes diagIn { from { opacity: .3; transform: translateY(6px); } }

/* ---------- Obras ---------- */
.works-sec { background: var(--cal-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; font-size: .93rem; font-weight: 600; color: var(--ink-2); background: transparent;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.chip .n { font-size: .74rem; opacity: .6; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-on .n { color: var(--teja-l); opacity: 1; }

.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 52vw; grid-auto-flow: dense; gap: 10px; }
.work { position: relative; overflow: hidden; background: var(--arena); border-radius: var(--r-lg); animation: workIn var(--t) var(--ease-out); }
.work.w-big, .work.w-wide { grid-column: span 2; }
.work-btn { position: absolute; inset: 0; width: 100%; display: block; text-align: left; cursor: zoom-in; }
.work-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.work-cap {
  position: absolute; inset: auto 0 0 0; display: grid; gap: 2px; padding: 44px 14px 14px; color: #fff;
  background: linear-gradient(180deg, rgba(10, 30, 45, 0) 0%, rgba(10, 30, 45, .85) 100%);
}
.work-cat { color: var(--teja-l); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.work-t { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.work-btn:hover img { transform: scale(1.04); }
.work-pill { position: absolute; top: 10px; left: 10px; padding: 5px 10px; border-radius: 999px; background: #fff; color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.work-pill.after { background: var(--teja); color: #fff; }
@keyframes workIn { from { opacity: 0; transform: translateY(12px); } }
.works-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; color: var(--muted); font-size: .92rem; }
.works-note .i { color: var(--teja); margin-top: 2px; }

/* ---------- Opiniones ---------- */
.reviews { background: var(--cal); }
.rv-grid { display: grid; gap: 16px; }
.rv-score { display: grid; gap: 14px; align-content: start; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: var(--mar); color: var(--on-dark); }
.rv-score b { font-family: var(--f-head); font-size: clamp(4.4rem, 9vw, 6.6rem); font-weight: 700; line-height: .85; letter-spacing: -.05em; }
.rv-score .stars .i { width: 22px; height: 22px; }
.rv-score p { color: var(--on-dark-2); }
.rv-score a { color: #fff; font-weight: 600; text-underline-offset: 3px; }
.rv { display: grid; gap: 18px; align-content: space-between; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.rv blockquote { font-family: var(--f-head); font-size: clamp(1.2rem, 1.9vw, 1.42rem); font-weight: 500; line-height: 1.32; letter-spacing: -.012em; }
.rv-who { display: flex; align-items: center; gap: 12px; }
.rv-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--teja-soft); color: var(--teja); font-weight: 700; }
.rv-who p { font-weight: 700; line-height: 1.2; }
.rv-who small { display: block; color: var(--muted); font-weight: 500; font-size: .86rem; }
.rv .stars .i { width: 15px; height: 15px; }
.rv-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.rv-tags li { padding: 8px 14px; border-radius: 999px; background: var(--cal-2); font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.rv-tags li b { color: var(--teja); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: 52px; }
.contact .h2 { margin-bottom: 22px; }
.ct-list { display: grid; margin-top: 36px; border-top: 1px solid var(--line-dark); }
.ct-list li { display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-dark); align-items: center; }
.ct-list .i { width: 46px; height: 46px; padding: 12px; border-radius: 50%; background: var(--mar-2); color: var(--teja-l); }
.ct-lbl { color: var(--on-dark-2); margin-bottom: 2px; font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.ct-list p:not(.ct-lbl) { font-size: 1.1rem; font-weight: 600; }
.ct-list a { text-decoration: none; background: linear-gradient(var(--teja-l), var(--teja-l)) 0 100% / 0 2px no-repeat; transition: background-size var(--t) var(--ease-out); }
.ct-list a:hover { background-size: 100% 2px; }

.form { background: var(--cal); color: var(--ink); padding: clamp(22px, 4vw, 42px); border-radius: var(--r-lg); display: grid; gap: 20px; align-self: start; }
.form-h { font-family: var(--f-head); font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.form-sub { color: var(--muted); margin-top: 6px; font-size: .95rem; }
.f-types { border: 0; margin: 0; padding: 0; min-width: 0; }
.f-types legend { font-weight: 700; margin-bottom: 12px; padding: 0; }
.opt { font-size: .74rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.f-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { position: relative; cursor: pointer; }
.fchip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fchip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .93rem; font-weight: 600; color: var(--ink-2); background: #fff;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.fchip:hover span { border-color: var(--ink); }
.fchip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip input:checked + span::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--teja-l); }
.fchip input:focus-visible + span { outline: 3px solid var(--teja); outline-offset: 2px; }

.f-row { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field label > span[aria-hidden] { color: var(--danger); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; font-size: 1rem;
  background: #fff; border: 1px solid rgba(19, 32, 45, .26); border-radius: var(--r);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.field textarea { resize: vertical; min-height: 118px; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(185, 78, 38, .35); }
.field.has-err input, .field.has-err textarea { border-color: var(--danger); }
.f-help { font-size: .86rem; color: var(--muted); }
.f-err { font-size: .88rem; color: var(--danger); font-weight: 600; }
.f-err:empty { display: none; }
.f-check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.f-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--teja); flex: none; cursor: pointer; }
.f-check a { font-weight: 600; }
.f-ok { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r); background: var(--mar); color: #fff; }
.f-ok .i { color: var(--teja-l); }
.f-ok-t { font-weight: 700; font-size: 1.08rem; margin-bottom: 4px; }
.f-ok a { color: var(--teja-l); font-weight: 700; }

.map { margin-top: clamp(52px, 7vw, 92px); width: 100%; aspect-ratio: 4 / 3; background: var(--mar-3); border-radius: var(--r-lg); overflow: hidden; }
.map iframe { width: 100%; height: 100%; border: 0; filter: saturate(.6) contrast(1.02); }

/* ---------- Pie ---------- */
.ftr { position: relative; background: #0A1F2F; color: var(--on-dark-2); padding-top: clamp(60px, 8vw, 100px); overflow: hidden; }
.ftr-top { display: grid; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line-dark); }
.ftr .brand { color: var(--on-dark); margin-bottom: 18px; }
.ftr-brand p { max-width: 36ch; }
.ftr-h { color: var(--teja-l); margin-bottom: 14px; }
.ftr-col ul { display: grid; gap: 8px; }
.ftr a { text-decoration: none; transition: color var(--t-fast) ease; }
.ftr a:hover { color: #fff; }
.ftr-col a { display: inline-block; padding: 2px 0; }
.ftr-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px; font-size: .88rem; }
.ftr-giant {
  font-family: var(--f-head); font-size: clamp(4.4rem, 19vw, 17rem); font-weight: 800; line-height: .78; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .13); text-align: center; white-space: nowrap;
  margin: 10px 0 -.1em; user-select: none;
}

/* ---------- Barra móvil ---------- */
.mbar {
  position: fixed; inset: auto 0 0 0; z-index: var(--z-mbar);
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px;
  padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom));
  background: rgba(14, 42, 63, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-dark);
  transform: translateY(110%); transition: transform var(--t) var(--ease-out);
}
.mbar.is-on { transform: none; }
.mbar .btn { --bh: 50px; padding: 0 12px; }

/* ---------- Visor ---------- */
.lb { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(7, 20, 30, .96); color: #fff; }
.lb::backdrop { background: rgba(7, 20, 30, .7); }
.lb[open] { animation: lbIn var(--t) var(--ease-out); }
.lb-in { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 72px 16px 24px; }
.lb-fig { display: grid; gap: 14px; max-width: min(1400px, 100%); max-height: 100%; }
.lb-fig img { max-width: 100%; max-height: calc(100svh - 170px); object-fit: contain; margin-inline: auto; border-radius: 6px; }
.lb-fig figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-weight: 600; }
.lb-fig figcaption span:first-child { color: var(--teja-l); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.lb-count { margin-left: auto; color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; width: 52px; height: 52px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid var(--line-dark-2); transition: background-color var(--t-fast) ease; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { bottom: 16px; }
.lb-prev { left: 16px; }
.lb-next { left: 76px; }
@keyframes lbIn { from { opacity: 0; } }

/* ---------- Apariciones ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 640px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 26vw; }
  .work.w-big { grid-column: span 2; grid-row: span 2; }
  .work.w-tall { grid-row: span 2; }
  .f-row { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 28px 24px; border-right: 1px solid var(--line); }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { border-right: 0; }
  .ftr-top { grid-template-columns: 1fr 1fr; }
  .lb-prev, .lb-next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lb-next { left: auto; right: 16px; }
  .lb-in { padding: 72px 84px 32px; }
  .map { aspect-ratio: 16 / 7; }
  .rv-grid { grid-template-columns: 1fr 1fr; }
  .rv-score { grid-column: 1 / -1; }
  .diag-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (min-width: 1024px) {
  :root { --hdr-h: 82px; }
  .nav { display: block; }
  .hdr-cta { display: flex; }
  .burger { display: none; }
  .mbar { display: none; }
  .hero-place { display: inline-flex; }

  .hero-in { padding-bottom: 44px; }
  .hero-foot { padding-bottom: 36px; }

  .sec-head-row { grid-template-columns: 1.3fr 1fr; column-gap: 64px; }
  .sec-head-row .lead, .sec-head-row .filters { justify-self: end; margin-bottom: 26px; }
  .sec-head-row .filters { justify-content: flex-end; }

  .intro-grid { grid-template-columns: 1fr 3fr; column-gap: 48px; align-items: start; }
  .intro-grid .eyebrow { margin-top: 10px; }

  /* Servicios: lista + panel fijo */
  .svc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: repeat(6, auto) 1fr; column-gap: clamp(40px, 5vw, 88px); border-top: 0; }
  .svc-item { display: contents; }
  .svc-head { grid-column: 1; border-bottom: 1px solid var(--line-dark); }
  .svc-item:first-child .svc-head { border-top: 1px solid var(--line-dark); }
  .svc-item:nth-child(1) .svc-head { grid-row: 1; }
  .svc-item:nth-child(2) .svc-head { grid-row: 2; }
  .svc-item:nth-child(3) .svc-head { grid-row: 3; }
  .svc-item:nth-child(4) .svc-head { grid-row: 4; }
  .svc-item:nth-child(5) .svc-head { grid-row: 5; }
  .svc-item:nth-child(6) .svc-head { grid-row: 6; }
  .svc-head button { min-height: 86px; grid-template-columns: 52px 1fr 24px; padding: 22px 0; transition: color var(--t-fast) ease, padding var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out); }
  .svc-item.is-on .svc-head button { box-shadow: inset 3px 0 0 var(--teja-l); padding-left: 18px; }

  .svc-body {
    grid-column: 2; grid-row: 1 / -1; display: block; align-self: start;
    position: sticky; top: calc(var(--hdr-h) + 32px);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity var(--t) ease, transform var(--t) var(--ease-out), visibility 0s linear var(--t);
  }
  .svc-item.is-on .svc-body { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t) ease, transform var(--t) var(--ease-out), visibility 0s; }
  .svc-inner { overflow: visible; }
  .svc-media { aspect-ratio: 16 / 10; margin-bottom: 26px; }
  .svc-text { display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 32px; padding-bottom: 0; }
  .svc-text > p:first-child { grid-column: 1 / -1; font-size: 1.12rem; margin-bottom: 4px; }
  .svc-text .ticks { margin: 16px 0 0; }
  .svc-quote { align-self: end; }

  .damp-grid { grid-template-columns: 1fr 1.08fr; gap: clamp(48px, 6vw, 96px); align-items: start; }
  .damp-copy { position: sticky; top: calc(var(--hdr-h) + 32px); }

  .works { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 16.5vw; }
  .work-cap { transform: translateY(8px); opacity: 0; transition: opacity var(--t) ease, transform var(--t) var(--ease-out); }
  .work-btn:hover .work-cap, .work-btn:focus-visible .work-cap { opacity: 1; transform: none; }

  .rv-grid { grid-template-columns: 1.05fr 1fr 1fr 1fr; }
  .rv-score { grid-column: auto; }

  .contact-grid { grid-template-columns: 1fr 1.05fr; gap: clamp(56px, 6vw, 104px); }
  .contact-info { position: sticky; top: calc(var(--hdr-h) + 32px); align-self: start; }

  .ftr-top { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; }
}

@media (min-width: 1200px) {
  .hdr-tel { display: inline-flex; }
}

@media (min-width: 1440px) {
  .works { grid-auto-rows: 236px; }
}

@media (hover: none) {
  .work-cap { opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-img { transform: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { flex-wrap: wrap; width: auto; animation: none !important; }
}
