/* ═══════════════════════════════════════════════════════════════════════════
   BoxVise Website — Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  /* Light Theme (default) */
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-nav: rgba(248,250,252,0.85);
  --text-primary: #0D1829;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: rgba(0,0,0,0.06);
  --border-light: rgba(0,0,0,0.03);

  --primary: #D4772C;
  --primary-dark: #B8621E;
  --primary-light: rgba(212,119,44,0.1);
  --primary-glow: rgba(212,119,44,0.25);
  --accent: #1E3A5F;

  --gradient: linear-gradient(135deg, #D4772C 0%, #B8621E 50%, #D4772C 100%);
  --gradient-text: linear-gradient(135deg, #D4772C, #E8943A);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 40px var(--primary-glow);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --nav-height: 72px;
  --container-max: 1200px;
}

[data-theme="dark"] {
  --bg: #0B1120;
  --bg-card: #131D32;
  --bg-elevated: #1A2744;
  --bg-nav: rgba(11,17,32,0.9);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #475569;
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.03);
  --primary-light: rgba(212,119,44,0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);
}

/* ── Reset & Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: transparent;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: color 0.4s ease;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { border: none; cursor: pointer; font-family: inherit; background: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ──────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
}
.nav-logo { width: 34px; height: 34px; border-radius: 8px; }
.brand-text {
  font-size: 20px; font-weight: 900; font-style: italic; letter-spacing: -0.5px;
}
.brand-accent { color: var(--primary); }
.nav-links {
  display: flex; gap: 32px;
}
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: color 0.2s; position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--primary); border-radius: 1px; transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; color: var(--text-secondary); transition: all 0.2s;
  background: var(--primary-light);
}
.theme-toggle:hover { background: var(--primary); color: white; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
.nav-cta {
  padding: 10px 22px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: var(--primary); color: white; transition: all 0.3s;
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px; width: 28px; padding: 4px 0;
}
.mobile-menu-btn span {
  display: block; height: 2px; background: var(--text-primary); border-radius: 2px;
  transition: all 0.3s;
}

/* ── Page-Wide Video Background ─────────────────────────────────────── */
.page-video-bg {
  position: fixed; inset: 0; z-index: -2;
}
.page-bg-video {
  width: 100%; height: 100%; object-fit: cover;
  will-change: contents;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.page-video-overlay {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(248,250,252,0.88) 0%,
    rgba(248,250,252,0.62) 20%,
    rgba(248,250,252,0.58) 50%,
    rgba(248,250,252,0.65) 75%,
    rgba(248,250,252,0.82) 100%
  );
  transition: background 0.4s ease;
}
[data-theme="dark"] .page-video-overlay {
  background: linear-gradient(
    to bottom,
    rgba(11,17,32,0.90) 0%,
    rgba(11,17,32,0.65) 20%,
    rgba(11,17,32,0.60) 50%,
    rgba(11,17,32,0.68) 75%,
    rgba(11,17,32,0.86) 100%
  );
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; position: relative;
  padding: calc(var(--nav-height) + 40px) 0 40px;
  background: transparent;
}
.hero-container {
  position: relative; z-index: 1;
  width: 100%;
  /* text anchored to the absolute left of the viewport */
  padding-left: clamp(32px, 5vw, 80px);
  padding-right: 52%; /* keeps text in left half, right half clear for video */
}
.hero-content {
  width: 100%;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: var(--primary-light); border: 1px solid rgba(212,119,44,0.15);
  font-size: 13px; font-weight: 600; color: var(--primary);
  margin-bottom: 24px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
.hero-title {
  font-size: clamp(36px, 5vw, 60px); font-weight: 900; line-height: 1.1;
  letter-spacing: -1.5px; margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.title-gradient {
  background: var(--gradient-text); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle {
  font-size: 18px; color: var(--text-secondary); line-height: 1.7;
  max-width: 520px; margin-bottom: 32px;
}
.btn-ghost-hero {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.7);
  color: var(--text-primary);
}
[data-theme="dark"] .btn-ghost-hero {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12);
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 40px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px;
  border-radius: 14px; font-size: 15px; font-weight: 600; transition: all 0.3s;
}
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-dark); transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--primary-glow);
}
.btn-ghost {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.hero-stats {
  display: flex; align-items: center; gap: 24px;
}
.stat { text-align: left; }
.stat-number {
  font-size: 28px; font-weight: 900; letter-spacing: -1px; color: var(--text-primary);
}
.stat-plus { font-size: 20px; font-weight: 700; color: var(--primary); }
.stat-label { display: block; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 36px; background: rgba(0,0,0,0.18); }
[data-theme="dark"] .stat-divider { background: rgba(255,255,255,0.18); }

/* Scroll indicator */
.scroll-indicator {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 20px;
  color: var(--text-muted); font-size: 12px;
}
.scroll-mouse {
  width: 24px; height: 38px; border-radius: 12px;
  border: 2px solid var(--text-muted); position: relative;
}
.scroll-dot {
  width: 4px; height: 8px; border-radius: 2px; background: var(--text-muted);
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  animation: scroll-down 2s infinite;
}
@keyframes scroll-down {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

/* ── Features ────────────────────────────────────────────────────────── */
.features { padding: 120px 0; background: transparent; }
.section-header {
  text-align: center; margin-bottom: 64px;
  position: relative; z-index: 1;
}
.section-tag {
  display: inline-block; padding: 6px 16px; border-radius: 100px;
  background: rgba(212,119,44,0.14);
  border: 1px solid rgba(212,119,44,0.25);
  color: var(--primary);
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.section-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 900; line-height: 1.15;
  letter-spacing: -1px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.section-desc {
  font-size: 16px; color: var(--text-secondary); margin-top: 16px;
  max-width: 540px; margin-left: auto; margin-right: auto;
}
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature-card {
  padding: 32px 28px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.5);
  transition: all 0.4s cubic-bezier(0.25,0.8,0.25,1);
  position: relative; overflow: hidden;
}
[data-theme="dark"] .feature-card {
  background: rgba(13,24,50,0.72);
  border-color: rgba(255,255,255,0.09);
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient); opacity: 0; transition: opacity 0.4s;
}
.feature-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lg);
  border-color: rgba(212,119,44,0.15);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 20px;
}
.fi-orange { background: rgba(212,119,44,0.1); color: #D4772C; }
.fi-blue { background: rgba(59,130,246,0.1); color: #3B82F6; }
.fi-green { background: rgba(34,197,94,0.1); color: #22C55E; }
.fi-purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.fi-amber { background: rgba(245,158,11,0.1); color: #F59E0B; }
.fi-teal { background: rgba(20,184,166,0.1); color: #14B8A6; }
.feature-card h3 {
  font-size: 18px; font-weight: 700; margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
}

/* ── How It Works ────────────────────────────────────────────────────── */
.how-it-works {
  padding: 120px 0; background: transparent;
}
.steps {
  display: flex; align-items: flex-start; justify-content: center; gap: 0;
}
.step {
  text-align: center; max-width: 280px; position: relative;
  padding: 28px 24px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.40);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}
[data-theme="dark"] .step {
  background: rgba(13,24,50,0.42);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.step-number {
  font-size: 40px; font-weight: 900;
  letter-spacing: -2px; margin-bottom: 14px;
  background: var(--gradient-text); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; opacity: 0.25;
}
.step-visual {
  margin-bottom: 20px;
}
.step-icon-wrap {
  width: 72px; height: 72px; border-radius: 22px; display: inline-flex;
  align-items: center; justify-content: center;
  background: rgba(212,119,44,0.15);
  border: 1px solid rgba(212,119,44,0.2);
  color: var(--primary);
  transition: all 0.4s;
}
.step:hover .step-icon-wrap {
  background: var(--primary); color: white;
  box-shadow: var(--shadow-glow); transform: scale(1.05);
}
.step h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; color: var(--text-primary); }
.step p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.step-connector {
  display: flex; align-items: center;
  /* align with icon center: card-padding(28) + step-number(~50) + margin(14) + visual-margin(20) + half-icon(36) */
  padding-top: 148px;
  color: rgba(212,119,44,0.5);
  margin: 0 16px; flex-shrink: 0;
}

/* ── Tools Section ───────────────────────────────────────────────────── */
.tools-section {
  padding: 120px 0; background: transparent;
}
.tools-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.tool-card {
  padding: 28px 24px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.5);
  text-align: center; transition: all 0.4s;
}
[data-theme="dark"] .tool-card {
  background: rgba(13,24,50,0.72);
  border-color: rgba(255,255,255,0.09);
}
.tool-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md);
  border-color: rgba(212,119,44,0.15);
}
.tool-icon {
  width: 52px; height: 52px; border-radius: 16px; display: inline-flex;
  align-items: center; justify-content: center; margin-bottom: 16px;
}
.ti-blue { background: rgba(59,130,246,0.1); color: #3B82F6; }
.ti-amber { background: rgba(245,158,11,0.1); color: #F59E0B; }
.ti-green { background: rgba(34,197,94,0.1); color: #22C55E; }
.ti-purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.tool-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.tool-card p { font-size: 13px; color: var(--text-secondary); }

/* ── Download CTA ────────────────────────────────────────────────────── */
.download { padding: 120px 0; }
.download-card {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 20px 60px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
  padding: 80px 40px; text-align: center;
}
[data-theme="dark"] .download-card {
  background: rgba(13,24,50,0.55);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
/* Decorative tinted orbs */
.download-bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: var(--radius-xl); }
.dl-shape {
  position: absolute; border-radius: 50%;
}
.dl-shape-1 { width: 320px; height: 320px; top: -120px; right: -60px; background: radial-gradient(circle, rgba(212,119,44,0.18) 0%, transparent 70%); }
.dl-shape-2 { width: 220px; height: 220px; bottom: -80px; left: -40px; background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%); }
.dl-shape-3 { width: 180px; height: 180px; top: 40%; left: 55%; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(212,119,44,0.10) 0%, transparent 70%); }
.download-content { position: relative; z-index: 1; }
.download-icon {
  width: 80px; height: 80px; border-radius: 20px; margin: 0 auto 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.download-card h2 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 900; color: var(--text-primary);
  letter-spacing: -1px; margin-bottom: 12px;
}
.download-card p {
  font-size: 16px; color: var(--text-secondary); max-width: 480px;
  margin: 0 auto 32px; line-height: 1.6;
}
.download-buttons { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.store-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-radius: 14px;
  background: var(--primary); border: 1px solid transparent;
  color: white; transition: all 0.3s;
}
.store-btn:hover {
  background: var(--primary-dark); transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--primary-glow);
}
.store-label { display: block; font-size: 10px; opacity: 0.85; }
.store-name { display: block; font-size: 16px; font-weight: 700; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  padding: 60px 0 30px;
  background: rgba(248,250,252,0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.4);
}
[data-theme="dark"] .footer {
  background: rgba(11,17,32,0.85);
  border-top-color: rgba(255,255,255,0.08);
}
.footer-top {
  display: flex; justify-content: space-between; gap: 60px;
  padding-bottom: 40px; border-bottom: 1px solid var(--border);
}
.footer-brand { max-width: 300px; }
.footer-brand p { margin-top: 12px; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.footer-links { display: flex; gap: 60px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h5 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.footer-col a {
  font-size: 13px; color: var(--text-secondary); transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
}
.footer-bottom p { font-size: 13px; color: var(--text-muted); }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center;
  color: var(--text-muted); background: var(--primary-light);
  transition: all 0.2s;
}
.footer-socials a:hover { background: var(--primary); color: white; }

/* ── Animations ──────────────────────────────────────────────────────── */
[data-animate] {
  opacity: 0; transform: translateY(30px); transition: all 0.7s cubic-bezier(0.25,0.8,0.25,1);
}
[data-animate="fade-left"] { transform: translateX(40px); }
[data-animate].visible {
  opacity: 1; transform: translateY(0) translateX(0);
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-container { padding-right: clamp(32px, 5vw, 80px); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-container { text-align: center; padding-left: 24px; padding-right: 24px; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; align-items: center; gap: 24px; }
  .step-connector { display: none; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; gap: 40px; }
  .footer-links { gap: 40px; flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 32px; }
  .tools-grid { grid-template-columns: 1fr; }
  .download-card { padding: 50px 24px; }
  .store-btn { flex: 1; justify-content: center; min-width: 160px; }
}

/* Mobile Menu */
.nav-links.mobile-open {
  display: flex; flex-direction: column; position: absolute;
  top: var(--nav-height); left: 0; right: 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  box-shadow: var(--shadow-lg); gap: 16px;
}
[data-theme="dark"] .nav-links.mobile-open {
  background: rgba(11,17,32,0.92);
  border-bottom-color: rgba(255,255,255,0.08);
}
.mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
