/* Arte Crochet · Tira del hilo
   Escala del tapiz: 1 px de textura = ancho / 1280 en escritorio, ancho / 600 en móvil.
   Es la misma escala a la que se ve el vídeo, para que las puntadas no salten en la unión. */

:root {
  --hondo: #0b2a3a;
  --atlantico: #134a63;
  --crema: #f7ecd9;
  --crema-suave: #e3d6c1;
  --rosa: #f0a3ba;
  --rosa-fuerte: #e07b9a;
  --sombra: 6 24 34;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --fuente-titulo: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --fuente-texto: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  /* altura de la banda de empalme (260 px de textura) */
  --banda: calc(100% * 260 / 1280);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--hondo); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  color: var(--crema);
  background: var(--hondo);
  font: 400 1.0625rem/1.6 var(--fuente-texto);
  overflow-x: clip;
}

::selection { background: var(--rosa-fuerte); color: var(--hondo); }

img { display: block; max-width: 100%; }

.oculto {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

a:focus-visible,
button:focus-visible { outline: 3px solid var(--rosa); outline-offset: 4px; border-radius: 6px; }

/* ---------------- hero (vídeo existente) ---------------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 100svh;
  overflow: hidden;
  background: #123a4d url(assets/hero-inicio.webp) center bottom / cover no-repeat;
}
.hero-media,
.hero-video,
.hero-final {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  /* si se recorta, se recorta por arriba: la fila inferior del vídeo es la que empalma con el tapiz */
  object-position: center bottom;
}
.hero-final[hidden] { display: none; }
.hero.sin-video .hero-video { visibility: hidden; }

.hero-cta {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3.4vw, 44px);
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  background: var(--crema);
  color: var(--hondo);
  font: 700 clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem)/1 var(--fuente-titulo);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgb(var(--sombra) / 0.55), inset 0 -3px 0 rgb(0 0 0 / 0.12);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.hero-cta:active { transform: translateX(-50%) scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .hero-cta:hover { background: #fff6e8; }
}

/* ---------------- el tapiz ---------------- */
.tapiz {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background-color: var(--atlantico);
  background-image: url(assets/tapiz-inicio-escritorio.webp), url(assets/tapiz-escritorio.webp);
  background-size: 100% auto, 100% auto;
  background-position: center top, center top;
  background-repeat: no-repeat, repeat-y;
}

.intro {
  position: relative;
  z-index: 2;
  width: min(640px, 100% - 32vw);
  margin: 0 auto;
  padding: calc(100vw * 260 / 1280 + 28px) 0 clamp(40px, 6vw, 88px);
  text-align: center;
}

h2, h3 {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}
.intro h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); }
.intro-texto { position: relative; }
.intro p { margin: 0.8em auto 0; max-width: 46ch; color: var(--crema-suave); font-size: 1.125rem; }

/* el texto descansa sobre una sombra suave del propio tapiz, sin taparlo */
.intro-texto::before,
.ficha::before,
.pedido::before {
  content: "";
  position: absolute;
  inset: -34px -46px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--sombra) / 0.72), rgb(var(--sombra) / 0.5) 62%, rgb(var(--sombra) / 0));
  filter: blur(14px);
  pointer-events: none;
}

/* ---------------- catálogo ---------------- */
.catalogo {
  --carril: 1fr;
  position: relative;
  width: min(1120px, 100% - 32vw);
  margin: 0 auto;
}

.pieza {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.2vw, 32px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 72px);
}
.pieza + .pieza { margin-top: clamp(24px, 3vw, 48px); }

.ventana {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  z-index: 1;
}
.pieza.vertical .ventana { aspect-ratio: 3 / 4; }

.derecha .ventana { grid-column: 6 / 13; grid-row: 1; }
.derecha .ficha   { grid-column: 2 / 6;  grid-row: 1; padding-left: 14px; }
.izquierda .ventana { grid-column: 1 / 8; grid-row: 1; }
.izquierda .ficha   { grid-column: 8 / 12; grid-row: 1; padding-right: 14px; }
.derecha.vertical .ventana { grid-column: 7 / 13; }
.izquierda.vertical .ventana { grid-column: 1 / 7; }
.izquierda.vertical .ficha { grid-column: 7 / 12; }

