/* =========================================================
   Pinturas y Lacados PF
   Paleta: monocromo frío + un solo acento (azul ultramar).
   Radios: botones en píldora, tarjetas 16px, campos 10px,
   puertas/muebles 4px (son objetos, no interfaz).
   Capas (z-index): 10 cabecera, 20 menú móvil, 30 botón WhatsApp.
   ========================================================= */

:root {
  --bg: #F3F4F2;
  --surface: #FAFAF9;
  --tint: #E9EBE8;
  --ink: #141518;
  --ink-soft: #3B3E44;
  --muted: #5B5F66;
  --line: rgba(20, 21, 24, 0.12);
  --accent: #2A40C9;
  --accent-hover: #2235A8;
  --on-accent: #FAFAF9;
  --accent-soft: rgba(42, 64, 201, 0.08);
  --shadow: 0 30px 60px -28px rgba(20, 24, 40, 0.35);
  --error: #B42318;
  --success: #1E6B3A;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --r-card: 16px;
  --r-field: 10px;
  --r-object: 4px;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 128px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1012;
    --surface: #17181B;
    --tint: #141518;
    --ink: #ECEDEF;
    --ink-soft: #C9CBD0;
    --muted: #9A9EA6;
    --line: rgba(236, 237, 239, 0.12);
    --accent: #7D8DFF;
    --accent-hover: #9AA7FF;
    --on-accent: #0F1012;
    --accent-soft: rgba(125, 141, 255, 0.12);
    --shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.7);
    --error: #FF8A80;
    --success: #7DD89B;
  }
}

