/* ═══════════════════════════════════════════════════════════════════
   RANKRUSH — DESIGN SYSTEM v3
   Tout est visible par défaut. Les animations sont progressives.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --violet: #8B5CF6;
  --violet-light: #A78BFA;
  --violet-dark: #6D28D9;
  --cyan: #22D3EE;
  --cyan-dark: #06B6D4;
  --emerald: #34D399;
  --amber: #FBBF24;
  --pink: #F472B6;
  --blue: #60A5FA;
  --red: #EF4444;
  --bg: #050508;
  --bg-card: #0a0a10;
  --bg-elevated: #111118;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: #fff; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

::selection { background: rgba(139, 92, 246, .4); color: #fff; }

/* ─── NOISE TEXTURE ─── */
.noise {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 256px;
}

/* ─── CURSOR GLOW ─── */
.cursor-glow {
  position: fixed; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, .07) 0%, transparent 70%);
  pointer-events: none; z-index: 1; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .3s ease;
}
.cursor-glow.active { opacity: 1; }
@media (max-width: 768px) { .cursor-glow { display: none; } }

/* ─── TEXT GRADIENT ─── */
.text-gradient {
  background: linear-gradient(135deg, var(--violet-light), var(--cyan), var(--violet));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── AMBIENT GLOWS ─── */
.section-glow {
  position: absolute; width: 500px; height: 500px; border-radius: 50%;
  filter: blur(120px); opacity: .12; pointer-events: none;
}
.section-glow--left { left: -200px; top: 20%; background: var(--violet); }
.section-glow--right { right: -200px; top: 30%; background: var(--cyan); }

/* ═══════════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════════ */
#navbar {
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  background: rgba(5, 5, 8, .7);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), opacity .4s ease;
}
#navbar.nav-hidden { transform: translateY(-100%); opacity: 0; }
#navbar.nav-visible { transform: translateY(0); opacity: 1; }

.nav-link {
  position: relative; color: rgba(255, 255, 255, .5);
  font-size: 14px; font-weight: 500; letter-spacing: .02em; transition: color .3s ease;
}
.nav-link:hover { color: rgba(255, 255, 255, .9); }
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--violet); transition: width .3s ease;
}
.nav-link:hover::after { width: 100%; }

.btn-nav {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; background: var(--violet);
  font-weight: 600; font-size: 14px; color: #fff;
  border: 1px solid rgba(255, 255, 255, .1); transition: all .3s ease;
}
.btn-nav:hover { background: var(--violet-dark); box-shadow: 0 0 30px rgba(139, 92, 246, .35); }

/* ═══════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════ */
#hero { position: relative; }

.hero-video-wrap {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.hero-video-wrap video {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.8s ease;
}
.hero-video-wrap video.loaded {
  opacity: 1;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(5,5,8,.5) 0%, rgba(5,5,8,.3) 40%, rgba(5,5,8,.95) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(5,5,8,.6) 75%);
}

.hero-badge {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: 100px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .8); letter-spacing: .03em;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: .95; letter-spacing: -.03em; margin-top: 24px;
}

.hero-phone-wrapper { display: flex; justify-content: center; perspective: 1200px; }
.hero-phone { position: relative; }

.phone-frame {
  position: relative; width: 280px; max-width: 100%;
  background: var(--bg-elevated); border-radius: 40px; padding: 12px;
  border: 2px solid rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03), 0 25px 50px -12px rgba(0,0,0,.5), 0 0 80px rgba(139,92,246,.12);
  overflow: hidden;
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 28px; background: var(--bg-elevated);
  border-radius: 20px; z-index: 10; border: 1px solid rgba(255,255,255,.05);
}
.phone-screen {
  position: relative; border-radius: 30px; overflow: hidden;
  aspect-ratio: 9 / 19.5; background: var(--bg-card);
}
.phone-carousel { position: relative; width: 100%; height: 100%; }
.carousel-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .8s ease-in-out;
}
.carousel-img.active { opacity: 1; }
.phone-glow {
  position: absolute; inset: -40px; border-radius: 60px;
  background: radial-gradient(ellipse at center, rgba(139,92,246,.2), transparent 70%);
  z-index: -1; filter: blur(30px); animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.05); }
}

