/* =========================================================================
   Slider Video — marketing site
   Dark theme khớp app (accent tím #8B5CF6). Tự chứa, không phụ thuộc CDN.
   ========================================================================= */

:root {
  --bg: #0a0a0b;
  --bg-2: #101013;
  --card: #1c1c1e;
  --card-2: #2c2c2e;
  --stroke: #3a3a3c;
  --stroke-soft: rgba(255, 255, 255, 0.08);
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-dim: rgba(139, 92, 246, 0.16);
  --success: #34c759;
  --text: #ffffff;
  --text-2: #a1a1aa;
  --text-3: #71717a;

  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1160px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 20px 60px -18px rgba(139, 92, 246, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60vw 60vw at 78% -8%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(50vw 50vw at 5% 8%, rgba(59, 130, 246, 0.10), transparent 55%);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container { position: relative; z-index: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d4bd6);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 26px 70px -18px rgba(139, 92, 246, 0.7); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--stroke);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--accent); }
.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 16px; }

/* store badges */
.stores { display: flex; gap: 14px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px; border-radius: 14px;
  background: #fff; color: #0a0a0b;
  transition: transform .2s ease, box-shadow .25s ease;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.6);
}
.store-badge:hover { transform: translateY(-3px); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #52525b; line-height: 1; }
.store-badge strong { font-size: 16px; line-height: 1.15; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  background: rgba(10, 10, 11, 0.62);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--stroke-soft); background: rgba(10, 10, 11, 0.82); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand .logo { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 8px 22px -8px rgba(139,92,246,.8); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-2); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 8px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--accent-light);
  background: var(--accent-dim);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(52,199,89,.18); }
h1.hero-title {
  font-size: clamp(38px, 5.6vw, 66px);
  line-height: 1.02;
  letter-spacing: -.03em;
  font-weight: 800;
}
.grad-text {
  background: linear-gradient(110deg, #fff 10%, var(--accent-light) 55%, #6ea8ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-2); font-size: clamp(16px, 2vw, 19px); margin: 22px 0 30px; max-width: 40ch; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-meta { margin-top: 26px; display: flex; align-items: center; gap: 20px; color: var(--text-3); font-size: 14px; flex-wrap: wrap; }
.hero-meta .sep { width: 1px; height: 16px; background: var(--stroke); }
.hero-visual { position: relative; display: flex; justify-content: center; }

/* ---------- phone mockup ---------- */
.phone {
  position: relative;
  width: 300px;
  aspect-ratio: 300 / 620;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #26262b, #101013);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.06);
}
.phone::after { /* dynamic island */
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; background: #000; border-radius: 16px; z-index: 3;
}
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 36px; overflow: hidden; background: var(--bg);
  display: flex; flex-direction: column;
}
.phone.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }

/* glow behind phone */
.hero-visual::before {
  content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.4), transparent 60%);
  filter: blur(30px); z-index: -1;
}

/* ---------- before/after interactive ---------- */
.ba {
  position: relative; width: 100%; height: 100%;
  overflow: hidden; user-select: none; touch-action: none; cursor: ew-resize;
}
.ba-layer { position: absolute; inset: 0; }
.ba-layer .scene { width: 100%; height: 100%; object-fit: cover; }
.ba-before .scene { filter: grayscale(1) brightness(.62) contrast(.9); }
.ba-after { clip-path: inset(0 0 0 var(--split, 50%)); }
.ba-tag {
  position: absolute; bottom: 14px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #fff;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
}
.ba-tag.before { left: 14px; }
.ba-tag.after { right: 14px; }
.ba-divider {
  position: absolute; top: 0; bottom: 0; left: var(--split, 50%);
  width: 3px; background: #fff; transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(0,0,0,.5);
}
.ba-knob {
  position: absolute; top: 50%; left: var(--split, 50%);
  width: 46px; height: 46px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 6px rgba(139,92,246,.22);
}
.ba-knob svg { width: 26px; height: 26px; }

/* standalone showcase before/after (rounded card) */
.ba-card {
  width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--stroke-soft);
}

