/* ================= TIPOLOGÍAS · 3 variantes ================= */
/* Data común */
.typ-wrap { position: relative; }

/* --------- VARIANTE A · Tabs verticales editoriales --------- */
.typ-a { display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.4fr; gap: clamp(32px, 6vw, 96px); align-items: stretch; }
@media (max-width: 900px) { .typ-a { grid-template-columns: 1fr; gap: 32px; } }

.typ-a-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--bone-10); }
.typ-a-list li { border-bottom: 1px solid var(--bone-10); }
.typ-a-btn {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 20px; align-items: baseline;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 28px 0; text-align: left;
  font-family: inherit; color: var(--ink-90);
  transition: color 320ms var(--ease), padding 320ms var(--ease);
}
.typ-a-btn .r { font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.22em; color: var(--ink-40); text-transform: uppercase; }
.typ-a-btn .t { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -0.015em; }
.typ-a-btn .t em { font-style: normal; color: var(--ink-60); }
.typ-a-btn .a { font-family: var(--sans); font-size: 18px; color: var(--ink-40); transition: transform 320ms var(--ease), color 320ms var(--ease); }
.typ-a-btn:hover { padding-left: 12px; }
.typ-a-btn:hover .a { transform: translateX(4px); color: var(--ink-90); }
.typ-a-list li.on .typ-a-btn { padding-left: 12px; }
.typ-a-list li.on .typ-a-btn .r { color: var(--terra); }
.typ-a-list li.on .typ-a-btn .t { color: var(--ink-90); }
.typ-a-list li.on .typ-a-btn .a { transform: translateX(4px); color: var(--ink-90); }

.typ-a-stage {
  position: relative;
  display: grid; grid-template-rows: auto auto auto;
  gap: 28px;
  align-self: start;
  position: sticky; top: 96px;
}
@media (max-width: 900px) { .typ-a-stage { position: relative; top: 0; } }

.typ-a-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bone-20);
  overflow: hidden;
}
.typ-a-media .slot {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(26,26,26,.42);
  opacity: 0; transition: opacity 480ms var(--ease);
  background: linear-gradient(160deg, #D9D0C1, #B8B2A6);
}
.typ-a-media .slot.on { opacity: 1; }
.typ-a-media .slot svg { width: 18%; height: auto; stroke: currentColor; stroke-width: 1.2; fill: none; }
.typ-a-media .slot .lbl {
  position: absolute; left: 20px; bottom: 20px;
  font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

.typ-a-body { display: grid; grid-template-columns: 1fr; gap: 20px; }
.typ-a-body .desc {
  font-size: 16px; line-height: 1.7; color: var(--ink-60); margin: 0; max-width: 52ch;
  min-height: 3.4em;
}
.typ-a-specs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--bone-10);
}
.typ-a-specs .spec {
  padding: 18px 16px 0 0;
  border-right: 1px solid var(--bone-10);
}
.typ-a-specs .spec:last-child { border-right: none; padding-right: 0; }
.typ-a-specs .k {
  font-family: var(--sans); font-weight: 500; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-40); margin-bottom: 8px;
}
.typ-a-specs .v {
  font-family: var(--serif); font-weight: 300; font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink-90);
}
.typ-a-specs .v small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: 0.02em; color: var(--ink-60); margin-top: 4px; text-transform: none; font-weight: 400; }
.typ-a-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-90); text-decoration: none;
  padding: 14px 22px; border: 1px solid var(--ink-90);
  justify-self: start;
  transition: background 280ms var(--ease), color 280ms var(--ease);
}
.typ-a-cta:hover { background: var(--ink-90); color: var(--bone-00); }

/* --------- VARIANTE B · Split horizontal expansible --------- */
.typ-b {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
  background: var(--bone-10);
  border: 1px solid var(--bone-10);
  overflow: hidden;
  min-height: 620px;
  transition: grid-template-columns 720ms var(--e-soft);
}
@media (max-width: 900px) { .typ-b { grid-template-columns: 1fr; min-height: 0; transition: none; } }