.scroll-indicator { animation: fadeIn .6s ease forwards 2s; opacity: 0; }
.scroll-mouse {
  width: 26px; height: 42px; border-radius: 13px;
  border: 2px solid rgba(255,255,255,.2); position: relative;
}
.scroll-wheel {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 8px; border-radius: 3px; background: rgba(255,255,255,.4);
  animation: scrollWheel 2s ease-in-out infinite;
}
@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════════
   MARQUEE
   ═══════════════════════════════════════════════════════════════════ */
.marquee-track { display: flex; width: max-content; }
.marquee-content {
  display: flex; align-items: center;
  animation: marquee 25s linear infinite; will-change: transform;
}
.marquee-item {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: .15em;
  color: rgba(255,255,255,.2); white-space: nowrap; padding: 0 24px;
}
.marquee-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(139,92,246,.5); flex-shrink: 0;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION TITLES
   ═══════════════════════════════════════════════════════════════════ */
.section-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase; color: var(--violet-light); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; letter-spacing: -.02em;
}

/* ═══════════════════════════════════════════════════════════════════
   HOW IT WORKS — STEPS
   ═══════════════════════════════════════════════════════════════════ */
.steps-grid {
  display: flex; align-items: flex-start; justify-content: center; gap: 0;
}
.step-card {
  flex: 0 1 320px; text-align: center; padding: 32px 24px;
  position: relative;
}
.step-connector {
  display: flex; align-items: center; padding-top: 60px;
  flex-shrink: 0;
}
.step-num {
  font-size: 48px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: .15; margin-bottom: 16px;
}
.step-icon {
  width: 64px; height: 64px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; transition: all .3s ease;
}
.step-icon--violet {
  background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.2); color: var(--violet-light);
}
.step-icon--cyan {
  background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.2); color: var(--cyan);
}
.step-icon--emerald {
  background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.2); color: var(--emerald);
}
.step-title {
  font-size: 18px; font-weight: 700; margin-bottom: 8px;
}
.step-desc {
  font-size: 15px; color: rgba(255,255,255,.4); line-height: 1.6;
}

@media (max-width: 768px) {
  .steps-grid { flex-direction: column; align-items: center; }
  .step-connector { padding-top: 0; transform: rotate(90deg); padding: 8px 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   FEATURE DEEP-DIVE — Alternating rows
   ═══════════════════════════════════════════════════════════════════ */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px 80px; align-items: center;
  padding: 60px 0;
}
.feature-row + .feature-row {
  border-top: 1px solid rgba(255,255,255,.04);
}

/* Reverse: phone on the right, content on the left */
.feature-row--reverse .feature-visual { order: 2; }
.feature-row--reverse .feature-content { order: 1; }

/* Phone */
.feature-visual {
  display: flex; justify-content: center;
}
.feature-phone-wrap {
  position: relative;
}
.ft-phone-frame {
  position: relative; width: 300px; max-width: 100%;
  background: var(--bg-elevated); border-radius: 44px; padding: 14px;
  border: 2px solid rgba(255,255,255,.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.03),
    0 30px 60px -15px rgba(0,0,0,.6),
    0 0 100px rgba(139,92,246,.08);
  overflow: hidden;
  transition: all .5s cubic-bezier(.16,1,.3,1);
}
.feature-row:hover .ft-phone-frame {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 40px 80px -20px rgba(0,0,0,.7),
    0 0 120px rgba(139,92,246,.15);
}
.ft-phone-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 26px; background: var(--bg-elevated);
  border-radius: 20px; z-index: 10; border: 1px solid rgba(255,255,255,.05);
}
.ft-phone-screen {
  border-radius: 32px; overflow: hidden;
  aspect-ratio: 9 / 19.5; background: var(--bg-card);
}
.ft-phone-screen img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Phone glow */
.feature-phone-glow {
  position: absolute; inset: -50px; border-radius: 60px;
  filter: blur(60px); opacity: .15; z-index: -1;
  transition: opacity .5s ease;
}
.feature-row:hover .feature-phone-glow { opacity: .25; }
.feature-glow--red { background: var(--red); }
.feature-glow--cyan { background: var(--cyan); }
.feature-glow--amber { background: var(--amber); }
.feature-glow--violet { background: var(--violet); }

