/* Front-end SASS for RedSignal */
:root {
  --rs-red: #d32f2f;
  --rs-red-dark: #b71c1c;
  --rs-red-light: #ff6659;
  --rs-bg-dark: #0f1115;
  --rs-bg-card: #181b21;
  --rs-text-main: #ffffff;
  --rs-text-muted: #9ca3af;
  --rs-hero-gradient-start: #2a1a1a;
}

[data-theme=light] {
  --rs-bg-dark: #f8f9fa;
  --rs-bg-card: #ffffff;
  --rs-text-main: #212529;
  --rs-text-muted: #6c757d;
  --rs-hero-gradient-start: #ffffff;
  /* Override Bootstrap Dark Utilities */
  /* Fix accordion arrow in light mode */
  /* Code blocks should stay dark usually, or we invert them too? Let's keep them dark for contrast but fix surrounding card */
  /* CTA Section Light Mode */
}
[data-theme=light] .bg-dark, [data-theme=light] .bg-darker {
  background-color: var(--rs-bg-dark) !important;
}
[data-theme=light] .bg-black {
  background-color: #000 !important; /* Keep black strictly black usually, or adjust if needed */
}
[data-theme=light] .text-white {
  color: var(--rs-text-main) !important;
}
[data-theme=light] .text-white-50 {
  color: var(--rs-text-muted) !important;
}
[data-theme=light] .border-secondary {
  border-color: #dee2e6 !important; /* Bootstrap border-color */
}
[data-theme=light] .accordion-button::after {
  filter: none !important;
}
[data-theme=light] .code-block {
  background-color: #f8f9fa !important;
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--rs-text-main);
}
[data-theme=light] .cta-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

body {
  background-color: var(--rs-bg-dark);
  color: var(--rs-text-main);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
.animate-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, var(--rs-hero-gradient-start) 0%, var(--rs-bg-dark) 70%);
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 0%, #d1d5db 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme=light] .hero-title {
  background: linear-gradient(135deg, #212529 0%, #495057 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--rs-text-muted);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto 40px;
}

.btn-primary-rs {
  background: linear-gradient(135deg, var(--rs-red) 0%, var(--rs-red-dark) 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.btn-primary-rs:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(211, 47, 47, 0.4);
  color: white;
}

.btn-outline-rs {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

[data-theme=light] .btn-outline-rs {
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--rs-text-main);
}

.btn-outline-rs:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

[data-theme=light] .btn-outline-rs:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
  color: var(--rs-text-main);
}

/* Cards & Features */
.feature-card {
  background: var(--rs-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 40px 30px;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-theme=light] .feature-card {
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(211, 47, 47, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

[data-theme=light] .feature-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.icon-box {
  width: 60px;
  height: 60px;
  background: rgba(211, 47, 47, 0.1);
  color: var(--rs-red);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.feature-card:hover .icon-box {
  background: var(--rs-red);
  color: white;
}

h3.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

p.card-text {
  color: var(--rs-text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Technical Highlight Section */
.tech-section {
  padding: 100px 0;
  background: #131519;
}

[data-theme=light] .tech-section {
  background: #f1f3f5;
}

.code-block {
  background: #000;
  border-radius: 12px;
  padding: 44px 24px 24px 24px;
  font-family: "Monaco", "Consolas", monospace;
  font-size: 14px;
  color: #a9b7c6;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.code-block::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
}

/* Steps */
.step-item {
  position: relative;
  padding-left: 30px;
}

.step-number {
  font-size: 48px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  position: absolute;
  top: -20px;
  left: 0;
  z-index: 0;
}

[data-theme=light] .step-number {
  color: rgba(0, 0, 0, 0.05);
}

.step-content {
  position: relative;
  z-index: 1;
}

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--rs-red-dark) 0%, #8a1212 100%);
  padding: 100px 0;
  text-align: center;
}

/* Utilities */
.text-gradient {
  background: linear-gradient(90deg, #ff6659 0%, #d32f2f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rs-text-muted);
  margin-bottom: 20px;
  display: inline-block;
}

[data-theme=light] .badge-pill {
  background: rgba(0, 0, 0, 0.05);
}

/* Accordion Overrides */
.accordion-item {
  background-color: var(--rs-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--rs-text-main);
}

[data-theme=light] .accordion-item {
  border-color: rgba(0, 0, 0, 0.05);
}

.accordion-button {
  background-color: var(--rs-bg-card);
  color: var(--rs-text-main);
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  background-color: rgba(211, 47, 47, 0.1); /* Red tint */
  color: #ff6659;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}

.accordion-button::after {
  filter: invert(1);
  transition: all 0.3s ease;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25);
  border-color: var(--rs-red);
}

/* Fix Bootstrap text-muted for dark mode */
.text-muted {
  color: var(--rs-text-muted) !important;
}

/* Decorative Glow Class */
.glow-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: rgba(211, 47, 47, 0.05);
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
}

[data-theme=light] .glow-decoration {
  opacity: 0.5; /* Tone it down further on light background */
}

/* Sections Migrated from Inline */
.section-live-activities {
  background: radial-gradient(circle at 90% 50%, #1c1c2e 0%, var(--rs-bg-dark) 80%);
}

[data-theme=light] .section-live-activities {
  background: radial-gradient(circle at 90% 50%, #e9ecef 0%, var(--rs-bg-dark) 80%);
}

.section-analytics {
  background: linear-gradient(180deg, #131519 0%, #0f1115 100%);
}

[data-theme=light] .section-analytics {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

.section-privacy {
  background-color: #0b0c10;
}

[data-theme=light] .section-privacy {
  background-color: #e9ecef;
}

.footer-minimal {
  background: #0f1115;
}

[data-theme=light] .footer-minimal {
  background: #f8f9fa;
}

/* Mock Device Styles */
.mock-device-wrapper {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme=light] .mock-device-wrapper {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

.mock-device {
  width: 280px;
  height: 500px;
  position: relative;
  overflow: hidden;
}

.mock-modal {
  z-index: 10;
}

.mock-overlay {
  z-index: 5;
}

/* Analytics Graph Bars */
.analytics-bar-container {
  height: 40px;
}

/* Brand Logo */
.brand-logo {
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.brand-logo .brand-red {
  color: #dc3545;
}
.brand-logo .brand-text {
  color: var(--rs-text-main);
}