.ventana > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 5%;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgb(var(--sombra) / 0.5);
  background: #134a63;
}
.ventana.tejida > img { border-radius: 0; box-shadow: none; }

.ventana canvas {
  position: absolute;
  left: calc(var(--m, 56px) * -1);
  top: calc(var(--m, 56px) * -1);
  width: calc(100% + var(--m, 56px) * 2);
  height: calc(100% + var(--m, 56px) * 2);
  pointer-events: none;
  /* los bordes exteriores se funden con el tapiz de la página: nunca se ve un rectángulo */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 calc(var(--m, 56px) * 0.6), #000 calc(100% - var(--m, 56px) * 0.6), transparent),
                      linear-gradient(to bottom, transparent, #000 calc(var(--m, 56px) * 0.6), #000 calc(100% - var(--m, 56px) * 0.6), transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 calc(var(--m, 56px) * 0.6), #000 calc(100% - var(--m, 56px) * 0.6), transparent),
                      linear-gradient(to bottom, transparent, #000 calc(var(--m, 56px) * 0.6), #000 calc(100% - var(--m, 56px) * 0.6), transparent);
          mask-composite: intersect;
}

.ficha {
  position: relative;
  z-index: 2;
  align-self: end;
  margin-bottom: clamp(8px, 3vw, 40px);
}
.ficha h3 { font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.4rem); }
.ficha .desc { margin: 0.6em 0 0; color: var(--crema-suave); max-width: 36ch; }
.ficha .precio {
  margin: 1em 0 0;
  font: 600 0.98rem/1.3 var(--fuente-texto);
  color: var(--crema);
}
.consultar {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.35em;
  color: var(--rosa);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color 180ms ease;
}
@media (hover: hover) and (pointer: fine) { .consultar:hover { color: #ffc6d6; } }

/* islas de ganchillo en capas: paralaje = profundidad */
.isla {
  position: absolute;
  z-index: 0;
  width: clamp(150px, 15vw, 230px);
  height: auto;
  pointer-events: none;
  will-change: transform;
}
.derecha .isla { left: 4%; top: 4%; }
.izquierda .isla { right: 2%; top: 4%; }

/* ---------------- pedido ---------------- */
.pedido {
  position: relative;
  z-index: 2;
  width: min(620px, 100% - 32vw);
  margin: clamp(80px, 10vw, 160px) auto 0;
  padding-bottom: 40px;
  text-align: center;
}
.pedido h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); }
.pedido p { margin: 0.9em auto 0; max-width: 48ch; color: var(--crema-suave); }
.pedido .eleccion { color: var(--crema); font-weight: 700; }
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 1.4em;
  padding: 0 2em;
  border-radius: 999px;
  background: var(--rosa-fuerte);
  color: #241018;
  font: 700 1.05rem/1 var(--fuente-titulo);
  text-decoration: none;
  box-shadow: 0 12px 30px rgb(var(--sombra) / 0.55), inset 0 -3px 0 rgb(0 0 0 / 0.14);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.boton:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .boton:hover { background: #ea8fab; } }
.pendiente {
  display: inline-block;
  margin-top: 1em !important;
  padding: 0.35em 0.8em;
  border: 1px dashed rgb(247 236 217 / 0.6);
  border-radius: 8px;
  font-size: 0.9rem;
}

.pie {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: clamp(64px, 8vw, 120px) 16px clamp(48px, 6vw, 80px);
  color: var(--crema-suave);
  font-size: 0.95rem;
}
.pie p { margin: 0; }
.pie img { width: 96px; height: 96px; filter: drop-shadow(0 8px 16px rgb(var(--sombra) / 0.6)); }

/* ---------------- ovillo ---------------- */
.ovillo {
  --d: clamp(48px, 4.4vw, 64px);
  position: absolute;
  left: 0; top: 0;
  z-index: 3;
  width: var(--d);
  height: var(--d);
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}
.ovillo.listo { opacity: 1; }
.ovillo img { position: relative; width: 100%; height: 100%; will-change: transform; }
.ovillo-sombra {
  position: absolute;
  left: 8%; right: 8%; top: 20%; bottom: -4%;
  border-radius: 50%;
  background: rgb(4 16 24 / 0.6);
  filter: blur(6px);
  will-change: transform, opacity;
}

/* ---------------- móvil: mismo juego, márgenes pequeños y alternos ---------------- */
@media (max-width: 719px) {
  .hero { aspect-ratio: 1 / 1.2; }
  .tapiz {
    background-image: url(assets/tapiz-inicio-movil.webp), url(assets/tapiz-movil.webp);
  }
  .intro {
    width: auto;
    margin: 0 22px;
    padding-top: calc(100vw * 260 / 600 + 18px);
    padding-bottom: 36px;
  }
  .intro p { font-size: 1.03rem; }
  .catalogo { width: 100%; }
  .pieza {
    display: block;
    padding-block: 36px 28px;
  }
  .pieza + .pieza { margin-top: 56px; }
  /* el lado ancho alterna: es el carril del ovillo */
  .derecha .ventana,
  .derecha .ficha { margin-left: 46px; margin-right: 16px; }
  .izquierda .ventana,
  .izquierda .ficha { margin-left: 16px; margin-right: 46px; }
  .ficha { margin-top: 30px; margin-bottom: 0; padding-inline: 6px; }
  .ficha .desc { max-width: none; }
  .ventana > img { border-radius: 14px; }
  .isla { width: 118px; top: auto; bottom: -64px; }
  .derecha .isla { left: auto; right: -46px; }
  .izquierda .isla { right: auto; left: -46px; }
  .pedido { width: auto; margin: 72px 22px 0; }
  .ovillo { --d: 34px; }
}

/* ---------------- tableta: más ancho útil, mismo juego alterno ---------------- */
@media (min-width: 720px) and (max-width: 1023px) {
  .catalogo { width: calc(100% - 72px); }
  .intro, .pedido { width: min(600px, 100% - 96px); }
  .derecha .ventana { grid-column: 6 / 13; }
  .derecha .ficha { grid-column: 2 / 6; }
  .izquierda .ficha { grid-column: 8 / 12; }
  .ficha h3 { font-size: 1.5rem; }
  .ficha .desc { font-size: 0.98rem; }
  .isla { width: 140px; }
}

/* ---------------- movimiento reducido ---------------- */
@media (prefers-reduced-motion: reduce) {
  .isla, .ovillo, .ovillo img { will-change: auto; }
}

/* ---------- ajustes de esta ronda ---------- */
.ovillo-caida,
.caida {
  position: fixed; left: 0; top: 0; z-index: 40;
  pointer-events: none;
  will-change: transform;
}
.caida { max-width: none; }

/* WhatsApp de crochet, fijo abajo a la derecha */
.whatsapp {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: 60px; height: 60px;
  border-radius: 50%;
  transition: transform 180ms var(--ease-out);
}
.whatsapp img { width: 100%; height: 100%; filter: drop-shadow(0 6px 12px rgb(var(--sombra) / 0.6)); }
.whatsapp:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .whatsapp:hover { transform: scale(1.06) rotate(-4deg); } }
.whatsapp:focus-visible { outline-offset: 6px; }

/* pie: Instagram y enlace a Conócenos */
.pie .instagram {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--crema); background: #134a63;
  box-shadow: 0 8px 18px rgb(var(--sombra) / 0.5);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.pie .instagram:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .pie .instagram:hover { background: var(--rosa-fuerte); color: var(--hondo); } }
