/* ========================================
   Day Night - Custom Styles
   Bootstrap 5 + Custom CSS
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #020618;
  --bg-mid: #0f172b;
  --bg-card: rgba(255, 255, 255, 0.02);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #d1d5dc;
  --text-muted: #99a1af;
  --gradient-start: #FF2056;
  --gradient-end: #FF6900;
  --gradient-text-start: #FF6384;
  --gradient-text-end: #FF9100;
  --radius-sm: 14px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 48px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --header-height: 64px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Utility ---------- */
.main-container {
  max-width: 1151px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--gradient-text-start), var(--gradient-text-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-gradient {
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  color: var(--text-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  padding: 10px 21px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-gradient:hover {
  opacity: 0.92;
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-outline-custom {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  padding: 10px 28px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-outline-custom:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ---------- Header ---------- */
#site-header {
  background: rgba(10, 11, 26, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1030;
}

#site-header .navbar {
  padding: 0;
  min-height: var(--header-height);
}

#site-header .main-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.75rem;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link-custom {
  color: var(--text-secondary) !important;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 0.5rem 0.75rem !important;
  transition: color 0.3s ease;
}

.nav-link-custom:hover {
  color: var(--text-primary) !important;
}

.btn-get-started {
  padding: 10px 21px;
  white-space: nowrap;
}

/* ---------- Hero Section ---------- */
.hero-section {
  padding: 64px 0 80px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-mid) 50%, var(--bg-primary) 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 70px;
  padding: 9px 17px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.badge-icon {
  font-size: 1rem;
  color: var(--gradient-text-start);
}

.hero-title {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 672px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.btn-hero-primary {
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 400;
}

.btn-hero-secondary {
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 400;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 25px 10px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 2.25rem;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: var(--text-muted);
}

/* ---------- Features Section ---------- */
.features-section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  /* max-width: 672px; */
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 33px;
  min-height: 266px;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-light);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 99, 132, 0.15), rgba(255, 145, 0, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--gradient-text-start);
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-desc {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Community Section ---------- */
.community-section {
  padding: 80px 0;
}

.community-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  transition: border-color 0.4s ease;
}

.community-card:hover {
  border-color: var(--border-light);
}

.community-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 99, 132, 0.15), rgba(255, 145, 0, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--gradient-text-start);
  margin: 0 auto 1.5rem;
}

.community-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 8.6px 14.8px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.tag-badge:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ---------- CTA Section ---------- */
.cta-section {
  padding: 80px 0;
}

.cta-title {
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  max-width: 896px;
  margin-left: auto;
  margin-right: auto;
}

.cta-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 582px;
  margin: 0 auto 2.5rem;
}

.btn-cta {
  padding: 16px 65px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 48px;
}

.footer-about {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: var(--text-muted);
  max-width: 248px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-divider {
  border-color: var(--border-subtle);
  opacity: 1;
}

.footer-copy {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: var(--text-muted);
  padding: 2rem 0;
}

/* ---------- Responsive ---------- */

/* ---- XL: 1200px+ ---- */
@media (min-width: 1200px) {
  .hero-section {
    padding: 96px 0;
  }

  .features-section,
  .community-section,
  .cta-section {
    padding: 80px 0;
  }

  .main-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ---- LG: 992px–1199px (tablets landscape / small laptops) ---- */
@media (max-width: 1199.98px) {
  .main-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
  }
}

/* ---- MD: 768px–991px (tablets portrait) ---- */
@media (max-width: 991.98px) {
  .main-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Header */
  #site-header .main-container {
    padding-top: 8px;
    padding-bottom: 8px;
    flex-wrap: wrap;
  }

  .navbar-collapse {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 8px;
  }

  .navbar-nav {
    margin-bottom: 0.75rem;
  }

  .btn-get-started {
    width: 100%;
    margin-top: 0.25rem;
    text-align: center;
    justify-content: center;
  }

  /* Hero */
  .hero-section {
    padding: 48px 0 64px;
  }

  .hero-badge {
    margin-bottom: 40px;
  }

  .hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    gap: 0.75rem;
    margin-bottom: 3rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  /* Sections */
  .features-section,
  .community-section,
  .cta-section {
    padding: 64px 0;
  }

  .section-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  }

  /* Community */
  .community-card {
    padding: 40px 32px;
  }

  /* CTA */
  .cta-title {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
  }

  /* Footer */
  .footer-about {
    max-width: 100%;
  }
}

