/* Decoestor Madrid · «El muestrario»: página blanca, tablero de tela azul pizarra y un simulador de luz con telas reales */

@font-face { font-family: "Shippori Mincho B1"; src: url("fonts/ShipporiMinchoB1-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Shippori Mincho"; src: url("fonts/ShipporiMincho-500-latin.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Shippori Mincho"; src: url("fonts/ShipporiMincho-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-400-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Brygada 1918"; src: url("fonts/Brygada1918-500-italic-latin.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --ink: #1b2c39;
  --ink-2: #4a5560;
  --muted: #5d6066;
  --rule: #e4e5e8;
  --paper: #ffffff;
  --soft: #f4f5f6;
  --slate: #586f79;
  --slate-dark: #445862;
  --slate-ink: #2c3a48;
  --cloth: #5b6d79; /* tela del muestrario, oscurecida para que el texto claro encima pase 4,5:1 */
  --tag: #ece7d5;
  --tag-ink: #2c3a48;
  --cream: #f6f4ec;
  --gold: #c9a24a;
  --display: "Shippori Mincho B1", "Shippori Mincho", Georgia, serif;
  --serif: "Shippori Mincho", Georgia, serif;
  --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --margin: clamp(20px, 5vw, 64px);
  --section: clamp(64px, 9vw, 128px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; scrollbar-color: var(--slate) var(--soft); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; color: var(--ink); }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--tag); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
.wrap { width: min(1280px, 100% - 2 * var(--margin)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { top: 12px; }
.ico { width: 1em; height: 1em; flex: none; }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.text { color: var(--ink-2); max-width: 62ch; margin-top: 16px; }

/* Botón */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 56px; padding: 12px 28px; border: 0; border-radius: 10px; font: 500 1.25rem/1.1 var(--serif); text-decoration: none; cursor: pointer; transition: background-color 0.2s, transform 0.2s var(--ease); }
.btn--cta { background: var(--slate); color: var(--cream); box-shadow: 0 1px 0 rgb(255 255 255 / 0.15) inset, 0 6px 16px rgb(27 44 57 / 0.18); }
.btn--cta:hover { background: var(--slate-dark); }
.btn--cta .ico { transition: transform 0.3s var(--ease); }
.btn--cta:hover .ico { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn.loading { pointer-events: none; opacity: 0.8; }

/* ---------- Cabecera ---------- */
.site-header { position: relative; z-index: 3; display: flex; align-items: center; gap: 16px; padding: 6px var(--margin); border-bottom: 1px solid var(--rule); background: var(--paper); }
.brand { display: block; flex: none; }
.brand img { height: 50px; width: auto; }
.nav { display: none; }
.nav a { white-space: nowrap; letter-spacing: -0.01em; font: 500 1.05rem/1 var(--serif); text-decoration: none; color: var(--ink); padding: 10px 0; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--slate); text-underline-offset: 0.35em; }
.header-tel { margin-left: auto; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 24px; }
.header-tel span { display: none; white-space: nowrap; }
.menu-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-size: 26px; cursor: pointer; }
.mobile-nav { display: none; position: fixed; inset: 0; z-index: 40; background: var(--paper); padding: 96px var(--margin) 32px; flex-direction: column; gap: 4px; overflow-y: auto; }
.mobile-nav.is-open { display: flex; }
.mobile-nav a { font: 700 1.7rem/1.2 var(--serif); color: var(--ink); text-decoration: none; padding: 8px 0; }
.mobile-nav a.sub { font: 500 1.2rem/1.2 var(--serif); padding-left: 18px; color: var(--ink-2); }
.mobile-nav .btn { margin-top: 20px; font-size: 1.2rem; color: var(--cream); }
.mobile-nav .m-tel { display: inline-flex; gap: 10px; align-items: center; font: 400 1.2rem var(--sans); }
body.nav-open .menu-btn { position: fixed; right: var(--margin); top: 18px; z-index: 45; }
body.nav-open .site-header { z-index: 46; }
body.nav-open .header-tel { visibility: hidden; } /* la cruz de cerrar queda por encima del menú */

/* ---------- Primera pantalla (móvil primero) ---------- */
.front { position: relative; container-type: inline-size; --u: calc(100cqw / 1536); }
.front-copy { padding: 36px var(--margin) 0; }
.front h1 { font-family: var(--display); font-size: clamp(2.3rem, 9.6vw, 3.4rem); line-height: 1.08; letter-spacing: -0.015em; }
.lead { margin-top: 18px; color: var(--muted); font-size: 1.15rem; line-height: 1.5; max-width: 34em; }
.lead strong { color: var(--ink); font-weight: 500; }
.front .btn--cta { margin-top: 26px; width: 100%; }
.years { display: flex; align-items: center; gap: 16px; margin-top: 22px; color: #4b535a; }
.years em { font: italic 500 1.15rem/1.2 "Brygada 1918", var(--serif); white-space: nowrap; }
.years .rule { flex: 1; height: 1px; background: #c3c7ca; max-width: 64px; }

/* Tablero del muestrario */
.board { position: relative; margin: 36px var(--margin) 0; padding: 54px 18px 22px; border-radius: 12px; background: linear-gradient(rgb(27 44 57 / 0.22), rgb(27 44 57 / 0.22)), url("plates/board-cloth.png") repeat, var(--cloth); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12), 0 14px 30px rgb(27 44 57 / 0.22); color: var(--cream); }
.board::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgb(246 244 236 / 0.55); border-radius: 8px; pointer-events: none; }
.board-label { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: var(--tag); color: var(--tag-ink); font: 500 1rem/1 var(--serif); padding: 9px 18px; border-radius: 4px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); white-space: nowrap; }
.window { position: relative; padding: 14px 10px 12px; background: linear-gradient(180deg, #f1f2f3, #d7dade); border-radius: 3px; box-shadow: 0 2px 6px rgb(0 0 0 / 0.25); }
.window-opening { position: relative; aspect-ratio: 608 / 335; overflow: hidden; background: #9fb6c6 url("plates/window-madrid.jpg") center / cover no-repeat; box-shadow: inset 0 0 0 2px #b9bec3; }
.window-photo { width: 100%; height: 100%; object-fit: cover; }
.window-cassette { position: absolute; left: 4px; right: 4px; top: 6px; height: 14px; border-radius: 7px; background: linear-gradient(180deg, #fbfbfb, #c9ccd0); box-shadow: 0 1px 2px rgb(0 0 0 / 0.3); }
.window-shade { position: absolute; inset: 0; background: #0b1217; opacity: 0; transition: opacity 0.7s var(--ease); pointer-events: none; }
.blind { --drop: 62%; position: absolute; left: 0; right: 0; top: 0; height: var(--drop); transition: height 1s var(--ease); animation: lower 1.6s var(--ease) 0.25s backwards; }
@keyframes lower { from { height: 10%; } }
.board.dragging .blind { transition: none; }
.blind-fabric { position: absolute; inset: 0 0 7px; background: url("plates/blind.png") top / 100% auto repeat-y; transition: opacity 0.6s var(--ease); }
/* El screen trae su barra dibujada: la tela se estira hasta abajo sin repetirse y esa es la única barra */
.board[data-type="screen"] .blind-fabric { inset: 0; background: url("plates/blind.png") top / 100% 100% no-repeat; }
.board[data-type="screen"] .blind-bar { display: none; }
.blind-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(180deg, #e6e8ea, #b8bdc1); box-shadow: 0 2px 3px rgb(0 0 0 / 0.25); }
.board[data-type="opacos"] .blind-fabric { background: #3d4247 url("fabrics/opaco.jpg") top left / 340px auto repeat; }
.board[data-type="opacos"] .window-shade { opacity: calc(0.34 * var(--cover, 0.6)); }
.board.dragging .window-shade { transition: none; }
.board[data-type="traslucidos"] .blind-fabric { background: rgb(240 236 226 / 0.82) url("fabrics/traslucido.jpg") center / cover; opacity: 0.9; backdrop-filter: blur(6px) brightness(1.06); -webkit-backdrop-filter: blur(6px) brightness(1.06); }
.board[data-type="decorativos"] .blind-fabric { background: #c3c7cb url("fabrics/decorativo.jpg") top / 100% auto repeat-y; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.swatch { position: relative; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--tag-ink); }
.swatch img { width: 100%; aspect-ratio: 160 / 102; object-fit: cover; border-radius: 999px; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.3)); transition: transform 0.25s var(--ease); }
.swatch .tag { position: relative; z-index: 2; font: 500 0.82rem/1 var(--serif); background: var(--tag); padding: 6px 8px; border-radius: 8px; white-space: nowrap; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); }
/* En el móvil cada etiqueta cabe en su columna: «Traslúcidos» y «Decorativos» se pisaban */
@media (max-width: 480px) { .board[data-sim] { padding-inline: 10px; } .swatches { gap: 4px; } .swatch .tag { font-size: min(0.74rem, 3.05vw); padding: 5px 4px; } }
.swatch[aria-checked="true"] img { filter: drop-shadow(2px 0 0 #f1e3b0) drop-shadow(-2px 0 0 #f1e3b0) drop-shadow(0 2px 0 #f1e3b0) drop-shadow(0 -2px 0 #f1e3b0) drop-shadow(0 2px 3px rgb(0 0 0 / 0.3)); }
.swatch[data-type="screen"]::before { content: ""; position: absolute; z-index: 1; left: 6%; right: 6%; top: 6%; aspect-ratio: 160 / 102; width: 88%; height: auto; background: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.16) 0 1px, transparent 1px 4px), repeating-linear-gradient(0deg, rgb(255 255 255 / 0.12) 0 1px, transparent 1px 4px); border-radius: 999px; pointer-events: none; }
.swatch:hover img { transform: translateY(-2px); }
.drop { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 16px; font: 400 1rem/1 var(--sans); color: #f5f6f7; }
.drop output { font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.drop input { width: 100%; height: 30px; margin: 0; background: transparent; accent-color: var(--tag); -webkit-appearance: none; appearance: none; cursor: pointer; }
.drop input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--tag) var(--fill, 62%), rgb(239 236 220 / 0.35) var(--fill, 62%)); }
.drop input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--tag); box-shadow: 0 1px 3px rgb(0 0 0 / 0.35); }
.drop input::-moz-range-track { height: 6px; border-radius: 3px; background: rgb(239 236 220 / 0.35); }
.drop input::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--tag); }
.drop input::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--tag); }
.sim-note { margin-top: 12px; color: #eef1f2; font-size: 0.98rem; min-height: 1.6em; }

/* Pasos */
.steps { list-style: none; margin: 0; padding: 32px var(--margin) 8px; display: grid; gap: 22px; }
.steps li { display: flex; align-items: center; gap: 16px; }
.step-ico { font-size: 44px; color: var(--ink); flex: none; display: grid; place-items: center; width: 56px; }
.step-txt { display: grid; gap: 2px; padding-left: 16px; border-left: 1px solid #c3c7ca; }
.step-txt strong { font: 700 1.35rem/1.15 var(--serif); letter-spacing: -0.015em; }
.step-txt span { color: var(--muted); font-size: 1.05rem; }

/* Escritorio: la composición medida de la comp (1536 × 1024), a escala del ancho */
@media (min-width: 1024px) {
  .front:not(.front--plain) { aspect-ratio: 1536 / 1024; }
  .front .site-header { position: absolute; inset: 0 0 auto; height: calc(var(--u) * 96); padding: 0; border: 0; display: block; background: none; }
  .front .site-header::after { content: ""; position: absolute; left: calc(var(--u) * 58); right: calc(var(--u) * 56); bottom: 0; height: 1px; background: var(--rule); }
  .front .brand { position: absolute; left: calc(var(--u) * 92); top: calc(var(--u) * 10); width: calc(var(--u) * 104); height: calc(var(--u) * 76); }
  .front .brand img { width: 100%; height: 100%; object-fit: contain; }
  .front .nav { display: block; }
  .front .nav a { position: absolute; top: calc(var(--u) * 28); height: calc(var(--u) * 40); display: flex; align-items: center; justify-content: center; padding: 0; font-size: calc(var(--u) * 23); }
  .front .nav a:nth-child(1) { left: calc(var(--u) * 540); width: calc(var(--u) * 104); }
  .front .nav a:nth-child(2) { left: calc(var(--u) * 688); width: calc(var(--u) * 190); }
  .front .nav a:nth-child(3) { left: calc(var(--u) * 922); width: calc(var(--u) * 70); }
  .front .nav a:nth-child(4) { left: calc(var(--u) * 1036); width: calc(var(--u) * 122); }
  .front .header-tel { position: absolute; left: calc(var(--u) * 1250); top: calc(var(--u) * 26); width: calc(var(--u) * 212); height: calc(var(--u) * 44); display: flex; gap: calc(var(--u) * 12); justify-content: flex-end; font: 500 calc(var(--u) * 26)/1 var(--serif); margin: 0; padding: 0; border: 0; }
  .front .header-tel .ico { width: calc(var(--u) * 24); height: calc(var(--u) * 24); }
  .front .header-tel span { display: inline; }
  .front .header-tel::before { content: ""; position: absolute; left: calc(var(--u) * -44); top: calc(var(--u) * 2); width: 1px; height: calc(var(--u) * 48); background: #c9ccd0; }
  .front .menu-btn { display: none; }
  .front-copy { position: absolute; left: calc(var(--u) * 92); top: calc(var(--u) * 182); width: calc(var(--u) * 530); padding: 0; }
  .front-copy { height: calc(var(--u) * 600); }
  .front-copy > * { position: absolute; left: 0; width: 100%; margin: 0 !important; }
  .front h1 { top: calc(var(--u) * 4); width: calc(var(--u) * 570) !important; font-size: calc(var(--u) * 66); line-height: 1.08; letter-spacing: -0.02em; }
  .front:not(.front--page) .lead { top: calc(var(--u) * 268); }
  /* Interiores: el título cambia de largo, así que el texto se apila en columna en vez de ir colocado a mano */
  .front--page .front-copy { display: flex; flex-direction: column; justify-content: center; }
  .front--page .front-copy > * { position: static; }
  .front--page h1 { width: calc(var(--u) * 570) !important; }
  .front--page .front-copy .lead { margin-top: calc(var(--u) * 26) !important; }
  .front--page .front-copy .btn--cta { margin-top: calc(var(--u) * 44) !important; flex: none; }
  .front--page .front-copy .years { margin-top: calc(var(--u) * 40) !important; flex: none; }
  .lead { margin-top: calc(var(--u) * 26); font-size: calc(var(--u) * 27); line-height: 1.38; }
  .front .btn--cta { top: calc(var(--u) * 428); width: 100%; min-height: 0; height: calc(var(--u) * 84); border-radius: calc(var(--u) * 12); font-size: calc(var(--u) * 34); gap: calc(var(--u) * 22); }
  .front .btn--cta .ico { width: calc(var(--u) * 34); height: calc(var(--u) * 34); }
  .years { top: calc(var(--u) * 552); height: calc(var(--u) * 42); gap: calc(var(--u) * 22); }
  .years em { font-size: calc(var(--u) * 30); }
  .years .rule { max-width: none; }
  .front .board { position: absolute; left: calc(var(--u) * 674); top: calc(var(--u) * 128); width: calc(var(--u) * 788); height: calc(var(--u) * 676); margin: 0; padding: 0; border-radius: calc(var(--u) * 14); }
  .front .board::before { inset: calc(var(--u) * 10); border-radius: calc(var(--u) * 9); }
  .front .board-label { top: calc(var(--u) * 20); font-size: calc(var(--u) * 21); padding: calc(var(--u) * 9) calc(var(--u) * 26); }
  .front .window { position: absolute; left: calc(var(--u) * 48); top: calc(var(--u) * 70); width: calc(var(--u) * 696); height: calc(var(--u) * 378); padding: calc(var(--u) * 18) calc(var(--u) * 44) calc(var(--u) * 26); }
  .front .window-opening { aspect-ratio: auto; height: 100%; }
  .front .window-cassette { top: calc(var(--u) * 4); height: calc(var(--u) * 18); left: calc(var(--u) * 4); right: calc(var(--u) * 4); }
  .front .swatches { position: absolute; left: calc(var(--u) * 50); top: calc(var(--u) * 462); width: calc(var(--u) * 692); margin: 0; gap: calc(var(--u) * 18); }
  .front .swatch { gap: calc(var(--u) * 2); }
  .front .swatch img { border-radius: 0; height: calc(var(--u) * 102); aspect-ratio: auto; }
  .front .swatch[data-type="screen"]::before { top: calc(var(--u) * 8); height: calc(var(--u) * 86); left: 6%; right: 6%; width: auto; aspect-ratio: auto; border-radius: 0; }
  .front .swatch .tag { font-size: calc(var(--u) * 19); padding: calc(var(--u) * 6) calc(var(--u) * 16); margin-top: calc(var(--u) * -2); }
  .front .drop { position: absolute; left: calc(var(--u) * 48); top: calc(var(--u) * 612); width: calc(var(--u) * 700); margin: 0; gap: calc(var(--u) * 30); font-size: calc(var(--u) * 23); }
  .front .sim-note { display: none; }
  .front:not(.front--page) .steps { position: absolute; left: calc(var(--u) * 58); right: calc(var(--u) * 56); top: calc(var(--u) * 866); padding: calc(var(--u) * 30) 0 0; border-top: 1px solid var(--rule); grid-template-columns: repeat(3, 1fr); gap: 0; }
  .front:not(.front--page) .steps li:nth-child(1) { padding-left: calc(var(--u) * 46); }
  .front:not(.front--page) .steps li:nth-child(2) { padding-left: calc(var(--u) * 100); }
  .front:not(.front--page) .steps li:nth-child(3) { padding-left: calc(var(--u) * 92); }
  .front .steps li { gap: calc(var(--u) * 26); }
  .front .step-ico { font-size: calc(var(--u) * 62); width: calc(var(--u) * 64); }
  .front .step-txt { padding-left: calc(var(--u) * 26); }
  .front .step-txt strong { font-size: calc(var(--u) * 34); }
  .front .step-txt span { font-size: calc(var(--u) * 26); }
}

/* Páginas interiores: misma pantalla, sin la banda de pasos dentro */
@media (min-width: 1024px) {
  .front--page { aspect-ratio: 1536 / 880 !important; }
}
.front--plain .plain-head { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 3vw, 40px); }
.front--plain h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); width: auto !important; }
.front--plain .btn--cta { margin-top: 26px; width: auto; }
@media (min-width: 900px) {
  .site-header { padding: 10px var(--margin); }
  .nav { display: flex; gap: 40px; margin-left: auto; }
  .header-tel { margin-left: 24px; width: auto; height: auto; display: inline-flex; gap: 10px; padding-left: 24px; border-left: 1px solid #c9ccd0; border-radius: 0; font: 500 1.05rem/1 var(--serif); }
  .header-tel span { display: inline; }
  .menu-btn { display: none; }
  .brand img { height: 62px; }
}

/* ---------- Secciones ---------- */
.band { padding: 8px 0 24px; border-bottom: 1px solid var(--rule); }
.band .steps { padding-inline: 0; }
@media (min-width: 900px) { .band .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
section h2 { font-size: clamp(2rem, 4vw, 3rem); }
.more { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font: 500 1.15rem/1.2 var(--serif); color: var(--slate-dark); text-decoration: underline; text-decoration-color: rgb(88 111 121 / 0.45); text-underline-offset: 0.3em; }
.more .ico { transition: transform 0.3s var(--ease); }
.more:hover .ico { transform: translateX(4px); }

/* Tipos */
.tipos { padding-block: var(--section); }
.tipo-list { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 56px; }
.tipo { display: grid; gap: 22px; align-items: center; }
.tipo-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.tipo-swatch { width: 120px; height: auto; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.25)); }
.tipo h3 { margin-top: 14px; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.tipo h3 a { text-decoration: none; }
.tipo h3 a:hover { text-decoration: underline; text-decoration-color: var(--slate); }
.tipo p { margin-top: 8px; color: var(--ink-2); max-width: 46ch; }
.tipo .tipo-fact { color: var(--muted); font-size: 1rem; }
@media (min-width: 900px) {
  .tipo { grid-template-columns: 1.1fr 1fr; gap: 64px; }
  .tipo:nth-child(even) .tipo-photo { order: 2; }
}

/* Oficio */
.oficio { padding-block: var(--section); background: var(--soft); }
.oficio-grid { display: grid; gap: 40px; }
.duo { display: grid; gap: 26px; }
.duo h3 { font-size: 1.5rem; }
.duo p { margin-top: 8px; color: var(--ink-2); max-width: 44ch; }
.story .duo { margin-top: 32px; }
@media (min-width: 900px) { .oficio-grid { grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: start; } .duo { grid-template-columns: 1fr 1fr; } }

/* Reseñas de Google: una clienta con sus fotos y, debajo, una tira que se desliza con el dedo o con las flechas */
.resenas { padding-block: var(--section); overflow-x: clip; }
.resenas + .faq .faq-grid { border-top: 1px solid var(--rule); padding-top: var(--section); }
.resenas + .faq { padding-top: 0; }
.rs-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.rs-nota { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 1rem; }
.rs-nota strong { font: 700 1.25rem/1 var(--serif); color: var(--ink); }
.stars { display: inline-flex; gap: 2px; color: var(--gold); font-size: 1rem; }
.rs-tema { display: inline-block; font: 500 0.86rem/1 var(--serif); color: var(--tag-ink); background: var(--tag); padding: 7px 10px; border-radius: 8px; }
.quien { display: inline-flex; align-items: center; gap: 12px; }
.quien img, .quien .ini { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.quien .ini { display: grid; place-items: center; background: var(--slate); color: var(--cream); font: 700 1.1rem/1 var(--serif); }
.quien strong { display: block; font: 700 1.05rem/1.2 var(--serif); color: var(--ink); }
.quien .stars { font-size: 0.8rem; margin-top: 4px; }

.rs-destacada { margin: 40px 0 0; display: grid; gap: 28px; }
.rs-fotos { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs-fotos > img { grid-row: span 2; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; }
.rs-mini { position: relative; min-height: 0; overflow: hidden; border-radius: 6px; }
.rs-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rs-destacada blockquote { margin: 0; align-self: center; }
.rs-destacada blockquote p { margin-top: 18px; font: 500 clamp(1.35rem, 2.2vw, 1.85rem)/1.4 var(--serif); color: var(--ink); max-width: 30ch; }
.rs-destacada figcaption { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.rs-src { color: var(--muted); font-size: 0.95rem; }
@media (min-width: 900px) { .rs-destacada { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; } }

.rs-rail-wrap { margin-top: 56px; }
.rs-rail { list-style: none; margin: -4px calc((100% - 100vw) / 2) 0; padding: 4px calc((100vw - 100%) / 2) 8px; scroll-padding-inline: max(var(--margin), (100vw - 1280px) / 2); display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 340px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.rs-rail::-webkit-scrollbar { display: none; }
.rs-rail:focus-visible { outline-offset: 6px; }
.rs-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 16px; background: var(--soft); border-radius: 6px; padding: 24px 22px 22px; }
.rs-card .rs-tema { align-self: flex-start; }
.rs-card p { flex: 1; color: var(--ink-2); font-size: 1.02rem; line-height: 1.55; }
.rs-ctrl { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rs-ctrl .more { margin-top: 0; }
.rs-flechas { display: inline-flex; gap: 10px; }
.rs-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgb(88 111 121 / 0.4); background: var(--paper); color: var(--slate-dark); font-size: 1.2rem; cursor: pointer; transition: background-color 0.2s, color 0.2s, opacity 0.2s; }
.rs-btn:hover { background: var(--slate); color: var(--cream); }
.rs-btn:disabled { opacity: 0.35; pointer-events: none; }
@media (min-width: 900px) { .rs-rail { grid-auto-columns: calc((100% - 3 * 16px) / 3.4); } }

/* ---------- Blog ---------- */
.blog { padding-block: 8px var(--section); }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: start; padding: 22px 20px; border-radius: 6px; background: var(--soft); transition: background-color 0.2s; }
.post-row:hover { background: #eceef0; }
.post-row h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.25; }
.post-row h3 a { text-decoration: none; }
.post-row h3 a::after { content: ""; position: absolute; inset: 0; }
.post-row { position: relative; }
.post-row h3 a:hover { text-decoration: underline; text-decoration-color: var(--slate); }
.post-row p { margin-top: 8px; color: var(--ink-2); font-size: 1.02rem; max-width: 70ch; }
.post-row .post-meta { margin-top: 10px; }
.post-sw { width: 76px; height: auto; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.25)); }
.post-sw--general { display: grid; place-items: center; height: 52px; border-radius: 4px; background: var(--slate); color: var(--cream); font-size: 30px; filter: none; }
.post-meta { color: var(--muted); font-size: 0.95rem; }
@media (min-width: 900px) { .post-row { grid-template-columns: 120px minmax(0, 1fr); gap: 32px; padding: 28px 32px; } .post-sw { width: 120px; } .post-sw--general { height: 78px; font-size: 40px; } }

.post-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 28ch; text-wrap: pretty; }
.post-crumb { margin-bottom: 18px; font: 500 1.05rem/1.2 var(--serif); }
.post-crumb a { color: var(--slate-dark); }
.post-head .post-meta { margin-top: 18px; }
.post { padding-block: 8px var(--section); }
.post-grid { display: grid; gap: 40px; }
.post-body { max-width: 68ch; font-size: 1.125rem; line-height: 1.7; color: var(--ink); }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 { margin-top: 2.2em; font-size: clamp(1.55rem, 2.6vw, 2rem); }
.post-body h3 { margin-top: 1.8em; font-size: 1.3rem; }
.post-body h2 + *, .post-body h3 + * { margin-top: 0.6em; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: 0.45em; }
.post-body li::marker { color: var(--slate); }
.post-body a { color: var(--slate-dark); text-decoration-color: rgb(88 111 121 / 0.5); }
.post-body a:hover { text-decoration-color: currentColor; }
.post-body strong { font-weight: 600; }
.post-table { overflow-x: auto; }
.post-table table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.post-table th, .post-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.post-table th { font: 700 1rem/1.3 var(--serif); background: var(--soft); }
.post-aside { align-self: start; padding: 26px 24px; border-radius: 6px; background: var(--soft); display: grid; gap: 16px; }
.post-aside p { color: var(--ink-2); }
.post-aside strong { display: block; margin-bottom: 6px; font: 700 1.25rem/1.25 var(--serif); color: var(--ink); }
.post-aside .btn { font-size: 1.1rem; min-height: 52px; padding-inline: 18px; }
.aside-tel { display: inline-flex; align-items: center; gap: 10px; font: 700 1.3rem/1 var(--serif); text-decoration: none; justify-self: start; }
@media (min-width: 1024px) { .post-grid { grid-template-columns: minmax(0, 68ch) minmax(260px, 320px); justify-content: space-between; gap: 64px; } .post-aside { position: sticky; top: 24px; } }
.post + .faq { padding-top: 0; }
.guias { padding-block: var(--section); background: var(--paper); }
.guias h2 { margin-bottom: 32px; }
.guias .post-list + .more { margin-top: 26px; }

/* Preguntas */
.faq { padding-block: var(--section); }
.faq-grid { display: grid; gap: 32px; }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; cursor: pointer; font: 700 clamp(1.15rem, 1.8vw, 1.4rem)/1.3 var(--serif); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .ico { font-size: 22px; color: var(--slate); transition: transform 0.3s var(--ease); }
html:not(.js) .faq-list details[open] summary .ico { transform: rotate(180deg); }
.faq-list details p { margin: 0; padding: 0 0 24px; color: var(--ink-2); max-width: 64ch; }
.faq-more { margin-top: 26px; color: var(--ink-2); }
.faq-more a { color: var(--slate-dark); font-weight: 500; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: 0.8fr 1.6fr; gap: 80px; } }

/* Cita */
.cita { padding-block: var(--section); background: var(--soft); }
.cita--first { padding-top: clamp(40px, 5vw, 64px); }
.cita-grid { display: grid; gap: 40px; align-items: start; }
.cita-tel { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; font: 700 clamp(1.8rem, 3.4vw, 2.4rem)/1 var(--serif); color: var(--ink); text-decoration: none; }
.cita-hours { margin-top: 14px; color: var(--ink-2); }
.cita-mail { margin-top: 6px; }
.cita-mail a { color: var(--ink-2); }
.board--form { margin: 0; padding: clamp(22px, 3vw, 36px); }
.board--form .form { background: var(--paper); color: var(--ink); border-radius: 6px; padding: clamp(22px, 3vw, 36px); display: grid; gap: 18px; position: relative; }
@media (min-width: 900px) { .cita-grid { grid-template-columns: 1fr 1.1fr; gap: 80px; } }
@media (max-width: 479px) { .board--form { padding: 12px; } .board--form .form { padding: 22px 18px; } .board--form .btn--cta { padding-inline: 16px; gap: 10px; font-size: clamp(1.05rem, 4.9vw, 1.25rem); white-space: nowrap; } }

/* Formulario */
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; }
.opt { font-weight: 400; color: var(--muted); }
.field input { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #a3aab0; border-radius: 8px; padding: 12px 14px; min-height: 52px; transition: border-color 0.2s, box-shadow 0.2s; caret-color: var(--slate); }
.field input::placeholder { color: #6b7177; }
.field input:hover { border-color: var(--slate); }
.field input:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px rgb(88 111 121 / 0.25); }
.field .err { display: none; color: #a3301f; font-size: 0.95rem; }
.field.invalid input { border-color: #a3301f; }
.field.invalid .err { display: block; }
.check { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 1rem; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--slate); flex: none; }
.check.invalid label { color: #a3301f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { display: none; color: #a3301f; }
.form.failed .form-error { display: block; }
.form-done { display: none; }
.form.sent > :not(.form-done) { display: none; }
.form.sent .form-done { display: block; }
.form-done h3 { font-size: 1.9rem; }
.form-done p { margin-top: 10px; color: var(--ink-2); }

/* Fichas de producto */
.story { padding-block: var(--section); }
.story-grid { display: grid; gap: 40px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ticks li { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.ticks .ico { color: var(--slate); font-size: 22px; }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
@media (min-width: 900px) { .story-grid { grid-template-columns: 1.1fr 1fr; gap: 80px; } }
.tejidos { padding-block: var(--section); background: var(--soft); }
.tags { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tag-card { position: relative; background: var(--paper); padding: 30px 22px 22px; border-radius: 0; border-top: 3px solid var(--tag); }
.tag-card strong { display: block; font: 700 1.35rem/1.2 var(--serif); }
.tag-card span { display: block; margin-top: 8px; color: var(--ink-2); font-size: 1rem; }

/* Pie */
.footer { border-top: 1px solid var(--rule); }
.footer-top { display: grid; gap: 24px; padding-block: 36px 22px; }
.footer-top .brand img { height: 84px; }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.footer-top nav a { font: 500 1.1rem/1.2 var(--serif); text-decoration: none; padding: 8px 0; }
.footer-top nav a:hover { text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-block: 18px 104px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 1rem; }
.footer-base a { padding: 6px 0; }
.footer-base > span { padding: 6px 0; }
.footer-base .legal { display: inline-flex; gap: 6px 18px; flex-wrap: wrap; padding: 0; }
@media (min-width: 900px) { .footer-top { grid-template-columns: auto 1fr; align-items: center; } .footer-top nav { justify-content: flex-end; } .footer-base { padding-bottom: 28px; } }

/* Botón flotante en el móvil */
.float-cta { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.float-cta.show { opacity: 1; transform: none; pointer-events: auto; }
.float-cta.show.hide { opacity: 0; transform: translateY(16px); pointer-events: none; }
@media (min-width: 900px) { .float-cta { left: auto; right: 24px; bottom: 24px; } }

/* Movimiento (patrones gratuitos de transitions.dev, escritos para esta web) */
:root { --ease-pop: cubic-bezier(0.22, 1, 0.36, 1); --quick: 0.32s; }

/* Texts reveal: la primera pantalla sube por líneas, con desfase */
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.js .front-copy > * { animation: rise 0.9s var(--ease) backwards; }
.js .front-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .front-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .front-copy > :nth-child(4) { animation-delay: 0.24s; }

/* Lo de más abajo aparece al llegar a ello (con GSAP lo mueve GSAP) */
.js:not(.gsap) .rv { opacity: 0; transform: translateY(10px); transition: opacity 0.55s ease-out, transform 0.55s ease-out; transition-delay: var(--d, 0s); }
.js:not(.gsap) .rv.in { opacity: 1; transform: none; }

/* Con GSAP, la entrada de la primera pantalla y la bajada del estor las lleva main.js */
.gsap .front-copy > * { animation: none; }
.gsap .blind { animation: none; }
.tipo-photo { display: block; overflow: hidden; border-radius: 6px; }

/* Number pop-in: el 30 entra cifra a cifra */
@keyframes pop { from { opacity: 0; transform: translateY(0.45em) scale(0.8); filter: blur(4px); } }
.pop { display: inline-flex; }
.js .pop > span { display: inline-block; animation: pop 0.6s var(--ease-pop) 0.7s backwards; }
.js .pop > span + span { animation-delay: 0.78s; }

/* Text states swap: la nota de la tela cambia con un desenfoque */
@keyframes swap { from { opacity: 0; filter: blur(5px); transform: translateY(4px); } }
.sim-note.swap { animation: swap 0.4s var(--ease); }

/* Accordion: la respuesta se abre por altura, la flecha gira */
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-a p { opacity: 0; transform: translateY(-6px); transition: opacity 0.3s, transform 0.4s var(--ease); }
.faq-list details.is-open .faq-a { grid-template-rows: 1fr; }
.faq-list details.is-open .faq-a p { opacity: 1; transform: none; }
.faq-list details.is-open summary .ico { transform: rotate(180deg); }
html:not(.js) .faq-a { grid-template-rows: 1fr; }
html:not(.js) .faq-a p { opacity: 1; transform: none; }

/* Error state shake */
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.field.invalid input, .check.invalid .box { animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

/* Checkbox check: el visto se dibuja */
.box { position: relative; flex: none; width: 24px; height: 24px; margin-top: 1px; }
.check .box input { appearance: none; -webkit-appearance: none; display: block; margin: 0; width: 24px; height: 24px; border: 1.5px solid #8c949a; border-radius: 6px; background: var(--paper); cursor: pointer; transition: background-color 0.2s, border-color 0.2s; }
.check .box input:checked { background: var(--slate); border-color: var(--slate); }
.check .box input:focus-visible { outline: 2px solid var(--slate); outline-offset: 2px; }
.check.invalid .box input { border-color: #a3301f; }
.box svg { position: absolute; inset: 3px; width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.box path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.28s var(--ease); }
.box input:checked + svg path { stroke-dashoffset: 0; transition-delay: 0.05s; }

/* Success check: el visto de cita pedida entra girando y se dibuja */
.done-check { display: block; width: 56px; height: 56px; margin-bottom: 14px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.done-check circle { fill: var(--slate); }
.done-check path { stroke: #fff; stroke-width: 3.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
@keyframes check-in { from { opacity: 0; transform: scale(0.6) rotate(-30deg); filter: blur(6px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.form.sent .done-check { animation: check-in 0.55s var(--ease-pop); }
.form.sent .done-check path { animation: draw 0.4s var(--ease) 0.3s forwards; }
.form.sent .form-done h3, .form.sent .form-done p { animation: rise 0.6s var(--ease) 0.15s backwards; }

/* Toast open/close: el botón flotante sube con desenfoque y escala */
.float-cta { transform: translateY(16px) scale(0.94); filter: blur(4px); transition: opacity var(--quick) var(--ease), transform var(--quick) var(--ease), filter var(--quick) var(--ease); }
.float-cta.show { filter: none; }
.float-cta.show.hide { transform: translateY(16px) scale(0.94); filter: blur(4px); }

/* Learn more hover: la flecha avanza y el subrayado se aprieta */
.more { transition: text-decoration-color 0.25s, text-underline-offset 0.3s var(--ease); }
.more:hover { text-decoration-color: currentColor; text-underline-offset: 0.22em; }

/* Panel reveal: el menú del móvil se despliega en vez de aparecer de golpe */
.mobile-nav { display: flex; opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity var(--quick) var(--ease), transform 0.45s var(--ease), visibility 0s linear var(--quick); }
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mobile-nav > * { opacity: 0; transform: translateY(10px); transition: opacity 0.3s, transform 0.45s var(--ease); }
.mobile-nav.is-open > * { opacity: 1; transform: none; }
.mobile-nav.is-open > :nth-child(2) { transition-delay: 0.03s; }
.mobile-nav.is-open > :nth-child(3) { transition-delay: 0.06s; }
.mobile-nav.is-open > :nth-child(4) { transition-delay: 0.09s; }
.mobile-nav.is-open > :nth-child(5) { transition-delay: 0.12s; }
.mobile-nav.is-open > :nth-child(6) { transition-delay: 0.15s; }
.mobile-nav.is-open > :nth-child(n+7) { transition-delay: 0.18s; }
@media (min-width: 900px) { .mobile-nav { display: none; } }

/* Icon swap: hamburguesa ↔ cruz con escala y desenfoque */
@keyframes icon-in { from { opacity: 0; transform: scale(0.6) rotate(-45deg); filter: blur(3px); } }
.menu-btn.swapped .ico { animation: icon-in 0.3s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; filter: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Pisos del Plan Vive: municipios */
.pv-zonas { padding-block: var(--section); }
.pv-lista { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pv-lista li { padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.pv-lista h3 { font: 700 1.3rem/1.2 var(--serif); }
.pv-lista .pv-n { margin-top: 4px; font-weight: 600; color: var(--ink); }
.pv-lista p { margin-top: 6px; color: var(--ink-2); font-size: 1rem; }
.pv-obras { margin-top: 28px; }
.tag-card span a, .duo p a, .pv-zonas .text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) { .footer-base .credito { margin-left: auto; } }
