/* ============================================
   LOGICPIXELS — COMPONENTS CSS (v3 FIXED)
   ============================================ */

/* ========== LOADER ========== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
}

.loader-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.loader-logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 4px;
  animation: loaderFill 1.5s var(--ease-out) forwards;
}

@keyframes loaderFill {
  to {
    width: 100%;
  }
}

/* ========== CUSTOM CURSOR ========== */
#cursorDot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
}

#cursorRing {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99997;
  transition: transform 0.15s var(--ease-out), width 0.3s, height 0.3s, border-color 0.3s;
  transform: translate(-50%, -50%);
}

.cursor-hover #cursorRing {
  width: 56px;
  height: 56px;
  border-color: var(--accent-light);
}

@media (pointer: coarse) {

  #cursorDot,
  #cursorRing {
    display: none;
  }
}

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
  /* Default: transparent (for homepage hero) */
  background: transparent;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- Logo ---- */
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  /* default: white for dark hero */
  z-index: 1001;
  transition: color 0.4s;
}

.nav-logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Nav links ---- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  /* default: light for dark hero */
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s var(--ease-out);
  border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
  color: white;
}

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

/* ---- CTA button ---- */
.nav-cta {
  padding: 10px 24px;
  background: var(--gradient-primary);
  color: white !important;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* ---- SCROLLED state (homepage) ---- */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo {
  color: var(--text-primary);
}

#navbar.scrolled .nav-link {
  color: var(--text-secondary);
}

#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.active {
  color: var(--accent);
}

#navbar.scrolled .hamburger span {
  background: var(--text-primary);
}

/* ===== INNER PAGES: always white navbar ===== */
body.inner-page #navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06) !important;
}

body.inner-page .nav-logo {
  color: var(--text-primary) !important;
}

body.inner-page .nav-link {
  color: var(--text-secondary) !important;
}

body.inner-page .nav-link:hover,
body.inner-page .nav-link.active {
  color: var(--accent) !important;
}

body.inner-page .hamburger span {
  background: var(--text-primary) !important;
}

/* ========== HAMBURGER ========== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1002;
  position: relative;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  /* default for dark hero */
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
  position: absolute;
}

.hamburger span:nth-child(1) {
  transform: translateY(-7px);
}

.hamburger span:nth-child(2) {
  transform: translateY(0);
}

.hamburger span:nth-child(3) {
  transform: translateY(7px);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(0);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(0);
}

/* ========== MOBILE MENU ========== */
#mobileOverlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

#mobileOverlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-link {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.3s;
  padding: 8px 0;
}

.mobile-link:hover {
  color: var(--accent);
}

.mobile-cta {
  margin-top: 16px;
  padding: 14px 36px;
  background: var(--gradient-primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ========== PAGE HERO (inner pages) ========== */
.page-hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  background: var(--gradient-bg);
  overflow: hidden;
}

.page-hero .bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-hero .section-label,
.page-hero h1,
.page-hero p {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========== GLASS CARD ========== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-glow);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

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

/* ========== FAQ ACCORDION ========== */
.faq-section {
  padding: var(--section-padding) 0;
}

.faq-section .section-header {
  text-align: center;
  margin-bottom: 60px;
}

.faq-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  transition: color 0.3s;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-tertiary);
  transition: transform 0.3s var(--ease-out), color 0.3s;
  margin-left: 16px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out);
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 24px;
}

.faq-answer p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ========== FOOTER ========== */
.footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.8);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand .footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.footer-brand .footer-logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-3px);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.3s, padding-left 0.3s;
}

.footer-col ul li a:hover {
  color: var(--accent-light);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --section-padding: 80px;
    --nav-height: 70px;
  }

  .container {
    padding: 0 16px;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .page-hero {
    padding: 60px 0 40px;
  }

  .page-hero h1 {
    font-size: 2rem;
  }
}