/* ===== ENSAMBLA — hoja de estilos compartida ===== */

/* Fuente Outfit self-hosted (variable, cubre pesos 100–900) */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #FAF9F5; font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a:hover { opacity: 0.82; }
img { max-width: 100%; }

/* ===== Loader (solo mostrativo, se desvanece al cargar) ===== */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #0D0C0B;
  transition: opacity .45s ease, visibility .45s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-mark { width: 74px; height: 74px; animation: loader-pulse 1.15s ease-in-out infinite; }
.loader-mark rect { transform-origin: 60px 60px; animation: loader-spin 1.6s linear infinite; }
@keyframes loader-pulse { 0%,100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1); } }
@keyframes loader-spin { to { transform: rotate(405deg); } }
@media (prefers-reduced-motion: reduce) {
  .loader-mark, .loader-mark rect { animation: none; }
}

/* ===== Navbar (moderno) ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 20px; padding: 18px clamp(20px, 5vw, 56px);
  background: #0D0C0B; /* mismo tono que el hero → se funde, sin franja gris */
  border-bottom: 1px solid transparent;
  font-family: 'Outfit', sans-serif;
  transition: padding .3s ease, background .3s ease, box-shadow .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.nav--scrolled {
  padding-top: 11px; padding-bottom: 11px;
  background: rgba(13, 12, 11, 0.92);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.38);
  border-bottom-color: rgba(240, 161, 37, 0.16);
}
.nav__brand { display: flex; align-items: center; text-decoration: none; justify-self: start; }
/* 3 columnas: logo (izq) · opciones (centro) · botones (der) */
.nav__menu { display: contents; }
.nav__actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav__brand:hover { opacity: 1; }
.brand-dot { color: #F0A125; }
.brand-mark { display: block; flex: none; }
.nav__logo-img { height: 40px; width: auto; display: block; transition: height .3s ease; }
.nav--scrolled .nav__logo-img { height: 32px; }
.footer__logo-img { height: 32px; width: auto; display: block; }

.nav__links { display: flex; align-items: center; gap: 4px; justify-self: center; }
.nav__link {
  position: relative; color: #CFC8BA; text-decoration: none; font-weight: 600; font-size: 15.5px;
  padding: 10px 17px; border-radius: 999px;
  transition: color .2s ease, background .25s ease;
}
.nav__link:hover { color: #FAF9F5; background: rgba(255, 255, 255, .07); opacity: 1; }
.nav__link[aria-current="page"] { color: #F0A125; background: rgba(240, 161, 37, .12); }
.nav__cta {
  background: linear-gradient(135deg, #F7B23E, #E0890B);
  color: #14120E; font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(240, 161, 37, .30);
  transition: transform .2s ease, box-shadow .25s ease;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(240, 161, 37, .48); opacity: 1; }
.nav__login {
  color: #FAF9F5; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid rgba(240, 161, 37, .45);
  white-space: nowrap; transition: background .2s ease, border-color .2s ease;
}
.nav__login:hover { background: rgba(240, 161, 37, .12); border-color: #F0A125; opacity: 1; }

/* Botón hamburguesa (oculto en desktop) */
.nav__toggle { display: none; }

@media (max-width: 768px) {
  .nav { display: flex; justify-content: space-between; padding: 14px 20px; }
  .nav--scrolled { padding-top: 11px; padding-bottom: 11px; }
  .nav__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; padding: 12px; border: none; cursor: pointer;
    background: rgba(255, 255, 255, .05); border-radius: 13px;
  }
  .nav__toggle span { display: block; height: 2px; width: 22px; background: #FAF9F5; border-radius: 2px;
    transition: transform .3s ease, opacity .2s ease; }
  .nav.open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__menu {
    position: absolute; top: 100%; left: 12px; right: 12px;
    display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    padding: 14px; margin-top: 8px; border-radius: 20px;
    background: rgba(20, 18, 14, .97);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(240, 161, 37, .16);
    box-shadow: 0 24px 56px rgba(0, 0, 0, .55);
    transform: translateY(-10px) scale(.98); transform-origin: top right;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav.open .nav__menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
  .nav__links { flex-direction: column; align-items: stretch; gap: 6px; }
  .nav__actions {
    display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(240, 161, 37, .14);
  }
  .nav__link { padding: 14px 16px; font-size: 16px; }
  .nav__link[aria-current="page"] { background: rgba(240, 161, 37, .14); }
  .nav__login { text-align: center; padding: 14px; }
  .nav__cta { text-align: center; padding: 15px; }
}

/* ===== Footer ===== */
.footer {
  background: #0D0C0B; color: #B5AE9F; font-family: 'Outfit', sans-serif;
  padding: clamp(44px, 6vw, 64px) clamp(20px, 5vw, 48px) 34px;
}
.footer__grid {
  max-width: 1160px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between;
}
.footer__brand { max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
.footer__brandrow { display: flex; align-items: center; gap: 10px; }
.footer__name { font-weight: 800; font-size: 20px; color: #FAF9F5; }
.footer__tagline { font-size: 14px; line-height: 1.6; color: #8A8377; margin: 0; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__title { font-weight: 700; font-size: 13px; letter-spacing: 1.5px; color: #6B6459; text-transform: uppercase; }
.footer__link { color: #B5AE9F; text-decoration: none; font-size: 14.5px; }
.footer__link:hover { color: #F0A125; opacity: 1; }
.footer__bottom {
  max-width: 1160px; margin: 34px auto 0; padding-top: 22px;
  border-top: 1px solid #221E17;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: 13px; color: #6B6459;
}

/* ===== FAQ (details/summary nativo) ===== */
details > summary { position: relative; padding-right: 46px !important; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid #C9821D; border-bottom: 2px solid #C9821D;
  transform: rotate(45deg); transition: transform .2s ease;
}
details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
details > summary:focus-visible { outline: 2px solid #F0A125; outline-offset: 2px; border-radius: 12px; }

/* ===== Hero 3D en scroll ===== */
.hero-mockup { will-change: transform; transform-origin: 50% 25%; }

/* ===== Reveal-on-scroll ===== */
[data-reveal] { opacity: 0; transform: translateY(26px); }
[data-reveal].is-visible { opacity: 1; transform: none; }
/* Secciones completas */
.site-main > div[data-reveal] {
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
/* Tarjetas dentro de grids: reveal + hover (duraciones por propiedad, sin conflicto) */
.reveal-grid > * {
  transition: opacity .6s cubic-bezier(.22,.61,.36,1),
              transform .6s cubic-bezier(.22,.61,.36,1),
              box-shadow .25s ease, border-color .25s ease;
}
.reveal-grid > *:hover {
  box-shadow: 0 18px 42px rgba(20,18,14,.14);
  border-color: #F0A125;
}

@media (prefers-reduced-motion: reduce) {
  .hero-mockup { transform: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===== Barra de progreso de scroll ===== */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, #F0A125, #C9821D);
  z-index: 200; will-change: transform;
}

/* ===== Glows ambientales + parallax ===== */
.glow-section { position: relative; overflow: hidden; isolation: isolate; }
.glow-section > *:not(.orb) { position: relative; z-index: 1; }
.orb {
  position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(70px); will-change: transform;
}
.orb--a { width: 540px; height: 540px; left: -140px; top: -160px;
  background: radial-gradient(circle, rgba(240,161,37,.30), transparent 70%); }
.orb--b { width: 440px; height: 440px; right: -120px; bottom: -180px;
  background: radial-gradient(circle, rgba(240,161,37,.16), transparent 70%); }
.glow-section--light .orb--a { background: radial-gradient(circle, rgba(240,161,37,.14), transparent 70%); }
.glow-section--light .orb--b { background: radial-gradient(circle, rgba(201,130,29,.10), transparent 70%); }
@media (prefers-reduced-motion: reduce) { .orb { display: none; } }

/* ===== Tilt 3D (tarjetas) ===== */
.reveal-grid > *, .tcard { transform-style: preserve-3d; }

/* ===== Precios (tarjetas de planes) ===== */
.pricing { max-width: 1120px; margin: 0 auto; width: 100%; }
.pricing__toggle {
  display: inline-flex; align-items: center; gap: 2px;
  background: #17140F; border: 1px solid #2A251C; border-radius: 999px; padding: 4px;
}
.pricing__toggle button {
  font-family: inherit; font-weight: 700; font-size: 14px; color: #B5AE9F;
  background: none; border: 0; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s ease, color .2s ease;
}
.pricing__toggle button.is-active { background: #F0A125; color: #14120E; }
.pricing__save {
  font-size: 11px; font-weight: 800; letter-spacing: .3px;
  background: rgba(240,161,37,.16); color: #F0A125; padding: 2px 8px; border-radius: 999px;
}
.pricing__toggle button.is-active .pricing__save { background: rgba(20,18,14,.18); color: #14120E; }

.pgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
@media (min-width: 1000px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }

.pcard {
  position: relative; display: flex; flex-direction: column; gap: 15px;
  background: #17140F; border: 1px solid #2A251C; border-radius: 20px; padding: 26px 24px;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), border-color .3s ease, box-shadow .3s ease;
}
.pcard:hover { transform: translateY(-4px); border-color: #3A3227; }
.pcard--featured {
  border-color: rgba(240,161,37,.55);
  background: linear-gradient(#1c1710, #17140F);
  box-shadow: 0 0 0 1px rgba(240,161,37,.22), 0 28px 60px rgba(240,161,37,.13);
}
.pcard__badge {
  position: absolute; top: -11px; left: 24px;
  background: #F0A125; color: #14120E; font-size: 11px; font-weight: 800; letter-spacing: .5px;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.pcard__name { font-weight: 800; font-size: 19px; color: #FAF9F5; }
.pcard__price { line-height: 1; margin-top: 2px; }
.pcard__amount { font-weight: 800; font-size: 34px; color: #FAF9F5; letter-spacing: -.02em; }
.pcard__per { font-size: 14px; color: #8A8377; font-weight: 500; margin-left: 3px; }
.pcard__note { font-size: 12.5px; color: #6B6459; min-height: 1.1em; }
.pcard__fine { font-size: 11.5px; line-height: 1.45; color: #6B6459; margin-top: -4px; }
.pcard__feats { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pcard__feats li { position: relative; padding-left: 24px; font-size: 13.5px; line-height: 1.5; color: #C7C0B2; }
.pcard__feats li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: #F0A125; font-weight: 800;
}
.pcard__cta {
  margin-top: auto; text-align: center; font-weight: 700; font-size: 14.5px;
  padding: 12px 18px; border-radius: 12px; text-decoration: none;
  transition: transform .2s ease, opacity .2s ease;
}
.pcard__cta--primary { background: #F0A125; color: #14120E; }
.pcard__cta--ghost { background: transparent; color: #FAF9F5; border: 1.5px solid #3A3227; }
.pcard__cta:hover { transform: translateY(-1px); }

/* Toggle mensual / anual (CSS-only, JS solo cambia la clase) */
.pricing .py { display: none; }
.pricing.is-annual .pm { display: none; }
.pricing.is-annual .py { display: inline; }

/* ===== Typewriter del hero ===== */
.tw { color: #F0A125; }
.tw__word { white-space: nowrap; }
.tw__caret {
  display: inline-block; width: 3px; height: 0.92em; margin-left: 5px;
  background: #F0A125; border-radius: 2px; vertical-align: -0.08em;
  animation: tw-blink 1s steps(1, end) infinite;
}
@keyframes tw-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tw__caret { animation: none; opacity: 1; } }

/* ===== Testimonios (rediseño 3D) ===== */
.tsection { background: #FAF9F5; padding: clamp(56px,8vw,96px) clamp(20px,5vw,48px); overflow: hidden; }
.tsection__head { text-align: center; max-width: 620px; margin: 0 auto clamp(34px,5vw,48px); }
.tsection__badge {
  display: inline-block; font-weight: 700; font-size: 12.5px; letter-spacing: 2px;
  color: #C9821D; background: rgba(240,161,37,.12);
  border: 1px solid rgba(240,161,37,.28); border-radius: 999px; padding: 6px 16px;
}
.tsection__title { font-weight: 800; font-size: clamp(28px,4vw,42px); color: #1F1B14; margin: 18px 0 0; letter-spacing: -.02em; }
.tsection__sub { font-size: 16.5px; line-height: 1.6; color: #6B6459; margin: 12px 0 0; }

/* Marquee de columnas (nuevo diseño animado) */
.tmarquee {
  max-width: 1160px; margin: 0 auto; display: flex; gap: 22px; justify-content: center;
  max-height: 640px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}
.tcol { flex: 1 1 0; min-width: 0; max-width: 360px; }
.tcol__track {
  display: flex; flex-direction: column; gap: 22px;
  will-change: transform;
  animation: tscroll var(--dur, 30s) linear infinite;
}
@keyframes tscroll { to { transform: translateY(-50%); } }

.tq {
  position: relative; border-radius: 20px; padding: 26px 26px 24px;
  background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
              linear-gradient(140deg, rgba(240,161,37,.50), rgba(229,224,214,.55)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 12px 30px rgba(20,18,14,.07);
  display: flex; flex-direction: column; gap: 14px;
}
.tq__stars { color: #F0A125; font-size: 15px; letter-spacing: 2px; }
.tq__text { font-size: 15.5px; line-height: 1.62; color: #3A362C; margin: 0; }
.tq__author { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.tq__avatar {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #14120E;
  background: linear-gradient(135deg, #F0A125, #E08A0C);
  box-shadow: 0 6px 16px rgba(240,161,37,.35);
}
.tq__who { display: flex; flex-direction: column; line-height: 1.35; }
.tq__name { font-weight: 700; font-size: 14.5px; color: #1F1B14; }
.tq__role { font-size: 12.5px; color: #8A8377; }

/* Tablet: 2 columnas animadas */
@media (max-width: 1023px) { .tcol--lg { display: none; } }

/* Móvil: sin marquee — stack en bloque, ancho completo, tarjetas sólidas */
@media (max-width: 719px) {
  .tmarquee {
    display: block; margin: 0; max-width: none; max-height: none; overflow: visible;
    -webkit-mask-image: none; mask-image: none;
  }
  .tcol { display: block; width: auto; max-width: none; margin: 0; }
  .tcol__track { display: block; animation: none; }
  .tq {
    display: flex; width: auto; margin: 0 0 14px; padding: 22px 20px 20px;
    background: #FFFFFF; border: 1px solid #EBE3D4;
  }
  .tq--dup { display: none; } /* oculta las copias del loop de desktop */
  /* Solo 2 por columna (6 en total) para que el scroll no sea eterno */
  .tcol__track > .tq:nth-child(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tcol__track { animation: none; }
  .tmarquee { max-height: none; overflow: visible;
    -webkit-mask-image: none; mask-image: none; }
  .tq--dup { display: none; }
}

/* ===== Bento grid (Funcionalidades) ===== */
.bento {
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 208px; gap: 16px;
}
.bento__item {
  position: relative; overflow: hidden; border-radius: 18px;
  background: #17140F; border: 1px solid #E5E0D6;
  transform-style: preserve-3d;
  box-shadow: 0 10px 30px rgba(20,18,14,.06);
  transition: transform .45s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease,
              border-color .3s ease, opacity .6s cubic-bezier(.22,.61,.36,1);
}
.bento__item:hover { box-shadow: 0 26px 60px rgba(20,18,14,.22); border-color: #F0A125; }
.b-wide { grid-column: span 3; }
.b-md   { grid-column: span 2; }
.b-tall { grid-row: span 2; }
.bento__item img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.bento__item:hover img { transform: scale(1.06); }
.bento__cap {
  position: absolute; inset: auto 0 0 0; z-index: 2; padding: 18px 20px;
  background: linear-gradient(transparent, rgba(13,12,11,.55) 35%, rgba(13,12,11,.95));
  color: #FAF9F5;
}
.bento__cap h3 { margin: 0; font-size: 17px; font-weight: 700; }
.bento__cap p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: #CFC8BA; }
.b-tall .bento__cap { padding: 24px; }
.b-tall .bento__cap h3 { font-size: 21px; }
.b-tall .bento__cap p { font-size: 14.5px; max-width: 40ch; }
@media (max-width: 860px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 190px; }
  .b-wide, .b-md { grid-column: span 1; }
  .b-tall { grid-row: span 1; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
}

/* ===== Glow en botones de acción (WhatsApp / naranja) ===== */
a[href^="https://wa.me"] { transition: box-shadow .25s ease, transform .25s ease; }
a[href^="https://wa.me"]:hover { box-shadow: 0 10px 34px rgba(240,161,37,.42); }