@media (prefers-color-scheme: dark) {
  .tile.tile--lacado { background: #2A40C9; color: #FAFAF9; }
  .tile--lacado p, .tile--lacado .tile-icon { color: rgba(250, 250, 249, 0.82) !important; }
  .tile--lacado .pill-list li { border-color: rgba(250, 250, 249, 0.35); }
  .tile.tile--pintura { background: #202226; color: var(--ink); border: 1px solid var(--line); }
  .tile--pintura p { color: var(--muted) !important; }
  .tile--pintura .tile-icon { color: var(--accent) !important; }
}

/* Archivo (Google Fonts, OFL) autoalojada: subconjunto latino, ejes de anchura y peso */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("assets/fonts/archivo-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light dark; scroll-padding-top: 80px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a, button, summary, label, select, input[type="checkbox"], input[type="range"] { touch-action: manipulation; }
button, .btn, summary, .swatch, .direct-link, .compare { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 40;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--font); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn i { font-size: 1.15em; transition: transform .3s var(--ease); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: .9375rem; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: block; width: 40px; height: 40px; flex: none; }
.bm-tile { fill: var(--accent); }
.bm-glyph { fill: var(--on-accent); }
@media (hover: hover) and (pointer: fine) {
  .brand .brand-mark { transition: transform .4s var(--ease); }
  .brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 700; font-size: .98rem; letter-spacing: -0.01em; }
.brand-sub { font-weight: 800; font-stretch: 125%; font-size: .82rem; color: var(--accent); letter-spacing: .08em; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: 1.35rem; cursor: pointer; place-items: center;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-mobile {
  position: fixed; inset: 68px 0 0; z-index: 20;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 4px;
  padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.nav-mobile.is-open { opacity: 1; visibility: visible; transform: none; }
.nav-mobile a:not(.btn) {
  font-size: 1.6rem; font-weight: 700; text-decoration: none;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.nav-mobile .btn { margin-top: 10px; }
.nav-mobile .btn-primary { margin-top: 24px; }

@media (max-width: 900px) {
  .nav-primary { display: none; }
  .nav-toggle { display: grid; }
}
@media (max-width: 520px) {
  .header-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 30vw, 400px); align-items: center;
  gap: clamp(32px, 4.5vw, 64px);
  min-height: calc(100svh - 68px - 160px);
}
.eyebrow {
  font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  font-weight: 800; font-stretch: 106%;
  line-height: 1.04; letter-spacing: -0.035em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { margin-top: 26px; font-size: clamp(1.06rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* entrada escalonada */
@media (prefers-reduced-motion: no-preference) {
  .hero-in { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  .hero-title .hero-in { animation-name: rise-line; animation-duration: 1s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rise-line { from { transform: translateY(105%); } to { transform: none; } }

.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 28px; }

/* ---------- Puerta lacada ---------- */
.door-stage { position: relative; width: min(100%, 340px); }
.door {
  --coat: #383E42;
  --next: #383E42;
  --sheen: .28;
  position: relative;
  aspect-ratio: 5 / 7.4;
  width: 100%;
  border-radius: var(--r-object);
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    var(--shadow);
}
.door[data-finish="mate"] { --sheen: .06; }
.door[data-finish="satinado"] { --sheen: .28; }

.door-coat { position: absolute; inset: 0; }
.door-coat--base { background: var(--coat); }
/* borde difuminado de la pasada: --p recorre la puerta de arriba abajo */
@property --p { syntax: "<percentage>"; inherits: false; initial-value: -12%; }
.door-coat--next {
  --p: -12%;
  background: var(--next);
  -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--p) - 10%), transparent calc(var(--p) + 10%));
  mask-image: linear-gradient(180deg, #000 calc(var(--p) - 10%), transparent calc(var(--p) + 10%));
}
.door.is-spraying .door-coat--next { animation: spray 1.15s var(--ease-in-out) forwards; }
@keyframes spray { from { --p: -12%; } to { --p: 112%; } }

/* neblina de pistola en el borde de la pasada */
.door-mist {
  position: absolute; left: -10%; right: -10%; top: 0; height: 20%;
  background: radial-gradient(60% 50% at 50% 50%, var(--next), transparent 70%);
  filter: blur(12px); opacity: 0; transform: translateY(-100%); mix-blend-mode: screen;
  pointer-events: none;
}
.door.is-spraying .door-mist { animation: mist 1.15s var(--ease-in-out) forwards; }
@keyframes mist {
  0% { opacity: 0; transform: translateY(-100%); }
  12% { opacity: .9; }
  85% { opacity: .9; }
  100% { opacity: 0; transform: translateY(500%); }
}

/* plafón rehundido */
.door-panel {
  position: absolute; inset: 11% 15% 11% 15%;
  border-radius: 2px;
  box-shadow:
    inset 4px 4px 7px rgba(0, 0, 0, 0.30),
    inset -3px -3px 5px rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.05),
    1px 1px 0 rgba(255, 255, 255, 0.12);
}
.door-panel::after {
  content: ""; position: absolute; inset: 9%;
  border-radius: 2px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.18), -1px -1px 2px rgba(255, 255, 255, 0.12);
}
/* brillo según acabado */
.door-sheen {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(112deg, transparent 22%, rgba(255, 255, 255, 0.9) 34%, transparent 46%),
    linear-gradient(112deg, transparent 52%, rgba(255, 255, 255, 0.5) 56%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%, rgba(0, 0, 0, 0.18));
  opacity: var(--sheen);
  mix-blend-mode: soft-light;
  transition: opacity .6s var(--ease);
}
.door-handle {
  position: absolute; right: 6.5%; top: 44%; width: 3.2%; height: 15%;
  border-radius: 3px;
  background: linear-gradient(90deg, #8E9196, #E8E9EB 45%, #9EA1A6 60%, #6D7075);
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.35);
}
.door-floor {
  position: absolute; left: 10%; right: 10%; bottom: -18px; height: 18px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(20, 24, 40, 0.28), transparent 70%);
  filter: blur(4px);
}

/* ---------- Configurador ---------- */
.configurator { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(100%, 380px); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.swatch {
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  background: var(--sw); border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }

.finish-toggle {
  display: inline-flex; padding: 4px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.finish-toggle button {
  font: 500 .875rem/1 var(--font); color: var(--muted);
  padding: 9px 16px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.finish-toggle button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.config-readout { font-size: .875rem; color: var(--muted); }
.config-readout strong { color: var(--ink); font-weight: 600; }

/* ---------- Cinta ---------- */
.ticker {
  border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 28px; padding-right: 28px;
  font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; font-stretch: 112%;
  letter-spacing: -0.01em; color: var(--ink-soft); white-space: nowrap;
}
.ticker-track span::after {
  content: ""; width: 14px; height: 18px; border-radius: 2px; background: var(--accent);
  opacity: .85;
}
.ticker-track span:nth-child(3n+2)::after { background: #8BA27C; }
.ticker-track span:nth-child(3n)::after { background: #C5C9C4; }
/* se desplaza al hacer scroll (sin bucle automático); sin soporte, queda quieta */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ticker-track { animation: ticker linear both; animation-timeline: view(); animation-range: cover; }
  }
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-30%); } }

/* ---------- Secciones ---------- */
.section { padding: var(--section-y) 0; scroll-margin-top: 68px; }
.section--tint { background: var(--tint); }
.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; font-stretch: 108%;
  letter-spacing: -0.03em; max-width: 24ch;
}
.section-lead { margin-top: 18px; color: var(--muted); max-width: 58ch; font-size: 1.1rem; }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
  .bento .reveal:nth-child(2) { transition-delay: 70ms; }
  .bento .reveal:nth-child(3) { transition-delay: 140ms; }
  .bento .reveal:nth-child(4) { transition-delay: 210ms; }
  .bento .reveal:nth-child(5) { transition-delay: 280ms; }
}

/* ---------- Servicios (bento) ---------- */
.bento {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, 1fr);
  grid-template-areas:
    "lac lac lac lac pin pin"
    "lac lac lac lac pin pin"
    "coc coc per per ten ten";
}
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--r-card); padding: clamp(24px, 3vw, 36px);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 230px;
}
.tile h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 700; font-stretch: 108%; }
.tile p { color: var(--muted); max-width: 44ch; }
.tile-icon { font-size: 1.8rem; color: var(--accent); margin-bottom: 4px; }