.pie p a, .volver a, .volver-pie a {
  color: var(--rosa); font-weight: 700; text-underline-offset: 5px;
  min-height: 44px; display: inline-flex; align-items: center;
}

/* vista Conócenos: mismo tapiz de fondo, sin el resto de la landing */
.vista-conocenos .intro,
.vista-conocenos .catalogo,
.vista-conocenos .pedido { display: none; }
.volver { position: relative; z-index: 3; width: min(1120px, 100% - 32vw); margin: 0 auto; padding-top: 28px; }
.conocenos {
  position: relative; z-index: 2;
  width: min(680px, 100% - 32vw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 88px) 0 40px;
  text-align: center;
}
.conocenos[hidden] { display: none; }
.conocenos h2 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); margin-bottom: 0.3em; }
.retrato {
  margin: 24px auto 8px;
  width: min(300px, 70vw); aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  border: 2px dashed rgb(247 236 217 / 0.55); border-radius: 18px;
  background: #134a63; color: var(--crema-suave);
}
.bloque { margin-top: clamp(32px, 4vw, 56px); text-align: left; }
.bloque h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); margin-bottom: 0.4em; }
.bloque p { color: var(--crema-suave); margin: 0; font-size: 1.05rem; }
.pendiente-texto { border-left: 3px solid var(--rosa-fuerte); padding-left: 14px; font-style: italic; }
.volver-pie { margin-top: 48px; text-align: center; }
@media (max-width: 719px) {
  .volver, .conocenos { width: auto; margin-left: 22px; margin-right: 22px; }
  .bloque { text-align: left; }
  .whatsapp { width: 54px; height: 54px; }
}


