/* ==============================
   HEADER / NAVIGATION
   ============================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: var(--space-md) 0;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: var(--space-sm) 0;
}

/* Header Text White on Transparent Dark Backgrounds */
.site-header.header-dark:not(.scrolled) .logo,
.site-header.header-dark:not(.scrolled) .mobile-toggle,
.site-header.header-dark:not(.scrolled) .nav-actions span {
  color: white !important;
}
.site-header.header-dark:not(.scrolled) .logo span {
  color: #c4adee; /* Lighter Purple for Logo Span */
}
.site-header.header-dark:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.9);
}
.site-header.header-dark:not(.scrolled) .nav-links a:hover {
  color: white;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* ==============================
   HERO SECTION
   ============================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px; /* Offset header */
  overflow: hidden;
  background: var(--gradient-bg-soft);
}

/* ==============================
   CUSTOM GLOW BACKGROUND (Hero)
   ============================== */
.hero-dark {
  background: linear-gradient(135deg, #2a0b73 0%, #031538 100%);
  color: white;
}

.hero-bg-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.glow-ring {
  position: absolute;
  border-radius: 50%;
  border: 40px solid rgba(220, 205, 255, 0.35);
  filter: blur(25px);
}

.glow-ring-1 {
  width: 55vw;
  height: 55vw;
  max-width: 600px;
  max-height: 600px;
  top: 50%;
  left: 45%;
  transform: translate(-50%, -50%);
  border-width: 50px;
}

.glow-ring-2 {
  width: 250px;
  height: 250px;
  top: -20px;
  right: -50px;
  border-width: 25px;
}

.glow-sparkle {
  position: absolute;
  bottom: 10%;
  right: 15%;
  width: 30px;
  height: 30px;
  color: rgba(255,255,255,0.6);
}

/* Generalized decorative rings for other sections using a pure CSS 3D Torus */
.decorator-ring {
  position: absolute;
  width: 400px;
  height: 400px;
  background: transparent;
  border-radius: 50%;
  /* Replicate the thick 3D purple torus look with real transparency */
  border: 100px solid rgba(144, 98, 255, 0.6) !important;
  box-shadow: 
    inset 0 0 50px 10px rgba(144, 98, 255, 0.5),
    0 0 80px 20px rgba(144, 98, 255, 0.4);
  filter: blur(15px); /* Soften it up so it feels 3D and out of focus */
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

.decorator-ring-right {
  top: -100px;
  right: -200px;
}

.decorator-ring-left {
  bottom: -150px;
  left: -200px;
}

/* Adjusting Text for Dark Background */
.hero-dark .hero-title {
  color: white;
}

.hero-dark .hero-title span {
  background: linear-gradient(135deg, #bfa8ff 0%, #e8e0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-dark .hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* The hero-content needs a z-index boost */
.hero-dark .hero-content, 
.hero-dark .hero-image-wrapper {
  z-index: 2;
}

.hero-dark .hero-badge {
  background: rgba(255,255,255,0.1);
  color: #dccdff;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-dark .hero-cta .btn-primary {
  background: white;
  color: #2a0b73;
}
.hero-dark .hero-cta .btn-secondary {
  border-color: rgba(255,255,255,0.5);
  color: white;
}
.hero-dark .hero-cta .btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-right: var(--space-2xl);
}

.hero-title {
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  line-height: 1.15;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  opacity: 1; /* GSAP will animate */
}

/* Add a gradient clip to specific words in title if wrapped in span */
.hero-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: nowrap;
}

/* Shrink hero buttons specifically, as requested */
.hero-cta .btn {
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .hero-cta {
    flex-wrap: wrap; /* On very small phones, allow stacking to avoid breaking UI */
  }
}

.hero-image-wrapper {
  position: relative;
  height: 80vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: translateZ(0); /* Hardware accel */
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1); /* For parallax zooming */
}

/* Floating Trust Strip overlay */
.trust-strip {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: white;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  z-index: 3;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  color: var(--color-primary);
}

/* ==============================
   STANDALONE TRUST STRIP
   ============================== */
.standalone-trust {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
}

.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4xl);
  flex-wrap: wrap;
}

/* ==============================
   ABOUT (FLOATING CARD) SECTION
   ============================== */
