/* Clipfy: estilos compartidos (colores, cabecera, mega menú, mascota y animaciones) */
:root {
  --bg: #0F1B26; --bg-2: #12212F; --card: #16283A; --hover: #1B3147; --line: #24405A; --line-2: #2B4A5C;
  --text: #EAF2F7; --muted: #B9CBD8; --soft: #8EA6B8; --faint: #5F7889;
  --accent: #34E0A8; --accent-ink: #0B1620; --accent-bg: #12352F; --accent-soft: #A7E9D2;
  --warn: #FFC857; --err: #FF8E9E;
  --display: 'Sora', system-ui, sans-serif;
  --body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; overflow-x: hidden; }
a { color: var(--muted); text-decoration: none; }
a:hover { color: #fff; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* Botones */
.go { padding: 0 24px; min-height: 50px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; font-size: 16px; cursor: pointer; }
.go:hover { filter: brightness(1.06); }
.go:disabled { opacity: .7; cursor: wait; }
.ghost { padding: 0 16px; min-height: 50px; border-radius: 12px; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; font-weight: 700; }
.ghost:hover { border-color: var(--accent); }
.field { flex: 1 1 280px; min-width: 0; font: inherit; font-size: 15px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--bg); color: var(--text); }
.field::placeholder { color: #6F889A; }
.field:focus { outline: none; border-color: var(--accent); }

/* Campo del enlace con botón para limpiarlo */
.field-wrap { position: relative; flex: 1 1 280px; min-width: 0; display: flex; }
.field-wrap .field { flex: 1; padding-right: 46px; }
.clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--card); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 20px; line-height: 1; }
.clear:hover { color: #fff; background: var(--hover); }

/* Cabecera y mega menú */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(15, 27, 38, .94); backdrop-filter: blur(10px); border-bottom: 1px solid #1F3242; }
header.top > .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: none; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 23px; }
.brand small { color: var(--soft); font-size: 13px; }
nav.main { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; }
nav.main > a, .menu-btn { padding: 10px 14px; border-radius: 10px; background: none; border: 0; cursor: pointer; color: var(--muted); }
.menu-btn:focus:not(:focus-visible) { outline: none; }
.menu-btn[aria-expanded="true"] { background: var(--card); color: #fff; }
.menu-btn svg { transition: transform .2s; vertical-align: -2px; margin-left: 4px; }
.menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
nav.main > a.install { border: 1.5px solid var(--line-2); color: var(--text); }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-2); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); animation: drop .22s ease-out both; }
.mega .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.05fr); gap: 24px; padding-block: 26px 30px; }
.mega h3 { margin: 0 0 6px; padding: 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--soft); }
.mega a.it { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; color: var(--text); }
.mega a.it:hover { background: var(--hover); }
.mega a.it.off { opacity: .6; pointer-events: none; }
.ico { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); font-weight: 800; font-size: 12px; }
.mega a.it b { display: block; font-size: 15px; }
.mega a.it span { font-size: 13px; color: var(--soft); }
.soon { font-style: normal; font-size: 11px; color: var(--accent-ink); background: var(--warn); border-radius: 99px; padding: 1px 6px; margin-left: 4px; font-weight: 800; }
.mega .promo { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 10px; display: flex; flex-direction: column; gap: 6px; }
.mega .promo h3 { margin-bottom: 4px; }
.mega a.prod { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; color: var(--text); }
.mega a.prod:hover { background: var(--hover); }
.mega a.prod.off { opacity: .6; pointer-events: none; }
.mega a.prod div { flex: 1; min-width: 0; }
.mega a.prod b { display: block; font-size: 15px; }
.mega a.prod span:not(.ico):not(.go-arrow) { font-size: 13px; color: var(--soft); }
.mega a.prod .go-arrow { color: var(--accent); font-weight: 800; }
.free { font-style: normal; font-size: 11px; color: var(--accent-ink); background: var(--accent); border-radius: 99px; padding: 1px 6px; margin-left: 4px; font-weight: 800; }

/* Mascota: Reelo */
.reelo { display: block; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%); mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%);
  transform-origin: 50% 85%; }