/* =====================================================================
   v3: fondo colorido, barra de menú, botones de crochet, páginas
   ===================================================================== */
.tapiz {
  background-image: url(assets/tapiz-escritorio-0.webp), url(assets/tapiz-escritorio.webp);
  background-size: 100% auto, 100% auto;
  background-position: center top, center top;
  background-repeat: no-repeat, repeat-y;
}
.tapiz.con-inicio {
  background-image: url(assets/tapiz-inicio-escritorio.webp), url(assets/tapiz-escritorio-0.webp), url(assets/tapiz-escritorio.webp);
  background-size: 100% auto, 100% auto, 100% auto;
  background-position: center top, center top, center top;
  background-repeat: no-repeat, no-repeat, repeat-y;
}
@media (max-width: 719px) {
  .tapiz {
    background-image: url(assets/tapiz-movil-0.webp), url(assets/tapiz-movil.webp);
  }
  .tapiz.con-inicio {
    background-image: url(assets/tapiz-inicio-movil.webp), url(assets/tapiz-movil-0.webp), url(assets/tapiz-movil.webp);
  }
}
.pagina { min-height: 100vh; padding-top: calc(84px + env(safe-area-inset-top, 0px)); }

/* barra de menú */
.barra {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  background: rgb(11 42 58 / 0.94);
  box-shadow: 0 10px 28px rgb(var(--sombra) / 0.55);
  transition: transform 380ms var(--ease-out), opacity 260ms ease;
}
.barra.oculta { transform: translateY(-110%); opacity: 0; pointer-events: none; }
.barra nav { display: flex; align-items: center; gap: 10px; }
.logo { display: block; border-radius: 50%; }
.logo img { width: 46px; height: 46px; display: block; filter: drop-shadow(0 4px 8px rgb(var(--sombra) / 0.6)); }

/* botones de crochet */
.cbtn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  color: #fff7e8;
  font: 700 0.98rem/1 var(--fuente-titulo);
  letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.75), 0 0 7px rgb(0 0 0 / 0.55);
  background: center / 100% 100% no-repeat;
  border-radius: 999px;
  filter: drop-shadow(0 6px 9px rgb(var(--sombra) / 0.55));
  transition: transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.cbtn-rosa { background-image: url(assets/boton-rosa.webp); }
