/*
 * buckspense.online - Premium Design System & Stylesheet
 * Brand colors: Deep Obsidian background, Emerald Green and Cyan highlights, Outfit & Inter Typography.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Custom Variables & Tokens --- */
:root {
  /* Color Palette */
  --bg-primary: #070a13;
  --bg-secondary: #0d1324;
  --bg-tertiary: #131b31;
  --bg-glass: rgba(13, 19, 36, 0.7);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-active: rgba(16, 185, 129, 0.3);

  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;
  --accent-emerald-glow: rgba(16, 185, 129, 0.15);
  --accent-cyan-glow: rgba(6, 182, 212, 0.15);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows & Glows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --glow-emerald: 0 0 25px rgba(16, 185, 129, 0.3);
  --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.3);

  /* Layout Constants */
  --container-max-width: 1200px;
  --header-height: 80px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 30px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient glow blobs */
body::before, body::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
}

body::before {
  top: -100px;
  right: -50px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
}

body::after {
  top: 600px;
  left: -150px;
  background: radial-gradient(circle, var(--accent-emerald) 0%, transparent 70%);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan) 70%, var(--accent-emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-accent-text {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout Components --- */

/* Sticky Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition-normal);
}

.site-header.scrolled {
  height: 70px;
  background: rgba(7, 10, 19, 0.9);
  box-shadow: var(--shadow-lg);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
  transition: var(--transition-fast);
  border-radius: 1px;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Primary/Secondary Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  border: 1px solid transparent;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-cyan) 100%);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4), var(--glow-emerald);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 110;
}

/* Hero Section */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 5rem;
  position: relative;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-xl);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 2rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: var(--glow-emerald);
  animation: pulse 2s infinite;
}

.hero h1 {
  max-width: 850px;
  margin: 0 auto 1.5rem;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

/* Dashboard Mockup Showcase */
.dashboard-showcase {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px;
  background: linear-gradient(135deg, var(--border-glass) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  position: relative;
}

.dashboard-showcase::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-cyan) 100%);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}

.mockup-header {
  height: 36px;
  background: #0b0e1a;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f87171;
}

.mockup-dot:nth-child(2) { background: #fbbf24; }
.mockup-dot:nth-child(3) { background: #34d399; }

.mockup-content {
  background: #090c15;
  border-radius: 0 0 12px 12px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  text-align: left;
}

.mockup-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mockup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mockup-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
}

.mockup-val {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.mockup-chart {
  height: 140px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-md);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 1rem;
}

.chart-bar {
  width: 28px;
  background: linear-gradient(180deg, var(--accent-emerald), transparent);
  border-radius: 4px 4px 0 0;
  transition: height 1s ease-in-out;
}

.chart-bar:nth-child(even) {
  background: linear-gradient(180deg, var(--accent-cyan), transparent);
}

.mockup-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Features Grid */
.features {
  padding: 6rem 0;
  background: radial-gradient(circle at 80% 20%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-top: 1px solid var(--border-glass);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-emerald-glow) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition-normal);
  pointer-events: none;
  z-index: 0;
}

.feature-card:nth-child(2)::before {
  background: linear-gradient(135deg, var(--accent-cyan-glow) 0%, transparent 100%);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-xl);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: var(--border-radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.feature-card:nth-child(2) .feature-icon-wrapper {
  color: var(--accent-cyan);
}

.feature-card:nth-child(3) .feature-icon-wrapper {
  color: var(--accent-violet);
}

.feature-card h3 {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.feature-card p {
  position: relative;
  z-index: 1;
}

/* Call to Action */
.cta-section {
  padding: 6rem 0;
  position: relative;
}

.cta-box {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-emerald) 0%, transparent 70%);
  filter: blur(80px);
  top: -150px;
  right: -150px;
  opacity: 0.15;
  pointer-events: none;
}

.cta-box h2 {
  margin-bottom: 1rem;
}

.cta-box p {
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* Feedback & Enquiries Form */
.feedback-form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 576px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* Success Overlay card */
.form-success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  border-radius: var(--border-radius-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  z-index: 10;
  padding: 2rem;
  border: 1px solid var(--border-active);
}

.form-success-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.success-icon-wrapper {
  width: 64px;
  height: 64px;
  background: var(--accent-emerald-glow);
  color: var(--accent-emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-emerald);
}

/* Premium Google Play Store Download Button */
.btn-playstore {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.6rem 1.4rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-normal);
  cursor: pointer;
  text-align: left;
}

.btn-playstore:hover {
  border-color: var(--accent-cyan);
  background: #090e1a;
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

.playstore-icon {
  width: 24px;
  height: 24px;
}

.playstore-text {
  display: flex;
  flex-direction: column;
}

.playstore-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.playstore-main {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Footer Section */
.site-footer {
  background: #04060b;
  border-top: 1px solid var(--border-glass);
  padding: 5rem 0 2rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand .logo-link {
  font-size: 1.5rem;
}

.footer-desc {
  max-width: 320px;
  font-size: 0.95rem;
}

.footer-heading {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-cyan);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* --- Privacy Policy Specific Styles --- */
.legal-container {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 6rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
}

.legal-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: fit-content;
}

.legal-toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 1px solid var(--border-glass);
  padding-left: 1rem;
}

.toc-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: block;
  padding: 0.25rem 0;
}

.toc-link:hover, .toc-link.active {
  color: var(--accent-emerald);
}

.legal-content {
  max-width: 800px;
}

.legal-content h1 {
  margin-bottom: 1rem;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 3rem;
  display: flex;
  gap: 1.5rem;
}

.legal-section {
  margin-bottom: 3rem;
}

.legal-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.legal-section p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.legal-list {
  list-style-type: none;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.legal-list li {
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.legal-list li::before {
  content: "•";
  color: var(--accent-cyan);
  font-weight: bold;
  display: inline-block;
  width: 1.2rem;
  margin-left: -1.2rem;
}

/* --- Animations --- */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
  }
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .legal-sidebar {
    display: none; /* Hide TOC on mobile for clean scrolling */
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(7, 10, 19, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 3rem 1.5rem;
    gap: 3rem;
    transition: var(--transition-normal);
    visibility: hidden; /* Prevent horizontal document scroll on mobile Chrome */
  }

  .site-nav.open {
    left: 0;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 2.5rem;
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .hero-actions {
    flex-direction: column;
    padding: 0 2rem;
  }

  .mockup-content {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .newsletter-form {
    flex-direction: column;
    background: none;
    border: none;
    padding: 0;
  }

  .newsletter-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
  }

  .newsletter-form .btn {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}
