/* ============================================================
   ESQUELETO COMÚN — hoja de estilos base
   Los valores de :root los sobreescribe el panel de control.
   ============================================================ */

:root {
  /* --- COLORES (editables desde el panel) --- */
  --c-ink:        #14211c;   /* texto principal */
  --c-muted:      #5d6b64;   /* texto secundario */
  --c-bg:         #fbfaf7;   /* fondo general */
  --c-surface:    #ffffff;   /* tarjetas y bloques */
  --c-line:       #e4e1d9;   /* separadores */
  --c-accent:     #1f6f4f;   /* color de marca */
  --c-accent-2:   #c9a227;   /* color secundario / detalles */
  --c-accent-ink: #ffffff;   /* texto sobre el color de marca */
  --c-dark:       #10201a;   /* secciones oscuras */

  /* --- TIPOGRAFÍA (editable desde el panel) --- */
  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-scale:   1;             /* multiplicador global de tamaño */

  /* --- FORMA --- */
  --radius:     18px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(20,33,28,.05), 0 12px 36px -12px rgba(20,33,28,.18);
  --shadow-lg:  0 2px 4px rgba(20,33,28,.06), 0 40px 80px -24px rgba(20,33,28,.3);
  --maxw:       1200px;
  --gutter:     clamp(20px, 5vw, 64px);
}

/* ---------------- reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: calc(17px * var(--f-scale));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 .4em;
  text-wrap: balance;
}
h1 { font-size: calc(clamp(2.3rem, 5.2vw, 4.3rem) * var(--f-scale)); }
h2 { font-size: calc(clamp(2rem, 4.2vw, 3.3rem) * var(--f-scale)); }
h3 { font-size: calc(clamp(1.2rem, 2vw, 1.55rem) * var(--f-scale)); }
p  { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---------------- utilidades ---------------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 140px); }
.section--tight { padding-block: clamp(48px, 6vw, 84px); }
.section--dark { background: var(--c-dark); color: #f2f0ea; }
.section--dark .lead,
.section--dark .eyebrow { color: rgba(242,240,234,.72); }
.section--surface { background: var(--c-surface); }

.eyebrow {
  font-family: var(--f-body);
  font-size: calc(.72rem * var(--f-scale));
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin: 0 0 1.1rem;
  display: block;
}
.lead { font-size: calc(1.15rem * var(--f-scale)); color: var(--c-muted); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.rule { height: 1px; background: var(--c-line); border: 0; margin: 0; }

/* ---------------- botones ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .95em 1.7em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: calc(.95rem * var(--f-scale));
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--c-accent); color: var(--c-accent-ink); box-shadow: 0 8px 24px -10px var(--c-accent); }
.btn--primary:hover { box-shadow: 0 14px 32px -10px var(--c-accent); }
.btn--ghost { border-color: currentColor; background: transparent; }
.btn--ghost:hover { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.section--dark .btn--ghost:hover { background: #f2f0ea; color: var(--c-dark); border-color: #f2f0ea; }
.btn--light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(8px); }
.btn--light:hover { background: #fff; color: var(--c-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* ============================================================
   CABECERA
   ============================================================ */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.hdr__in {
  max-width: var(--maxw); margin-inline: auto; padding: 16px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.hdr__brand { font-family: var(--f-display); font-size: calc(1.3rem * var(--f-scale)); font-weight: 600; letter-spacing: -.02em; margin-right: auto; }
.hdr__brand b { color: var(--c-accent); font-weight: 600; }
.hdr__nav { display: flex; align-items: center; gap: 28px; }
.hdr__nav a {
  font-size: calc(.92rem * var(--f-scale)); font-weight: 500; position: relative; padding-block: 4px;
}
.hdr__nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: currentColor; transition: width .25s ease;
}
.hdr__nav a:hover::after, .hdr__nav a[aria-current="page"]::after { width: 100%; }

/* estado transparente sobre el hero */
.hdr--over { color: #fff; }
.hdr--over .hdr__brand b { color: #fff; }
.hdr--solid {
  background: rgba(251,250,247,.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--c-line);
  color: var(--c-ink);
}
.hdr--solid .hdr__brand b { color: var(--c-accent); }

/* selector de idioma */
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: .4em;
  background: transparent; border: 1px solid currentColor; border-radius: 999px;
  padding: .42em .85em; font-size: calc(.8rem * var(--f-scale)); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; opacity: .85;
}
.lang__btn:hover { opacity: 1; }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 168px;
  background: var(--c-surface); color: var(--c-ink);
  border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; display: none; z-index: 10;
}
.lang__menu.open { display: block; }
.lang__menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; text-align: left;
  background: none; border: 0; border-radius: 7px; padding: 9px 12px;
  font-size: calc(.9rem * var(--f-scale));
}
.lang__menu button:hover { background: var(--c-bg); }
.lang__menu button[aria-selected="true"] { font-weight: 600; color: var(--c-accent); }
.lang__code { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .5; margin-left: auto; }

/* menú móvil */
.burger { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; }
.burger span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .25s ease, opacity .25s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; order: 3; }
  .hdr__nav {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--c-surface); color: var(--c-ink);
    border-bottom: 1px solid var(--c-line);
    padding: 12px var(--gutter) 28px;
    box-shadow: var(--shadow);
    display: none;
  }
  .hdr__nav.open { display: flex; }
  .hdr__nav a { padding: 15px 0; border-bottom: 1px solid var(--c-line); font-size: calc(1.05rem * var(--f-scale)); }
  .hdr__nav a::after { display: none; }
  .hdr__nav .btn { margin-top: 18px; justify-content: center; }
  .lang { order: 2; margin-left: auto; }
}