.cbtn-turquesa { background-image: url(assets/boton-turquesa.webp); }
.cbtn-naranja { background-image: url(assets/boton-naranja.webp); }
.cbtn-musgo { background-image: url(assets/boton-musgo.webp); }
.cbtn[aria-current="page"] { filter: drop-shadow(0 6px 9px rgb(var(--sombra) / 0.55)) brightness(1.18); }
@media (hover: hover) and (pointer: fine) { .cbtn:hover { transform: translateY(-2px) rotate(-1deg); } }
.cbtn:active { transform: scale(0.96); }
.barra .cbtn { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.hebra { position: fixed; left: 0; top: 0; height: 3px; border-radius: 3px; pointer-events: none; z-index: 9999; transform-origin: 0 50%; will-change: transform, opacity; }

/* fotos y huecos */
a.ventana { display: block; text-decoration: none; color: inherit; }
.ventana > img { object-fit: cover; object-position: center; padding: 0; background: #f4f1e9; }
.ficha h3 a { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .ficha h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; } }
a.ventana:focus-visible { outline: 3px solid var(--rosa); outline-offset: 10px; border-radius: 22px; }

/* productos más juntos */
.pieza { padding-block: clamp(6px, 1vw, 14px); }
.pieza + .pieza { margin-top: clamp(0px, 0.6vw, 8px); }
.ficha::before, .intro-texto::before {
  background: radial-gradient(closest-side, rgb(var(--sombra) / 0.86), rgb(var(--sombra) / 0.62) 66%, rgb(var(--sombra) / 0));
}
@media (max-width: 719px) {
  .pieza { padding-block: 14px 8px; }
  .pieza + .pieza { margin-top: 4px; }
  .ficha { margin-top: 18px; }
  .barra { gap: 8px; }
  .barra nav { gap: 6px; }
  .logo img { width: 40px; height: 40px; }
  .barra .cbtn { min-height: 36px; padding: 0 11px; font-size: 0.78rem; }
  .pagina { padding-top: calc(72px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 359px) { .barra .cbtn { padding: 0 8px; font-size: 0.7rem; } }

/* cierre de la landing */
.cierre { position: relative; z-index: 2; width: min(620px, 100% - 32vw); margin: clamp(48px, 6vw, 96px) auto 0; text-align: center; isolation: isolate; }
.cierre::before { content: ""; position: absolute; inset: -34px -46px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgb(var(--sombra) / 0.86), rgb(var(--sombra) / 0.6) 66%, rgb(var(--sombra) / 0)); filter: blur(14px); }
.cierre h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); }
.cierre p { margin: 0.8em auto 0; max-width: 46ch; color: var(--crema-suave); }
.cierre-botones, .acciones { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 1.4em; }
@media (max-width: 719px) { .cierre { width: auto; margin: 56px 22px 0; } }

