/* =============================================================
   CLIPS V.2 · landing
   1. Tokens · 2. Base · 3. Utilidades · 4. Componentes
   5. Secciones · 6. Efectos · 7. Responsive
   ============================================================= */

/* 1. Tokens — tomados de las capturas reales de la app */
:root {
  --bg: #0d1117;
  --bg-2: #11161d;
  --panel: #161b22;
  --panel-2: #1b222c;
  --line: #2a3340;
  --line-soft: rgba(255, 255, 255, .06);
  --text: #eef3f8;
  --muted: #9aa7b6;
  --accent: #3fb6ff;
  --accent-2: #7fd0ff;
  --accent-ink: #041241;
  --warn: #ffb648;
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
strong { color: var(--text); font-weight: 650; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* 3. Utilidades */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { --container: 920px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 1000;
  padding: .6rem 1rem; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .7rem; }

/* 4. Componentes */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.35rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(63, 182, 255, .22); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { min-height: 42px; padding: .5rem 1rem; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn[disabled] { background: var(--panel-2); color: var(--muted); border: 1px dashed var(--line); box-shadow: none; cursor: not-allowed; transform: none; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; transition: border-color .25s var(--ease-out), transform .25s var(--ease-out);
}
.card:hover { border-color: rgba(63, 182, 255, .55); transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; margin: .9rem 0 .45rem; }
.card p { color: var(--muted); font-size: .98rem; }
.card-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(63, 182, 255, .12); border: 1px solid rgba(63, 182, 255, .3); }
.card-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 5. Secciones */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav { display: none; gap: 1.6rem; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 600; font-size: .96rem; transition: color .2s; }
.nav a:hover { color: var(--text); }
.header-ctas { display: none; gap: .6rem; }
.nav-toggle { margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; }
.nav-toggle[hidden] { display: none; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
.menu-movil { display: grid; gap: .4rem; padding: .6rem var(--gutter) 1.2rem; border-top: 1px solid var(--line-soft); }
.menu-movil[hidden] { display: none; }
.menu-movil > a:not(.btn) { padding: .7rem .2rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.menu-movil .btn { margin-top: .4rem; }
/* Sin JS: el menú móvil se muestra como lista simple */
html:not(.js) .menu-movil[hidden] { display: grid; }

.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background: radial-gradient(800px 480px at 70% 30%, rgba(63, 182, 255, .16), transparent 70%),
              radial-gradient(600px 400px at 10% 10%, rgba(18, 48, 74, .7), transparent 70%);
}
.hero-grid { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 800; }
.hero h1 .acc { color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); margin-top: 1.2rem; max-width: 36em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.hero-tags li { font-size: .88rem; font-weight: 600; color: var(--muted); padding: .35rem .8rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.hero-tags li:first-child { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hero-visual figcaption { color: var(--muted); font-size: .85rem; margin-top: .7rem; text-align: center; }
.window { border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(63, 182, 255, .08); }
.window-bar { display: flex; align-items: center; gap: 6px; padding: .55rem .8rem; border-bottom: 1px solid var(--line); background: #0f141a; font-size: .8rem; color: var(--muted); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c3643; }
.window-bar span { margin-left: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.sub { color: var(--muted); margin-top: .8rem; font-size: 1.05rem; }

.cards { display: grid; gap: 1rem; }

.steps { display: grid; gap: 1rem; counter-reset: paso; }
.step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.4rem 4.6rem; counter-increment: paso; }
.step::before {
  content: counter(paso); position: absolute; left: 1.3rem; top: 1.3rem;
  width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800;
}
.step h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .98rem; }

.player { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(63, 182, 255, .1); }
.player video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.note { color: var(--muted); font-size: .92rem; margin-top: 1rem; text-align: center; max-width: 60em; margin-inline: auto; }

.feature { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 96px); }
.shot { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); transition: border-color .25s var(--ease-out), transform .25s var(--ease-out); cursor: zoom-in; }
.shot:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-copy h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 800; margin-bottom: 1rem; }
.ticks { display: grid; gap: .75rem; }
.ticks li { position: relative; padding-left: 1.8rem; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 1rem; height: .55rem; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.hint { margin-top: 1.2rem; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid rgba(255, 182, 72, .35); background: rgba(255, 182, 72, .07); color: #f3d6a6; font-size: .93rem; }

.download { display: grid; gap: 1.6rem; align-items: center; padding: clamp(24px, 4vw, 44px); border-radius: calc(var(--radius) + 4px); background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); }
.download h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); font-weight: 800; margin-bottom: .9rem; }
.download p { color: var(--muted); }
.status { display: flex; align-items: center; gap: .6rem; color: var(--warn) !important; font-weight: 650; margin-bottom: .5rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none; box-shadow: 0 0 0 4px rgba(255, 182, 72, .15); }
.status-ok { color: #3ddc84 !important; }
.status-ok .dot { background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .15); }

.faq { display: grid; gap: .7rem; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq details[open] { border-color: rgba(63, 182, 255, .45); }
.faq summary { list-style: none; cursor: pointer; padding: 1.05rem 3rem 1.05rem 1.2rem; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 1.2rem 1.15rem; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line-soft); padding: 3rem 0 1.5rem; background: #0a0e13; }
.footer-inner { display: grid; gap: 2rem; }
.footer-title { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); margin-bottom: .6rem; }
.footer-links { display: grid; gap: .4rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-base { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); font-size: .9rem; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(4, 7, 11, .88); }
.lightbox img { max-width: min(96vw, 1400px); max-height: 88vh; width: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.lightbox-close { position: absolute; top: -14px; right: -14px; width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); font-size: 1.1rem; }

/* Página legal */
.legal { padding: clamp(48px, 7vw, 88px) 0; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { list-style: disc; padding-left: 1.4rem; display: grid; gap: .4rem; }
.legal a { color: var(--accent); text-decoration: underline; }

/* 6. Efectos — aparición suave (solo con JS; sin JS todo se ve) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* 7. Responsive */
@media (min-width: 540px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  .download { grid-template-columns: 1fr auto; }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .nav, .header-ctas { display: flex; }
  .nav-toggle, .menu-movil { display: none !important; }
  .hero-grid { grid-template-columns: 1fr 1.15fr; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { max-width: 880px; }
  .step { padding: 1.5rem 1.6rem 1.5rem 5.2rem; }
  .step::before { left: 1.5rem; top: 1.45rem; width: 2.5rem; height: 2.5rem; }
  .feature { grid-template-columns: 1.25fr 1fr; }
  .feature-rev .shot { order: 2; }
}
@media (min-width: 960px) and (max-width: 1279px) {
  .header-ctas .btn-ghost { display: none; }
  .nav { gap: 1.1rem; }
}
@media (max-width: 959px) {
  html.js .nav-toggle[hidden] { display: grid; }
}

/* Movimiento reducido: solo se desactiva lo intrusivo (no hay autoplay ni bucles) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
