/* ============================================
   Circuit Swarm - Custom Styles
   Material Design Inspired + Bootstrap
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --cs-primary: #0D47A1;
  --cs-primary-light: #1565C0;
  --cs-primary-dark: #0A2F6B;
  --cs-accent: #00E5FF;
  --cs-accent-warm: #FF6D00;
  --cs-surface: #FAFBFF;
  --cs-surface-alt: #F0F4FF;
  --cs-text: #1A1A2E;
  --cs-text-muted: #5A6178;
  --cs-white: #FFFFFF;
  --cs-border: #E0E6F0;
  --cs-shadow-sm: 0 1px 3px rgba(13,71,161,0.08), 0 1px 2px rgba(13,71,161,0.06);
  --cs-shadow-md: 0 4px 16px rgba(13,71,161,0.10), 0 2px 6px rgba(13,71,161,0.06);
  --cs-shadow-lg: 0 12px 40px rgba(13,71,161,0.12), 0 4px 12px rgba(13,71,161,0.08);
  --cs-shadow-xl: 0 20px 60px rgba(13,71,161,0.15), 0 8px 20px rgba(13,71,161,0.10);
  --cs-radius: 12px;
  --cs-radius-lg: 20px;
  --cs-transition: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--cs-text);
  background: var(--cs-surface);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--cs-text);
}

/* ---- Navbar ---- */
.cs-navbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--cs-border);
  padding: 0.6rem 0;
  transition: all 0.3s var(--cs-transition);
  z-index: 1000;
}

.cs-navbar.scrolled {
  box-shadow: var(--cs-shadow-md);
}

.cs-navbar .navbar-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--cs-primary) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.cs-navbar .navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--cs-primary), var(--cs-accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,229,255,0.3);
}

.cs-navbar .nav-link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--cs-text-muted) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.25s var(--cs-transition);
  position: relative;
}

.cs-navbar .nav-link:hover,
.cs-navbar .nav-link.active {
  color: var(--cs-primary) !important;
  background: var(--cs-surface-alt);
}

.cs-navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--cs-primary);
  border-radius: 2px;
}

.navbar-toggler {
  border: none !important;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  background: var(--cs-surface-alt) !important;
}

.navbar-toggler:focus {
  box-shadow: none !important;
}

/* ---- Hero Section ---- */
.cs-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: linear-gradient(165deg, var(--cs-primary-dark) 0%, var(--cs-primary) 45%, var(--cs-primary-light) 100%);
  overflow: hidden;
}

.cs-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(0,229,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,229,255,0.1) 0%, transparent 40%),
    radial-gradient(circle at 60% 60%, rgba(255,109,0,0.06) 0%, transparent 30%);
  z-index: 1;
}

.cs-hero .circuit-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
}

.cs-hero .hero-content {
  position: relative;
  z-index: 2;
}

.cs-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--cs-white);
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.cs-hero h1 .accent {
  color: var(--cs-accent);
}

.cs-hero .hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.cs-hero .hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.2), transparent 70%);
  top: -100px;
  right: -100px;
  z-index: 1;
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

/* ---- Buttons ---- */
.btn-cs-primary {
  background: var(--cs-accent);
  color: var(--cs-primary-dark) !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0,229,255,0.35);
  transition: all 0.3s var(--cs-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cs-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,229,255,0.45);
  background: #33EDFF;
  color: var(--cs-primary-dark) !important;
}

.btn-cs-outline {
  background: transparent;
  color: var(--cs-white) !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  transition: all 0.3s var(--cs-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cs-outline:hover {
  border-color: var(--cs-white);
  background: rgba(255,255,255,0.1);
  color: var(--cs-white) !important;
}

.btn-cs-secondary {
  background: var(--cs-primary);
  color: var(--cs-white) !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 50px;
  box-shadow: var(--cs-shadow-md);
  transition: all 0.3s var(--cs-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cs-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--cs-shadow-lg);
  background: var(--cs-primary-light);
  color: var(--cs-white) !important;
}

/* ---- Section Styles ---- */
.cs-section {
  padding: 5rem 0;
}

.cs-section-sm {
  padding: 3.5rem 0;
}

.cs-section-alt {
  background: var(--cs-surface-alt);
}

.cs-section-dark {
  background: linear-gradient(165deg, var(--cs-primary-dark), var(--cs-primary));
  color: var(--cs-white);
}

.cs-section-dark h2,
.cs-section-dark h3,
.cs-section-dark h4 {
  color: var(--cs-white);
}

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cs-primary);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--cs-accent);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--cs-text-muted);
  max-width: 600px;
  line-height: 1.8;
}

/* ---- Cards ---- */
.cs-card {
  background: var(--cs-white);
  border-radius: var(--cs-radius-lg);
  border: 1px solid var(--cs-border);
  padding: 2rem;
  transition: all 0.35s var(--cs-transition);
  height: 100%;
}

.cs-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cs-shadow-lg);
  border-color: transparent;
}

.cs-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  background: var(--cs-surface-alt);
  color: var(--cs-primary);
}

.cs-card h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

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

/* ---- Stats ---- */
.stat-item {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--cs-accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* ---- Page Header ---- */
.cs-page-header {
  background: linear-gradient(165deg, var(--cs-primary-dark), var(--cs-primary) 60%, var(--cs-primary-light));
  padding: 7rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.cs-page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 50%, rgba(0,229,255,0.1) 0%, transparent 50%);
}