/* Content */
.feature-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.feature-num {
  font-size: 14px; font-weight: 700; color: rgba(255,255,255,.15);
  letter-spacing: .1em;
}
.feature-pill {
  display: inline-flex; align-items: center; padding: 6px 14px;
  border-radius: 100px; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.feature-pill--red { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); color: #f87171; }
.feature-pill--cyan { background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.25); color: var(--cyan); }
.feature-pill--amber { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.25); color: var(--amber); }
.feature-pill--violet { background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.25); color: var(--violet-light); }

.feature-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.15; letter-spacing: -.02em; margin-bottom: 16px;
}
.feature-desc {
  font-size: 16px; color: rgba(255,255,255,.45); line-height: 1.7;
  margin-bottom: 28px; max-width: 480px;
}

/* Checkpoints */
.feature-points {
  list-style: none; display: flex; flex-direction: column; gap: 14px;
}
.feature-points li {
  display: flex; align-items: center; gap: 14px;
  font-size: 15px; font-weight: 500; color: rgba(255,255,255,.6);
}
.fp-check {
  width: 28px; height: 28px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fp-check--red { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2); color: #f87171; }
.fp-check--cyan { background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.2); color: var(--cyan); }
.fp-check--amber { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.2); color: var(--amber); }
.fp-check--violet { background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.2); color: var(--violet-light); }

/* Feature responsive */
@media (max-width: 900px) {
  .feature-row {
    grid-template-columns: 1fr; gap: 40px; padding: 48px 0;
  }
  .feature-row--reverse .feature-visual { order: 0; }
  .feature-row--reverse .feature-content { order: 0; }
  .feature-visual { justify-content: center; }
  .feature-content { text-align: center; }
  .feature-header { justify-content: center; }
  .feature-desc { margin-left: auto; margin-right: auto; }
  .feature-points { align-items: center; }
  .ft-phone-frame { width: 260px; }
}
@media (max-width: 480px) {
  .ft-phone-frame { width: 240px; border-radius: 36px; padding: 10px; }
  .ft-phone-notch { width: 90px; height: 22px; }
  .ft-phone-screen { border-radius: 28px; }
}

/* ═══════════════════════════════════════════════════════════════════
   APP GALLERY — Interactive tabs
   ═══════════════════════════════════════════════════════════════════ */
.gallery-tabs {
  display: flex; justify-content: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 48px;
}
.gallery-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.45);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .3s cubic-bezier(.16,1,.3,1);
}
.gallery-tab:hover:not(.active) {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  transform: translateY(-1px);
}
.gallery-tab.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 0 24px rgba(139,92,246,.3);
}

/* Gallery display */
.gallery-display {
  display: flex; flex-direction: column; align-items: center;
}

/* Gallery phone */
.gallery-phone { position: relative; margin-bottom: 40px; }
.gallery-phone-frame {
  position: relative; width: 320px; max-width: 100%;
  background: var(--bg-elevated); border-radius: 48px; padding: 16px;
  border: 2px solid rgba(255,255,255,.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.03),
    0 40px 80px -20px rgba(0,0,0,.6),
    0 0 120px rgba(139,92,246,.1);
  overflow: hidden;
}
.gallery-phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 28px; background: var(--bg-elevated);
  border-radius: 20px; z-index: 10; border: 1px solid rgba(255,255,255,.05);
}
.gallery-phone-screen {
  position: relative; border-radius: 34px; overflow: hidden;
  aspect-ratio: 9 / 19.5; background: var(--bg-card);
}
.gallery-screen {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; transform: scale(1.02);
  transition: opacity .5s ease, transform .5s cubic-bezier(.16,1,.3,1);
}
.gallery-screen.active {
  opacity: 1; transform: scale(1);
}
.gallery-phone-glow {
  position: absolute; inset: -60px; border-radius: 70px;
  background: radial-gradient(ellipse at center, rgba(139,92,246,.18), transparent 70%);
  z-index: -1; filter: blur(40px);
  animation: glowPulse 4s ease-in-out infinite;
}

/* Gallery caption */
.gallery-caption {
  text-align: center; max-width: 500px;
}
.gallery-caption-title {
  font-size: 24px; font-weight: 700; margin-bottom: 8px;
  transition: opacity .3s ease;
}
.gallery-caption-desc {
  font-size: 16px; color: rgba(255,255,255,.4); line-height: 1.6;
  transition: opacity .3s ease;
}