.tile--lacado {
  grid-area: lac; background: var(--accent); color: var(--on-accent); border-color: transparent;
  flex-direction: row; justify-content: space-between; gap: 24px; min-height: 420px;
}
.tile--lacado .tile-body { display: flex; flex-direction: column; gap: 12px; justify-content: flex-end; }
.tile--lacado h3 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
.tile--lacado p, .tile--lacado .tile-icon { color: color-mix(in srgb, var(--on-accent) 82%, transparent); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill-list li {
  font-size: .875rem; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--on-accent) 35%, transparent);
}
.chip-fan { position: relative; flex: 0 0 38%; align-self: center; height: 260px; }
.chip-fan span {
  position: absolute; left: 50%; bottom: 0; width: 46%; aspect-ratio: 1 / 1.7;
  margin-left: -23%;
  background: var(--c); border-radius: var(--r-object);
  transform-origin: 50% 100%; transform: rotate(var(--r));
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform .6s var(--ease);
}
.chip-fan span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: rgba(255, 255, 255, 0.92); border-radius: 0 0 var(--r-object) var(--r-object);
}


.tile--pintura { grid-area: pin; background: var(--ink); color: var(--bg); border-color: transparent; justify-content: flex-end; }
.tile--pintura p { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.tile--pintura .tile-icon { color: var(--bg); }

.tile--cocinas { grid-area: coc; }
.tile--persianas {
  grid-area: per;
}
.tile--persianas::before {
  content: ""; position: absolute; inset: 0 0 0 52%; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 16px, var(--line) 16px 18px);
  mask-image: linear-gradient(90deg, transparent, #000 70%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
}
.tile--persianas > * { position: relative; }
.tile--tenidos {
  grid-area: ten;
  background:
    radial-gradient(120% 90% at 100% 100%, var(--accent-soft), transparent 60%),
    var(--surface);
}
.tile--cocinas, .tile--persianas, .tile--tenidos { justify-content: flex-end; }

@media (max-width: 960px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "lac lac" "pin pin" "coc per" "ten ten";
  }
  .tile--lacado { min-height: 0; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "lac" "pin" "coc" "per" "ten"; }
  .tile { min-height: 0; }
  .tile--lacado { flex-direction: column-reverse; }
  .chip-fan { flex: none; width: 70%; height: 170px; align-self: center; }
}