/* ============================================================
   HERO — carrusel a pantalla completa
   ============================================================ */
.hero { position: relative; height: 100svh; min-height: 640px; max-height: 1000px; overflow: hidden; background: var(--c-dark); }
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 7.5s cubic-bezier(.2,.6,.3,1);
}
.hero__slide.is-active img { transform: scale(1); }
.hero__slide::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(8,16,13,.9) 0%, rgba(8,16,13,.55) 38%, rgba(8,16,13,.28) 66%, rgba(8,16,13,.55) 100%);
}
.hero__body {
  position: relative; z-index: 2; height: 100%;
  max-width: var(--maxw); margin-inline: auto;
  padding: 96px var(--gutter) clamp(96px, 13vh, 150px);
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; overflow: hidden;
}
.hero__caption { max-width: 820px; }
.hero__caption h1 { max-width: 15ch; }
.hero__caption .eyebrow { color: rgba(255,255,255,.8); }
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero__text { font-size: calc(1.15rem * var(--f-scale)); color: rgba(255,255,255,.9); max-width: 52ch; margin-bottom: 2rem; }
.hero__caption > * { animation: heroUp .8s cubic-bezier(.2,.7,.3,1) both; }
.hero__caption > *:nth-child(2) { animation-delay: .08s; }
.hero__caption > *:nth-child(3) { animation-delay: .16s; }
.hero__caption > *:nth-child(4) { animation-delay: .24s; }
@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* controles del carrusel */
.hero__dots {
  position: absolute; left: var(--gutter); bottom: clamp(38px, 6vh, 64px); z-index: 3;
  display: flex; gap: 12px; align-items: center;
}
.hero__dot {
  width: 44px; height: 3px; border: 0; padding: 0; border-radius: 99px;
  background: rgba(255,255,255,.34); overflow: hidden; position: relative;
}
.hero__dot i { position: absolute; inset: 0 100% 0 0; background: #fff; transition: right .2s linear; display: block; }
.hero__dot.is-active i { animation: dotFill var(--hero-delay, 6s) linear forwards; }
@keyframes dotFill { from { right: 100%; } to { right: 0; } }
.hero__arrows { position: absolute; right: var(--gutter); bottom: clamp(34px, 6vh, 60px); z-index: 3; display: flex; gap: 10px; }
.hero__arrow {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.42); background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px); color: #fff;
  display: grid; place-items: center; transition: background .2s ease, transform .2s ease;
}
.hero__arrow:hover { background: #fff; color: var(--c-ink); transform: scale(1.06); }
.hero__scroll {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 3;
  color: rgba(255,255,255,.7); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll::after { content: ''; width: 1px; height: 30px; background: linear-gradient(rgba(255,255,255,.8), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }
@media (max-width: 700px) {
  .hero__arrows { display: none; }
  .hero__scroll { display: none; }
  .hero__caption { max-width: none; }
}

/* hero interior (páginas que no son la home) */
.phero { position: relative; min-height: 56svh; display: flex; align-items: flex-end; background: var(--c-dark); overflow: hidden; }
.phero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,16,13,.82), rgba(8,16,13,.3)); }
.phero__body { position: relative; z-index: 2; color: #fff; padding-block: clamp(56px, 9vh, 96px); width: 100%; }
.phero__body .eyebrow { color: rgba(255,255,255,.78); }
.phero h1 { color: #fff; font-size: calc(clamp(2.3rem, 5vw, 4rem) * var(--f-scale)); }
.phero .lead { color: rgba(255,255,255,.85); }

/* ============================================================
   BLOQUES DE CONTENIDO
   ============================================================ */
.grid { display: grid; gap: clamp(24px, 3vw, 40px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: clamp(28px, 3vw, 40px);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__num {
  font-family: var(--f-display); font-size: calc(2.4rem * var(--f-scale));
  color: var(--c-accent); line-height: 1; margin-bottom: .4em; display: block; opacity: .9;
}
.card p { color: var(--c-muted); margin: 0; }
.section--dark .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.section--dark .card p { color: rgba(242,240,234,.72); }

/* dos columnas texto + imagen */
.split { display: grid; gap: clamp(32px, 5vw, 80px); align-items: center; grid-template-columns: 1fr 1fr; }
.split--flip .split__media { order: -1; }
.split__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5; }
.split__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.split__media:hover img { transform: scale(1.04); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__media { aspect-ratio: 16/10; }
}

/* cifras */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.figure__value { font-family: var(--f-display); font-size: calc(clamp(2.6rem, 5vw, 4rem) * var(--f-scale)); line-height: 1; color: var(--c-accent); }
.section--dark .figure__value { color: var(--c-accent-2); }
.figure__label { font-size: calc(.88rem * var(--f-scale)); color: var(--c-muted); margin-top: .5em; }
.section--dark .figure__label { color: rgba(242,240,234,.7); }

/* pasos numerados */
.steps { counter-reset: s; display: grid; gap: 4px; }
.step { display: grid; grid-template-columns: 76px 1fr; gap: 24px; padding: clamp(24px,3vw,36px) 0; border-top: 1px solid var(--c-line); align-items: start; }
.step:last-child { border-bottom: 1px solid var(--c-line); }
.step__n {
  counter-increment: s; font-family: var(--f-display); font-size: calc(1.6rem * var(--f-scale));
  color: var(--c-accent); opacity: .5;
}
.step__n::before { content: '0' counter(s); }
.step p { color: var(--c-muted); margin: 0; }
@media (max-width: 640px) { .step { grid-template-columns: 1fr; gap: 8px; } }

/* especificaciones */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.spec { background: var(--c-surface); padding: clamp(22px, 2.5vw, 32px); }
.spec dt { font-size: calc(.74rem * var(--f-scale)); text-transform: uppercase; letter-spacing: .14em; color: var(--c-muted); margin-bottom: .6em; }
.spec dd { margin: 0; font-family: var(--f-display); font-size: calc(1.25rem * var(--f-scale)); }

/* acordeón FAQ */
.faq { border-top: 1px solid var(--c-line); }
.faq__item { border-bottom: 1px solid var(--c-line); }
.faq__q {
  width: 100%; background: none; border: 0; text-align: left;
  padding: 26px 44px 26px 0; position: relative;
  font-family: var(--f-display); font-size: calc(1.2rem * var(--f-scale)); letter-spacing: -.01em;
}
.faq__q::after {
  content: ''; position: absolute; right: 8px; top: 50%; width: 13px; height: 13px;
  border-right: 2px solid var(--c-accent); border-bottom: 2px solid var(--c-accent);
  transform: translateY(-70%) rotate(45deg); transition: transform .28s ease;
}
.faq__item.open .faq__q::after { transform: translateY(-20%) rotate(-135deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.faq__item.open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { color: var(--c-muted); padding-bottom: 26px; max-width: 70ch; }

/* ============================================================
   GALERÍA
   ============================================================ */
.gal { columns: 3; column-gap: 20px; }
@media (max-width: 900px) { .gal { columns: 2; } }
@media (max-width: 560px) { .gal { columns: 1; } }
.gal__item {
  break-inside: avoid; margin-bottom: 20px; position: relative;
  border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in;
  background: var(--c-line); display: block; width: 100%; border: 0; padding: 0;
}
.gal__item img { width: 100%; transition: transform .5s ease; }
.gal__item:hover img { transform: scale(1.05); }
.gal__cap {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: #fff;
  background: linear-gradient(transparent, rgba(8,16,13,.85));
  font-size: calc(.88rem * var(--f-scale)); text-align: left;
  opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease;
}
.gal__item:hover .gal__cap { opacity: 1; transform: none; }

/* filtros */
.gal__filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.chip {
  border: 1px solid var(--c-line); background: var(--c-surface); border-radius: 999px;
  padding: .5em 1.2em; font-size: calc(.85rem * var(--f-scale)); font-weight: 500;
  transition: all .2s ease;
}
.chip:hover { border-color: var(--c-accent); color: var(--c-accent); }
.chip[aria-pressed="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }

/* lightbox */
.lbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(8,14,11,.96);
  display: none; place-items: center; padding: 24px;
  opacity: 0; transition: opacity .3s ease;
}
.lbox.open { display: grid; }
.lbox.show { opacity: 1; }
.lbox img { max-width: min(1400px, 94vw); max-height: 84vh; object-fit: contain; border-radius: 6px; }
.lbox__cap { color: rgba(255,255,255,.82); text-align: center; margin-top: 18px; font-size: calc(.92rem * var(--f-scale)); }
.lbox__close, .lbox__nav {
  position: absolute; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28);
  color: #fff; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  transition: background .2s ease;
}
.lbox__close:hover, .lbox__nav:hover { background: rgba(255,255,255,.28); }
.lbox__close { top: 22px; right: 22px; }
.lbox__nav--prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lbox__nav--next { right: 22px; top: 50%; transform: translateY(-50%); }
.lbox__count { position: absolute; top: 30px; left: 30px; color: rgba(255,255,255,.6); font-size: .85rem; letter-spacing: .1em; }
@media (max-width: 640px) { .lbox__nav { width: 44px; height: 44px; } .lbox__nav--prev { left: 10px; } .lbox__nav--next { right: 10px; } }

/* ============================================================
   MODAL DE DEMO (iframe a pantalla completa)
   ============================================================ */
.demo-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(8,14,11,.94); display: none; opacity: 0; transition: opacity .3s ease; }
.demo-modal.open { display: block; }
.demo-modal.show { opacity: 1; }
.demo-modal__bar {
  position: absolute; inset: 0 0 auto 0; height: 58px; display: flex; align-items: center;
  gap: 16px; padding-inline: 18px; color: #fff; background: rgba(10,18,14,.7); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.demo-modal__title { font-size: calc(.92rem * var(--f-scale)); font-weight: 600; margin-right: auto; }
.demo-modal__x {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); color: #fff;
  border-radius: 999px; padding: .42em 1.1em; font-size: .85rem; font-weight: 600;
}
.demo-modal__x:hover { background: #fff; color: #10201a; }
.demo-modal iframe { position: absolute; inset: 58px 0 0 0; width: 100%; height: calc(100% - 58px); border: 0; background: #fff; }
.demo-open-btn[hidden] { display: none !important; }

/* ============================================================
   FORMULARIO DE CONTACTO
   ============================================================ */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label { font-size: calc(.82rem * var(--f-scale)); font-weight: 600; letter-spacing: .02em; }
.field input, .field textarea, .field select {
  font: inherit; font-size: calc(.98rem * var(--f-scale));
  padding: .82em 1em; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-ink); width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 16%, transparent);
}
.form__note { font-size: calc(.82rem * var(--f-scale)); color: var(--c-muted); }
.form__msg { padding: 1em 1.2em; border-radius: var(--radius-sm); font-size: calc(.92rem * var(--f-scale)); display: none; }
.form__msg.ok { display: block; background: color-mix(in srgb, var(--c-accent) 12%, transparent); color: var(--c-accent); }
.form__msg.err { display: block; background: #fdecec; color: #a32020; }

.contact-info { display: grid; gap: 26px; align-content: start; }
.contact-info dt { font-size: calc(.74rem * var(--f-scale)); text-transform: uppercase; letter-spacing: .14em; color: var(--c-muted); margin-bottom: .35em; }
.contact-info dd { margin: 0; font-size: calc(1.05rem * var(--f-scale)); }
.contact-info a:hover { color: var(--c-accent); }

/* ============================================================
   PIE
   ============================================================ */
.ftr { background: var(--c-dark); color: rgba(242,240,234,.75); padding-block: clamp(56px, 7vw, 88px) 36px; }
.ftr__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.12); }
@media (max-width: 800px) { .ftr__top { grid-template-columns: 1fr; gap: 34px; } }
.ftr__brand { font-family: var(--f-display); font-size: calc(1.5rem * var(--f-scale)); color: #fff; margin-bottom: .5em; }
.ftr h4 { font-family: var(--f-body); font-size: calc(.74rem * var(--f-scale)); text-transform: uppercase; letter-spacing: .15em; color: rgba(242,240,234,.5); margin-bottom: 1.2em; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.ftr a:hover { color: #fff; }
.ftr__bottom { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; padding-top: 28px; font-size: calc(.82rem * var(--f-scale)); color: rgba(242,240,234,.5); }

/* ============================================================
   APARICIÓN AL HACER SCROLL
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* aviso de imagen provisional */
.placeholder-note {
  position: fixed; left: 14px; bottom: 14px; z-index: 800;
  background: #ffe9a8; color: #6b4a00; border: 1px solid #e0bd53;
  border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 600; max-width: 260px;
}
.placeholder-note button { background: none; border: 0; float: right; margin-left: 8px; font-weight: 700; }

/* ============================================================
   SECCIÓN DE VÍDEO (debajo del hero)
   Se muestra primero una portada con el botón de reproducir y
   el vídeo no se carga hasta que se pulsa: así la página abre
   rápido y YouTube no pone cookies a quien no lo ve.
   ============================================================ */
.video[hidden] { display: none !important; }
.video__head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.center .video__head { margin-inline: auto; }
.video__marco {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16/9; background: var(--c-dark); box-shadow: var(--shadow-lg);
  max-width: 100%;
}
.video__marco img,
.video__marco iframe,
.video__marco video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border: 0; display: block;
}
.video__marco::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8,16,13,.55), rgba(8,16,13,.12));
  transition: opacity .3s ease;
}
.video__marco.reproduciendo::after { opacity: 0; }
.video__play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; background: none; border: 0; color: #fff; z-index: 2;
  transition: opacity .25s ease;
}
.video__play:hover .video__circulo { transform: scale(1.08); background: var(--c-accent); border-color: var(--c-accent); }
.video__circulo {
  width: clamp(64px, 8vw, 88px); height: clamp(64px, 8vw, 88px);
  border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.6);
  backdrop-filter: blur(10px);
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.video__circulo svg { margin-left: 4px; }
.video__etiqueta {
  font-size: calc(.9rem * var(--f-scale)); font-weight: 600; letter-spacing: .04em;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.video__duracion {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  background: rgba(8,16,13,.7); color: #fff; border-radius: 6px;
  padding: .25em .6em; font-size: .78rem; font-weight: 600;
}
.video__aviso {
  margin-top: 14px; font-size: calc(.82rem * var(--f-scale)); color: var(--c-muted);
}
.section--dark .video__aviso { color: rgba(242,240,234,.6); }

/* ============================================================
   TARIFAS / TIRADAS
   Tres opciones, la del medio destacada. Se oculta sola si no
   hay nada escrito en la primera.
   ============================================================ */
.tiers[hidden] { display: none !important; }
.tiers__head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 52px); }
.center .tiers__head { margin-inline: auto; }
.tiers__grid { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.tier {
  position: relative; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: clamp(28px, 3vw, 38px);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tier:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tier--destacado {
  border-color: var(--c-accent); border-width: 1.5px;
  box-shadow: 0 20px 50px -24px var(--c-accent);
}
.tier__badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--c-accent); color: var(--c-accent-ink);
  font-size: calc(.7rem * var(--f-scale)); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .45em 1em; border-radius: 999px; white-space: nowrap;
}
.tier__name { font-size: calc(.76rem * var(--f-scale)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }
.tier__qty { font-family: var(--f-display); font-size: calc(clamp(2rem, 3.4vw, 2.7rem) * var(--f-scale)); line-height: 1.05; letter-spacing: -.02em; }
.tier__price { font-size: calc(1.15rem * var(--f-scale)); font-weight: 600; color: var(--c-accent); margin-top: .25em; }
.tier__note { font-size: calc(.86rem * var(--f-scale)); color: var(--c-muted); margin-top: auto; padding-top: 1.1em; }
.tiers__pie { margin-top: clamp(28px, 3vw, 40px); }
.center .tiers__pie { display: flex; justify-content: center; }

/* ============================================================
   LOGOTIPO DE LA CABECERA
   Si no hay logotipo subido se ve el nombre escrito. Si hay dos
   versiones, la clara se usa sobre el hero y en el pie oscuro.
   ============================================================ */
.hdr__brand { display: inline-flex; align-items: center; gap: 10px; }
.hdr__logo { height: var(--logo-alto, 38px); width: auto; display: block; }
.hdr__logo--claro { display: none; }
.hdr--over .hdr__logo--oscuro { display: none; }
.hdr--over .hdr__logo--claro { display: block; }
/* si solo hay una versión, se usa siempre */
.hdr__brand--unico .hdr__logo { display: block !important; }
.ftr__logo { height: calc(var(--logo-alto, 38px) * 1.1); width: auto; margin-bottom: .6em; }
@media (max-width: 900px) {
  .hdr__logo { height: calc(var(--logo-alto, 38px) * .85); }
}

/* ============================================================
   PÁGINAS LEGALES
   ============================================================ */
.phero--corto { min-height: 38svh; }
.legal__intro { margin-bottom: clamp(32px, 4vw, 48px); }
.legal__bloque { padding-block: clamp(20px, 2.4vw, 30px); border-top: 1px solid var(--c-line); }
.legal__bloque:first-of-type { border-top: 0; padding-top: 0; }
.legal__bloque h2 {
  font-size: calc(clamp(1.15rem, 1.8vw, 1.45rem) * var(--f-scale));
  margin-bottom: .6em;
}
.legal__bloque p { color: var(--c-muted); max-width: 72ch; }
.legal__fecha {
  margin-top: clamp(32px, 4vw, 48px); padding-top: 20px;
  border-top: 1px solid var(--c-line);
  font-size: calc(.84rem * var(--f-scale)); color: var(--c-muted);
}

/* ============================================================
   BOTÓN FLOTANTE DE WHATSAPP
   El número se pone en config.js (WHATSAPP). Los textos, en el
   panel: wa.label y wa.text.
   ============================================================ */
.wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 18px 0 16px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(18, 90, 50, .32);
  transition: transform .18s ease, box-shadow .18s ease;
  max-width: calc(100vw - 40px);
}
.wa:hover,
.wa:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(18, 90, 50, .38);
}
.wa__icono { width: 28px; height: 28px; flex: 0 0 auto; }
.wa__texto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* En el móvil, solo el icono: el texto se comería la pantalla */
@media (max-width: 760px) {
  .wa { right: 14px; bottom: 14px; width: 56px; padding: 0; justify-content: center; }
  .wa__texto { display: none; }
}