@media (max-width: 768px) {
  .gallery-phone-frame { width: 280px; border-radius: 40px; padding: 12px; }
  .gallery-phone-notch { width: 100px; height: 24px; }
  .gallery-phone-screen { border-radius: 30px; }
  .gallery-tab { padding: 10px 14px; font-size: 13px; }
  .gallery-tab svg { width: 16px; height: 16px; }
}
@media (max-width: 480px) {
  .gallery-phone-frame { width: 250px; border-radius: 36px; padding: 10px; }
  .gallery-phone-screen { border-radius: 28px; }
  .gallery-tab span { display: none; }
  .gallery-tab { padding: 12px 14px; }
}

/* ═══════════════════════════════════════════════════════════════════
   STATS (with cards)
   ═══════════════════════════════════════════════════════════════════ */
.stat-card {
  text-align: center; padding: 28px 16px; border-radius: 20px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  transition: all .3s ease;
}
.stat-card:hover {
  border-color: rgba(139,92,246,.15);
  background: rgba(255,255,255,.04);
  transform: translateY(-2px);
}
.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700;
  letter-spacing: -.03em; line-height: 1;
}
.stat-suffix {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--violet-light);
}
.stat-label {
  margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.35); font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════════════════════════════ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid rgba(255,255,255,.06); border-radius: 16px;
  background: rgba(255,255,255,.02); overflow: hidden; transition: all .3s ease;
}
.faq-item[open] {
  background: rgba(255,255,255,.04); border-color: rgba(139,92,246,.2);
  box-shadow: 0 10px 30px rgba(139,92,246,.08);
}
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; cursor: pointer; font-weight: 600; font-size: 16px;
  list-style: none; color: rgba(255,255,255,.85); transition: color .3s ease;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: #fff; }
.faq-icon { position: relative; width: 24px; height: 24px; flex-shrink: 0; }
.faq-icon span { position: absolute; background: rgba(255,255,255,.5); border-radius: 2px; transition: all .3s ease; }
.faq-icon span:first-child { top: 50%; left: 4px; right: 4px; height: 2px; transform: translateY(-50%); }
.faq-icon span:last-child { left: 50%; top: 4px; bottom: 4px; width: 2px; transform: translateX(-50%); }
.faq-item[open] .faq-icon span:last-child { transform: translateX(-50%) scaleY(0); }
.faq-answer { padding: 0 24px 20px; }
.faq-answer p { font-size: 15px; color: rgba(255,255,255,.45); line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════════════════════════════ */
.cta-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(139,92,246,.15), transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(34,211,238,.1), transparent 50%);
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.btn-glow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 14px; background: var(--violet);
  font-weight: 600; font-size: 15px; color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
  position: relative; overflow: hidden;
  transition: all .3s cubic-bezier(.16,1,.3,1);
}
.btn-glow::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,.1) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .6s ease;
}
.btn-glow:hover::before { transform: translateX(100%); }
.btn-glow:hover {
  background: var(--violet-dark);
  box-shadow: 0 0 40px rgba(139,92,246,.4), 0 0 80px rgba(139,92,246,.15);
  transform: translateY(-2px);
}
.btn-glow--lg { padding: 18px 36px; font-size: 16px; border-radius: 16px; }
.btn-glow--disabled {
  background: rgba(139,92,246,.25); cursor: default; pointer-events: none;
  border-color: rgba(139,92,246,.15); color: rgba(255,255,255,.5);
}
.btn-glow--disabled::before { display: none; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 14px; background: transparent;
  font-weight: 600; font-size: 15px; color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.1);
  transition: all .3s cubic-bezier(.16,1,.3,1);
}
.btn-outline:hover {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.2);
  color: #fff; transform: translateY(-2px);
}
.btn-outline--lg { padding: 18px 36px; font-size: 16px; border-radius: 16px; }
.btn-open-beta { cursor: pointer; font-family: 'Inter', system-ui, sans-serif; }

