/* INSTAHOGAR · estilos (28/11/2026)
   Colores de su logo: morado #8F62C0 y verde #7CC038. Base: noche violeta (la del salón con la luz apagada) y una pared
   de yeso claro. Un solo color con presencia (el morado); el verde, en poco: el tejado, la lucecita de los interruptores
   y el botón de WhatsApp.
   Letras: Gabarito (títulos, 700-900) y Be Vietnam Pro (texto, 400-600). Nada fino, nada de cursiva. */
:root {
  --noche: #17121F; --noche2: #221A2E; --noche3: #2E2440;
  --tinta: #1E1828; --pared: #EFE9E0; --hueso: #F6F2EC; --blanco: #FBF9F5;
  --mor: #8F62C0; --mor-os: #5E3C8A; --mor-cl: #C9AEF0; --mor-led: #E07BFF;
  --ver: #7CC038; --ver-os: #3F7417;
  --gris: #645B6E; --gris-cl: #B9AFC6; --junta: #D8CFC2;
  --f-t: 'Gabarito', 'Arial Black', system-ui, sans-serif;
  --f-p: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gut: clamp(16px, 4vw, 56px);
  --hdr: 64px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--hdr); overflow-x: clip; }
body { margin: 0; background: var(--noche); color: var(--tinta); font: 400 16px/1.55 var(--f-p); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { 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: -60px; z-index: 100; background: var(--hueso); color: var(--tinta); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--ver); outline-offset: 3px; }
.ih-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gut); }