.cs-page-header .circuit-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 60px 60px;
}

.cs-page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--cs-white);
  position: relative;
  z-index: 2;
}

.cs-page-header p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.cs-breadcrumb {
  position: relative;
  z-index: 2;
  margin-bottom: 1rem;
}

.cs-breadcrumb a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.cs-breadcrumb a:hover {
  color: var(--cs-accent);
}

.cs-breadcrumb span {
  color: rgba(255,255,255,0.4);
  margin: 0 0.4rem;
  font-size: 0.8rem;
}

.cs-breadcrumb .current {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---- Contact Info ---- */
.contact-info-card {
  background: var(--cs-white);
  border-radius: var(--cs-radius-lg);
  border: 1px solid var(--cs-border);
  padding: 2.5rem;
  height: 100%;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-item .icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: var(--cs-surface-alt);
  color: var(--cs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-info-item h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cs-text-muted);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.contact-info-item p,
.contact-info-item a {
  color: var(--cs-text);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.6;
}

.contact-info-item a:hover {
  color: var(--cs-primary);
}

/* Contact Form */
.cs-form .form-control {
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  padding: 0.85rem 1.1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: var(--cs-white);
  transition: all 0.25s var(--cs-transition);
}

.cs-form .form-control:focus {
  border-color: var(--cs-primary);
  box-shadow: 0 0 0 3px rgba(13,71,161,0.1);
}

.cs-form .form-label {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--cs-text);
  margin-bottom: 0.4rem;
}

/* ---- Product Feature ---- */
.product-feature {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.product-feature .feature-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: var(--cs-surface-alt);
  color: var(--cs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.product-feature p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--cs-text-muted);
}

.product-feature strong {
  color: var(--cs-text);
}

/* ---- Product Mockup ---- */
.product-mockup {
  background: linear-gradient(145deg, var(--cs-primary), var(--cs-primary-light));
  border-radius: var(--cs-radius-lg);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--cs-shadow-xl);
}

.product-mockup::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 70%, rgba(0,229,255,0.2) 0%, transparent 60%);
}

.phone-mockup {
  width: 220px;
  height: 440px;
  background: #111;
  border-radius: 36px;
  border: 3px solid #333;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.phone-screen {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: linear-gradient(180deg, #0D47A1 0%, #1565C0 50%, #0A2F6B 100%);
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.phone-screen .app-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--cs-accent), #00B8D4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0,229,255,0.4);
}

.phone-screen .app-icon i {
  font-size: 1.8rem;
  color: white;
}

.phone-screen .app-name {
  color: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
}

.phone-screen .app-tagline {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

/* ---- About Timeline ---- */
.about-story {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--cs-border);
}

.about-story .story-point {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.about-story .story-point:last-child {
  margin-bottom: 0;
}

.about-story .story-point::before {
  content: '';
  position: absolute;
  left: -2.55rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cs-primary);
  border: 3px solid var(--cs-surface);
  box-shadow: 0 0 0 2px var(--cs-primary);
}

.about-story .story-point h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--cs-primary);
}

.about-story .story-point p {
  color: var(--cs-text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ---- Legal Pages ---- */
.legal-content {
  background: var(--cs-white);
  border-radius: var(--cs-radius-lg);
  border: 1px solid var(--cs-border);
  padding: 3rem;
}

.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--cs-primary);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--cs-text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-content ul {
  color: var(--cs-text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ul li {
  margin-bottom: 0.4rem;
}

.legal-date {
  font-size: 0.85rem;
  color: var(--cs-text-muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--cs-border);
  margin-bottom: 2rem;
}

/* ---- Footer ---- */
.cs-footer {
  background: var(--cs-primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 0;
}

.cs-footer h5 {
  color: var(--cs-white);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.cs-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  display: block;
  margin-bottom: 0.5rem;
}

.cs-footer a:hover {
  color: var(--cs-accent);
}

.cs-footer p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--cs-white) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
  margin-top: 3rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* ---- Animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s var(--cs-transition);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .cs-hero {
    min-height: 70vh;
    padding: 6rem 0 4rem;
  }

  .cs-section {
    padding: 3.5rem 0;
  }

  .legal-content {
    padding: 2rem 1.5rem;
  }

  .phone-mockup {
    width: 180px;
    height: 360px;
  }
}

@media (max-width: 767.98px) {
  .cs-hero {
    min-height: auto;
    padding: 5rem 0 3.5rem;
    text-align: center;
  }

  .cs-hero .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .cs-hero .hero-buttons {
    justify-content: center;
  }

  .cs-page-header {
    padding: 6rem 0 3rem;
    text-align: center;
  }

  .cs-page-header p {
    margin-left: auto;
    margin-right: auto;
  }

  .cs-breadcrumb {
    justify-content: center;
  }

  .section-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .product-mockup {
    padding: 2rem;
    margin-top: 2rem;
  }

  .stat-item {
    padding: 1rem 0.5rem;
  }

  .contact-info-card {
    padding: 1.5rem;
  }

  .about-story {
    padding-left: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .cs-navbar .navbar-brand {
    font-size: 1.2rem;
  }

  .btn-cs-primary,
  .btn-cs-outline,
  .btn-cs-secondary {
    padding: 0.65rem 1.5rem;
    font-size: 0.88rem;
  }

  .legal-content {
    padding: 1.5rem 1rem;
  }
}