/* ═══════════════════════════════════════════════════════════════════
   MODAL BÊTA
   ═══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(5,5,8,.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.modal-overlay.open {
  opacity: 1; visibility: visible;
}

.modal-card {
  position: relative; width: 100%; max-width: 580px; max-height: 90vh;
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(139,92,246,.3) transparent;
  background: linear-gradient(165deg, rgba(17,17,24,1) 0%, rgba(10,10,16,1) 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 28px; padding: 40px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 40px 80px -20px rgba(0,0,0,.8),
    0 0 120px rgba(139,92,246,.1);
  transform: translateY(20px) scale(.97);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}
.modal-card::-webkit-scrollbar { width: 6px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background: rgba(139,92,246,.3); border-radius: 3px; }

.modal-close {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s ease;
}
.modal-close:hover {
  background: rgba(255,255,255,.08); color: #fff;
  border-color: rgba(255,255,255,.15);
}

/* Modal header */
.modal-header { text-align: center; margin-bottom: 32px; }
.modal-logo-wrap {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 18px; overflow: hidden;
  border: 2px solid rgba(139,92,246,.3);
  box-shadow: 0 0 30px rgba(139,92,246,.2);
}
.modal-logo { width: 100%; height: 100%; object-fit: contain; }
.modal-header h3 { font-size: 22px; margin-bottom: 8px; }
.modal-header p { font-size: 15px; color: rgba(255,255,255,.4); line-height: 1.5; }

/* Modal steps */
.modal-steps {
  display: flex; flex-direction: column; gap: 0;
}
.modal-step {
  display: flex; gap: 16px; padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.05);
}
.modal-step:first-child { border-top: none; }
.modal-step-num {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--violet-light);
}
.modal-step-content { flex: 1; min-width: 0; }
.modal-step-content h4 {
  font-size: 16px; font-weight: 600; margin-bottom: 4px; color: rgba(255,255,255,.9);
}
.modal-step-content p {
  font-size: 14px; color: rgba(255,255,255,.4); line-height: 1.6;
}
.modal-step-content strong { color: rgba(255,255,255,.7); }

/* Modal link */
.modal-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 13px; font-weight: 600;
  color: var(--violet-light); transition: color .2s ease;
}
.modal-link:hover { color: #fff; }

/* Source URL box */
.modal-source-url {
  margin-top: 10px; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 10px 12px;
  transition: border-color .2s ease;
}
.modal-source-url:hover { border-color: rgba(139,92,246,.2); }
.modal-source-url code {
  font-size: 11px; color: rgba(255,255,255,.5);
  word-break: break-all; flex: 1; line-height: 1.4;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.modal-copy {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04); color: rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s ease;
}
.modal-copy:hover { background: rgba(139,92,246,.15); color: var(--violet-light); border-color: rgba(139,92,246,.3); }
.modal-copy.copied { background: rgba(52,211,153,.15); color: var(--emerald); border-color: rgba(52,211,153,.3); }

/* Modal footer */
.modal-footer {
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.05);
  display: flex; justify-content: center;
}

@media (max-width: 640px) {
  .modal-card { padding: 28px 20px; border-radius: 22px; }
  .modal-header h3 { font-size: 19px; }
  .modal-source-url code { font-size: 10px; }
}

/* ═══════════════════════════════════════════════════════════════════
   CONTACT FORM (modal)
   ═══════════════════════════════════════════════════════════════════ */
.modal-card--contact { max-width: 520px; }

.contact-form {
  display: flex; flex-direction: column; gap: 20px;
}
.contact-field {
  display: flex; flex-direction: column; gap: 6px;
}
.contact-field label {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5);
  letter-spacing: .03em;
}
.contact-field input,
.contact-field textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: #fff; font-size: 15px; font-family: 'Inter', system-ui, sans-serif;
  transition: all .2s ease; outline: none; resize: vertical;
}
.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: rgba(255,255,255,.2);
}
.contact-field input:focus,
.contact-field textarea:focus {
  border-color: rgba(139,92,246,.4);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 3px rgba(139,92,246,.1);
}
.contact-field textarea { min-height: 120px; }

.contact-submit {
  width: 100%; justify-content: center; margin-top: 4px;
  font-family: 'Inter', system-ui, sans-serif; cursor: pointer;
}
.contact-submit:disabled {
  opacity: .6; pointer-events: none;
}

.contact-status {
  text-align: center; font-size: 14px; font-weight: 500;
  min-height: 20px; transition: all .3s ease;
}
.contact-status.success { color: var(--emerald); }
.contact-status.error { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════
   CONTACT CARD
   ═══════════════════════════════════════════════════════════════════ */
.contact-card {
  padding: 40px; border-radius: 24px;
  background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06);
  transition: all .3s ease;
}
.contact-card:hover { border-color: rgba(139,92,246,.15); }

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
.footer-link {
  font-size: 14px; color: rgba(255,255,255,.35);
  transition: color .3s ease;
}
.footer-link:hover { color: rgba(255,255,255,.7); }