/* Por defecto, el panel con .on es más ancho (1.5fr vs 0.75fr) */
@media (min-width: 901px) {
  .typ-b:has(> .typ-b-panel.on:nth-child(1)) { grid-template-columns: 1.5fr 0.75fr 0.75fr; }
  .typ-b:has(> .typ-b-panel.on:nth-child(2)) { grid-template-columns: 0.75fr 1.5fr 0.75fr; }
  .typ-b:has(> .typ-b-panel.on:nth-child(3)) { grid-template-columns: 0.75fr 0.75fr 1.5fr; }
  /* Hover sobreescribe (importante: tras .on para que gane el hover) */
  .typ-b:has(> .typ-b-panel:nth-child(1):hover) { grid-template-columns: 1.5fr 0.75fr 0.75fr; }
  .typ-b:has(> .typ-b-panel:nth-child(2):hover) { grid-template-columns: 0.75fr 1.5fr 0.75fr; }
  .typ-b:has(> .typ-b-panel:nth-child(3):hover) { grid-template-columns: 0.75fr 0.75fr 1.5fr; }
}
.typ-b-panel {
  position: relative;
  background: var(--ink-90);
  color: var(--bone-00);
  padding: 40px 36px;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
}
.typ-b-panel::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,26,26,.20) 0%, rgba(26,26,26,0) 45%, rgba(26,26,26,.55) 100%);
  z-index: 1;
  transition: background 720ms var(--e-soft), opacity 720ms var(--e-soft);
}
.typ-b-panel .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 600ms var(--e-soft), transform 900ms var(--e-soft), filter 720ms var(--e-soft);
  filter: saturate(0.92) brightness(0.85);
}
/* Overlay de color sobre la foto: mantiene el "mood" cromático que ya tenías */
.typ-b-panel .bg::after {
  content: ""; position: absolute; inset: 0;
  mix-blend-mode: multiply;
  opacity: 0.82;
}
/* Color por defecto (sin foto). La foto aparece sólo en hover. */
.typ-b-panel[data-type="bodas"]       { background: linear-gradient(160deg, #141B26 0%, #2C3E5C 55%, #46608F 100%); }
.typ-b-panel[data-type="corporativo"] { background: linear-gradient(160deg, #2C3526, #5C6B4E 55%, #94A584); }
.typ-b-panel[data-type="privado"]     { background: linear-gradient(160deg, #3D1F1F, #7A3838 55%, #B57068); }

.typ-b-panel[data-type="bodas"] .bg       { background-image: image-set(url('assets/photo-banquete-1200.webp') type('image/webp'), url('assets/photo-banquete-1200.jpg') type('image/jpeg')); }
.typ-b-panel[data-type="corporativo"] .bg { background-image: image-set(url('assets/photo-exterior-1200.webp') type('image/webp'), url('assets/photo-exterior-1200.jpg') type('image/jpeg')); }
.typ-b-panel[data-type="privado"] .bg     { background-image: image-set(url('assets/gal-terraza-1200.webp') type('image/webp'), url('assets/gal-terraza-1200.jpg') type('image/jpeg')); }

.typ-b-panel[data-type="bodas"] .bg::after       { background: linear-gradient(160deg, #3a2a22, #7a5a3c 60%, #c0a080); }
.typ-b-panel[data-type="corporativo"] .bg::after { background: linear-gradient(160deg, #1e2a24, #3c4a3e 60%, #7a8a7a); }
.typ-b-panel[data-type="privado"] .bg::after     { background: linear-gradient(160deg, #2a2020, #5a3a3c 60%, #9a7262); }

.typ-b-panel > * { position: relative; z-index: 2; }
.typ-b-panel .r { font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.22em; color: rgba(255,255,255,.72); text-transform: uppercase; }
.typ-b-panel .t {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.05; letter-spacing: -0.015em;
  margin: 14px 0 0;
  color: var(--bone-00);
  white-space: nowrap;                 /* nunca partir "Celebraciones" */
  transition: font-size 460ms var(--e-soft);
}
/* El panel activo/hover se ensancha → su título crece (cabe de sobra) */
@media (min-width: 901px) {
  .typ-b .typ-b-panel.on .t,
  .typ-b .typ-b-panel:hover .t { font-size: clamp(32px, 3.4vw, 46px); }
}
/* Apilado en móvil: ancho completo, título grande sin riesgo */
@media (max-width: 900px) {
  .typ-b-panel .t { font-size: clamp(30px, 6vw, 44px); white-space: normal; }
}
.typ-b-panel .desc {
  max-width: 36ch;
  font-size: 14px; line-height: 1.65; color: rgba(255,255,255,.85);
  margin: 0;
  text-wrap: pretty;
  hyphens: auto;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 320ms var(--ease), max-height 480ms var(--ease), margin-top 320ms var(--ease);
}
/* Activo (Bodas por defecto, o el clicado) → desc visible */
.typ-b-panel.on .desc {
  opacity: 1;
  max-height: 320px;
  margin-top: 18px;
}
.typ-b-panel .specs {
  display: grid; grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 320ms var(--ease), max-height 480ms var(--ease), margin-top 320ms var(--ease), padding-top 320ms var(--ease), border-top-color 320ms var(--ease);
}
.typ-b-panel.on .specs {
  opacity: 1;
  max-height: 240px;
  margin-top: 24px;
  padding-top: 18px;
  border-top-color: rgba(255,255,255,.28);
}
@container (min-width: 320px) {
  .typ-b-panel .specs { grid-template-columns: 1fr 1fr; gap: 14px 20px; }
}
.typ-b-panel { container-type: inline-size; }
.typ-b-panel .specs .k { font-family: var(--sans); font-weight: 500; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 4px; }
.typ-b-panel .specs .v { font-family: var(--serif); font-weight: 300; font-size: 19px; color: var(--bone-00); letter-spacing: -0.01em; }
.typ-b-panel .cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--bone-00); text-decoration: none;
  margin-top: 28px;
  padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.55);
  align-self: flex-start;
  transition: border-color 320ms ease, gap 320ms ease;
}
.typ-b-panel .cta:hover { border-color: var(--bone-00); gap: 14px; }

.typ-b-panel { cursor: pointer; }

/* Desktop: hover activa el panel encima (Bodas se colapsa, hovered se expande) */
@media (min-width: 901px) {
  /* La foto sólo aparece en hover (y en el activo), con el tinte de color muy bajado */
  .typ-b-panel:hover .bg,
  .typ-b-panel.on .bg { opacity: 1; transform: scale(1.04); filter: saturate(1.02); }
  .typ-b-panel:hover .bg::after,
  .typ-b-panel.on .bg::after { opacity: 0.65; }
  .typ-b-panel:hover::before {
    background: linear-gradient(180deg, rgba(26,26,26,.55) 0%, rgba(26,26,26,.20) 35%, rgba(26,26,26,.92) 100%);
  }
  /* Hovered → expand */
  .typ-b-panel:hover .desc {
    opacity: 1; max-height: 320px; margin-top: 18px;
  }
  .typ-b-panel:hover .specs {
    opacity: 1; max-height: 240px; margin-top: 24px; padding-top: 18px;
    border-top-color: rgba(255,255,255,.28);
  }
  /* Si hay un panel hovered, el .on que NO sea hovered se colapsa */
  .typ-b:has(.typ-b-panel:hover) .typ-b-panel.on:not(:hover) .desc {
    opacity: 0; max-height: 0; margin-top: 0;
  }
  .typ-b:has(.typ-b-panel:hover) .typ-b-panel.on:not(:hover) .specs {
    opacity: 0; max-height: 0; margin-top: 0; padding-top: 0;
    border-top-color: rgba(255,255,255,0);
  }
}
/* Móvil: tres tarjetas iguales, con foto y lo justo encima.
   Antes Bodas venía con la clase .on y desplegaba párrafo y lista de eventos
   (443 px de alto) mientras Empresas y Celebraciones se quedaban en 187. Esa
   asimetría, más el bloque de texto, es lo que abrumaba al bajar. En móvil no
   hay panel activo: los tres pesan lo mismo y llevan antetítulo, nombre y una
   sola acción. El detalle está en su página. */
@media (max-width: 900px) {
  .typ-b-panel {
    min-height: 268px;
    padding: 28px;
    cursor: default;
    background: #1A1A1A;
    justify-content: flex-end;
  }

  /* Nada de panel activo: el texto largo y la lista de eventos se van */
  .typ-b-panel .desc,
  .typ-b-panel.on .desc,
  .typ-b-panel .specs,
  .typ-b-panel.on .specs { display: none; }

  .typ-b-panel .t { margin-top: 6px; }
  .typ-b-panel .cta { margin-top: 20px; }

  /* La foto, siempre puesta: en táctil no hay hover que la revele */
  .typ-b-panel .bg {
    display: block;
    opacity: 1;
    transform: none;
    filter: saturate(1.02);
  }
  /* ORDEN DE CAPAS. Esto era el fallo de fondo: .bg lleva z-index 2 y el
     ::before del degradado lleva 1, así que el degradado se pintaba DEBAJO de
     la foto y no hacía absolutamente nada. Subir sus tramos no servía de nada.
     Aquí se reordena: foto 1, degradado 2, texto 3. */
  .typ-b-panel .bg { z-index: 1; }
  .typ-b-panel::before { z-index: 2; }
  .typ-b-panel > div { position: relative; z-index: 3; }

  /* Con el degradado funcionando ya no hace falta apagar la foto entera:
     el tinte plano se queda en lo justo para unificar los tres paneles. */
  .typ-b-panel .bg::after { opacity: 0.20; }

  /* Degradado de abajo arriba. El texto va anclado al pie del panel, así que
     la parte densa cubre exactamente donde cae, y la foto queda limpia arriba.
     Los tramos están puestos para que el titular caiga sobre .82 o más. */
  .typ-b-panel::before {
    background: linear-gradient(to top,
      rgba(var(--scrim), .90) 0%,
      rgba(var(--scrim), .82) 26%,
      rgba(var(--scrim), .64) 44%,
      rgba(var(--scrim), .38) 62%,
      rgba(var(--scrim), .16) 78%,
      rgba(var(--scrim), .04) 91%,
      rgba(var(--scrim), 0) 100%);
    opacity: 1;
  }

  /* El degradado va en el color de cada tipología, no en negro. Son los mismos
     tonos que el tinte de escritorio (#3a2a22 bodas, #1e2a24 empresas,
     #2a2020 celebraciones), bajados un 30% de luminancia: a su valor original
     el titular de Bodas se quedaba en 5,3:1, porque son más claros que el
     negro. Mismo matiz, más profundidad. */
  .typ-b-panel[data-type="bodas"]       { --scrim: 38, 27, 21; }  /* marrón cálido */
  .typ-b-panel[data-type="corporativo"] { --scrim: 20, 28, 24; }  /* verde */
  .typ-b-panel[data-type="privado"]     { --scrim: 28, 21, 21; }  /* granate */

  /* En una tarjeta de 309px no hace falta el archivo de 1600px */
  .typ-b-panel[data-type="bodas"] .bg {
    background-image: image-set(url("assets/photo-banquete-900.webp") type("image/webp"),
                                url("assets/photo-banquete-900.jpg") type("image/jpeg"));
  }
  .typ-b-panel[data-type="corporativo"] .bg {
    background-image: image-set(url("assets/photo-exterior-900.webp") type("image/webp"),
                                url("assets/photo-exterior-900.jpg") type("image/jpeg"));
  }
  .typ-b-panel[data-type="privado"] .bg {
    background-image: image-set(url("assets/gal-terraza-900.webp") type("image/webp"),
                                url("assets/gal-terraza-900.jpg") type("image/jpeg"));
  }
}

/* --------- VARIANTE C · Stage con mini-itinerario --------- */
.typ-c {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(24px, 4vw, 56px);
  border: 1px solid var(--bone-10);
  background: var(--bone-00);
  overflow: hidden;
}
@media (max-width: 900px) { .typ-c { grid-template-columns: 1fr; } }

.typ-c-nav {
  display: flex; flex-direction: column;
  padding: clamp(28px, 3vw, 48px);
  gap: 4px;
  background: var(--bone-05);
  border-right: 1px solid var(--bone-10);
}
@media (max-width: 900px) { .typ-c-nav { border-right: none; border-bottom: 1px solid var(--bone-10); } }
.typ-c-head { margin-bottom: 20px; }
.typ-c-head .k { font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 6px; }
.typ-c-head .t { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; color: var(--ink-90); letter-spacing: -0.01em; }
.typ-c-tabs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--bone-10); }
.typ-c-tabs li {
  border-bottom: 1px solid var(--bone-10);
}
.typ-c-tab {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 18px 0; text-align: left;
  display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center;
  color: var(--ink-90); font-family: inherit;
  transition: color 280ms var(--ease);
}
.typ-c-tab .r { font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.22em; color: var(--ink-40); }
.typ-c-tab .t { font-family: var(--serif); font-weight: 400; font-size: 20px; letter-spacing: -0.005em; color: var(--ink-90); }
.typ-c-tab .a { font-family: var(--sans); font-size: 14px; color: var(--ink-40); transition: transform 280ms var(--ease); }
.typ-c-tab:hover { color: var(--ink-90); }
.typ-c-tab:hover .a { transform: translateX(4px); color: var(--ink-90); }
.typ-c-tabs li.on .typ-c-tab .r { color: var(--terra); }
.typ-c-tabs li.on .typ-c-tab::after {
  content: ""; position: absolute;
}
.typ-c-tabs li.on { background: #fff; margin-left: -16px; padding-left: 16px; border-left: 2px solid var(--ink-90); }

.typ-c-stage {
  display: grid; grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: clamp(28px, 3vw, 48px);
  min-height: 520px;
}
.typ-c-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bone-20);
  overflow: hidden;
}
.typ-c-media .slot {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 480ms var(--ease);
  display: grid; place-items: center;
}
.typ-c-media .slot.on { opacity: 1; }
.typ-c-media .slot[data-type="bodas"]       { background: linear-gradient(160deg, #3a2a22, #7a5a3c 60%, #c0a080); }
.typ-c-media .slot[data-type="corporativo"] { background: linear-gradient(160deg, #1e2a24, #3c4a3e 60%, #7a8a7a); }
.typ-c-media .slot[data-type="privado"]     { background: linear-gradient(160deg, #2a2020, #5a3a3c 60%, #9a7262); }
.typ-c-media .slot .icn { width: 48px; height: 48px; stroke: rgba(255,255,255,.8); stroke-width: 1.2; fill: none; }
.typ-c-media .slot .lbl {
  position: absolute; left: 24px; bottom: 20px;
  font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

.typ-c-info { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
@media (max-width: 620px) { .typ-c-info { grid-template-columns: 1fr; gap: 24px; } }
.typ-c-info .desc { font-size: 15px; line-height: 1.7; color: var(--ink-60); margin: 0; }
.typ-c-info .iti { border-left: 1px solid var(--bone-10); padding-left: 20px; }
.typ-c-info .iti h5 { font-family: var(--sans); font-weight: 500; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-40); margin: 0 0 12px; }
.typ-c-info .iti ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.typ-c-info .iti li {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: baseline;
  font-size: 13px; line-height: 1.5; color: var(--ink-90);
}
.typ-c-info .iti li .h { font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.1em; color: var(--ink-40); }

.typ-c-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  padding-top: 20px; border-top: 1px solid var(--bone-10);
  flex-wrap: wrap;
}
.typ-c-foot .specs {
  display: grid; grid-template-columns: repeat(3, auto); gap: 28px;
}
.typ-c-foot .specs .spec .k { font-family: var(--sans); font-weight: 500; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 4px; }
.typ-c-foot .specs .spec .v { font-family: var(--serif); font-weight: 300; font-size: 22px; line-height: 1; color: var(--ink-90); letter-spacing: -0.01em; }
.typ-c-foot .cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone-00); text-decoration: none;
  padding: 14px 22px; background: var(--ink-90); border: 1px solid var(--ink-90);
  transition: background 280ms var(--ease), color 280ms var(--ease);
}
.typ-c-foot .cta:hover { background: var(--terra); border-color: var(--terra); }

/* Visibilidad entre variantes */
.typ-a, .typ-b, .typ-c { display: none; }
[data-typ="a"] .typ-a { display: grid; }
[data-typ="b"] .typ-b { display: grid; }
[data-typ="c"] .typ-c { display: grid; }
