/* ============================================================
   components.css — piezas reutilizables del sistema
   ============================================================ */

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: .95em 1.35em .95em 1.5em;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: -.01em;
  line-height: 1;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  will-change: transform;
}
.btn__icon {
  display: grid;
  place-items: center;
  width: 2.15em; height: 2.15em;
  margin: -.75em -.55em -.75em 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue-700);
  flex: none;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn__icon svg { width: 1em; height: 1em; }

.btn--primary { background: var(--blue-600); color: var(--white); box-shadow: var(--shadow-blue); }
.btn--primary:hover { background: var(--blue-700); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }

.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink .btn__icon { background: var(--white); color: var(--ink); }
.btn--ink:hover { background: var(--blue-700); transform: translateY(-2px); }

.btn--white { background: var(--white); color: var(--blue-700); }
.btn--white .btn__icon { background: var(--blue-600); color: var(--white); }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(8, 30, 60, .18); }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--outline .btn__icon { background: var(--ice-100); color: var(--blue-700); }
.btn--outline:hover { border-color: var(--blue-600); color: var(--blue-700); }

.btn--outline-light {
  background: transparent;
  color: var(--white);
  border-color: var(--on-blue-line);
}
.btn--outline-light .btn__icon { background: rgba(255,255,255,.16); color: var(--white); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }

.btn--lg { font-size: var(--fs-body); padding: 1.05em 1.45em 1.05em 1.6em; }
.btn--block { display: flex; width: 100%; justify-content: center; }
.btn:hover .btn__icon { transform: translateX(2px); }

/* Enlace de texto con subrayado animado */
.link {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--ink);
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: color var(--dur-fast) var(--ease), background-size var(--dur-fast) var(--ease);
}
.link:hover { color: var(--blue-700); background-size: 40% 1px; }
.link svg { width: .85em; height: .85em; }
.link--blue { color: var(--blue-700); }
.link--light { color: var(--white); }

/* ---------- Píldoras / etiquetas ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .55em 1em;
  border-radius: var(--r-pill);
  background: var(--white);
  border: var(--border);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--ink);
  white-space: nowrap;
}
.pill--ice { background: var(--ice-100); border-color: transparent; color: var(--blue-800); }
.pill--blue { background: var(--blue-600); border-color: transparent; color: var(--white); }
.pill--ghost { background: rgba(255,255,255,.14); border-color: var(--on-blue-line); color: var(--white); }
.pill--dot::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-600);
  flex: none;
}
.pill--dot.pill--blue::before, .pill--dot.pill--ghost::before { background: currentColor; }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Etiqueta flotante anclada a una fotografía */
.tag-float {
  position: absolute;
  z-index: var(--z-badge);
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .6em 1.05em;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 26px rgba(16, 40, 70, .12);
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.tag-float::after {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
}
.tag-float--left::after { order: -1; }

/* ---------- Tarjetas ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.1vw, 32px);
  border-radius: var(--r-lg);
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card--ice { background: var(--ice-50); }
.card--flat { box-shadow: none; }
.card--blue {
  background: var(--blue-600);
  border-color: transparent;
  color: var(--white);
}
.card--blue .h3, .card--blue .card__num { color: var(--white); }
.card--blue p, .card--blue .muted { color: var(--on-blue-soft); }

.card__num {
  font-size: clamp(2.6rem, 4vw, 4.1rem);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.05em;
  color: var(--blue-200);
  opacity: .55;
}
.card--blue .card__num { color: rgba(255,255,255,.34); opacity: 1; }
.card__body { display: grid; gap: 10px; margin-top: auto; }
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--line-soft);
}
.card--blue .card__foot { border-top-color: var(--on-blue-line); }

.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-200); }
.card-link:focus-within { border-color: var(--blue-600); }

/* Enlace que cubre toda la tarjeta sin romper el foco */
.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* ---------- Métricas ---------- */
.stat { display: grid; gap: 6px; }
.stat__num {
  font-size: clamp(2.6rem, 4.4vw, 4.6rem);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.05em;
  color: var(--ink);
}
.stat__num .plus, .stat__num .sup { color: var(--blue-600); }
.stat__label { font-weight: 600; font-size: var(--fs-small); letter-spacing: -.01em; }
.stat__note { font-size: var(--fs-micro); color: var(--muted); line-height: 1.5; }
.stat--onblue .stat__num, .stat--onblue .stat__label { color: var(--white); }
.stat--onblue .stat__num .plus { color: var(--blue-200); }
.stat--onblue .stat__note { color: var(--on-blue-soft); }

/* ---------- Badge de imagen temporal (solo desarrollo) ---------- */
.media-badge {
  position: absolute;
  left: 10px; bottom: 10px;
  z-index: var(--z-badge);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(16, 17, 20, .72);
  color: #fff;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
}
.media-badge--warn { background: rgba(180, 121, 31, .9); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  padding-top: clamp(12px, 1.6vw, 22px);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              padding var(--dur) var(--ease);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
  justify-content: space-between;
}
.header.is-stuck {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-soft), 0 10px 30px rgba(20, 55, 80, .05);
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__text { display: grid; line-height: 1.1; }
.brand__name { font-weight: 700; font-size: .95rem; letter-spacing: -.03em; white-space: nowrap; }
.brand__role { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 229, 237, .8);
}
.nav__link {
  padding: .62em 1.05em;
  border-radius: var(--r-pill);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--ink-soft);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.nav__link:hover { background: var(--ice-100); color: var(--ink); }