/* ═══════════════════════════════════════════════════════════════════
   FOCUS VISIBLE
   ═══════════════════════════════════════════════════════════════════ */
:where(a, button, input, summary, details):focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   BURGER MENU (mobile only)
   ═══════════════════════════════════════════════════════════════════ */
.burger-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  cursor: pointer; position: relative;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger-btn span {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: rgba(255,255,255,.7); transition: all .3s ease;
}
.burger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
  .burger-btn { display: flex; }
}

/* Mobile menu panel */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; z-index: 49;
  background: rgba(5,5,8,.95);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding-top: 80px;
  max-height: 0; overflow: hidden;
  opacity: 0; visibility: hidden;
  transition: max-height .4s cubic-bezier(.16,1,.3,1), opacity .3s ease, visibility .3s ease;
}
.mobile-menu.open {
  max-height: 100vh; opacity: 1; visibility: visible;
}
.mobile-menu-inner {
  display: flex; flex-direction: column;
  padding: 24px 24px 32px;
  gap: 4px;
}
.mobile-menu-link {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-radius: 14px;
  font-size: 16px; font-weight: 600; color: rgba(255,255,255,.6);
  transition: all .2s ease;
}
.mobile-menu-link:hover,
.mobile-menu-link:active { background: rgba(255,255,255,.05); color: #fff; }
.mobile-menu-cta {
  margin-top: 12px; background: var(--violet); color: #fff;
  justify-content: center; border-radius: 14px;
}
.mobile-menu-cta:hover,
.mobile-menu-cta:active { background: var(--violet-dark); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tablet & small desktop (≤ 768px) ── */
@media (max-width: 768px) {
  .hero-title { font-size: clamp(2.8rem, 12vw, 5rem); }
  .phone-frame { width: 240px; }
  .contact-card { padding: 24px; }

  /* Hero buttons */
  .btn-glow, .btn-outline { padding: 12px 20px; font-size: 14px; }
  .btn-glow--lg, .btn-outline--lg { padding: 14px 24px; font-size: 15px; }

  /* CTA title */
  #download h2 { font-size: clamp(2rem, 6vw, 3.5rem) !important; }

  /* Footer stack & center */
  footer .grid { text-align: center; }
  footer .grid > div:first-child { justify-content: center; }
  footer .grid > div:last-child { justify-content: center; }

  /* Contact card stack */
  .contact-card .grid > div { text-align: center; }
  .contact-card .flex { justify-content: center; }

  /* Scroll indicator hide on mobile */
  .scroll-indicator { display: none; }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .hero-title { font-size: 2.5rem; }
  .phone-frame { width: 220px; }

  /* Hero buttons full width */
  #hero .flex-wrap { flex-direction: column; }
  #hero .flex-wrap .btn-glow,
  #hero .flex-wrap .btn-outline { width: 100%; justify-content: center; }

  /* CTA buttons full width */
  #download .flex-wrap { flex-direction: column; align-items: center; }
  #download .flex-wrap .btn-glow,
  #download .flex-wrap .btn-outline,
  #download .flex-wrap .btn-glow--lg,
  #download .flex-wrap .btn-outline--lg {
    width: 100%; max-width: 320px; justify-content: center;
    padding: 14px 20px; font-size: 14px;
  }

  /* Hero description */
  #hero p { font-size: 16px; }

  /* Section padding */
  section { padding-left: 0; padding-right: 0; }
  .mx-auto { padding-left: 20px; padding-right: 20px; }

  /* Stats compact */
  .stat-card { padding: 20px 12px; border-radius: 16px; }
  .stat-label { font-size: 12px; }

  /* FAQ compact */
  .faq-question { padding: 16px 18px; font-size: 15px; }
  .faq-answer { padding: 0 18px 16px; }

  /* Gallery caption */
  .gallery-caption-title { font-size: 20px; }
  .gallery-caption-desc { font-size: 14px; }

  /* Feature content on mobile */
  .feature-title { font-size: 1.6rem; }
  .feature-desc { font-size: 14px; }
  .feature-points li { font-size: 14px; }

  /* Section titles */
  .section-title { font-size: clamp(1.7rem, 7vw, 2.5rem); }

  /* Steps */
  .step-card { padding: 24px 16px; }
  .step-desc { font-size: 14px; }
}
