/* ============================================
   BarEasy Landing V2 — Base Tokens & Resets
   ============================================ */

:root {
  /* ---- Backgrounds ---- */
  --bg-dark: #000000;
  --bg-dark-2: #0a0a0b;
  --bg-card: #111113;
  --bg-card-hover: #161618;

  /* ---- Surfaces ---- */
  --surface-elevated: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);

  /* ---- Text ---- */
  --text-primary: #f5f5f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* ---- Brand accent (subtle blue glow) ---- */
  --glow: rgba(255, 255, 255, 0.2);
  --glow-subtle: rgba(255, 255, 255, 0.06);
  --glow-bg: rgba(255, 255, 255, 0.02);

  /* ---- Borders ---- */
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-glow: rgba(84, 214, 255, 0.2);

  /* ---- Shadows ---- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 32px 64px rgba(0, 0, 0, 0.6);

  /* ---- Typography ---- */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: clamp(1.75rem, 3.5vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 5vw, 3.25rem);
  --text-5xl: clamp(2.75rem, 6vw, 4.25rem);

  /* ---- Spacing ---- */
  --space-section: clamp(4rem, 8vw, 7rem);
  --space-section-lg: clamp(5rem, 10vw, 10rem);

  /* ---- Grid/Noise ---- */
  --grid-line: rgba(255, 255, 255, 0.035);
  --noise-opacity: 0.025;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  line-height: 1.6;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---- Noise texture overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ---- Dot grid background utility ---- */
.bg-grid {
  background-image: radial-gradient(circle, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---- Container ---- */
.container-v2 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container-v2 { padding: 0 1.25rem; }
}

/* ---- Hide default Django navbar ---- */
.navbar { display: none !important; }

/* ---- Common button styles ---- */
.btn-v2 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 12px;
  padding: 0.875rem 1.75rem;
}

.btn-primary-v2 {
  background: var(--text-primary);
  color: var(--bg-dark);
  position: relative;
}

.btn-primary-v2:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.btn-secondary-v2 {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary-v2:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ---- Section titles ---- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 8px var(--glow);
}

.hero-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: #25D366;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.section-heading {
  font-size: var(--text-4xl);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.section-subheading {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 2.5rem;
  line-height: 1.5;
}

/* ---- Gradient text utility ---- */
.text-gradient {
  background: linear-gradient(135deg, #c0c0c0 0%, #6b6b6b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Scroll progress bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 1001;
  background: transparent;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #25D366, rgba(37, 211, 102, 0.6));
  transform-origin: left;
}

/* Native scroll-driven animation where supported */
@supports (animation-timeline: scroll()) {
  .scroll-progress-bar {
    width: 100%;
    animation: grow-progress linear;
    animation-timeline: scroll();
  }
  @keyframes grow-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
}