/* ---------- textos comunes ---------- */
.ih-k { margin: 0 0 14px; font: 700 13px/1 var(--f-p); letter-spacing: .14em; text-transform: uppercase; color: var(--mor-os); display: flex; align-items: center; gap: 10px; }
.ih-k::before { content: ''; width: 22px; height: 4px; border-radius: 4px; background: var(--ver); }
.ih-t { margin: 0; font: 800 clamp(38px, 5.2vw, 72px)/.98 var(--f-t); letter-spacing: -.015em; }
.ih-t .ih-l { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ih-t .ih-l > span { display: block; }
.js .ih-t .ih-l > span { transform: translateY(105%); transition: transform .9s var(--ease); }
.js .ve .ih-t .ih-l > span { transform: none; }
.js .ve .ih-t .ih-l:nth-child(2) > span { transition-delay: .08s; }
.ih-p { margin: 16px 0 0; font: 500 clamp(16px, 1.3vw, 18px)/1.5 var(--f-p); color: var(--gris); max-width: 46ch; }

/* ---------- botones ---------- */
.ih-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0; font: 700 16px/1 var(--f-p); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s; white-space: nowrap; }
.ih-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.ih-btn i { font-style: normal; transition: transform .25s var(--ease); }
.ih-btn:hover i { transform: translateX(4px); }
.ih-btn-m { background: var(--mor); color: #fff; box-shadow: 0 10px 30px -10px rgba(143, 98, 192, .8); }
.ih-btn-m:hover { background: #9C70CE; transform: translateY(-2px); }
.ih-btn-v { background: var(--ver); color: #11200A; box-shadow: 0 10px 30px -12px rgba(124, 192, 56, .75); }
.ih-btn-v:hover { background: #8BCF47; transform: translateY(-2px); }
.ih-btn-o { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.ih-btn-o:hover { background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
.ih-btn-s { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* ---------- menú ---------- */
.ih-hdr { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: var(--hdr); display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); padding: 0 var(--gut); color: var(--hueso); transition: background .35s, box-shadow .35s; }
.ih-hdr.sol { background: rgba(23, 18, 31, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.ih-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.ih-logo .ih-mark { width: 40px; height: auto; flex: none; }
.ih-logo b { font: 800 21px/1 var(--f-t); letter-spacing: -.01em; }
.ih-nav { display: flex; gap: clamp(16px, 2.2vw, 32px); }
.ih-nav a { font: 600 15px/1 var(--f-p); text-decoration: none; opacity: .86; padding: 8px 0; position: relative; }
.ih-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--ver); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.ih-nav a:hover { opacity: 1; }
.ih-nav a:hover::after { transform: none; }
.ih-lang { font: 700 13px/1 var(--f-p); letter-spacing: .08em; text-decoration: none; padding: 9px 10px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px rgba(246, 242, 236, .35); }
.ih-lang:hover { box-shadow: inset 0 0 0 1.5px var(--hueso); }
.ih-burger { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; position: relative; }
.ih-burger span:not(.sr) { position: absolute; left: 11px; right: 11px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease); }
.ih-burger span:nth-child(1) { top: 17px; }
.ih-burger span:nth-child(2) { top: 25px; }
.ih-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.ih-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ==========================================================================================
   1 · PORTADA: el salón de noche, el nombre bajo el tejado y la luz que se enciende
   ========================================================================================== */
.ih-por { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: var(--noche); color: var(--hueso); isolation: isolate; }
.ih-esc { position: absolute; inset: -3%; transform: translate3d(var(--px, 0px), var(--py, 0px), 0); transition: transform .9s cubic-bezier(.2, .6, .2, 1); will-change: transform; }
.ih-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.js .ih-on { opacity: 0; transition: opacity 1.15s cubic-bezier(.3, .6, .2, 1); }
.js .ih-por.encendida .ih-on { opacity: 1; }
.js .ih-por.apagando .ih-on { transition-duration: .22s; }
.ih-led { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; pointer-events: none; }
.ih-velo { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(90deg, rgba(23, 18, 31, .9) 0%, rgba(23, 18, 31, .72) 26%, rgba(23, 18, 31, .2) 54%, rgba(23, 18, 31, 0) 72%),
    linear-gradient(0deg, rgba(23, 18, 31, .85) 0%, rgba(23, 18, 31, 0) 38%),
    linear-gradient(180deg, rgba(23, 18, 31, .55) 0%, rgba(23, 18, 31, 0) 18%); }
.ih-por-in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: calc(var(--hdr) + 12px) var(--gut) clamp(26px, 7vh, 64px); }
/* el nombre: 2 líneas bajo el tejado. Todo en em: crece con la letra */
.ih-nom { --fs: min(9.6vw, calc((100svh - 250px) / 2.95)); position: relative; margin: 0; padding-top: 1.02em; width: 3.62em; font: 900 var(--fs)/.9 var(--f-t); letter-spacing: -.01em; color: var(--hueso); text-shadow: 0 2px 40px rgba(23, 18, 31, .45); }
.ih-nl { display: block; overflow: hidden; padding: 0 .02em .05em; margin: 0 -.02em -.05em; }
.ih-lt { display: inline-block; }
.js .ih-lt { transform: translateY(108%); }
.js .ih-por.ve .ih-lt { transform: none; transition: transform 1s var(--ease) calc(var(--n) * 45ms); }
.ih-tejado { position: absolute; left: -.08em; top: 0; width: 3.7em; height: 3em; overflow: visible; pointer-events: none; }
.ih-tejado path { filter: drop-shadow(0 0 .08em rgba(124, 192, 56, .35)); }
.js .ih-tejado path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .ih-por.ve .ih-tejado path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .2, 1) .55s; }
.ih-lema { margin: 22px 0 22px; font: 600 clamp(17px, 1.5vw, 22px)/1.3 var(--f-p); max-width: 30ch; }
.js .ih-lema, .js .ih-por-b { opacity: 0; transform: translateY(14px); }
.js .ih-por.encendida .ih-lema, .js .ih-por.listo .ih-lema, .js .ih-por.encendida .ih-por-b, .js .ih-por.listo .ih-por-b { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .ih-por.encendida .ih-por-b { transition-delay: .12s; }

/* ==========================================================================================
   INTERRUPTOR DE PARED (portada y servicios)
   ========================================================================================== */
.sw { --tam: clamp(78px, 7.2vw, 104px); position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw-luz { position: absolute; left: 50%; top: calc(var(--tam) / 2); width: calc(var(--tam) * 2.6); height: calc(var(--tam) * 2.6); margin: calc(var(--tam) * -1.3) 0 0 calc(var(--tam) * -1.3); border-radius: 50%; background: radial-gradient(circle, rgba(143, 98, 192, .55) 0%, rgba(143, 98, 192, .22) 38%, rgba(143, 98, 192, 0) 68%); opacity: 0; transform: scale(.6); transition: opacity .45s, transform .6s var(--ease); pointer-events: none; }
.sw-placa { position: relative; width: var(--tam); height: var(--tam); border-radius: 14%; display: grid; place-items: center; perspective: 260px;
  background: linear-gradient(150deg, #FFFEFB 0%, #F1ECE4 60%, #E6E0D6 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(60, 40, 80, .07), 0 1px 2px rgba(40, 25, 60, .2), 0 16px 28px -14px rgba(40, 25, 60, .45); transition: box-shadow .4s; }
.sw-tecla { position: relative; width: 66%; height: 66%; border-radius: 11%; transform: rotateX(11deg); transition: transform .14s cubic-bezier(.3, 1.7, .5, 1), background .14s, box-shadow .14s;
  background: linear-gradient(180deg, #FFFFFF 0%, #F3EFE8 55%, #E4DED4 100%);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 -1px rgba(60, 40, 80, .1), 0 5px 9px -3px rgba(40, 25, 60, .28); }
.sw-led { position: absolute; left: 50%; bottom: 13%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #CBCFC2; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .22); transition: background .15s, box-shadow .15s; }
.sw-n { position: relative; font: 800 clamp(15px, 1.25vw, 18px)/1.1 var(--f-t); transition: color .3s; }
.sw:hover .sw-placa { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(60, 40, 80, .07), 0 1px 2px rgba(40, 25, 60, .2), 0 20px 32px -14px rgba(40, 25, 60, .55); }
.sw:active .sw-tecla { transform: rotateX(0deg) scale(.97); }
.sw[aria-checked="true"] .sw-tecla { transform: rotateX(-11deg); background: linear-gradient(0deg, #FFFFFF 0%, #F3EFE8 55%, #E2DBD0 100%); box-shadow: inset 0 -1px 0 #fff, 0 -2px 0 -1px rgba(60, 40, 80, .08), 0 2px 5px -2px rgba(40, 25, 60, .25); }
.sw[aria-checked="true"] .sw-led { background: var(--ver); box-shadow: 0 0 5px 1px rgba(124, 192, 56, .95), 0 0 14px 2px rgba(124, 192, 56, .55); }
.sw[aria-checked="true"] .sw-luz { opacity: 1; transform: none; }
.sw[aria-checked="true"] .sw-placa { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(60, 40, 80, .07), 0 1px 2px rgba(40, 25, 60, .2), 0 16px 34px -12px rgba(143, 98, 192, .6); }
.sw[aria-checked="true"] .sw-n { color: var(--mor-os); }
.sw:focus-visible { outline: none; }
.sw:focus-visible .sw-placa { outline: 3px solid var(--ver); outline-offset: 4px; }
/* el de la portada: más pequeño, sobre la foto */
.sw-por { --tam: 58px; position: absolute; z-index: 3; right: var(--gut); bottom: clamp(26px, 7vh, 64px); gap: 9px; color: var(--hueso); }
.sw-por .sw-n { font-size: 14px; letter-spacing: .04em; }
.sw-por[aria-checked="true"] .sw-n { color: var(--hueso); }
.sw-por .sw-luz { background: radial-gradient(circle, rgba(224, 123, 255, .35) 0%, rgba(224, 123, 255, 0) 65%); }
.js .sw-por { opacity: 0; transition: opacity .8s .4s; }
.js .ih-por.listo .sw-por, .js .ih-por.encendida .sw-por { opacity: 1; }

/* ==========================================================================================
   2 · SERVICIOS: la pared de interruptores
   ========================================================================================== */
.ih-serv { position: relative; padding: clamp(80px, 12vh, 130px) 0 clamp(72px, 11vh, 120px); color: var(--tinta);
  background-color: var(--pared);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .5 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }
.ih-serv-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 370px); gap: clamp(36px, 5vw, 80px); align-items: end; }
.ih-pantalla { position: relative; min-height: clamp(150px, 20vh, 180px); margin: 26px 0 30px; }
.ih-pan-n { margin: 0; font: 900 clamp(54px, 7.4vw, 112px)/.9 var(--f-t); letter-spacing: -.02em; color: var(--mor); }
.ih-pan p { margin: 12px 0 0; font: 500 17px/1.45 var(--f-p); color: var(--gris); max-width: 44ch; }
.js .ih-pan { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transform: translateY(18px); transition: opacity .35s, transform .5s var(--ease); pointer-events: none; }
.js .ih-pan.on { opacity: 1; transform: none; }
.js .ih-pan .ih-pan-n { transform: translateY(30%); transition: transform .6s var(--ease); }
.js .ih-pan.on .ih-pan-n { transform: none; }
html:not(.js) .ih-pan { margin-bottom: 22px; }
.ih-pared { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 24px); justify-items: center; }
/* la pista: las lucecitas laten un momento al llegar */
.js .ve .ih-pared .sw:not([aria-checked="true"]) .sw-led { animation: pista 1.4s ease-in-out .6s 2; }
@keyframes pista { 50% { background: #B4DD8C; box-shadow: 0 0 8px rgba(124, 192, 56, .55); } }
/* la hoja del presupuesto */
.ih-hoja { position: relative; background: var(--noche); color: var(--hueso); border-radius: 24px; padding: 28px 26px 22px; box-shadow: 0 40px 70px -40px rgba(23, 18, 31, .8); display: flex; flex-direction: column; }
.ih-hoja-t { margin: 0 0 14px; font: 800 24px/1.1 var(--f-t); }
.ih-hoja-l { list-style: none; margin: 0 0 20px; padding: 0; min-height: 76px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; }
.ih-hoja-l li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 10px; border-radius: 999px; background: rgba(143, 98, 192, .24); color: #EADCFB; font: 600 14px/1 var(--f-p); animation: chip .35s var(--ease); }
.ih-hoja-l li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ver); box-shadow: 0 0 8px rgba(124, 192, 56, .8); }
.ih-hoja-l li.ih-vacio { background: none; padding: 0; color: var(--gris-cl); font-weight: 500; animation: none; }
.ih-hoja-l li.ih-vacio::before { display: none; }
@keyframes chip { from { opacity: 0; transform: scale(.85); } }
.ih-hoja label { font: 600 14px/1.3 var(--f-p); color: var(--gris-cl); margin-bottom: 8px; }
.ih-hoja textarea { width: 100%; resize: vertical; min-height: 84px; max-height: 200px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid rgba(246, 242, 236, .14); background: var(--noche2); color: var(--hueso); font: 500 15px/1.45 var(--f-p); margin-bottom: 18px; }
.ih-hoja textarea::placeholder { color: #8E849C; }
.ih-hoja textarea:focus { outline: none; border-color: var(--mor-cl); }
.ih-hoja .ih-btn { width: 100%; white-space: normal; text-align: center; padding: 12px 20px; }
.ih-hoja-tel { margin: 14px 0 0; text-align: center; font: 500 14px/1.3 var(--f-p); color: var(--gris-cl); }
.ih-hoja-tel a { color: var(--hueso); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--ver); }

/* ==========================================================================================
   3 · TRABAJOS: las fotos reales se encienden al llegar
   ========================================================================================== */
.ih-trab { background: var(--noche); color: var(--hueso); padding: clamp(80px, 12vh, 130px) 0 clamp(72px, 11vh, 120px); }
.ih-trab .ih-k { color: var(--mor-cl); }
.ih-trab .ih-p { color: var(--gris-cl); }
.ih-trab-cap { display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 48px; }
.ih-trab-cap .ih-k { grid-column: 1 / -1; }
.ih-trab-cap .ih-p { margin: 0 0 .5em; justify-self: end; text-align: right; }
.ih-galeria { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(12px, 1.6vw, 20px); margin-top: clamp(28px, 5vh, 48px); }
.ih-f { margin: 0; position: relative; display: flex; flex-direction: column; }
.ih-f-foto { position: relative; display: block; width: 100%; height: clamp(260px, 50vh, 470px); padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: zoom-in; background: var(--noche2); }
.ih-f-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .5s; }
.ih-f-foto:hover img { transform: scale(1.035); }
.ih-f-a .ih-f-foto img { object-position: 50% 60%; }
.ih-f figcaption { margin-top: 14px; font: 500 14.5px/1.45 var(--f-p); color: var(--gris-cl); max-width: 42ch; }
/* encender: empiezan casi a oscuras y, al llegar, la luz parpadea y se queda */
.js .ih-f-foto { filter: brightness(.16) saturate(.35); }
.js .ih-f.luz .ih-f-foto { animation: chispa 1.05s linear forwards; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes chispa {
  0% { filter: brightness(.16) saturate(.35); } 12% { filter: brightness(.9) saturate(.9); } 18% { filter: brightness(.25) saturate(.4); }
  30% { filter: brightness(1.05) saturate(1); } 36% { filter: brightness(.55) saturate(.7); } 52% { filter: brightness(1.08) saturate(1.05); }
  100% { filter: brightness(1) saturate(1); }
}
/* el salón con dos luces */
.ih-f-c .ih-ledf { opacity: 0; }
.ih-f-c[data-luz="led"] .ih-ledf { opacity: 1; }
.ih-f-c[data-luz="led"] .ih-focos { opacity: 0; }
.ih-seg { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; padding: 4px; border-radius: 999px; background: rgba(23, 18, 31, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ih-seg button { border: 0; background: none; cursor: pointer; min-height: 36px; padding: 0 16px; border-radius: 999px; font: 700 14px/1 var(--f-p); color: var(--gris-cl); transition: background .3s, color .3s; }
.ih-seg button[aria-checked="true"] { background: #F2E6CF; color: #2A2116; }
.ih-seg button[data-v="led"][aria-checked="true"] { background: var(--mor-led); color: #210B2B; }
/* la caja para ver en grande */
.ih-caja { border: 0; padding: 0; background: none; max-width: min(1200px, 94vw); max-height: 92vh; overflow: visible; color: var(--hueso); }
.ih-caja::backdrop { background: rgba(12, 9, 17, .9); }
.ih-caja img { width: auto; max-width: 100%; max-height: 80vh; border-radius: 14px; margin: 0 auto; }
.ih-caja p { margin: 14px 0 0; text-align: center; font: 500 15px/1.4 var(--f-p); color: var(--gris-cl); }
.ih-caja-x { position: absolute; top: -18px; right: -10px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--hueso); color: var(--tinta); font: 700 26px/1 var(--f-p); cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }

/* ==========================================================================================
   4 · PREGUNTAS: azulejos hidráulicos que se giran
   ========================================================================================== */
.ih-faq { background: var(--hueso); color: var(--tinta); padding: clamp(80px, 12vh, 130px) 0; }
.ih-faq .ih-wrap { max-width: 1100px; }
.ih-faq-cap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 40px; }
.ih-faq-cap .ih-k { flex-basis: 100%; }
.ih-faq-cap .ih-p { margin: 0 0 .4em; }
.ih-azulejos { list-style: none; margin: clamp(28px, 5vh, 44px) 0 0; padding: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: var(--junta); border-radius: 8px; box-shadow: inset 0 1px 3px rgba(60, 40, 30, .18); }
.ih-az { position: relative; aspect-ratio: 1 / .86; perspective: 1100px; }
.ih-az-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3, .9, .3, 1); }
.ih-az.girada .ih-az-in { transform: rotateY(180deg); }
.ih-az-cara, .ih-az-dorso { position: absolute; inset: 0; border-radius: 3px; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: grid; place-items: center; padding: 12%; text-align: center; }
/* el dibujo del azulejo: un círculo en cada esquina y un rombo en cada lado. Con los azulejos juntos se cierran los
   círculos y los rombos, como en un suelo hidráulico. Cada pieza va a su tamaño (no se deforma con la forma del azulejo). */
.ih-az-cara { --m: clamp(84px, 9vw, 120px); --q: clamp(24px, 2.4vw, 32px); background-color: #F8F3EA; background-repeat: no-repeat;
  --c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Ccircle cx='60' cy='60' r='30' fill='%238F62C0' opacity='.15'/%3E%3Ccircle cx='60' cy='60' r='45' fill='none' stroke='%238F62C0' stroke-width='6' opacity='.42'/%3E%3Ccircle cx='60' cy='60' r='10' fill='%237CC038'/%3E%3C/svg%3E");
  --r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 0 32 16 16 32 0 16Z' fill='%238F62C0' opacity='.17'/%3E%3C/svg%3E");
  background-image: var(--c), var(--c), var(--c), var(--c), var(--r), var(--r), var(--r), var(--r);
  background-size: var(--m) var(--m), var(--m) var(--m), var(--m) var(--m), var(--m) var(--m), var(--q) var(--q), var(--q) var(--q), var(--q) var(--q), var(--q) var(--q);
  background-position: calc(var(--m) / -2) calc(var(--m) / -2), calc(100% + var(--m) / 2) calc(var(--m) / -2), calc(var(--m) / -2) calc(100% + var(--m) / 2), calc(100% + var(--m) / 2) calc(100% + var(--m) / 2), 50% calc(var(--q) / -2), 50% calc(100% + var(--q) / 2), calc(var(--q) / -2) 50%, calc(100% + var(--q) / 2) 50%; }
.ih-az-cara::before { content: ''; position: absolute; inset: clamp(9px, 1vw, 13px); border: 2.5px solid rgba(143, 98, 192, .28); border-radius: 8px; pointer-events: none; }
.ih-az-cara h3 { margin: 0; }
.ih-az-b { border: 0; background: none; padding: 0; cursor: pointer; font: 800 clamp(17px, 1.7vw, 23px)/1.15 var(--f-t); color: var(--tinta); letter-spacing: -.005em; }
.ih-az-b::after { content: ''; position: absolute; inset: 0; }
.ih-az-gira { position: absolute; right: 9%; bottom: 9%; font-style: normal; font: 700 18px/1 var(--f-p); color: var(--mor); opacity: .8; transition: transform .4s var(--ease); }
.ih-az:hover .ih-az-gira { transform: rotate(120deg); }
.ih-az:hover .ih-az-cara { background-color: #FFFBF4; }
.ih-az-dorso { transform: rotateY(180deg); background: var(--mor); color: #fff; cursor: pointer;
  background-image: radial-gradient(circle at 0 0, rgba(124, 192, 56, .9) 0 10px, transparent 10.5px), radial-gradient(circle at 100% 100%, rgba(255, 255, 255, .14) 0 44px, transparent 44.5px); }
.ih-az-dorso p { margin: 0; font: 600 clamp(14.5px, 1.25vw, 17px)/1.45 var(--f-p); }
/* sin JavaScript: pregunta y respuesta, una debajo de otra */
html:not(.js) .ih-az { aspect-ratio: auto; }
html:not(.js) .ih-az-in, html:not(.js) .ih-az-cara, html:not(.js) .ih-az-dorso { position: static; transform: none; }
.js .ve .ih-az { animation: baldosa .7s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes baldosa { from { opacity: 0; transform: translateY(24px) scale(.96); } }

/* ==========================================================================================
   5 · CONTACTO y pie
   ========================================================================================== */
.ih-fin { background: var(--noche); color: var(--hueso); padding-top: clamp(90px, 14vh, 150px); position: relative; overflow: hidden; }
.ih-fin::before { content: ''; position: absolute; left: 50%; top: 0; width: min(1100px, 120vw); height: 520px; transform: translateX(-50%); background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(143, 98, 192, .32), rgba(143, 98, 192, 0) 70%); pointer-events: none; }
.ih-fin-in { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
/* el tejado mide en em lo mismo que la línea más larga del título (+0,7 em): no se deforma nunca */
.ih-fin-casa { position: relative; font-size: clamp(46px, 8vw, 118px); padding-top: 1.02em; }
.ih-fin-tejado { position: absolute; left: 50%; top: 0; height: 1em; transform: translateX(-50%); overflow: visible; }
.ih-fin-tejado path { filter: drop-shadow(0 0 .08em rgba(124, 192, 56, .35)); }
.js .ih-fin-tejado path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .ih-fin.ve .ih-fin-tejado path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s cubic-bezier(.6, 0, .2, 1) .2s; }
.ih-fin-t { font-size: 1em; font-weight: 900; }
.ih-fin-p { margin: 22px 0 32px; font: 600 clamp(17px, 1.5vw, 21px)/1.4 var(--f-p); color: var(--gris-cl); }
.ih-fin-b { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ih-peu { margin-top: clamp(80px, 12vh, 130px); border-top: 1px solid rgba(246, 242, 236, .1); padding: 34px 0 40px; }
.ih-peu-in { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.ih-peu-m .ih-mark { width: 64px; height: auto; }
.ih-peu-d p { margin: 0 0 4px; font: 500 14px/1.5 var(--f-p); color: var(--gris-cl); }
.ih-peu-d b { color: var(--hueso); font-weight: 600; }
.ih-peu-d a { color: var(--hueso); text-decoration: none; }
.ih-peu-l { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 14px/1.4 var(--f-p); }
.ih-peu-l a { color: var(--gris-cl); text-decoration: none; }
.ih-peu-l a:hover { color: var(--hueso); }

/* ---------- legales y 404 ---------- */
.ih-legal { background: var(--hueso); color: var(--tinta); }
.ih-legal-in { max-width: 760px; padding-top: calc(var(--hdr) + 60px); padding-bottom: 80px; }
.ih-legal-in .ih-t { font-size: clamp(36px, 5vw, 56px); margin-bottom: 24px; }
.ih-legal-in h2 { font: 800 22px/1.2 var(--f-t); margin: 30px 0 8px; }
.ih-legal-in p { margin: 0 0 12px; }
.ih-legal-in a:not(.ih-btn) { color: var(--mor-os); font-weight: 600; }
.ih-legal-in .ih-btn { margin-top: 24px; }
.ih-404 { background: var(--noche); color: var(--hueso); }
.ih-e404 { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px var(--gut); }
.ih-e404-m .ih-mark { width: 120px; height: auto; }
.ih-e404-n { margin: 16px 0 4px; font: 900 clamp(90px, 16vw, 180px)/.85 var(--f-t); color: var(--mor); }
.ih-e404 .ih-p { color: var(--gris-cl); margin-bottom: 26px; }
.ih-e404-b { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.ih-e404 .ih-btn-o { color: var(--hueso); }

/* ==========================================================================================
   PANTALLAS
   ========================================================================================== */
@media (max-width: 1080px) {
  .ih-serv-in { grid-template-columns: 1fr; align-items: start; }
  .ih-hoja { max-width: 560px; }
  .ih-galeria { grid-template-columns: 1fr 1fr; }
  .ih-f-a { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .ih-nav { position: fixed; top: var(--hdr); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gut) 22px; background: rgba(23, 18, 31, .97); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s; }
  .ih-nav.abierto { opacity: 1; transform: none; visibility: visible; transition: opacity .25s, transform .3s var(--ease); }
  .ih-nav a { font-size: 20px; padding: 14px 0; border-bottom: 1px solid rgba(246, 242, 236, .08); }
  .ih-burger { display: block; }
  .ih-hdr .ih-btn-s { display: none; }
  .ih-hdr.menu { background: rgba(23, 18, 31, .97); }
  .ih-trab-cap { grid-template-columns: 1fr; }
  .ih-trab-cap .ih-p { justify-self: start; text-align: left; margin-top: 14px; }
}
@media (max-width: 720px) {
  :root { --hdr: 58px; }
  .ih-logo b { font-size: 19px; }
  .ih-logo .ih-mark { width: 34px; }
  .ih-por { min-height: 560px; }
  .ih-foto { object-position: 56% 50%; }
  .ih-velo { background: linear-gradient(0deg, rgba(23, 18, 31, .96) 0%, rgba(23, 18, 31, .78) 38%, rgba(23, 18, 31, .1) 66%), linear-gradient(180deg, rgba(23, 18, 31, .6) 0%, rgba(23, 18, 31, 0) 20%); }
  .ih-nom { --fs: min(23vw, 110px); }
  .ih-lema { margin: 16px 0 18px; }
  .ih-por-in { padding-bottom: 28px; }
  .ih-pared { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
  .sw { --tam: clamp(76px, 22vw, 96px); }
  /* en el móvil el interruptor de la portada sube arriba a la derecha, bajo el menú: abajo tapaba la frase */
  .sw.sw-por { --tam: 46px; top: calc(var(--hdr) + 18px); bottom: auto; }
  .ih-pantalla { min-height: 150px; margin: 20px 0 26px; }
  .ih-galeria { grid-template-columns: 1fr; }
  .ih-f-foto { height: auto; aspect-ratio: 4 / 3; }
  .ih-azulejos { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 6px; gap: 6px; }
  .ih-az { aspect-ratio: 1 / 1.02; }
  .ih-az-cara, .ih-az-dorso { padding: 10%; }
  .ih-az-b { font-size: 16px; }
  .ih-az-dorso p { font-size: 13.5px; line-height: 1.4; }
  .ih-peu-in { grid-template-columns: 1fr; text-align: left; }
  .ih-fin-b .ih-btn { width: 100%; }
}
@media (max-width: 380px) {
  .ih-az-dorso p { font-size: 12.8px; }
  .ih-az-cara, .ih-az-dorso { padding: 8%; }
}
/* pantallas bajas de portátil: el nombre manda, pero cabe con el menú */
@media (min-width: 721px) and (max-height: 620px) {
  .ih-lema { margin: 16px 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