/* ---------- app screen recreations ---------- */
.scr { position: relative; width: 100%; height: 100%; background: var(--bg); color: #fff; font-size: 11px; }
.scr-pad { padding: 44px 18px 0; }
.scr h3 { font-size: 17px; font-weight: 800; text-align: center; letter-spacing: -.01em; }
.scr .muted { color: var(--text-3); text-align: center; font-size: 11px; margin-top: 2px; }
.slot {
  margin-top: 14px; border: 1.5px dashed var(--stroke); border-radius: 16px;
  padding: 20px 12px; display: grid; place-items: center; gap: 8px; text-align: center;
}
.slot .plus { width: 42px; height: 42px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; font-size: 22px; color: #fff; }
.slot .plus.accent { background: var(--accent); }
.slot b { font-size: 13px; }
.slot span { color: var(--text-3); font-size: 10px; }
.scr .cta-btn { margin: 14px 4px 0; text-align: center; background: var(--card-2); color: var(--text-3); border-radius: 12px; padding: 12px; font-weight: 700; font-size: 12px; }
.tabbar {
  position: absolute; left: 14px; right: 14px; bottom: 14px; height: 52px;
  background: rgba(28,28,30,.9); border-radius: 26px; display: flex; align-items: center; justify-content: space-around;
  border: 1px solid var(--stroke-soft);
}
.tabbar .tab { display: grid; justify-items: center; gap: 3px; color: var(--text-3); font-size: 9px; }
.tabbar .tab svg { width: 18px; height: 18px; }
.tabbar .tab.active { color: var(--accent-light); }

/* library thumb play badge */
.thumb .pb { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb .pb::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  clip-path: polygon(38% 28%, 38% 72%, 72% 50%);
  background: #fff; opacity: .92;
}

/* ---------- section ---------- */
section { position: relative; padding: 84px 0; }
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head .kicker { color: var(--accent-light); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.02em; margin-top: 12px; font-weight: 800; line-height: 1.08; }
.section-head p { color: var(--text-2); margin-top: 14px; font-size: 17px; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--stroke-soft); }
.stat .num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(120deg, #fff, var(--accent-light)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--text-3); font-size: 13px; margin-top: 4px; }

/* feature cards */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature {
  padding: 28px; border-radius: var(--radius); background: linear-gradient(180deg, var(--card), #161618);
  border: 1px solid var(--stroke-soft); transition: transform .25s ease, border-color .25s, box-shadow .3s;
}
.feature:hover { transform: translateY(-6px); border-color: rgba(139,92,246,.4); box-shadow: var(--shadow); }
.feature .ic { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 18px; background: var(--accent-dim); color: var(--accent-light); }
.feature .ic svg { width: 28px; height: 28px; }
.feature h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.feature p { color: var(--text-2); margin-top: 10px; font-size: 15px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--stroke-soft); position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), #6d4bd6);
  margin-bottom: 16px; box-shadow: var(--shadow-accent);
}
.step h3 { font-size: 17px; font-weight: 700; }
.step p { color: var(--text-2); font-size: 14px; margin-top: 8px; }

/* showcase gallery */
.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: center; }
.showcase .phone { width: 100%; max-width: 260px; margin: 0 auto; }
.showcase .cap { text-align: center; margin-top: 16px; }
.showcase .cap b { font-size: 16px; }
.showcase .cap p { color: var(--text-3); font-size: 13px; }

/* split feature (2 col) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .lead { font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.split p { color: var(--text-2); margin-top: 16px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { padding: 9px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--stroke); font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; }
.chip .sw { width: 14px; height: 14px; border-radius: 50%; }

/* option cards row (split directions / handles) */
.optionrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.option { border-radius: var(--radius); background: var(--card); border: 1px solid var(--stroke-soft); padding: 20px; text-align: center; transition: border-color .25s, transform .25s; }
.option:hover { border-color: rgba(139,92,246,.4); transform: translateY(-4px); }
.option .demo { height: 90px; border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: #000; }
.option b { font-size: 14px; }
.option span { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }

/* CTA band */
.cta-band {
  border-radius: var(--radius-lg); padding: 56px 40px; text-align: center; overflow: hidden; position: relative;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(139,92,246,.35), transparent 70%),
    linear-gradient(180deg, #17141f, #101013);
  border: 1px solid rgba(139,92,246,.28);
}
.cta-band h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.cta-band p { color: var(--text-2); margin: 14px auto 28px; max-width: 46ch; font-size: 17px; }
.cta-band .stores { justify-content: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--stroke-soft); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer .brand { margin-bottom: 14px; }
.footer p { color: var(--text-3); font-size: 14px; max-width: 34ch; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-2); font-size: 15px; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--stroke-soft); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }

/* ---------- legal pages ---------- */
.legal { padding: 56px 0 40px; }
.legal-head { max-width: 760px; margin: 0 auto 20px; }
.legal-head .kicker { color: var(--accent-light); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.legal-head h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.02em; margin-top: 10px; }
.legal-head .updated { color: var(--text-3); margin-top: 12px; font-size: 14px; }
.legal-body {
  max-width: 760px; margin: 0 auto; background: var(--card); border: 1px solid var(--stroke-soft);
  border-radius: var(--radius-lg); padding: 40px clamp(24px, 5vw, 48px);
}
.legal-body h2 { font-size: 22px; font-weight: 700; margin: 34px 0 12px; letter-spacing: -.01em; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 17px; font-weight: 700; margin: 22px 0 8px; }
.legal-body p, .legal-body li { color: var(--text-2); font-size: 16px; }
.legal-body p { margin-bottom: 14px; }
.legal-body ul { margin: 0 0 16px 22px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--accent-light); }
.legal-body strong { color: #fff; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.toc a { font-size: 13px; padding: 7px 13px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--stroke); color: var(--text-2); }
.toc a:hover { border-color: var(--accent); color: #fff; }

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .features, .stats { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .showcase { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; gap: 44px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split .split-visual { order: -1; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    gap: 4px; padding: 16px 24px 22px; background: rgba(12,12,14,.98); border-bottom: 1px solid var(--stroke-soft);
  }
  .nav-links.open a { padding: 12px 0; font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-cta .btn-ghost { display: none; }
  section { padding: 60px 0; }
  .features, .stats, .steps, .optionrow { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .stat .num { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