.nav__link[aria-current="page"] { background: var(--ice-100); color: var(--blue-700); }

.header__actions { display: flex; align-items: center; gap: 10px; }

.lang {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(217, 229, 237, .8);
  backdrop-filter: blur(10px);
}
.lang__opt {
  padding: .38em .72em;
  border-radius: var(--r-pill);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.lang__opt:hover { color: var(--ink); }
.lang__opt.is-active { background: var(--ink); color: var(--white); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: var(--border);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.icon-btn--blue { background: var(--blue-600); border-color: transparent; color: var(--white); }
.icon-btn--blue:hover { background: var(--blue-700); border-color: transparent; }

.burger { display: none; }
.burger__lines { position: relative; width: 18px; height: 12px; }
.burger__lines span {
  position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.burger__lines span:nth-child(1) { top: 0; }
.burger__lines span:nth-child(2) { top: 5px; }
.burger__lines span:nth-child(3) { top: 10px; }
.burger[aria-expanded="true"] .burger__lines span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__lines span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Menú móvil */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--white);
  padding: 96px var(--pad-x) 40px;
  display: grid;
  align-content: start;
  gap: 6px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform var(--dur-slow) var(--ease), visibility 0s linear var(--dur-slow);
  overflow-y: auto;
}
.menu.is-open { transform: translateY(0); visibility: visible; transition-delay: 0s; }
.menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.03em;
}
.menu__link span { color: var(--muted-light); font-size: .8rem; font-weight: 600; }
.menu__foot { margin-top: 24px; display: grid; gap: 14px; }

/* ---------- CTA fija móvil ---------- */
.cta-dock {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: var(--z-cta);
  display: none;
  gap: 8px;
  padding: 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(16, 40, 70, .16);
  transform: translateY(140%);
  transition: transform var(--dur) var(--ease);
}
.cta-dock.is-visible { transform: translateY(0); }
.cta-dock .btn { flex: 1; justify-content: center; }

/* ---------- Acordeón ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 2vw, 26px) 0;
  text-align: left;
  font-size: clamp(1.02rem, 1.35vw, 1.28rem);
  font-weight: 600;
  letter-spacing: -.022em;
  color: var(--ink);
  transition: color var(--dur-fast) var(--ease);
}
.accordion__trigger:hover { color: var(--blue-700); }
.accordion__sign {
  position: relative;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: var(--border);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              transform var(--dur) var(--ease);
}
.accordion__sign::before, .accordion__sign::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.accordion__sign::after { transform: translate(-50%, -50%) rotate(90deg); }
.accordion__trigger[aria-expanded="true"] .accordion__sign {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
}
.accordion__trigger[aria-expanded="true"] .accordion__sign::after { transform: translate(-50%, -50%) rotate(0); opacity: 0; }
.accordion__panel {
  overflow: hidden;
  height: 0;
  transition: height var(--dur) var(--ease);
}
.accordion__content {
  padding: 0 clamp(48px, 6vw, 90px) clamp(20px, 2.2vw, 30px) 0;
  color: var(--muted);
  display: grid;
  gap: 12px;
}
.accordion__content strong { color: var(--ink); font-weight: 600; }

/* ---------- Controles de carrusel ---------- */
.slider-nav { display: flex; align-items: center; gap: 10px; }
.slider-nav .icon-btn:disabled,
.slider-nav .icon-btn.is-disabled { opacity: .35; pointer-events: none; }

.swiper { overflow: visible; }
.swiper-slide { height: auto; }
.swiper-pagination-bullets { position: static; display: flex; gap: 7px; margin-top: 22px; }
.swiper-pagination-bullet {
  width: 7px; height: 7px; margin: 0 !important;
  background: var(--line); opacity: 1;
  transition: width var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.swiper-pagination-bullet-active { width: 26px; border-radius: 4px; background: var(--blue-600); }

/* ---------- Nota / aviso ---------- */
.note {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--ice-100);
  color: var(--ink-soft);
  font-size: var(--fs-small);
  line-height: 1.55;
}
.note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--blue-600); }
.note--onblue { background: rgba(255,255,255,.12); color: var(--on-blue-soft); }
.note--onblue svg { color: var(--white); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.72); padding-block: clamp(48px, 6vw, 84px) 32px; }
.footer a { color: rgba(255,255,255,.72); transition: color var(--dur-fast) var(--ease); }
.footer a:hover { color: var(--white); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(28px, 3vw, 56px);
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer__title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.45); font-weight: 600; margin-bottom: 16px;
}
.footer__list { display: grid; gap: 10px; font-size: var(--fs-small); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: .8rem; color: rgba(255,255,255,.45);
}
.footer__disclaimer {
  margin-top: 22px; font-size: .78rem; line-height: 1.6;
  color: rgba(255,255,255,.42); max-width: 78ch;
}
.footer .brand__name { color: var(--white); }
.footer .brand__role { color: rgba(255,255,255,.45); }
