/*
 * Yachay — assets/css/yachay.css
 * Sistema de diseño completo
 */

/* ════════════════════════════════════════════════════════════
   IMPORTS
   ════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ════════════════════════════════════════════════════════════
   BASE / BODY
   ════════════════════════════════════════════════════════════ */
body.ya-landing {
  background-color: var(--ya-bg);
  color: var(--ya-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', sans-serif;
  min-height: 100dvh;
}

/* ════════════════════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════════════════════ */
.ya-container {
  width: 100%;
  max-width: var(--ya-max-width, 480px);
  margin-inline: auto;
  padding-inline: 16px;
}

/* ════════════════════════════════════════════════════════════
   TOP BAR
   ════════════════════════════════════════════════════════════ */
.ya-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ya-bg, #DFE4DE);
  border-bottom: 0.5px solid rgba(0,0,0,0.10);
  backdrop-filter: saturate(120%) blur(20px);
  -webkit-backdrop-filter: saturate(120%) blur(20px);
}

.ya-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  gap: 12px;
}

.ya-topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.ya-topbar__logo {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.ya-topbar__logo-text,
.ya-modal__logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #1D1D1F;
  white-space: nowrap;
}

/* ── LOGO HORIZONTAL COMPLETO ─────────────────────────────────
   Selector reforzado para ganar a cualquier regla anterior.
   El logo de YACHAY es ancho, no cuadrado: necesita height fijo
   y width auto para conservar proporción.
*/
.ya-topbar img.ya-topbar__logo--full,
img.ya-topbar__logo.ya-topbar__logo--full {
  width: auto !important;
  height: 72px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  display: block !important;
}

@media (max-width: 640px) {
  .ya-topbar__inner { height: 76px; }
  .ya-topbar img.ya-topbar__logo--full,
  img.ya-topbar__logo.ya-topbar__logo--full {
    height: 54px !important;
  }
}

.ya-topbar__initials {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--ya-accent);
  color: var(--ya-btn-text, #fff);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ya-topbar__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ya-text, #1D1D1F);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ya-topbar__actions {
  flex-shrink: 0;
}
/* "Iniciar sesión" — texto bien visible sobre el fondo sage */
.ya-topbar__actions .ya-link--subtle {
  color: #2D3D2D !important;
  font-weight: 500;
  opacity: 1;
}

/* ════════════════════════════════════════════════════════════
   BOTONES
   ════════════════════════════════════════════════════════════ */
.ya-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.ya-btn:active {
  transform: scale(0.97);
}

.ya-btn--cta {
  background: var(--ya-accent);
  color: var(--ya-btn-text, #000);
  font-size: 14px;
  font-weight: 700;
  padding: 15px 24px;
  border-radius: 13px;
  letter-spacing: 0.2px;
}

.ya-btn--cta:hover { opacity: 0.92; }

.ya-btn--full { width: 100%; }

.ya-btn--sm {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  color: var(--ya-text);
}

.ya-btn--join {
  margin-top: 4px;
}

.ya-link--subtle {
  font-size: 13px;
  color: rgba(29,29,31,0.5);
  text-decoration: none;
}

/* ════════════════════════════════════════════════════════════
   HERO VIDEO
   ════════════════════════════════════════════════════════════ */
.ya-hero {
  padding: 14px 0 0;
}

.ya-video-hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ya-bg-surface, #111);
  cursor: pointer;
}

.ya-video-hero__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

.ya-video-hero__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.ya-video-hero__play:hover { background: rgba(0,0,0,0.35); }

.ya-video-hero__play .ti {
  font-size: 40px;
  color: white;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}

/* Iframe video (se inyecta por JS) */
.ya-video-hero iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Placeholder vacío */
.ya-video-hero--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255,255,255,0.12);
}

.ya-video-hero__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(245,245,247,0.35);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

.ya-video-hero__placeholder .ti { font-size: 28px; }

/* ════════════════════════════════════════════════════════════
   THUMBNAILS DE VIDEO
   ════════════════════════════════════════════════════════════ */
