/* Cerrajería Villalba · hoja de estilos (el HTML se genera con tools/build.mjs) */
:root {
  --red: #d0262d;
  --red-d: #b31e24;
  --red-l: #ff5b4f;
  --blue: #1f3f9e;
  --ink: #16181d;
  --muted: #625d55;
  --facade: #e9e4da;
  --steel: #23262b;
  --warm: #ffcf8f;
  --gut: clamp(16px, 3vw, 44px);
  --wall: clamp(12px, 5vw, 88px);
  --top-h: 76px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --stucco: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.loading { overflow: hidden; }
body {
  margin: 0;
  background: var(--facade);
  color: var(--ink);
  font-family: Archivo, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
img, svg { display: block; }
p { margin: 0; }
h1 { margin: 0; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 4px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  background: var(--red); color: #fff;
  border: 1.5px solid var(--red); border-radius: 4px;
  font-weight: 700; font-size: 1rem; font-variation-settings: "wdth" 105; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}
.btn:hover { background: var(--red-d); border-color: var(--red-d); }
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 0.92rem; }
.btn-sm .s { display: none; }
.btn-line { background: transparent; border-color: rgba(255, 255, 255, 0.38); }
.btn-line:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.7); }

/* Cabecera: sobre la fachada */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gut);
  background: var(--facade);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand b { display: block; font-size: 1.08rem; font-weight: 800; font-variation-settings: "wdth" 108; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; }
.brand small { display: block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.top-act { display: flex; align-items: center; gap: 22px; }
.tel { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.tel svg { width: 17px; height: 17px; fill: var(--red); }
.tel:hover { color: var(--red); }

/* ── Portada: la puerta que se abre ── */
.garage { position: relative; }
.js .garage { height: 300svh; }
.stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--grain), var(--facade); }
.js .stage { position: sticky; top: 0; }