.about-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
  align-items: center;
  position: relative;
}

.about-image-column img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  object-fit: cover;
  min-height: 500px;
}

.about-floating-card {
  background: white;
  padding: var(--space-3xl);
  border-radius: var(--radius-xl) var(--radius-xl) 60px var(--radius-xl); /* Matches screenshot bottom-right heavy rounding */
  box-shadow: var(--shadow-xl);
  margin-left: -120px; /* Pull it heavily over the image like the screenshot */
  position: relative;
  z-index: 10;
  border-left: 5px solid var(--color-accent);
}

.about-floating-card h2 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  font-size: 2.2rem;
  margin-bottom: var(--space-md);
  margin-top: var(--space-sm);
  line-height: 1.2;
}

.about-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.about-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.about-author strong {
  display: block;
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  font-size: 1.1rem;
}

.about-author span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ==============================
   SERVICES SECTION
   ============================== */
.services-section {
  background: var(--gradient-bg-soft);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-4xl);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--color-border);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(100, 52, 251, 0.3);
}

.service-img-wrapper {
  height: 240px;
  overflow: hidden;
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-card:hover img {
  transform: scale(1.05);
}

.service-content {
  padding: var(--space-xl);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  font-size: 1.5rem;
  color: var(--color-primary-dark);
}

.service-content p {
  flex-grow: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: var(--space-md);
}

.service-link svg {
  transition: transform 0.2s;
}

.service-link:hover {
  color: var(--color-primary);
}

.service-link:hover svg {
  transform: translateX(5px);
}

/* ==============================
   PROCESS (HOW IT WORKS)
   ============================== */
.process-section {
  background: var(--color-primary);
  color: white;
  position: relative;
}

.process-section .section-header h2 {
  color: white;
}
.process-section .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  position: relative;
}

/* Add connecting line */
.process-steps::before {
  content: '';
  position: absolute;
  top: 40px; /* Align with number */
  left: 10%;
  right: 10%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.step-card {
  position: relative;
  z-index: 2;
  text-align: center;
}

.step-number {
  width: 80px;
  height: 80px;
  background: var(--gradient-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-family: var(--font-heading);
  margin: 0 auto var(--space-md);
  box-shadow: 0 0 0 10px var(--color-primary), 0 0 0 11px rgba(255,255,255,0.2);
}

.step-card h3 {
  color: white;
}

.step-card p {
  color: rgba(255, 255, 255, 0.8);
}

/* ==============================
   FEATURE CARDS (Dementia / General)
   ============================== */
.dementia-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

/* First Row (3 equal items) - Each spans 2 out of 6 */
.dementia-grid > .feature-card:nth-child(1),
.dementia-grid > .feature-card:nth-child(2),
.dementia-grid > .feature-card:nth-child(3) { 
  grid-column: span 2; 
}

/* Second Row (2 equal items) - Each spans 3 out of 6 */
.dementia-grid > .feature-card:nth-child(4),
.dementia-grid > .feature-card:nth-child(5) { 
  grid-column: span 3; 
}

.feature-card {
  background: var(--color-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(100, 52, 251, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(100, 52, 251, 0.08);
  color: var(--color-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
}

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

/* ==============================
   REASONS GRID (Why Choose Us)
   ============================== */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

/* ==============================
   CALL TO ACTION (FOOTER CTA)
   ============================== */
.cta-section {
  margin: var(--space-4xl) auto;
  max-width: 1000px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-4xl);
  text-align: center;
  color: white;
  box-shadow: var(--shadow-xl);
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--space-lg);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn-secondary {
  border-color: white;
  color: white;
}

.cta-buttons .btn-secondary:hover {
  background: white;
  color: var(--color-primary);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .about-container {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }
  
  .about-floating-card {
    margin-left: 0;
    margin-top: -80px; /* Pull it up over the image instead of side */
    border-radius: var(--radius-xl);
  }

  .process-steps::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }

  .process-steps,
  .reasons-grid,
  .dementia-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .dementia-grid > .feature-card {
    grid-column: span 1 !important;
  }

  .about-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }

  .cta-section {
    padding: var(--space-2xl);
    border-radius: 0;
  }
}