.ya-thumbs {
  display: flex;
  gap: 7px;
  padding: 10px 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ya-thumbs::-webkit-scrollbar { display: none; }

.ya-thumb {
  position: relative;
  width: 66px;
  height: 50px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  border: 1.5px solid transparent;
  background: var(--ya-bg-surface, #F5F5F7);
  transition: border-color 0.2s, transform 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.ya-thumb:hover { transform: scale(1.05); }
.ya-thumb.ya-thumb--active { border-color: var(--ya-accent); }

.ya-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.ya-thumb__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.28);
}

/* Ícono SVG de plataforma en las miniaturas */
.ya-thumb__play svg {
  width: 14px; height: 14px; color: white; opacity: 0.9;
}

.ya-thumb__no-thumb {
  width: 100%; height: 100%;
  background: var(--ya-bg-surface, #F0F0F2);
  display: flex; align-items: center; justify-content: center;
}

.ya-thumb--empty {
  background: var(--ya-bg-surface, #F0F0F2);
  border: 1px dashed rgba(0,0,0,0.1);
  display: block;
  opacity: 0.5;
}

/* Colores por plataforma */
.ya-thumb--youtube .ya-thumb__play { background: rgba(255,0,0,0.2); }
.ya-thumb--vimeo .ya-thumb__play { background: rgba(26,183,234,0.2); }
.ya-thumb--tiktok .ya-thumb__play { background: rgba(0,0,0,0.5); }
.ya-thumb--instagram .ya-thumb__play { background: rgba(193,53,132,0.2); }


/* ════════════════════════════════════════════════════════════
   STATS BAR
   ════════════════════════════════════════════════════════════ */
.ya-stats {
  padding: 6px 0 2px;
}

.ya-stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ya-bg-border, rgba(0,0,0,0.08));
  border-radius: 12px;
  overflow: hidden;
}

.ya-stat {
  background: var(--ya-bg-surface, #F5F5F7);
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.ya-stat .ti {
  font-size: 15px;
  color: rgba(29,29,31,0.4);
  flex-shrink: 0;
}

.ya-stat span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ya-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ya-stat__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   CTA BLOCK
   ════════════════════════════════════════════════════════════ */
.ya-cta-block {
  padding: 14px 0 4px;
}

.ya-cta-block--bottom {
  padding: 24px 0 40px;
}

.ya-discount-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 11px;
  color: rgba(29,29,31,0.55);
}

.ya-discount-badge .ti {
  font-size: 13px;
  color: var(--ya-accent);
}

/* ════════════════════════════════════════════════════════════
   DESCRIPCIÓN
   ════════════════════════════════════════════════════════════ */
.ya-description {
  padding: 16px 0 4px;
}

.ya-description__text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(29,29,31,0.65);
}

.ya-description__text p { margin-bottom: 10px; }
.ya-description__text p:last-child { margin-bottom: 0; }

/* Si se pega un emoji como imagen (copy-paste), que se vea como texto, no como foto gigante */
.ya-description__text img {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  max-width: 1.2em;
  max-height: 1.2em;
  vertical-align: -0.2em;
  margin: 0 1px;
}

/* Red de seguridad: ninguna imagen del sitio debería desbordar su contenedor */
img { max-width: 100%; height: auto; }

/* ════════════════════════════════════════════════════════════
   BENEFICIOS
   ════════════════════════════════════════════════════════════ */
.ya-benefits {
  padding: 12px 0 8px;
}

.ya-benefits__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ya-benefit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ya-benefit .ti {
  font-size: 15px;
  color: var(--ya-accent);
  margin-top: 1px;
  flex-shrink: 0;
}

.ya-benefit span {
  font-size: 13px;
  color: rgba(29,29,31,0.65);
  line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════
   MODAL / JOIN SHEET
   ════════════════════════════════════════════════════════════ */
.ya-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}

.ya-modal.is-open {
  pointer-events: all;
  opacity: 1;
}

.ya-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ya-modal__sheet {
  position: relative;
  z-index: 1;
  background: #fff;
  color: #1D1D1F;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 40px;
  width: 100%;
  max-width: var(--ya-max-width, 480px);
  margin-inline: auto;
  max-height: 92dvh;
  overflow-y: auto;
  transform: translateY(24px);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.ya-modal.is-open .ya-modal__sheet {
  transform: translateY(0);
}

.ya-modal__handle {
  width: 36px;
  height: 4px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.ya-modal__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.ya-modal__logo-img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
}

.ya-modal__logo-initials {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--ya-accent);
  color: var(--ya-btn-text, #000);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ya-modal__title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #1D1D1F;
  margin-bottom: 4px;
}

.ya-modal__sub {
  text-align: center;
  font-size: 13px;
  color: rgba(29,29,31,0.55);
  margin-bottom: 20px;
}

.ya-section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(29,29,31,0.5);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

/* ── Plans ── */
.ya-plans { border: none; }
.ya-plans legend { display: none; }

.ya-plans__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.ya-plan {
  position: relative;
  display: block;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 13px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.ya-plan--selected { border-color: var(--ya-accent) !important; }

.ya-plan__radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ya-plan__radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.2);
  margin-bottom: 8px;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ya-plan--selected .ya-plan__radio {
  border-color: var(--ya-accent);
  background: var(--ya-accent);
}

.ya-plan--selected .ya-plan__radio::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ya-btn-text, #000);
}

.ya-plan__badge {
  position: absolute;
  top: -10px;
  right: 8px;
  background: #22C55E;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.ya-plan__name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1D1D1F;
  margin-bottom: 2px;
}

.ya-plan__price {
  display: flex;
  align-items: baseline;
  gap: 1px;
  margin-bottom: 2px;
}

.ya-plan__price strong {
  font-size: 20px;
  font-weight: 700;
  color: #1D1D1F;
}

.ya-plan__price span {
  font-size: 11px;
  color: rgba(29,29,31,0.5);
}

.ya-plan__billed {
  font-size: 10px;
  color: rgba(29,29,31,0.45);
  margin: 0;
}

/* ── Payment methods ── */
.ya-payment { margin-bottom: 16px; }

.ya-payment__methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ya-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #1D1D1F;
  background: white;
  cursor: pointer;
  transition: background 0.15s;
}