/* ---------- Antes / después ---------- */
.compare {
  --pos: 50%;
  position: relative; margin-top: clamp(36px, 5vw, 56px);
  aspect-ratio: 16 / 8; border-radius: var(--r-card); overflow: hidden;
  background: #D9DAD5; user-select: none; touch-action: pan-y;
}
.compare-layer { position: absolute; inset: 0; display: grid; place-items: center; }
.compare-before { background: linear-gradient(180deg, #DCD6CB, #C9C1B3); }
.compare-after { background: linear-gradient(180deg, #E6E8E4, #D3D6D1); clip-path: inset(0 0 0 var(--pos)); }

.compare-tag {
  position: absolute; top: 18px; left: 18px;
  font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(20, 21, 24, 0.78); color: #FAFAF9;
}
.compare-tag--after { left: auto; right: 18px; background: var(--accent); color: var(--on-accent); }

.compare-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #FAFAF9; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.compare-handle i {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center;
  background: #FAFAF9; color: #141518; font-size: 1.25rem;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
  transition: transform .25s var(--ease);
}
.compare:active .compare-handle i { transform: translate(-50%, -50%) scale(0.94); }
.compare { cursor: ew-resize; }
/* el range queda para teclado y lectores de pantalla; el arrastre lo gestiona main.js */
.compare-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.compare-range:focus-visible ~ .compare-handle i,
.compare:has(.compare-range:focus-visible) .compare-handle i { outline: 3px solid var(--accent); outline-offset: 2px; }

/* mueble bajo de cocina: tres puertas sobre zócalo */
.cabinet {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2%;
  width: 66%; aspect-ratio: 3 / 1.75;
  padding: 1.2%; border-radius: var(--r-object);
  position: relative;
  box-shadow: 0 30px 50px -24px rgba(20, 24, 40, 0.45);
}
.cabinet::before { /* encimera */
  content: ""; position: absolute; left: -3%; right: -3%; top: -7%; height: 7%;
  border-radius: 2px; background: linear-gradient(180deg, #F2F1EE, #CFCDC7);
  box-shadow: 0 6px 10px -6px rgba(0, 0, 0, 0.4);
}
.cabinet::after { /* zócalo */
  content: ""; position: absolute; left: 2%; right: 2%; bottom: -8%; height: 8%;
  background: #2B2C2F;
}
.cab-door { position: relative; border-radius: 3px; overflow: hidden; }
.cab-handle {
  position: absolute; top: 9%; left: 50%; width: 34%; height: 3.4%; margin-left: -17%;
  border-radius: 3px;
  background: linear-gradient(180deg, #E8E9EB, #8E9196);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

/* antes: roble barnizado, amarillento y gastado */
.cabinet--worn { background: #6B4A2B; }
.cabinet--worn .cab-door {
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.35) 48%, transparent 49.5%) 0 0 / 100% 100%,
    linear-gradient(80deg, transparent 20%, rgba(255, 255, 255, 0.28) 20.6%, transparent 21.4%) 0 0 / 100% 100%,
    radial-gradient(18% 10% at 72% 82%, rgba(240, 225, 190, 0.6), transparent 70%),
    radial-gradient(30% 18% at 30% 60%, rgba(60, 35, 15, 0.35), transparent 70%),
    repeating-linear-gradient(91deg, rgba(70, 40, 15, 0.10) 0 1px, transparent 1px 11px, rgba(70, 40, 15, 0.07) 11px 13px, transparent 13px 23px),
    linear-gradient(180deg, #B98A4E, #A8763C 60%, #96672F);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), inset 0 -18px 30px -18px rgba(40, 20, 5, 0.55);
  filter: saturate(0.85);
}
.cabinet--worn .cab-handle { background: linear-gradient(180deg, #B9A88A, #6E6250); }

/* después: lacado verde pálido satinado */
.cabinet--new { background: #7E9470; }
.cabinet--new .cab-door {
  background:
    linear-gradient(112deg, transparent 25%, rgba(255, 255, 255, 0.22) 38%, transparent 50%),
    linear-gradient(180deg, #93AA85, #879E79);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

@media (max-width: 640px) {
  .compare { aspect-ratio: 4 / 3.4; }
  .cabinet { width: 84%; }
}

/* ---------- Proceso ---------- */
.process {
  --progress: 0;
  margin-top: clamp(44px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  position: relative; counter-reset: step;
}
.process::before, .process::after {
  content: ""; position: absolute; top: 27px; left: 28px; right: calc((100% - 84px) / 4 - 28px); height: 2px;
}
.process::before { background: var(--line); }
.process::after {
  background: var(--accent); transform-origin: left; transform: scaleX(var(--progress));
  transition: transform 1.6s var(--ease-in-out);
}
.process.is-drawn { --progress: 1; }
.process-step { position: relative; z-index: 1; }
.process-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px;
  background: var(--bg); border: 2px solid var(--line); color: var(--muted); font-size: 1.5rem;
  transition: border-color .4s var(--ease), color .4s var(--ease), background-color .4s var(--ease);
}
.process.is-drawn .process-icon { border-color: var(--accent); color: var(--accent); }
.process.is-drawn .process-step:nth-child(1) .process-icon { transition-delay: .1s; }
.process.is-drawn .process-step:nth-child(2) .process-icon { transition-delay: .5s; }
.process.is-drawn .process-step:nth-child(3) .process-icon { transition-delay: .9s; }
.process.is-drawn .process-step:nth-child(4) .process-icon { transition-delay: 1.3s; background: var(--accent); color: var(--on-accent); }
.process-step h3 { margin-top: 22px; font-size: 1.2rem; font-weight: 700; }
.process-step p { margin-top: 8px; color: var(--muted); font-size: 1rem; }

@media (max-width: 860px) {
  .process { grid-template-columns: 1fr; gap: 34px; }
  .process::before, .process::after { display: none; }
  .process-step:not(:last-child)::before, .process-step:not(:last-child)::after {
    content: ""; position: absolute; left: 27px; top: 56px; bottom: -34px; width: 2px;
  }
  .process-step:not(:last-child)::before { background: var(--line); }
  .process-step:not(:last-child)::after {
    background: var(--accent); transform-origin: top; transform: scaleY(var(--progress));
    transition: transform .45s var(--ease-in-out);
  }
  .process-step:nth-child(2)::after { transition-delay: .4s; }
  .process-step:nth-child(3)::after { transition-delay: .8s; }
  .process-step { display: grid; grid-template-columns: 56px 1fr; column-gap: 20px; }
  .process-step .process-icon { grid-row: span 2; }
  .process-step h3 { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .process { --progress: 1; }
  .process::after, .process-step::after, .process-icon { transition: none; }
}

/* ---------- Manifiesto ---------- */
.manifesto { border-top: 1px solid var(--line); }
.manifesto-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.manifesto-text {
  font-size: clamp(1.7rem, 3.6vw, 2.9rem); font-weight: 700; font-stretch: 106%;
  line-height: 1.18; letter-spacing: -0.025em; max-width: 26ch;
}
.manifesto-text span { color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 40px; }
.facts li { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink-soft); }
.facts i { color: var(--accent); font-size: 1.3rem; }

/* ---------- Preguntas ---------- */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-title { position: sticky; top: 108px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font-size: 1.125rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; font-size: 1.25rem; color: var(--accent); transition: transform .35s var(--ease); }
.faq details[open] summary i { transform: rotate(45deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--muted); max-width: 62ch; }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] p { animation: rise .5s var(--ease); }
}
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-title { position: static; }
}

/* ---------- Contacto ---------- */
.contact-direct {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 40px;
}
.direct-link {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; min-width: 0;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.direct-link i { font-size: 1.6rem; color: var(--accent); flex: none; }
.direct-link span { display: flex; flex-direction: column; font-size: .95rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.direct-link strong { color: var(--ink); font-weight: 600; font-size: 1rem; }

.contact-form {
  margin-top: 16px; padding: clamp(24px, 4vw, 44px);
  border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row--full { grid-column: 1 / -1; }
.form-row label { font-weight: 600; font-size: .95rem; }
.form-row input:not([type="checkbox"]), .form-row select, .form-row textarea {
  width: 100%; font: 400 1rem/1.4 var(--font); color: var(--ink);
  background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: var(--r-field); padding: 13px 14px; min-height: 50px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-row textarea { resize: vertical; min-height: 130px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.field-hint { font-size: .875rem; color: var(--muted); }
.field-error { font-size: .875rem; color: var(--error); min-height: 0; }
.field-error:empty { display: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error) !important; }

.form-check { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
.form-check { flex-wrap: nowrap; align-items: flex-start; }
.form-check input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); margin: 1px 0 0; }
.form-check label { flex: 1 1 0; min-width: 0; font-weight: 400; color: var(--ink-soft); }
.form-check { flex-wrap: wrap; }
.form-check .field-error { margin-left: 32px; }
.form-check .field-error { flex-basis: 100%; }

.form-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-status { font-size: .95rem; font-weight: 500; }
.form-status.is-error { color: var(--error); }
.form-status.is-success { color: var(--success); }
.form-actions button[disabled] { opacity: .65; cursor: progress; }

.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  .contact-direct { grid-template-columns: 1fr 1fr; gap: 10px; }
  .direct-link { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .direct-link:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .contact-form { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
}

/* ---------- Pie ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 16px; color: var(--muted); max-width: 34ch; font-size: .95rem; }
.footer-col h2 { font-size: .95rem; font-weight: 700; margin-bottom: 14px; letter-spacing: 0; }
.footer-col li + li { margin-top: 2px; }
.footer-col a { display: inline-block; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: .95rem; overflow-wrap: anywhere; }
.footer-bottom { position: relative; margin-top: 48px; padding-top: 22px; color: var(--muted); font-size: .875rem; }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:nth-child(3) { grid-column: 1 / -1; order: 3; }
  .footer-col:nth-child(4) { order: 2; }
  .footer-col a { overflow-wrap: normal; }
}

/* ---------- WhatsApp flotante (móvil) ---------- */
.wa-fab {
  position: fixed; z-index: 30;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 999px; display: none; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 1.7rem; text-decoration: none;
  box-shadow: 0 12px 28px -8px rgba(20, 24, 40, 0.5);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.wa-fab:active { transform: scale(0.94); }
body.menu-open .wa-fab { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .wa-fab { display: grid; }
  /* deja sitio al botón flotante al final de la página */
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Hero en pantallas medianas y móvil ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual { order: 2; }
}
@media (max-width: 640px) {
  .door-stage { width: min(72%, 260px); }
  .hero-ctas .btn { flex: 1 1 100%; }
}

/* ---------- Páginas legales ---------- */
.legal { padding: clamp(48px, 8vw, 96px) 0 var(--section-y); }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; font-stretch: 108%; letter-spacing: -0.03em; }
.legal .legal-updated { margin-top: 12px; color: var(--muted); font-size: .95rem; }
.legal h2 { margin-top: 44px; font-size: 1.35rem; font-weight: 700; }
.legal p, .legal li { margin-top: 12px; color: var(--ink-soft); }
.legal ul { list-style: disc; padding-left: 22px; }
.legal a { color: var(--accent); }
.legal .pending { background: var(--accent-soft); padding: 0 4px; border-radius: 3px; }
.site-footer--legal { padding: 28px 0; }
.legal-footer { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; color: var(--muted); font-size: .875rem; }
.legal-footer span:last-child { display: flex; gap: 20px; }
.legal-footer a { color: var(--muted); text-decoration: none; }

/* ---------- Efectos hover solo con ratón (en táctil se quedarían pegados) ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover i.ph-arrow-right { transform: translateX(3px); }
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-ghost:hover { border-color: var(--ink); }
  .nav-links a:hover { color: var(--ink); }
  .nav-links a:hover::after { transform: scaleX(1); }
  .swatch:hover { transform: translateY(-2px); }
  .tile--lacado:hover .chip-fan span { transform: rotate(calc(var(--r) * 1.9)); }
  .direct-link:hover { border-color: var(--accent); transform: translateY(-2px); }
  .footer-col a:hover, .legal-footer a:hover { color: var(--ink); }
}

/* ---------- Respuesta al tocar ---------- */
.direct-link:active { transform: scale(0.98); border-color: var(--accent); }
.swatch:active { transform: scale(0.92); }
.finish-toggle button:active { transform: scale(0.96); }
.faq summary:active { opacity: .7; }

/* ---------- Objetivos táctiles de al menos 44px ---------- */
@media (pointer: coarse) {
  .swatches { gap: 8px; }
  .swatch { width: 40px; height: 40px; }
  .swatch::before { content: ""; position: absolute; inset: -4px; }
  .swatch { position: relative; }
  .finish-toggle button { padding: 13px 18px; }
  .legal-footer a { display: inline-block; padding: 10px 0; }
}

/* ---------- Botón de llamar en la cabecera (solo móvil) ---------- */
.header-call {
  display: none; width: 44px; height: 44px; border-radius: 999px; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 1.3rem; text-decoration: none;
}
.header-call:active { transform: scale(0.94); }
@media (max-width: 520px) { .header-call { display: grid; } }

/* ---------- Ajustes de diseño en móvil ---------- */
@media (max-width: 640px) {
  .hero { padding-top: 28px; }
  .eyebrow { margin-bottom: 14px; }
  .hero-title { font-size: clamp(2.05rem, 8.6vw, 2.6rem); line-height: 1.06; }
  /* en móvil el titular corta las líneas de forma natural */
  .hero-title .line, .hero-title .line > span { display: inline; overflow: visible; padding: 0; }
  .hero-title .hero-in { animation-name: rise; }
  .hero-sub { margin-top: 16px; font-size: 1.03rem; }
  .hero-ctas { margin-top: 24px; gap: 10px; }
  .hero-visual { gap: 22px; }
  .door-stage { width: min(56%, 220px); }

  .section-title { font-size: clamp(1.8rem, 7.6vw, 2.3rem); }
  .section-lead { font-size: 1.02rem; }

  .manifesto-inner { align-items: flex-start; text-align: left; }
  .manifesto-text { font-size: clamp(1.45rem, 6.4vw, 1.8rem); }
  .facts { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 30px; }

  .faq summary { font-size: 1.05rem; padding: 20px 0; }
  .tile--persianas::before { left: 74%; }
  .tile--persianas p { max-width: 30ch; }
  .tile { padding: 24px; }
}

/* ---------- Objetivos táctiles (2) ---------- */
@media (pointer: coarse) {
  .brand { min-height: 44px; }
  .btn-sm { min-height: 44px; }
  .nav-links a { display: inline-block; padding: 12px 0; }
  .nav-links a::after { bottom: 6px; }
  .finish-toggle button { padding: 15px 18px; }
  .footer-col a { padding: 10px 0; }
  .footer-col li + li { margin-top: 0; }
  .legal-footer a { padding: 11px 0; }
}

/* ---------- Móvil en horizontal: que el botón principal quepa en la primera pantalla ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-top: 20px; }
  .eyebrow { margin-bottom: 10px; }
  .hero-title { font-size: clamp(1.9rem, 4.6vw, 2.6rem); }
  .hero-sub { margin-top: 12px; }
  .hero-ctas { margin-top: 18px; }
  .hero-ctas .btn { min-height: 46px; }
}

/* ---------- Iconos (sprite SVG) ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { display: inline-grid; place-items: center; line-height: 1; flex: none; }
.ico svg { width: 1em; height: 1em; fill: currentColor; }

/* ---------- Llamadas a la acción intermedias ---------- */
.inline-cta {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  color: var(--ink-soft); font-size: 1.02rem;
}
.inline-cta a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; color: var(--accent); text-decoration: none;
  border-bottom: 2px solid currentColor;
}
.inline-cta a .ico { font-size: 1.2em; }
.process-cta { margin-top: clamp(40px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.process-cta span { color: var(--muted); font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); }
@media (max-width: 640px) {
  .process-cta .btn { width: 100%; }
}

/* ---------- Casilla de privacidad: una sola zona táctil ---------- */
.check-label { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; cursor: pointer; font-weight: 400 !important; color: var(--ink-soft); }
.check-label input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.form-check .field-error { margin-left: 34px; }

/* ---------- Horario ---------- */
.hours { margin-top: 10px; color: var(--muted); font-size: 1rem; }
.hours strong { color: var(--ink); font-weight: 600; }
.footer-note { color: var(--muted); font-size: .95rem; padding: 6px 0; }