/* ---- SM: 576px–767px (large phones / small tablets) ---- */
@media (max-width: 767.98px) {
  .main-container {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }

  /* Hero */
  .hero-section {
    padding: 40px 0 56px;
  }

  .hero-badge {
    margin-bottom: 32px;
    font-size: 0.8125rem;
    padding: 8px 15px;
    gap: 10px;
  }

  .hero-title {
    font-size: clamp(2rem, 6vw, 2.75rem);
    margin-bottom: 1.25rem;
  }

  .hero-subtitle {
    font-size: 0.9375rem;
    margin-bottom: 2rem;
  }

  .hero-buttons {
    margin-bottom: 2.5rem;
    gap: 0.75rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    padding: 14px 24px;
    font-size: 0.9375rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 20px 10px;
  }

  .stat-value {
    font-size: 1.625rem;
  }

  .stat-label {
    font-size: 0.8125rem;
  }

  /* Features */
  .feature-card {
    min-height: auto;
    padding: 28px;
  }

  /* Community */
  .community-card {
    padding: 36px 24px;
  }

  .community-tags {
    gap: 0.625rem;
  }

  /* CTA */
  .cta-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }

  .cta-subtitle {
    font-size: 0.9375rem;
  }

  .btn-cta {
    padding: 14px 48px;
  }

  /* Footer */
  .footer-about {
    max-width: 100%;
  }

  .footer-heading {
    margin-top: 0.5rem;
  }
}

/* ---- XS: max 575px (mobile phones) ---- */
@media (max-width: 575.98px) {
  .main-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Hero */
  .hero-section {
    padding: 32px 0 48px;
  }

  .hero-badge {
    margin-bottom: 28px;
    font-size: 0.8rem;
    padding: 7px 14px;
    gap: 8px;
  }

  .hero-title {
    font-size: clamp(1.875rem, 7.5vw, 2.5rem);
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 2rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 320px;
    padding: 14px 20px;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .stat-card {
    padding: 18px 8px;
    border-radius: var(--radius-md);
  }

  .stat-value {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.375rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  /* Sections */
  .features-section,
  .community-section,
  .cta-section {
    padding: 48px 0;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 1.875rem);
    line-height: 1.3;
  }

  .section-subtitle {
    font-size: 0.9375rem;
  }

  /* Feature cards */
  .feature-card {
    min-height: auto;
    padding: 22px;
  }

  .feature-title {
    font-size: 1.0625rem;
  }

  .feature-desc {
    font-size: 0.9375rem;
  }

  /* Community */
  .community-card {
    padding: 28px 16px;
    border-radius: var(--radius-md);
  }

  .community-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }

  .community-tags {
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .tag-badge {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  /* CTA */
  .cta-title {
    font-size: clamp(1.625rem, 6.5vw, 2.25rem);
    line-height: 1.25;
  }

  .cta-subtitle {
    font-size: 0.9375rem;
    margin-bottom: 2rem;
  }

  .btn-cta {
    width: 100%;
    max-width: 280px;
    padding: 14px 32px;
  }

  /* Footer */
  .site-footer {
    padding-top: 36px;
  }

  .footer-about {
    max-width: 100%;
    margin-bottom: 0.5rem;
  }

  .footer-copy {
    padding: 1.5rem 0;
    font-size: 0.8125rem;
  }
}

/* ---- 2XS: max 359px (small phones like SE 1st gen) ---- */
@media (max-width: 359.98px) {
  .main-container {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .stat-value {
    font-size: 1.375rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    max-width: 100%;
  }

  .btn-cta {
    max-width: 100%;
  }

  .feature-card {
    padding: 18px;
  }

  .community-card {
    padding: 24px 14px;
  }

  .section-title {
    font-size: 1.375rem;
  }
}

/* ---------- Navbar Brand Overflow Guard ---------- */
.navbar-brand {
  flex-shrink: 0;
  min-width: 0;
  max-width: 60%;
}

.navbar-brand img {
  display: block;
  height: 32px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* ---------- Touch / Hover Devices ---------- */
@media (hover: none) {
  .feature-card:hover,
  .stat-card:hover,
  .tag-badge:hover,
  .community-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-subtle);
  }
}

/* ---------- Footer Column Fix (mobile) ---------- */
@media (max-width: 575.98px) {
  .site-footer .row > [class*="col-6"] {
    width: 50%;
  }

  .site-footer .col-12 {
    width: 100%;
    margin-bottom: 1.5rem;
  }
}

/* ---------- Prevent horizontal scroll ---------- */
.hero-section,
.features-section,
.community-section,
.cta-section,
.site-footer {
  overflow-x: hidden;
}

/* ---------- GSAP Initial States ---------- */
.gsap-fade-up {
  opacity: 0;
  transform: translateY(30px);
}

.gsap-fade-in {
  opacity: 0;
}

.gsap-scale-in {
  opacity: 0;
  transform: scale(0.9);
}

.gsap-slide-left {
  opacity: 0;
  transform: translateX(-40px);
}

.gsap-slide-right {
  opacity: 0;
  transform: translateX(40px);
}

/* ---------- Animated Background Glow ---------- */
.hero-section::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 99, 132, 0.08) 0%, rgba(255, 145, 0, 0.04) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-section > .container {
  position: relative;
  z-index: 1;
}

/* ---------- Smooth Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(255, 99, 132, 0.3);
  color: var(--text-primary);
}