/* Que el botón no se coma la última línea del pie */
@media (min-width: 761px) { .ftr__bottom { padding-right: 270px; } }
@media (max-width: 760px) { .ftr__bottom { padding-bottom: 60px; } }

/* En pantallas muy bajas estorba más que ayuda */
@media (max-height: 460px) { .wa { display: none; } }

/* ============================================================
   PRECIOS BAJO CLAVE
   ============================================================ */
[hidden] { display: none !important; }
.tier__price--bloq { letter-spacing: .22em; color: var(--c-muted); }
.tiers__aviso { color: var(--c-muted); max-width: 54ch; margin: 0 auto 1.2rem; }
.btn-row--centro { justify-content: center; }
.tiers--abierto .tiers__aviso { display: none; }

.clave {
  position: fixed; inset: 0; z-index: 90; display: none;
  place-items: center; padding: 1.2rem;
  background: rgba(16, 22, 18, .58);
}
.clave.is-open { display: grid; }
.clave__caja {
  position: relative; width: 100%; max-width: 30rem;
  background: var(--c-surface); color: var(--c-ink);
  border-radius: var(--radius); padding: clamp(1.5rem, 3.4vw, 2.4rem);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
}
.clave__caja h3 { margin: 0 0 .5rem; font-family: var(--f-display); }
.clave__caja > p { margin: 0 0 1.3rem; color: var(--c-muted); }
.clave__form { display: flex; gap: .6rem; flex-wrap: wrap; }
.clave__form input {
  flex: 1 1 11rem; min-width: 0; font: inherit;
  padding: .78rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-ink);
}
.clave__form input:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.clave__err { margin: .9rem 0 0; color: #b4513a; font-size: .95rem; }
.clave__x {
  position: absolute; top: .7rem; right: .9rem;
  background: none; border: 0; font: inherit; cursor: pointer;
  color: var(--c-muted); padding: .3rem .5rem;
}
.clave__x:hover { color: var(--c-ink); }


/* ============================================================
   CARRUSEL DE CARACTERÍSTICAS
   Fondo de espacio con estrellas, una escena dibujada a la
   izquierda y la cifra grande a la derecha. Las escenas solo se
   mueven cuando su diapositiva está activa; con «reducir el
   movimiento» se ven quietas y completas.
   ============================================================ */
.carac {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 600px at 15% 20%, rgba(62,201,214,.18), transparent 60%),
    radial-gradient(900px 600px at 90% 90%, rgba(249,115,22,.16), transparent 60%),
    linear-gradient(160deg, #3a2a8c 0%, var(--c-dark) 55%, #1b1442 100%);
  padding-block: clamp(64px, 9vw, 120px);
  isolation: isolate;
}
.carac__cielo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.carac__cielo i {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #fff;
  opacity: .25; animation: kmTitila var(--t) ease-in-out var(--d) infinite alternate;
}
@keyframes kmTitila { to { opacity: .95; transform: scale(1.4); } }
.carac__brillo {
  position: absolute; z-index: -1; width: 46vmax; height: 46vmax; border-radius: 50%;
  left: -12vmax; top: -10vmax; pointer-events: none;
  background: radial-gradient(circle, rgba(107,63,212,.55), transparent 65%);
  filter: blur(20px); animation: kmDeriva 18s ease-in-out infinite alternate;
}
@keyframes kmDeriva { to { transform: translate(18vmax, 10vmax) scale(1.15); } }

.carac__in {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 80px); align-items: center;
}
.carac__escena { position: relative; aspect-ratio: 1; width: 100%; max-width: 460px; justify-self: center; }
.carac__escena::before {
  content: ''; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.16), rgba(255,255,255,.03) 60%, transparent 70%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08);
}
.esc {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  opacity: 0; transform: scale(.86) rotate(-6deg);
  transition: opacity .55s ease, transform .8s cubic-bezier(.2,.9,.25,1.15);
  pointer-events: none;
}
.esc.is-active { opacity: 1; transform: none; }
.esc text { font-family: var(--f-display); font-weight: 700; }