/* páginas interiores */
.contenido { position: relative; z-index: 2; width: min(1120px, 100% - 32vw); margin: 0 auto; padding: clamp(24px, 4vw, 56px) 0 24px; }
.contenido.estrecho { width: min(660px, 100% - 32vw); text-align: center; }
.contenido h1 { font-family: var(--fuente-titulo); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); margin: 0 0 0.3em; text-wrap: balance; }
.contenido h1, .contenido h2, .contenido p, .contenido strong, .contenido em { text-shadow: 0 1px 14px rgb(var(--sombra) / 0.95), 0 0 3px rgb(var(--sombra) / 0.8); }
.lede { font-size: 1.15rem; max-width: 52ch; margin: 0 auto 1.4em; color: var(--crema); }
.contenido:not(.estrecho) .lede { margin-left: 0; }
.bloque { margin-top: clamp(28px, 4vw, 52px); text-align: left; }
.bloque h2 { font-family: var(--fuente-titulo); font-weight: 700; letter-spacing: -0.025em; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); margin: 0 0 0.4em; }
.bloque p { margin: 0; color: var(--crema); font-size: 1.05rem; }
.pendiente-texto { border-left: 3px solid var(--rosa-fuerte); padding-left: 14px; font-style: italic; }
.retrato { margin: 20px auto 8px; width: min(300px, 70vw); aspect-ratio: 4 / 5; display: grid; place-items: center; border: 2px dashed rgb(247 236 217 / 0.55); border-radius: 18px; background: #134a63; color: var(--crema-suave); }
.eleccion { font-weight: 700; color: var(--crema); min-height: 1.6em; }
.pendiente { display: inline-block; margin-top: 1.2em; padding: 0.35em 0.8em; border: 1px dashed rgb(247 236 217 / 0.6); border-radius: 8px; font-size: 0.9rem; }

.rejilla { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.tarjeta { display: block; color: inherit; text-decoration: none; transition: transform 200ms var(--ease-out); }
.tarjeta-foto { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 18px; background: #f4f1e9; box-shadow: 0 16px 34px rgb(var(--sombra) / 0.55); }
.tarjeta-foto img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta-texto { display: grid; gap: 2px; margin-top: 12px; }
.tarjeta-texto strong { font: 700 1.15rem/1.2 var(--fuente-titulo); letter-spacing: -0.02em; }
.tarjeta-texto em { font-style: normal; color: var(--crema-suave); font-size: 0.95rem; }
.tarjeta:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .tarjeta:hover { transform: translateY(-4px) rotate(-0.6deg); } }
.tarjeta:focus-visible { outline: 3px solid var(--rosa); outline-offset: 6px; border-radius: 20px; }

.ficha-pagina { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.ficha-foto { margin: 0; filter: drop-shadow(0 18px 30px rgb(var(--sombra) / 0.6)); }
.ficha-foto img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 34px solid transparent; border-image: url(assets/marco-crochet.webp) 70 stretch; background: #f4f1e9; }
.ficha-info h1 { margin-bottom: 0.2em; }
.que-es { margin: 0 0 0.8em; font-size: 1.05rem; color: var(--crema-suave); }
.que-es span { color: var(--rosa); font-weight: 700; margin-right: 0.4em; }
.ficha-info .desc { font-size: 1.15rem; max-width: 40ch; margin: 0 0 1em; color: var(--crema); }
.ficha-info .precio { font-weight: 700; margin: 0; }
.ficha-info .acciones { justify-content: flex-start; }
.vecinas { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 2em; }
.vecinas a { color: var(--rosa); font-weight: 700; text-underline-offset: 5px; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 719px) {
  .contenido, .contenido.estrecho { width: auto; margin: 0 22px; }
  .rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .tarjeta-foto { border-radius: 14px; }
  .tarjeta-texto strong { font-size: 1rem; }
  .ficha-pagina { grid-template-columns: minmax(0, 1fr); }
  .ficha-foto img { border-width: 26px; }
  .ficha-info .acciones { justify-content: center; }
  .ficha-info { text-align: center; }
  .ficha-info .desc { margin-inline: auto; }
  .vecinas { justify-content: center; }
}
@media (min-width: 720px) and (max-width: 1023px) { .contenido { width: calc(100% - 72px); } .contenido.estrecho { width: min(620px, 100% - 96px); } .rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.aviso { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; max-width: min(92vw, 420px); padding: 0.7em 1.1em; border-radius: 12px; background: rgb(11 42 58 / 0.97); color: var(--crema); font-size: 0.95rem; box-shadow: 0 10px 28px rgb(var(--sombra) / 0.6); }
.caida { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; will-change: transform; max-width: none; filter: drop-shadow(0 8px 8px rgb(var(--sombra) / 0.55)); }

/* lectura sobre el fondo colorido */
.ficha-info, .contenido.estrecho { isolation: isolate; }
.ficha-info::before, .contenido.estrecho::before {
  content: ""; position: absolute; inset: -28px -36px; z-index: -1; border-radius: 48px;
  background: radial-gradient(closest-side, rgb(var(--sombra) / 0.88), rgb(var(--sombra) / 0.66) 70%, rgb(var(--sombra) / 0));
  filter: blur(12px); pointer-events: none;
}
.contenido > h1:first-child { width: fit-content; max-width: 100%; }

/* espacio justo entre piezas para que el ovillo cruce sin tocar fotos ni textos */
.pieza { padding-block: 12px; }
.pieza + .pieza { margin-top: calc(clamp(48px, 4.4vw, 64px) + 24px); }
@media (max-width: 719px) {
  .pieza { padding-block: 12px 8px; }
  .pieza + .pieza { margin-top: 64px; }
}