.ya-pay-btn:hover { background: #F5F5F7; }
.ya-pay-btn .ti { font-size: 16px; }

/* ── Total ── */
.ya-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-bottom: 12px;
}

.ya-total__label {
  font-size: 12px;
  color: rgba(29,29,31,0.5);
}

.ya-total__amount {
  font-size: 15px;
  font-weight: 700;
  color: #1D1D1F;
}

/* ── Modal legal ── */
.ya-modal__legal {
  text-align: center;
  font-size: 11px;
  color: rgba(29,29,31,0.4);
  margin-top: 10px;
  line-height: 1.5;
}

.ya-modal__legal a {
  color: rgba(29,29,31,0.55);
  text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.ya-footer {
  border-top: 1px solid rgba(0,0,0,0.07);
  padding: 20px 0 32px;
}

.ya-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.ya-footer__copy {
  font-size: 11px;
  color: rgba(29,29,31,0.35);
}

.ya-footer__links {
  display: flex;
  gap: 16px;
}

.ya-footer__links a {
  font-size: 11px;
  color: rgba(29,29,31,0.4);
  text-decoration: none;
  transition: color 0.15s;
}

.ya-footer__links a:hover {
  color: rgba(29,29,31,0.7);
}

/* ════════════════════════════════════════════════════════════
   UTILIDADES
   ════════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — Desktop centrado (max 480px como Skool)
   ════════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  body.ya-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .ya-topbar { width: 100%; }
  .ya-topbar__inner { max-width: var(--ya-max-width); }

  .ya-main { width: 100%; }

  .ya-modal__sheet {
    border-radius: 24px;
    margin-bottom: 48px;
  }

  .ya-modal {
    align-items: center;
  }
}

/* ════════════════════════════════════════════════════════════
   ANIMACIÓN FADE-IN suave al cargar
   ════════════════════════════════════════════════════════════ */
@keyframes ya-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ya-hero,
.ya-stats,
.ya-cta-block,
.ya-description,
.ya-benefits {
  animation: ya-fade-up 0.5s ease both;
}

.ya-stats     { animation-delay: 0.05s; }
.ya-cta-block { animation-delay: 0.10s; }
.ya-description { animation-delay: 0.15s; }
.ya-benefits  { animation-delay: 0.20s; }

/* ════════════════════════════════════════════════════════════
   LAYOUT DE DOS COLUMNAS (main + sidebar)
   ════════════════════════════════════════════════════════════ */

.ya-page-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.ya-page-layout--with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
  padding-top: 0;
}

.ya-page-main { min-width: 0; }

/* ── Sidebar ── */
.ya-sidebar {
  position: sticky;
  top: 80px;
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07), 0 0 0 0.5px rgba(0,0,0,0.07);
}

.ya-sidebar__banner {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.ya-sidebar__banner img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.ya-sidebar__body { padding: 16px; }

.ya-sidebar__name {
  font-size: 17px; font-weight: 800;
  color: #1D1D1F; margin: 0 0 3px; letter-spacing: -0.3px;
}
.ya-sidebar__creator {
  font-size: 12px; color: rgba(29,29,31,0.45);
  margin: 0 0 14px;
}

.ya-sidebar__pitch { margin-bottom: 14px; }
.ya-sidebar__pitch-intro {
  font-size: 13px; font-weight: 600;
  color: #1D1D1F; margin: 0 0 8px;
}
.ya-sidebar__benefits {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.ya-sidebar__benefits li {
  font-size: 12px; color: rgba(29,29,31,0.7);
  padding-left: 0; line-height: 1.4;
}

.ya-sidebar__links {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
  padding-top: 10px;
  border-top: 0.5px solid rgba(0,0,0,0.07);
}
.ya-sidebar__link {
  font-size: 12px; font-weight: 600;
  color: var(--ya-accent, #E8842A);
  text-decoration: none;
  transition: opacity 0.15s;
}
.ya-sidebar__link:hover { opacity: 0.7; }

.ya-sidebar__stats {
  display: flex; gap: 0;
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.ya-sidebar__stat {
  flex: 1; text-align: center; padding: 10px 6px;
  border-right: 0.5px solid rgba(0,0,0,0.08);
}
.ya-sidebar__stat:last-child { border-right: none; }
.ya-sidebar__stat strong {
  display: block; font-size: 16px; font-weight: 800;
  color: #1D1D1F;
}
.ya-sidebar__stat span {
  font-size: 10px; color: rgba(29,29,31,0.45);
  text-transform: uppercase; letter-spacing: 0.3px;
}

.ya-sidebar__join { font-size: 13px; }

/* ── Mobile: sidebar debajo ── */
@media (max-width: 760px) {
  .ya-page-layout--with-sidebar {
    grid-template-columns: 1fr;
  }
  .ya-page-main  { order: 1; } /* video ARRIBA */
  .ya-sidebar    { position: static; order: 2; } /* sidebar ABAJO */
}