.carac__eyebrow { color: rgba(255,255,255,.72); }
.carac__pila { display: grid; }
.carac__slide {
  grid-area: 1 / 1; visibility: hidden; opacity: 0;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.carac__slide.is-active { visibility: visible; opacity: 1; transition: opacity .45s ease; }
.carac__slide.is-vacia { display: none; }
.carac__slide > * { transform: translateY(18px); opacity: 0; transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .6s ease; }
.carac__slide.is-active > * { transform: none; opacity: 1; }
.carac__slide.is-active > :nth-child(2) { transition-delay: .1s; }
.carac__slide.is-active > :nth-child(3) { transition-delay: .2s; }
.carac__num { display: flex; align-items: baseline; gap: .35em; flex-wrap: wrap; margin: 0 0 .1em; line-height: .95; }
.carac__num b {
  font-family: var(--f-display); font-weight: 700; letter-spacing: -.03em;
  font-size: calc(clamp(4.4rem, 11vw, 8.5rem) * var(--f-scale));
  background: linear-gradient(120deg, #fde68a, var(--c-accent-2, #f97316) 60%, #fb7185);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.carac__num span {
  font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  font-size: calc(clamp(.95rem, 1.6vw, 1.2rem) * var(--f-scale)); color: #c4b5fd;
}
.carac h2 { color: #fff; font-size: calc(clamp(1.7rem, 3.2vw, 2.6rem) * var(--f-scale)); margin: .25em 0 .45em; max-width: 20ch; }
.carac__texto { color: rgba(255,255,255,.82); font-size: calc(1.1rem * var(--f-scale)); max-width: 52ch; margin: 0; }

.carac__ctrl { display: flex; align-items: center; gap: 20px; margin-top: clamp(28px, 4vw, 44px); flex-wrap: wrap; }
.carac__puntos { display: flex; gap: 8px; flex: 1 1 220px; }
.carac__punto {
  flex: 1; height: 26px; padding: 11px 0; background: none; border: 0; cursor: pointer; position: relative;
}
.carac__punto::before { content: ''; position: absolute; inset: 11px 0; border-radius: 4px; background: rgba(255,255,255,.22); }
.carac__punto i { position: absolute; inset: 11px 100% 11px 0; border-radius: 4px; background: #fff; display: block; }
.carac__punto.is-active i { animation: kmLlena var(--carac-ms, 7s) linear forwards; }
.carac.is-pausado .carac__punto.is-active i { animation-play-state: paused; }
.carac__punto:hover::before { background: rgba(255,255,255,.4); }
@keyframes kmLlena { to { right: 0; } }
.carac__flechas { display: flex; gap: 10px; }
.carac__btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff;
  transition: background .2s ease, transform .2s ease, color .2s ease;
}
.carac__btn:hover { background: #fff; color: var(--c-dark); transform: scale(1.06); }
.carac__btn .ico-play { display: none; }
.carac__btn[aria-pressed="true"] .ico-play { display: block; }
.carac__btn[aria-pressed="true"] .ico-pausa { display: none; }
.carac :focus-visible { outline: 2px solid #fde68a; outline-offset: 3px; }

@media (max-width: 860px) {
  .carac__in { grid-template-columns: 1fr; }
  .carac__escena { max-width: 300px; }
  .carac__textos { text-align: center; }
  .carac__num { justify-content: center; }
  .carac h2, .carac__texto { margin-inline: auto; }
  .carac__ctrl { justify-content: center; }
}

/* ---- las ocho escenas ---- */
.e-sombra { fill: rgba(0,0,0,.25); }
.esc.is-active .e-flota { animation: kmFlota 4s ease-in-out infinite; }
@keyframes kmFlota { 50% { transform: translateY(-8px); } }
.e-hoja { transform-box: view-box; transform-origin: 160px 160px; }
.esc.is-active .e-hoja { animation: kmHoja 3.8s cubic-bezier(.45,.05,.35,1) var(--d) infinite both; }
@keyframes kmHoja {
  0%, 10% { transform: scaleX(1); opacity: 1; }
  45%, 84% { transform: scaleX(-1); opacity: 1; }
  94% { transform: scaleX(-1); opacity: 0; }
  100% { transform: scaleX(1); opacity: 0; }
}

.e-cifra { fill: #fff; font-size: 26px; }
.e-barra { transform-box: fill-box; transform-origin: 50% 100%; }
.esc.is-active .e-barra { animation: kmCrece .9s cubic-bezier(.3,1.5,.5,1) var(--d) both; }
@keyframes kmCrece { from { transform: scaleY(0); } }
.e-salta { transform: translate(254px, 34px); }
.esc.is-active .e-salta { animation: kmSalta 3.2s ease-in-out 1s infinite both; }
@keyframes kmSalta {
  0%   { transform: translate(74px, 136px) scale(.2); }
  10%  { transform: translate(74px, 136px) scale(1); }
  22%  { transform: translate(104px, 92px); }
  34%  { transform: translate(134px, 102px); }
  46%  { transform: translate(164px, 58px); }
  58%  { transform: translate(194px, 68px); }
  70%  { transform: translate(224px, 24px); }
  82%, 92% { transform: translate(254px, 34px) rotate(72deg); }
  100% { transform: translate(254px, 34px) rotate(72deg) scale(0); }
}

.e-orbita { transform-box: view-box; transform-origin: 160px 160px; }
.e-derecho { transform-box: fill-box; transform-origin: center; }
.esc.is-active .e-orbita { animation: kmGira 14s linear infinite; }
.esc.is-active .e-derecho { animation: kmGira 14s linear infinite reverse; }
@keyframes kmGira { to { transform: rotate(360deg); } }

.e-globo { transform-box: fill-box; transform-origin: 30% 100%; }
.esc.is-active .e-globo { animation: kmPop .7s cubic-bezier(.3,1.6,.5,1) both; }
.e-puntos circle { transform-box: fill-box; transform-origin: center; }
.esc.is-active .e-puntos { animation: kmFuera .3s ease 1.6s both; }
.esc.is-active .e-puntos circle { animation: kmBota .6s ease-in-out infinite; }
.esc.is-active .e-puntos circle:nth-child(2) { animation-delay: .15s; }
.esc.is-active .e-puntos circle:nth-child(3) { animation-delay: .3s; }
@keyframes kmBota { 50% { transform: translateY(-10px); } }
@keyframes kmFuera { to { opacity: 0; } }
.e-risa { transform-box: fill-box; transform-origin: center; }
.esc.is-active .e-risa { animation: kmEntra .5s cubic-bezier(.3,1.6,.5,1) 1.7s both, kmRie .5s ease-in-out 2.3s 6 alternate; }
@keyframes kmEntra { from { opacity: 0; transform: scale(.3); } }
@keyframes kmRie { to { transform: rotate(-4deg) scale(1.04); } }
.e-chispa > path { transform-box: fill-box; transform-origin: center; }
.esc.is-active .e-chispa > path { animation: kmChispa 1.6s ease-in-out var(--d) infinite both; }
@keyframes kmChispa { 0%, 100% { transform: scale(.4) rotate(0); opacity: .4; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }

.e-traza { stroke-dasharray: 690; }
.esc.is-active .e-traza { animation: kmTraza 1.3s ease both; }
@keyframes kmTraza { from { stroke-dashoffset: 690; } }
.esc.is-active .e-relleno { animation: kmAparece .6s ease both; animation-delay: 1.1s; }
.esc.is-active .e-relleno:nth-of-type(3) { animation-delay: 1.25s; }
.esc.is-active .e-relleno:nth-of-type(4) { animation-delay: 1.4s; }
.esc.is-active .e-cota { animation: kmAparece .6s ease 1.7s both; }
@keyframes kmAparece { from { opacity: 0; } }
.e-medida { fill: #fbbf24; font-size: 15px; letter-spacing: .06em; }

.esc.is-active .e-pieza { animation: kmEncaja 1s cubic-bezier(.3,1.35,.5,1) var(--d) both; }
@keyframes kmEncaja { from { transform: translate(var(--x), var(--y)) rotate(-24deg); opacity: 0; } }
.esc.is-active .e-camino { animation: kmMarcha 1.2s linear infinite; }
@keyframes kmMarcha { to { stroke-dashoffset: -28; } }

.e-hojaverde { transform-box: fill-box; transform-origin: 50% 100%; }
.esc.is-active .e-hojaverde { animation: kmBrota 1.1s cubic-bezier(.3,1.3,.5,1) both, kmMece 4s ease-in-out 1.2s infinite; }
@keyframes kmBrota { from { transform: scale(0) rotate(-20deg); } }
@keyframes kmMece { 50% { transform: rotate(4deg); } }
.e-nervio { stroke-dasharray: 420; }
.esc.is-active .e-nervio { animation: kmNervio 1.4s ease .9s both; }
@keyframes kmNervio { from { stroke-dashoffset: 420; } }
.esc.is-active .e-gota { animation: kmGota 2.4s ease-in 1.4s infinite both; }
@keyframes kmGota { 0% { transform: translateY(-40px); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateY(40px); opacity: 1; } 100% { transform: translateY(46px); opacity: 0; } }

.e-idioma { fill: #fff; font-size: 20px; letter-spacing: .04em; }
.e-pop { transform-box: fill-box; transform-origin: center; }
.esc.is-active .e-pop { animation: kmPop .6s cubic-bezier(.3,1.6,.5,1) var(--d) both, kmFlota 3s ease-in-out calc(var(--d) + .8s) infinite; }
@keyframes kmPop { from { transform: scale(0); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .carac *, .carac *::before { animation: none !important; transition: none !important; }
  .esc { transform: none; }
  .carac__punto.is-active i { right: 0; }
}

/* ============================================================
   LA COLECCIÓN: mosaico, filtros, ventana y página de cada libro
   ============================================================ */
.col-cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.col-cabeza h2 { margin-bottom: .2em; }
.col-cabeza .lead { margin: 0; }
.col-filtros { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); }
.col-filtros:empty { display: none; }
.col-filtro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.col-filtro__t { font-size: calc(.74rem * var(--f-scale)); text-transform: uppercase; letter-spacing: .14em; color: var(--c-muted); min-width: 6.5em; }
.col-vacio { text-align: center; color: var(--c-muted); padding: 40px 0; }

.mosaico { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: clamp(22px, 3vw, 40px) clamp(18px, 2.4vw, 32px); }
.mosaico__item { display: flex; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; animation: kmSube .6s cubic-bezier(.2,.8,.2,1) calc(var(--i, 0) * 60ms) both; }
@keyframes kmSube { from { opacity: 0; transform: translateY(18px); } }
.mosaico__item .portada { transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease; }
.mosaico__item:hover .portada, .mosaico__item:focus-visible .portada { transform: translateY(-6px) rotate(-1.2deg); box-shadow: 0 2px 4px rgba(30,42,90,.08), 0 30px 50px -18px rgba(43,31,99,.5); }
.mosaico__pie { display: grid; gap: 2px; }
.mosaico__pie b { font-family: var(--f-display); font-weight: 600; font-size: calc(1.12rem * var(--f-scale)); line-height: 1.2; }
.mosaico__pie small { color: var(--c-muted); font-size: calc(.84rem * var(--f-scale)); }
.mosaico--tira { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

/* La portada: apaisada como los libros, con un lomo dibujado */
.portada {
  position: relative; display: block; aspect-ratio: 210 / 148; border-radius: 6px 12px 12px 6px; overflow: hidden;
  background: var(--c-surface); box-shadow: 0 1px 2px rgba(30,42,90,.08), 0 16px 34px -18px rgba(43,31,99,.45);
}
.portada img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portada::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.22) 0, rgba(255,255,255,.18) 2.2%, rgba(0,0,0,.06) 3.5%, transparent 7%);
}
.portada__falsa { display: none; }
.portada.sin-img .portada__falsa {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 9% 9% 9% 12%; color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.35) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 75%, rgba(255,255,255,.18) 0 18%, transparent 19%),
    linear-gradient(135deg, hsl(var(--tono, 260) 70% 58%), hsl(calc(var(--tono, 260) + 50) 75% 48%));
}
.portada__falsa b { font-family: var(--f-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.portada__falsa span { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.05rem, 2.2vw, 1.5rem); line-height: 1.1; max-width: 14ch; }

/* La ficha (ventana y página del libro) */
.ficha { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(26px, 4vw, 56px); align-items: start; }
.ficha__portada .portada { border-radius: 8px 16px 16px 8px; }
.ficha__fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.ficha__foto { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: var(--c-line); cursor: zoom-in; }
.ficha__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ficha__foto:hover img { transform: scale(1.07); }
.ficha__titulo { font-size: calc(clamp(1.9rem, 3.4vw, 2.8rem) * var(--f-scale)); margin: .1em 0 .4em; }
.ficha__desc { color: var(--c-muted); font-size: calc(1.08rem * var(--f-scale)); }
.ficha__datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 24px 0 28px; }
.ficha__datos > div { background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 12px; padding: 10px 14px; }
.ficha__datos dt { font-size: calc(.7rem * var(--f-scale)); text-transform: uppercase; letter-spacing: .12em; color: var(--c-muted); }
.ficha__datos dd { margin: 2px 0 0; font-weight: 600; }
.ficha__botones { gap: 10px; }
.btn__ico { flex: none; margin-right: .1em; }
.btn--amazon { background: #ffb02e; color: #131921; box-shadow: 0 8px 22px -10px #ff9900; }
.btn--amazon:hover { background: #ff9900; }
.btn--icono { padding-inline: .9em; }
@media (max-width: 820px) { .ficha { grid-template-columns: 1fr; } }

.libro-modal { position: fixed; inset: 0; z-index: 950; display: none; }
.libro-modal.open { display: grid; place-items: center; }
.libro-modal__fondo { position: absolute; inset: 0; background: rgba(27,20,66,.72); backdrop-filter: blur(6px); opacity: 0; transition: opacity .28s ease; }
.libro-modal__caja {
  position: relative; width: min(1120px, calc(100% - 32px)); max-height: calc(100svh - 40px);
  background: var(--c-surface); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(26px) scale(.97); transition: opacity .28s ease, transform .4s cubic-bezier(.2,.9,.25,1.1);
}
.libro-modal.show .libro-modal__fondo { opacity: 1; }
.libro-modal.show .libro-modal__caja { opacity: 1; transform: none; }
.libro-modal__barra { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; gap: 8px; }
.libro-modal__x, .libro-modal__flecha {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--c-line); background: rgba(255,255,255,.9); color: var(--c-ink); font-size: 1rem;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.libro-modal__x:hover, .libro-modal__flecha:hover { background: var(--c-ink); color: #fff; transform: scale(1.05); }
.libro-modal__cuerpo { overflow: auto; padding: clamp(56px, 6vw, 64px) clamp(20px, 4vw, 48px) clamp(24px, 4vw, 48px); overscroll-behavior: contain; }
@media (max-width: 640px) {
  .libro-modal__caja { width: 100%; max-height: 100svh; height: 100svh; border-radius: 0; }
}

.pagina-libro { padding: calc(96px + clamp(20px, 4vw, 48px)) 0 clamp(56px, 8vw, 110px); }
.migas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: calc(.86rem * var(--f-scale)); color: var(--c-muted); margin-bottom: clamp(22px, 3vw, 36px); }
.migas a { color: inherit; }
.migas a:hover { color: var(--c-accent); }

.aviso-web {
  position: fixed; left: 50%; bottom: 28px; z-index: 1100; transform: translate(-50%, 20px);
  background: var(--c-ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.aviso-web.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .mosaico__item { animation: none; }
}