.reelo.saluda { animation: wave 2.6s ease-in-out infinite; }
.reelo.sentado { animation: float 4s ease-in-out infinite; }
.reelo.salta { animation: jump .7s cubic-bezier(.3, 0, .4, 1) infinite; }
.reelo.feliz { animation: hop .6s ease-out 2; }
.reelo.triste { animation: none; filter: saturate(.6); }
.bubble { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 14px; color: var(--muted); max-width: 300px; }
.bubble strong { color: #fff; }

/* Ventana con los pasos para instalar */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 12, 18, .7); display: grid; place-items: center; padding: 20px; animation: drop .2s ease-out both; }
.modal .caja { width: min(420px, 100%); max-height: 90dvh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.modal .reelo { width: 84px; align-self: center; }
.modal h2 { margin: 0; font-family: var(--display); font-size: 21px; text-align: center; }
.modal p, .modal li { margin: 0; color: var(--muted); font-size: 15px; }
.modal ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.modal strong { color: #fff; }
.modal .nota { background: var(--accent-bg); border-radius: 12px; padding: 10px 12px; color: var(--accent-soft); font-size: 14px; }

/* Pro y cuenta */
.pro-tag { font-style: normal; display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--accent-ink); background: linear-gradient(90deg, #FFC857, #FFB020); border-radius: 6px; padding: 1px 5px; vertical-align: 2px; }
nav.main > a.pro-link { color: #FFC857; }
#cuentaNav { position: relative; display: inline-flex; }
.cuenta-btn { padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-weight: 700; color: var(--text); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
a.cuenta-btn { display: inline-block; }
.yo-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); z-index: 30; display: flex; flex-direction: column; animation: drop .18s ease-out both; }
.yo-menu p { margin: 4px 8px 8px; font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
.yo-menu p b { color: var(--text); }
.yo-menu a { padding: 9px 10px; border-radius: 9px; color: var(--text); font-size: 14px; font-weight: 700; }
.yo-menu a:hover { background: var(--hover); }
.yo-menu a.destacado { color: #FFC857; }
.modal .caja { position: relative; }
.modal .x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--card); color: var(--muted); font-size: 20px; cursor: pointer; }
.modal .caja.estrecha { width: min(380px, 100%); }
.modal .auth { display: flex; flex-direction: column; gap: 10px; }
.modal .auth .field { flex: none; width: 100%; }
.modal .err { color: var(--err); font-size: 14px; font-weight: 700; min-height: 1em; }
.modal .alt { text-align: center; font-size: 14px; color: var(--soft); }
.modal .alt a { color: var(--accent); font-weight: 700; }
.modal a.go { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.modal .caja.pro { width: min(460px, 100%); border-color: #6B5A2A; background: linear-gradient(180deg, #1B2A2E, var(--bg-2) 40%); }
.pro-sello { align-self: center; font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .12em; color: var(--accent-ink); background: linear-gradient(90deg, #FFC857, #FFB020); border-radius: 10px; padding: 6px 14px; box-shadow: 0 8px 24px -6px rgba(255,184,32,.5); }
.lead-pro { text-align: center; }
.pro-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.pro-lista li { position: relative; padding-left: 22px; font-size: 13.5px; color: var(--muted); }
.pro-lista li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }
.pro-lista li.on { color: #fff; font-weight: 800; }
.pro-lista li.on::before { content: "★"; color: #FFC857; }
.modal .caja.ancha { width: min(720px, 100%); }
.planes-op { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.plan-op { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text, #fff); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.plan-op:hover, .plan-op:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.plan-op.top { border-color: #6B5A2A; background: linear-gradient(180deg, #23302B, var(--card) 70%); }
.po-n { font-family: var(--display); font-weight: 800; font-size: 17px; color: #fff; }
.po-p b { font-family: var(--display); font-size: 22px; color: #fff; }
.po-p s, .lead-pro s { color: var(--soft); }
.po-p small { color: var(--soft); }
.po-d { font-size: 13.5px; color: var(--muted); }
.po-i { font-size: 12.5px; color: var(--soft); flex: 1; }
.po-b { margin-top: 4px; text-align: center; padding: 9px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.plan-op:not(.top) .po-b { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.modal .field.codigo { text-align: center; letter-spacing: .4em; font-size: 22px; font-weight: 800; }
.modal .field.codigo::placeholder { letter-spacing: normal; font-size: 16px; font-weight: 600; }
.lead-pro s { color: var(--soft); }
.precio-f { color: #FFC857; }
.cupos { display: grid; gap: 6px; }
.cupos-b { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.cupos-b i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FFC857, #FFB020); }
.cupos p { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.cupos p b { color: #FFC857; }
.fund-ok { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 6px 0; }
.fund-ok b { font-family: var(--display); font-size: 18px; color: #fff; }
.fund-ok p { margin: 0; color: var(--muted); font-size: 14.5px; }
.pro-det summary { cursor: pointer; text-align: center; color: var(--accent); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.fund-sello { display: inline-block; margin: 0 12px 6px; padding: 4px 10px; border-radius: 99px; background: rgba(255,200,87,.14); color: #FFC857; font-weight: 800; font-size: 13px; }
.fund-ico { font-size: 13px; }
@media (max-width: 520px) { .pro-lista { grid-template-columns: 1fr; } nav.main > a.pro-link { display: none; } .cuenta-btn { max-width: 96px; padding: 9px 10px; font-size: 14px; } nav.main > a.install .txt { display: none; } nav.main > a.install svg { margin: 0 !important; } nav.main { gap: 2px; } }

/* Chispas al terminar algo */
.spark { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); pointer-events: none; animation: spark .7s ease-out forwards; z-index: 3; }

footer.pie { border-top: 1px solid #1F3242; color: var(--soft); font-size: 14px; }
footer.pie .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px max(20px, env(safe-area-inset-bottom)); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes wave { 0%,100% { transform: rotate(0); } 15% { transform: rotate(-5deg); } 30% { transform: rotate(4deg); } 45% { transform: rotate(-3deg); } 60% { transform: rotate(0); } }
@keyframes jump {
  0% { transform: translateY(0) scale(1.06, .92); }
  30% { transform: translateY(-26px) scale(.96, 1.05); }
  55% { transform: translateY(-34px) scale(1, 1) rotate(-3deg); }
  85% { transform: translateY(-4px) scale(.98, 1.03); }
  100% { transform: translateY(0) scale(1.06, .92); }
}
@keyframes hop { 0%,100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-18px) scale(1.05); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes strip { to { transform: translateX(-50%); } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(52,224,168,.4); } 50% { box-shadow: 0 0 0 10px rgba(52,224,168,0); } }
@keyframes spark { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); } }

@media (max-width: 960px) { .mega .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { nav.main > a:not(.install):not(.pro-link) { display: none; } }
@media (max-width: 520px) {
  nav.main > a, .menu-btn { white-space: nowrap; padding: 9px 10px; font-size: 14px; }
  nav.main > a.install .lg { display: none; }
  .brand b { font-size: 21px; }
  .mega .wrap { grid-template-columns: 1fr; max-height: 70vh; overflow: auto; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 440px) { .brand b { display: none; } header.top > .wrap { gap: 6px; } }