/* Hueco de la puerta: dintel y jambas de acero; la puerta llega hasta abajo */
.opening {
  position: absolute;
  top: calc(var(--top-h) + 16px); left: var(--wall); right: var(--wall); bottom: 0;
  overflow: hidden;
  background: #0c0b0a;
  border: 10px solid var(--steel); border-bottom: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* Dentro del garaje */
.inside {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    linear-gradient(90deg, #1c1b1a 0 14px, transparent 14px calc(100% - 14px), #1c1b1a calc(100% - 14px)),
    radial-gradient(120% 80% at 50% 115%, #3b2a19 0%, #16130f 55%, #0b0a09 100%);
  color: #f6f1e8;
}
.glow {
  position: absolute; left: -15%; right: -15%; bottom: 0; height: 130%;
  background:
    radial-gradient(55% 32% at 50% 100%, rgba(255, 222, 170, 0.75), rgba(255, 186, 110, 0.22) 50%, transparent 75%),
    radial-gradient(70% 70% at 50% 100%, rgba(255, 190, 120, 0.22), transparent 70%);
  transform-origin: 50% 100%;
  transform: scaleY(var(--gl, 1));
  opacity: var(--go, 1);
  pointer-events: none;
}
.copy { position: relative; z-index: 1; width: min(100%, 1000px); padding: 0 28px; text-align: center; }
h1 {
  font-size: clamp(2.15rem, 5.4vw, 5.3rem);
  font-weight: 800; font-variation-settings: "wdth" 112;
  line-height: 0.98; letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 .ln { display: block; overflow: hidden; padding-bottom: 0.07em; margin-bottom: -0.07em; }
h1 .ln > span { display: inline-block; }
h1 .red { color: var(--red-l); }
.lead { max-width: 54ch; margin: 26px auto 0; font-size: clamp(1rem, 1.25vw, 1.15rem); color: rgba(246, 241, 232, 0.78); text-wrap: pretty; }
.acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* Contador de la carga: se ve por el hueco que deja la puerta al bajar */
.loadnum {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 1;
  text-align: center; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; font-variant-numeric: tabular-nums;
  color: rgba(255, 222, 170, 0.85);
  opacity: 0; transition: opacity 300ms ease;
}
.loading .loadnum { opacity: 1; }

/* La puerta seccional: chapa lacada antracita, acanalado central y textura stucco */
.door { position: absolute; inset: 0; z-index: 2; perspective: 1400px; perspective-origin: 50% -30%; }
.panel {
  position: absolute; left: 0; right: 0; top: 0;
  height: calc(100% / 6);
  transform: translateY(calc(var(--i) * 100%));
  transform-origin: 50% 100%;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0) 7%, rgba(0, 0, 0, 0) 93%, rgba(0, 0, 0, 0.42)),
    linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.045) 46%, rgba(255, 255, 255, 0) 62%),
    var(--stucco),
    linear-gradient(180deg, #4b5056 0%, #41454b 38%, #383c41 72%, #303338 100%);
  backface-visibility: hidden;
  will-change: transform;
}
.loading .panel { visibility: hidden; }
/* Junta entre tramos y acanalado central, por encima del vinilo */
.panel::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0 1px, rgba(0, 0, 0, 0.18) 1px 3px, transparent 3px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0 2px, rgba(0, 0, 0, 0.25) 2px 5px, transparent 5px),
    linear-gradient(180deg, transparent 0 calc(50% - 7px), rgba(0, 0, 0, 0.1) calc(50% - 7px) calc(50% - 1.5px), rgba(0, 0, 0, 0.55) calc(50% - 1.5px) 50%, rgba(255, 255, 255, 0.14) 50% calc(50% + 1px), rgba(255, 255, 255, 0.04) calc(50% + 1px) calc(50% + 6px), transparent calc(50% + 6px));
}
.panel::after { content: ""; position: absolute; inset: 0; z-index: 3; background: #000; opacity: var(--sh, 0); pointer-events: none; }
.paint { position: absolute; left: 0; right: 0; top: calc(var(--i) * -100%); height: 600%; z-index: 1; }

.windows {
  position: absolute; top: 3.9%; height: 8.8%; left: 0; right: 0;
  display: flex; justify-content: center; gap: clamp(28px, 7vw, 120px);
}
.windows i {
  width: clamp(70px, 11vw, 170px); height: 100%;
  border-radius: 6px;
  border: 5px solid #17191c;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #4a525b 0%, #262b31 60%, #1b1f23 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 2px 5px rgba(0, 0, 0, 0.6);
}

/* Rótulo de vinilo, como el que pondría un taller de verdad */
.vinyl {
  position: absolute; left: 0; right: 0; top: 40%; height: 26%;
  display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.2vw, 36px);
  color: #f2f2ef;
}
.badge { display: grid; place-items: center; width: clamp(64px, 8vw, 128px); aspect-ratio: 1; border-radius: 50%; background: #f2f2ef; flex: none; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.badge .mark { width: 74%; height: 74%; }
.vt { display: grid; gap: 0.35em; }
.vt b {
  font-size: clamp(2.2rem, 6.2vw, 6.4rem);
  font-weight: 700; font-variation-settings: "wdth" 78;
  line-height: 0.9; letter-spacing: 0.005em; text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.vt small {
  display: block; padding-top: 0.5em; border-top: 3px solid var(--red);
  font-size: clamp(0.9rem, 1.7vw, 1.75rem); font-weight: 600; font-variation-settings: "wdth" 85;
  letter-spacing: 0.06em; text-transform: uppercase; color: rgba(242, 242, 239, 0.9);
}
.lock { position: absolute; left: 50%; top: 93.3%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #9aa0a6, #50555b 60%, #2c2f33); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.lock::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 10px; margin: -5px 0 0 -1.5px; border-radius: 2px; background: #1a1c1f; }
.seal { position: absolute; left: 0; right: 0; bottom: 0; height: 0.7%; background: #111214; }

.lintel { position: absolute; inset: 0 0 auto 0; height: 26px; z-index: 3; background: linear-gradient(rgba(0, 0, 0, 0.6), transparent); pointer-events: none; }

/* Entrada del titular cuando la puerta ya está arriba */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity 500ms ease, transform 700ms var(--ease-out); }
.js h1 .ln > span { transform: translateY(108%); transition: transform 900ms var(--ease-out); }
.js .garage.open .rv, .js .garage.open h1 .ln > span { opacity: 1; transform: none; }
.js .garage.open h1 .ln:nth-child(2) > span { transition-delay: 90ms; }
.js .garage.open h1 .ln:nth-child(3) > span { transition-delay: 180ms; }
.js .garage.open .lead { transition-delay: 260ms; }
.js .garage.open .acts { transition-delay: 340ms; }

/* Pie */
.foot { background: var(--ink); color: #eeeae2; padding: clamp(56px, 8vw, 96px) var(--gut) 28px; }
.foot-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; }
.foot-in p + p { margin-top: 10px; }
.foot-k { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--warm); margin-bottom: 14px; }
.foot-big { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; font-variation-settings: "wdth" 112; line-height: 1; letter-spacing: -0.02em; }
.foot-big a { text-decoration: none; }
.foot a:hover { color: var(--warm); }
.foot-legal { max-width: 1200px; margin: 56px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.82rem; color: rgba(238, 234, 226, 0.55); }

/* Sin JavaScript o con movimiento reducido: la puerta ya está abierta */
html:not(.js) .door { display: none; }
@media (prefers-reduced-motion: reduce) {
  .js .garage { height: auto; }
  .js .stage { position: relative; }
  .door { display: none; }
  .js .rv, .js h1 .ln > span { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 760px) {
  :root { --top-h: 64px; }
  body { font-size: 16px; }
  .brand .mark { width: 32px; height: 32px; }
  .brand b { font-size: 0.98rem; }
  .brand small { display: none; }
  .tel { font-size: 0; gap: 0; width: 42px; height: 42px; justify-content: center; border-radius: 50%; background: rgba(22, 24, 29, 0.06); }
  .tel svg { width: 18px; height: 18px; }
  .top-act { gap: 8px; }
  .opening { top: calc(var(--top-h) + 6px); border-width: 7px; border-bottom: 0; }
  .copy { padding: 0 20px; }
  .lead { margin-top: 18px; }
  .acts { flex-direction: column; align-items: stretch; margin-top: 24px; }
  .windows i:nth-child(n+4) { display: none; }
  .windows { gap: 22px; }
  .windows i { border-width: 4px; }
  .vinyl { flex-direction: column; gap: 14px; top: 34%; height: 36%; text-align: center; }
  .badge { width: 58px; }
  .vt b { font-size: clamp(2.2rem, 11.5vw, 3.6rem); }
  .vt small { font-size: 0.9rem; }
  .foot-in { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 430px) {
  .brand { gap: 9px; }
  .brand b { white-space: normal; max-width: 6.5em; font-size: 0.92rem; line-height: 1.05; }
  .btn-sm { padding: 0 14px; }
  .btn-sm .l { display: none; }
  .btn-sm .s { display: inline; }
}
@media (max-width: 760px) {
  .vt small { justify-self: center; padding: 0.5em 0.2em 0; }
}

/* ───────── Multipágina: menú, secciones interiores, formulario ───────── */
body:not(.home) main { padding-top: var(--top-h); }
.top { border-bottom: 1px solid transparent; transition: border-color 200ms ease; }
body:not(.home) .top { border-bottom-color: rgba(22, 24, 29, 0.1); }
.nav { display: flex; gap: clamp(18px, 2.2vw, 34px); margin: 0 auto 0 clamp(24px, 4vw, 64px); }
.nav a { position: relative; padding: 6px 0; font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; transition: transform 260ms var(--ease-out); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.btn[aria-current="page"] { background: var(--ink); border-color: var(--ink); }

.menu-btn { display: none; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: rgba(22, 24, 29, 0.06); cursor: pointer; place-content: center; gap: 6px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform 220ms var(--ease-out); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.drawer {
  position: fixed; inset: var(--top-h) 0 0 0; z-index: 19;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px var(--gut) calc(28px + env(safe-area-inset-bottom));
  background: var(--facade); visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity 220ms ease, transform 280ms var(--ease-out), visibility 0s 280ms;
}
.drawer.open { visibility: visible; opacity: 1; transform: none; transition: opacity 220ms ease, transform 280ms var(--ease-out); }
.drawer nav { display: grid; }
.drawer nav a { padding: 14px 0; border-bottom: 1px solid rgba(22, 24, 29, 0.1); font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 700; font-variation-settings: "wdth" 92; letter-spacing: -0.01em; text-decoration: none; }
.drawer nav a[aria-current="page"] { color: var(--red); }
.drawer-foot { color: var(--muted); }
.drawer-foot a { font-size: 1.3rem; font-weight: 800; color: var(--ink); text-decoration: none; }
html.menu-open { overflow: hidden; }

/* Retícula común */
.wrap { width: min(100% - 2 * var(--gut), 1200px); margin: 0 auto; }
.narrow { max-width: 780px; }
.sec { padding: clamp(72px, 10vw, 136px) 0; }
.sec.alt { background: #e1dbcf; }
.sec.dark, .cta-band { background: var(--ink); color: #eeeae2; }
h2 { margin: 0; font-size: clamp(2rem, 4.2vw, 3.5rem); font-weight: 800; font-variation-settings: "wdth" 88; line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; }
h3 { margin: 0 0 8px; font-size: 1.22rem; font-weight: 750; font-variation-settings: "wdth" 96; letter-spacing: -0.01em; }
.sec p { text-wrap: pretty; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head p { max-width: 52ch; color: var(--muted); }
.dark p { color: rgba(238, 234, 226, 0.75); }
.link { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 3px; }
.arr { width: 18px; height: 18px; flex: none; transition: transform 200ms var(--ease-out); }
.link:hover .arr { transform: translateX(4px); }

/* Fotos: marco fijo; al pasar, zoom suave dentro */
.ph { margin: 0; overflow: hidden; background: #cfc8bb; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
a:hover .ph img, .ph:hover img { transform: scale(1.03); }

/* Servicios de la portada: filas con foto pequeña */
.svc { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.svc a {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 180px 24px; gap: 32px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid rgba(22, 24, 29, 0.16); text-decoration: none;
}
.svc-t { font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 800; font-variation-settings: "wdth" 90; letter-spacing: -0.02em; line-height: 1.05; transition: color 180ms ease; }
.svc-d { color: var(--muted); }
.svc-ph { aspect-ratio: 3 / 2; border-radius: 3px; }
.svc a:hover .svc-t { color: var(--red); }
.svc a:hover .arr { transform: translateX(4px); color: var(--red); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split-txt p { margin-top: 18px; max-width: 50ch; }
.split-txt h2 + p { margin-top: 24px; }
.split-ph { aspect-ratio: 4 / 3; border-radius: 3px; }
.split-ph.tall { aspect-ratio: 3 / 4; max-height: 78svh; }
.split.rev > .ph { order: 2; }

.works-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; }
.works-grid .ph { aspect-ratio: 3 / 4; border-radius: 3px; }

.how h2 { margin-bottom: clamp(36px, 5vw, 56px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 22px; border-top: 1.5px solid var(--ink); display: grid; align-content: start; gap: 8px; }
.steps li::before { content: counter(s, decimal-leading-zero); font-weight: 800; font-variation-settings: "wdth" 80; font-size: 0.95rem; color: var(--red); }
.steps b { font-size: 1.2rem; font-weight: 750; }
.steps span { color: var(--muted); }

.cta-band { padding: clamp(72px, 9vw, 120px) 0; }
.cta-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 64px; align-items: end; }
.cta-in h2 { grid-row: span 2; font-size: clamp(2.4rem, 5.4vw, 4.6rem); }
.cta-in p { color: rgba(238, 234, 226, 0.75); max-width: 46ch; }
.cta-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.cta-tel { display: inline-flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 800; text-decoration: none; font-variant-numeric: tabular-nums; }
.cta-tel svg { width: 20px; height: 20px; fill: var(--warm); }
.cta-tel:hover { color: var(--warm); }

/* Cabecera de las páginas interiores */
.pagehead { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.pagehead-in { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.pagehead h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); font-weight: 850; font-variation-settings: "wdth" 82; line-height: 0.95; letter-spacing: -0.035em; text-wrap: balance; }
.lead-l { margin-top: 24px; max-width: 44ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); text-wrap: pretty; }
.pagehead-ph { aspect-ratio: 4 / 3; border-radius: 3px; }
.pagehead.plain { padding-bottom: 0; }
.pagehead.nf { padding: clamp(96px, 16vw, 200px) 0; }
.pagehead.nf .btn { margin-top: 32px; }

/* Listas: tipos de puerta, revisiones, trabajos de forja */
.spec { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.spec div { padding: 22px 0 26px; border-top: 1px solid rgba(22, 24, 29, 0.18); }
.spec dt { font-size: 1.22rem; font-weight: 750; font-variation-settings: "wdth" 96; margin-bottom: 6px; }
.spec dd { margin: 0; color: var(--muted); }
.spec-1 { grid-template-columns: 1fr 1fr; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.three > div { padding-top: 22px; border-top: 1.5px solid var(--ink); }
.three p, .duo-grid p { color: var(--muted); }
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.duo-ph { aspect-ratio: 16 / 10; border-radius: 3px; margin-bottom: 22px; }
.big-p { margin: 24px 0 36px; font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 56ch; }
.note { border-left: 4px solid var(--red); padding-left: clamp(20px, 3vw, 40px); }
.note h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.note p { margin-top: 18px; color: var(--muted); max-width: 58ch; }

/* Presupuesto */
.form-sec { padding-top: clamp(40px, 5vw, 64px); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.quote { display: grid; gap: 22px; }
.quote fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.quote legend, .field label { display: block; margin-bottom: 8px; padding: 0; font-weight: 700; font-size: 0.95rem; }
.field small { font-weight: 400; color: var(--muted); }
.radios { display: flex; flex-wrap: wrap; gap: 10px; }
.radio { position: relative; cursor: pointer; }
.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid rgba(22, 24, 29, 0.25); border-radius: 4px; font-weight: 600; font-size: 0.95rem; background: #f3efe7; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.radio:hover span { border-color: var(--ink); }
.radio input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.radio input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #f6f3ed; border: 1.5px solid rgba(22, 24, 29, 0.22); border-radius: 4px;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(22, 24, 29, 0.45); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.field [aria-invalid="true"] { border-color: var(--red); }
.err { margin-top: 6px; font-size: 0.88rem; color: var(--red-d); }
.err:empty { display: none; }
.hint { font-size: 0.92rem; color: var(--muted); max-width: 62ch; }
.btn-wide { justify-self: start; min-width: 260px; }
.contact-card { padding: clamp(24px, 3vw, 36px); background: var(--ink); color: #eeeae2; border-radius: 4px; position: sticky; top: calc(var(--top-h) + 24px); }
.contact-card p + p { margin-top: 8px; }
.contact-card hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); margin: 24px 0; }
.cc-big { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; font-variation-settings: "wdth" 108; letter-spacing: -0.02em; line-height: 1; }
.cc-big a { text-decoration: none; }
.contact-card .link { margin-top: 6px; }
.contact-card a:hover { color: var(--warm); }

.legal h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal p { color: var(--muted); }
.credits { display: block; margin-top: 8px; font-size: 0.74rem; }
.foot-in { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.foot-nav { display: grid; align-content: start; gap: 8px; }
.foot-nav .foot-k { margin-bottom: 6px; }
.foot-nav a { text-decoration: none; }

@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 1000px) {
  .foot-in { grid-template-columns: 1fr 1fr; }
  .svc a { grid-template-columns: minmax(0, 1fr) 150px 24px; gap: 8px 24px; }
  .svc-d { grid-column: 1; grid-row: 2; }
  .svc-ph { grid-column: 2; grid-row: 1 / span 2; }
  .svc .arr { grid-column: 3; grid-row: 1 / span 2; }
  .spec { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .foot-in { grid-template-columns: 1fr; }
  .sec-head, .split, .pagehead-in, .cta-in, .form-grid, .steps, .three, .duo-grid, .spec, .spec-1, .field-row { grid-template-columns: 1fr; }
  .split.rev > .ph { order: 0; }
  .cta-in h2 { grid-row: auto; }
  .works-grid { grid-template-columns: 1fr 1fr; }
  .works-grid .w1 { grid-column: span 2; aspect-ratio: 4 / 3; }
  .svc a { grid-template-columns: minmax(0, 1fr) 96px; }
  .svc .arr { display: none; }
  .svc-ph { grid-column: 2; }
  .pagehead-ph { order: -1; aspect-ratio: 16 / 10; }
  .pagehead { padding-top: 20px; }
  .contact-card { position: static; }
  .btn-wide { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer.open, .menu-btn span, .ph img, .nav a::after { transition: none; }
}
.cred-list { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; color: var(--muted); }
.foot-big { font-size: clamp(1.9rem, 2.9vw, 2.7rem); white-space: nowrap; }
.sec:not(.alt):not(.dark) + .sec:not(.alt):not(.dark) { padding-top: 0; }
.pagehead h1 { max-width: 11ch; }
.works-grid .ph { aspect-ratio: auto; height: clamp(380px, 40vw, 580px); }
@media (max-width: 760px) { .works-grid .ph { height: 260px; } .works-grid .w1 { height: 240px; } }


/* ───────── Bento de servicios ───────── */
.bento {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: clamp(240px, 25vw, 340px) clamp(220px, 21vw, 290px) clamp(190px, 16vw, 230px);
  grid-template-areas: "big big tall" "m f tall" "w w w";
}
.bento li:nth-child(1) { grid-area: big; }
.bento li:nth-child(2) { grid-area: m; }
.bento li:nth-child(3) { grid-area: tall; }
.bento li:nth-child(4) { grid-area: f; }
.bento li:nth-child(5) { grid-area: w; }
.bento a {
  position: relative; display: block; height: 100%; overflow: hidden; border-radius: 4px;
  color: #fff; text-decoration: none; background: var(--steel);
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.bento a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(22, 24, 29, 0.6); }
.bento .b-ph { position: absolute; inset: 0; border-radius: 0; }
.bento a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 15, 18, 0.82) 0%, rgba(14, 15, 18, 0.35) 38%, rgba(14, 15, 18, 0) 62%); pointer-events: none; }
.b-txt { position: absolute; left: clamp(18px, 2vw, 28px); right: clamp(18px, 2vw, 28px); bottom: clamp(16px, 1.8vw, 24px); z-index: 1; display: grid; gap: 6px; }
.b-t { display: flex; align-items: center; gap: 10px; font-size: clamp(1.25rem, 2vw, 1.8rem); font-weight: 800; font-variation-settings: "wdth" 90; letter-spacing: -0.015em; line-height: 1.05; }
.b-big .b-t { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.b-d { max-width: 40ch; font-size: 0.95rem; color: rgba(255, 255, 255, 0.82); text-wrap: pretty; }
.bento a:hover .arr { transform: translateX(4px); }

/* ───────── Las cinco puertas en fila ───────── */
.doors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.dt { display: grid; gap: 4px; text-decoration: none; }
.dt-frame {
  position: relative; display: block; aspect-ratio: 6 / 5; overflow: hidden; margin-bottom: 12px;
  border: 7px solid var(--steel); border-bottom: 0; background: #0f0d0b;
  perspective: 700px; perspective-origin: 50% -20%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.dt-in {
  position: absolute; inset: 0;
  background: radial-gradient(95% 70% at 50% 115%, #ffd9a0 0%, #8a5f34 32%, #2a1f16 62%, #0f0d0b 100%);
  opacity: 0.35; transition: opacity 700ms ease;
}
.dt-t { font-size: 1.15rem; font-weight: 800; font-variation-settings: "wdth" 94; letter-spacing: -0.01em; transition: color 180ms ease; }
.dt-d { font-size: 0.92rem; color: var(--muted); line-height: 1.4; }
.dt .leaf { position: absolute; inset: 0; display: block; }
.dt .leaf i { display: block; }
.dt:hover .dt-in, .dt:focus-visible .dt-in, .dt.open .dt-in { opacity: 1; }
.dt:hover .dt-t, .dt:focus-visible .dt-t { color: var(--red); }

/* Seccional: antracita por tramos, sube y se mete en el techo */
.dt-seccional .leaf { display: grid; grid-template-rows: repeat(5, 1fr); transition: transform 1000ms cubic-bezier(0.65, 0, 0.35, 1); }
.dt-seccional .leaf i { background: linear-gradient(180deg, #4a4f56 0%, #33373c 46%, #2a2d32 100%); border-bottom: 1.5px solid #15171a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.dt-seccional .leaf i:first-child { background: linear-gradient(180deg, #4a4f56 0 30%, #1e2226 30% 62%, #33373c 62%); }
.dt-seccional:hover .leaf, .dt-seccional:focus-visible .leaf, .dt-seccional.open .leaf { transform: translateY(-101%); }

/* Basculante: una pieza clara acanalada que gira hacia dentro desde arriba */
.dt-basculante .leaf {
  background: repeating-linear-gradient(90deg, #dcd8d0 0 9px, #c4bfb5 9px 11px);
  box-shadow: inset 0 -6px 0 #b3ada2;
  transform-origin: 50% 0; transition: transform 1000ms cubic-bezier(0.65, 0, 0.35, 1);
}
.dt-basculante .leaf::after { content: ""; position: absolute; left: 50%; bottom: 14%; width: 18%; height: 4%; margin-left: -9%; border-radius: 2px; background: #8d8779; }
.dt-basculante:hover .leaf, .dt-basculante:focus-visible .leaf, .dt-basculante.open .leaf { transform: translateY(-4%) rotateX(86deg); }

/* Corredera: barrotes de hierro que se deslizan hacia un lado */
.dt-corredera .leaf {
  display: flex; justify-content: space-between; padding: 0 6%;
  border-top: 7px solid #24272b; border-bottom: 7px solid #24272b;
  transition: transform 1100ms cubic-bezier(0.65, 0, 0.35, 1);
}
.dt-corredera .leaf i { width: 5px; background: linear-gradient(90deg, #1d2024, #4a5058 50%, #1d2024); }
.dt-corredera .leaf::before { content: ""; position: absolute; left: 0; right: 0; top: 48%; height: 5px; background: #24272b; }
.dt-corredera:hover .leaf, .dt-corredera:focus-visible .leaf, .dt-corredera.open .leaf { transform: translateX(104%); }

/* Batiente: dos hojas de hierro granate que se abren hacia dentro */
.dt-batiente .leaf { width: 50%; display: flex; justify-content: space-evenly; background: #6b1f25; border: 5px solid #571920; transition: transform 1000ms cubic-bezier(0.65, 0, 0.35, 1); }
.dt-batiente .leaf i { width: 3px; background: #4a141a; }
.dt-batiente .leaf.l { left: 0; right: auto; transform-origin: 0 50%; }
.dt-batiente .leaf.r { left: auto; right: 0; transform-origin: 100% 50%; }
.dt-batiente:hover .leaf.l, .dt-batiente:focus-visible .leaf.l, .dt-batiente.open .leaf.l { transform: rotateY(74deg); }
.dt-batiente:hover .leaf.r, .dt-batiente:focus-visible .leaf.r, .dt-batiente.open .leaf.r { transform: rotateY(-74deg); }

/* Enrollable: lamas de aluminio que se recogen en el cajón */
.dt-enrollable .box { position: absolute; left: 0; right: 0; top: 0; height: 13%; z-index: 2; background: linear-gradient(180deg, #a7adb4, #7d838a); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); }
.dt-enrollable .leaf { top: 13%; display: grid; grid-template-rows: repeat(14, 1fr); clip-path: inset(0 0 0 0); transition: clip-path 1100ms cubic-bezier(0.65, 0, 0.35, 1); }
.dt-enrollable .leaf i { background: linear-gradient(180deg, #c3c8ce, #9aa0a7); border-bottom: 1px solid #6f757c; }
.dt-enrollable:hover .leaf, .dt-enrollable:focus-visible .leaf, .dt-enrollable.open .leaf { clip-path: inset(0 0 100% 0); }

/* ───────── Trabajos: una persiana fina que sube al aparecer (discreta) ───────── */
.js .works-grid .ph { position: relative; }
.js .works-grid .ph::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, #3b3f45 0 18px, #2c2f34 18px 19.5px);
  clip-path: inset(0 0 0 0);
  transition: clip-path 900ms cubic-bezier(0.65, 0, 0.35, 1);
}
.js .works-grid.in .ph::after { clip-path: inset(0 0 100% 0); }
.js .works-grid.in .ph:nth-child(2)::after { transition-delay: 140ms; }
.js .works-grid.in .ph:nth-child(3)::after { transition-delay: 280ms; }

@media (max-width: 1000px) {
  .doors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 200px 200px 200px; grid-template-areas: "big big" "m f" "tall tall" "w w"; }
  .doors { grid-template-columns: 1fr 1fr; gap: 24px 14px; }
  .dt-frame { border-width: 5px; border-bottom: 0; }
  .dt-d { font-size: 0.86rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dt .leaf, .dt-in, .bento a { transition: none; }
  .js .works-grid .ph::after { display: none; }
}
/* Al abrirse, el garaje se funde poco a poco con la fachada, sin corte:
   --fd (0 cerrada → 1 abierta) lo pone site.js. Primero se aclara el interior y, más abajo,
   los laterales del marco siguen bajando y se desvanecen. Mismo grano de fondo en toda la página. */
body { background: var(--grain), var(--facade); }
.stage { background: transparent; }
.opening {
  background: transparent;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fd, 0) * 26%), rgba(0, 0, 0, 0.6) calc(100% - var(--fd, 0) * 15%), rgba(0, 0, 0, 0.22) calc(100% - var(--fd, 0) * 6%), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fd, 0) * 26%), rgba(0, 0, 0, 0.6) calc(100% - var(--fd, 0) * 15%), rgba(0, 0, 0, 0.22) calc(100% - var(--fd, 0) * 6%), transparent 100%);
}
.inside {

  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fd, 0) * 34%), rgba(0, 0, 0, 0.82) calc(100% - var(--fd, 0) * 27%), rgba(0, 0, 0, 0.55) calc(100% - var(--fd, 0) * 20%), rgba(0, 0, 0, 0.26) calc(100% - var(--fd, 0) * 13%), rgba(0, 0, 0, 0.08) calc(100% - var(--fd, 0) * 7%), transparent calc(100% - var(--fd, 0) * 2%));
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fd, 0) * 34%), rgba(0, 0, 0, 0.82) calc(100% - var(--fd, 0) * 27%), rgba(0, 0, 0, 0.55) calc(100% - var(--fd, 0) * 20%), rgba(0, 0, 0, 0.26) calc(100% - var(--fd, 0) * 13%), rgba(0, 0, 0, 0.08) calc(100% - var(--fd, 0) * 7%), transparent calc(100% - var(--fd, 0) * 2%));
}
@media (prefers-reduced-motion: reduce) { .stage { --fd: 1; } }
html:not(.js) .stage { --fd: 1; }
.copy { transform: translateY(calc(var(--fd, 0) * -9svh)); }

/* La puerta es decorado: nunca tapa los botones del titular */
.door { pointer-events: none; }
