/* ===================================
   Runsun Case - Main Stylesheet
   =================================== */

:root {
  --brand-red: #C22D2D;
  --brand-dark: #1A1A2E;
  --brand-accent: #F5A623;
  --brand-gray: #F8F9FA;
  --brand-gray-mid: #E9ECEF;
  --brand-text: #333333;
}

/* --- Global Resets & Base Styles --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--brand-text);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
}

.font-data {
  font-family: 'JetBrains Mono', monospace;
}

/* --- Section Padding Responsive --- */
.section-padding {
  padding: 2.5rem 1rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding: 6rem 4rem;
  }
}

/* --- Mobile Compact Styles --- */
@media (max-width: 767px) {
  /* Smaller headings on mobile */
  h2 {
    font-size: 1.5rem !important;
    line-height: 1.3;
  }

  /* Reduce spacing between heading and content */
  .section-padding h2 + p {
    margin-bottom: 1.5rem !important;
    font-size: 0.875rem !important;
  }

  /* Compact buttons on mobile */
  .btn-primary, .btn-secondary {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }

  /* Compact stats grid in hero */
  .font-data {
    font-size: 1.5rem !important;
  }

  /* Compact product card text area */
  #products .p-6,
  #blog .p-6 {
    padding: 0.75rem !important;
  }

  #products .p-6 h3,
  #blog .p-6 h3 {
    font-size: 0.8rem !important;
    margin-bottom: 0.25rem !important;
  }

  #products .p-6 p,
  #blog .p-6 p {
    font-size: 0.7rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3;
  }

  #products .p-6 a {
    font-size: 0.7rem !important;
  }

  /* Compact Best Sellers cards */
  #bestsellers .min-w-\[280px\] {
    min-width: 220px !important;
    max-width: 240px !important;
  }

  #bestsellers .p-4 {
    padding: 0.5rem !important;
  }

  #bestsellers .p-4 h3 {
    font-size: 0.8rem !important;
  }

  /* Compact Best Sellers subtitle */
  #bestsellers p.text-lg {
    font-size: 0.8rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Compact OEM/ODM section */
  #oem-odm .mb-16 {
    margin-bottom: 2rem !important;
  }

  #oem-odm .gap-8 {
    gap: 1.25rem !important;
  }

  /* Compact About section */
  #about .gap-12 {
    gap: 1.5rem !important;
  }

  #about .mb-12 {
    margin-bottom: 1.5rem !important;
  }

  #about .text-lg {
    font-size: 0.875rem !important;
  }

  #about .space-y-3 > * + * {
    margin-top: 0.5rem !important;
  }

  #about .grid.grid-cols-2 .p-6 {
    padding: 0.75rem !important;
  }

  /* Compact Certifications */
  #certifications .gap-6 {
    gap: 0.75rem !important;
  }

  #certifications .p-6 {
    padding: 0.75rem !important;
  }

  #certifications .w-24 {
    width: 3.5rem !important;
    height: 3.5rem !important;
  }

  #certifications .mb-12 {
    margin-bottom: 1.5rem !important;
  }

  /* Compact Testimonials */
  #clients .mb-12 {
    margin-bottom: 1.5rem !important;
  }

  #clients .mb-16 {
    margin-bottom: 1.5rem !important;
  }

  #clients .gap-8 {
    gap: 1rem !important;
  }

  #clients .p-8 {
    padding: 1rem !important;
  }

  /* Compact Factory section */
  #factory .mb-12 {
    margin-bottom: 1.5rem !important;
  }

  #factory .gap-4 {
    gap: 0.5rem !important;
  }

  #factory .h-48 {
    height: 8rem !important;
  }

  /* Compact Blog */
  #blog .mb-12 {
    margin-bottom: 1.5rem !important;
  }

  #blog .gap-8 {
    gap: 1rem !important;
  }

  /* Compact Contact */
  #contact .mb-12 {
    margin-bottom: 1.5rem !important;
  }

  #contact .gap-12 {
    gap: 1.5rem !important;
  }

  /* Footer compact */
  footer {
    padding-top: 2rem !important;
    padding-bottom: 1.5rem !important;
  }

  footer .grid {
    gap: 1.5rem !important;
  }

  footer .mb-12 {
    margin-bottom: 1.5rem !important;
  }
}

/* --- Button Styles --- */
.btn-primary {
  background-color: var(--brand-red);
  color: white;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #a02424;
}

.btn-secondary {
  border: 2px solid white;
  color: white;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--brand-dark);
}

/* --- Noise Texture Overlay for Dark Sections --- */
.noise-texture {
  position: relative;
}

.noise-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1;
}

.noise-texture > * {
  position: relative;
  z-index: 2;
}

/* --- Radial Gradient Glow for Dark Sections --- */
.dark-glow {
  position: relative;
}

.dark-glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(194, 45, 45, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.dark-glow > * {
  position: relative;
  z-index: 2;
}

/* --- Section Divider --- */
.section-divider-top {
  position: relative;
}

.section-divider-top::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--brand-red) 20%, var(--brand-accent) 50%, var(--brand-red) 80%, transparent 100%);
  opacity: 0.6;
}

/* --- Step Circle Glow --- */
.step-glow {
  box-shadow: 0 0 20px rgba(194, 45, 45, 0.4), 0 0 40px rgba(194, 45, 45, 0.1);
}

/* --- Card Hover Micro-interaction --- */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}
