/* ============================================
   HOMEPAGE
   ============================================ */

/* --- Intro / loading screen --- */
#intro-screen {
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#intro-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.intro-logo {
  width: clamp(190px, 30vw, 320px);
  height: auto;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  animation: introLogoIn 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes introLogoIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #intro-screen { transition: none; }
  .intro-logo { animation: none; opacity: 1; transform: none; }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* iOS Safari: exclude collapsing toolbars (fallback above) */
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  will-change: transform;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-poster { z-index: 0; }
.hero-video {
  z-index: 1;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-video.is-loaded { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(59,58,54,0.35) 0%, rgba(59,58,54,0.55) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white-warm);
  /* Anchored to the bottom so the button sits a fixed gap above the scroll
     cue (which is itself bottom-anchored) regardless of viewport height. */
  padding-bottom: 112px;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: var(--space-sm);
  transition-delay: 0.05s;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  color: var(--white-warm);
  font-weight: 400;
}

/* Word-by-word headline reveal */
.hero-headline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-headline.is-animated .word { opacity: 1; transform: translateY(0); }
.hero-headline .word:nth-of-type(1) { transition-delay: 0.15s; }
.hero-headline .word:nth-of-type(2) { transition-delay: 0.32s; }
.hero-headline .word:nth-of-type(3) { transition-delay: 0.55s; }
.hero-headline .word:nth-of-type(4) { transition-delay: 0.72s; }

.hero-sub {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  margin-top: var(--space-sm);
  max-width: 480px;
  opacity: 0.95;
  font-style: italic;
  font-family: var(--font-display);
  transition-delay: 0.25s;
  margin-left: auto;
  margin-right: auto;
}

.hero-content .btn {
  margin-top: var(--space-md);
  transition-delay: 0.35s;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), transparent);
  z-index: 2;
}

.scroll-cue::after {
  content: '';
  position: absolute;
  top: 0;
  left: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--white-warm);
  animation: scrollDown 2.2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: 0; opacity: 1; }
  80% { opacity: 0.4; }
  100% { top: 44px; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue::after { animation: none; top: 20px; }
  .hero-headline .word { opacity: 1; transform: none; transition: none; }
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--charcoal);
  padding: var(--space-lg) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  color: var(--sand);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
}

/* --- Credential Strip --- */
.credential-strip {
  background: var(--white-warm);
  padding: var(--space-md) 0 var(--space-lg);
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}

.credential-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: var(--space-sm);
}

.cred-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  border: 1.5px solid var(--sand);
  border-radius: 100px;
  padding: 8px 18px;
  background: var(--cream);
  transition: border-color var(--transition), color var(--transition);
}

.cred-badge:hover {
  border-color: var(--sage);
  color: var(--sage-deep);
}

/* --- Why We Exist --- */
.why-exist {
  background: var(--white-warm);
}

.narrow-text {
  max-width: 760px;
  text-align: center;
}

.narrow-text h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: var(--space-sm) 0;
}

.lede {
  font-size: 1.15rem;
  color: var(--charcoal-soft);
  margin-top: var(--space-sm);
  text-wrap: pretty;
}

.eyebrow.center { text-align: center; display: block; }
h2.center { text-align: center; }
.center { text-align: center; }

/* --- How We Help preview --- */
.how-we-help-preview {
  padding-top: calc(var(--space-xl) + var(--space-sm));
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.help-card {
  text-align: center;
  padding: var(--space-md);
  background: var(--white-warm);
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.help-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(59,58,54,0.08);
}

.help-icon {
  margin-bottom: var(--space-sm);
  color: var(--sage-deep);
  display: flex;
  justify-content: center;
}

.help-card h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.help-card p {
  color: var(--charcoal-soft);
  font-size: 0.98rem;
}

/* --- Meet Founders --- */
.meet-founders {
  background: var(--white-warm);
}

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

.founders-image {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  min-width: 0; /* same grid-overflow guard as .hero-split-image in inner-pages.css */
}

.founders-text { text-align: center; }

.founders-text .eyebrow { margin-bottom: var(--space-xs); }

.founders-text h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  margin-bottom: var(--space-sm);
}

.founders-text p {
  color: var(--charcoal-soft);
  margin-bottom: var(--space-sm);
}

.text-link {
  font-weight: 600;
  color: var(--sage-deep);
  display: inline-block;
  margin-top: 8px;
  transition: opacity var(--transition);
}

.text-link:hover { opacity: 0.7; }

/* --- Asha Method (signature element) --- */
.asha-method {
  background: var(--sand);
  position: relative;
}

.asha-method h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: var(--space-lg);
}

.method-path {
  position: relative;
  margin-top: var(--space-lg);
}

/* Wave overlays the top band; dots sit on it, text starts below at a shared height */
.method-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  display: block;
}

.method-line path {
  fill: none;
  stroke: var(--sage-deep);
  stroke-width: 2;
  stroke-dasharray: 6 8;
  stroke-linecap: round;
  opacity: 0.55;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
  position: relative;
  padding-top: 70px;
}

.method-step {
  text-align: center;
  padding: 0 8px;
  position: relative;
}

.method-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sage-deep);
  position: absolute;
  left: 50%;
  top: calc(var(--dot-y, 35px) - 70px);
  transform: translate(-50%, -50%);
}

.method-step:nth-child(1) .method-dot { --dot-y: 46px; }
.method-step:nth-child(2) .method-dot { --dot-y: 26px; }
.method-step:nth-child(3) .method-dot { --dot-y: 39px; }
.method-step:nth-child(4) .method-dot { --dot-y: 35px; }
.method-step:nth-child(5) .method-dot { --dot-y: 29px; }

.method-dot::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--sage-deep);
  opacity: 0.35;
}

.method-step h4 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.method-step p {
  font-size: 0.88rem;
  color: var(--charcoal-soft);
}

/* --- Testimonials --- */
.testimonials {
  background: var(--white-warm);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.testimonial-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  position: relative;
  text-align: center;
}

.testimonial-card p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--charcoal);
}

.testimonial-card cite {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--sage-deep);
  font-weight: 600;
}

.testimonial-note {
  text-align: center;
  margin-top: var(--space-md);
  color: var(--charcoal-soft);
  font-size: 0.9rem;
  font-style: italic;
}

/* --- Final CTA --- */
.final-cta {
  background: var(--charcoal);
  color: var(--white-warm);
  padding: var(--space-xl) 0;
}

/* CTA and footer are both charcoal — on small screens their stacked paddings
   read as one huge dead band, so trim the CTA's share. */
@media (max-width: 700px) {
  .final-cta { padding: var(--space-lg) 0; }
}

.final-cta h2 {
  color: var(--white-warm);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: var(--space-md);
}

/* --- Name Meaning — Orbit Word Effect --- */
.name-meaning {
  padding-bottom: 0;
  margin-bottom: calc(-1 * var(--space-lg));
}

.orbit-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  margin-top: var(--space-xl);
  gap: 0;
}

.orbit-divider {
  width: 1px;
  height: 100%;
  min-height: 300px;
  background: linear-gradient(180deg, transparent 0%, var(--sage-deep) 30%, var(--sage-deep) 70%, transparent 100%);
  opacity: 0.3;
  margin: 0 var(--space-lg);
  align-self: stretch;
}

.orbit-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) 0;
}

.orbit-center {
  position: relative;
  width: 320px;
  height: 280px;
  margin-bottom: var(--space-md);
}

.orbit-script,
.orbit-name {
  font-family: var(--font-display);
  color: var(--sage-deep);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
}

/* Devanagari ghost cross-fades into the English name every 4s */
.orbit-script {
  font-size: clamp(5rem, 10vw, 8rem);
  opacity: 0.2;
  animation: orbit-glyph-script 8s ease-in-out infinite;
}

.orbit-name {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-style: italic;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: orbit-glyph-name 8s ease-in-out infinite;
}

@keyframes orbit-glyph-script {
  0%, 42% { opacity: 0.2; }
  50%, 92% { opacity: 0; }
  100% { opacity: 0.2; }
}

@keyframes orbit-glyph-name {
  0%, 42% { opacity: 0; }
  50%, 92% { opacity: 0.2; }
  100% { opacity: 0; }
}

.orbit-word {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  font-style: italic;
  color: var(--sage-deep);
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 100px;
  padding: 5px 14px;
  white-space: nowrap;
  --orbit-radius: 130px;
  transform:
    translate(-50%, -50%)
    rotate(var(--angle, 0deg))
    translate(var(--orbit-radius))
    rotate(calc(-1 * var(--angle, 0deg)));
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.orbit-panel.is-visible .orbit-word {
  opacity: 1;
  animation: orbit-revolve 46s linear infinite;
}

/* Revolve by animating the full transform (universally supported, unlike
   @property custom-property animation, which older iOS/Firefox lack).
   Both endpoints share the same function list, so it interpolates smoothly
   and the counter-rotation keeps each pill upright. */
@keyframes orbit-revolve {
  from {
    transform:
      translate(-50%, -50%)
      rotate(var(--angle, 0deg))
      translate(var(--orbit-radius))
      rotate(calc(-1 * var(--angle, 0deg)));
  }
  to {
    transform:
      translate(-50%, -50%)
      rotate(calc(var(--angle, 0deg) + 360deg))
      translate(var(--orbit-radius))
      rotate(calc(-1 * (var(--angle, 0deg) + 360deg)));
  }
}

.orbit-definition {
  text-align: center;
  max-width: 280px;
}

@media (prefers-reduced-motion: reduce) {
  .orbit-word { transition: none; }
  .orbit-panel.is-visible .orbit-word { opacity: 1; animation: none; }
  .orbit-script { animation: none; opacity: 0.2; }
  .orbit-name { display: none; }
}

@media (max-width: 760px) {
  .orbit-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  .orbit-divider {
    width: 60px;
    height: 1px;
    min-height: unset;
    background: linear-gradient(90deg, transparent, var(--sage-deep), transparent);
    margin: 0 auto;
  }
  .orbit-center { width: 280px; height: 240px; }
  .orbit-word { --orbit-radius: 100px; }
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .founders-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .founders-image { aspect-ratio: 16/10; }
  .help-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .method-steps { grid-template-columns: repeat(5, 1fr); gap: 4px; padding-top: 0; }
  .method-step h4 { font-size: 1.05rem; }
  .method-step p { display: none; }
  .method-line { display: none; }
  .method-dot {
    /* relative (not static) so the ::after halo ring keeps anchoring to the
       14px dot — static made it anchor to the whole step, drawing a huge oval */
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto var(--space-sm);
  }
}

@media (max-width: 560px) {
  .method-steps { grid-template-columns: 1fr; gap: var(--space-sm); text-align: left; }
  .method-step { display: flex; align-items: flex-start; gap: 14px; text-align: left; }
  .method-dot { margin: 6px 0 0; flex-shrink: 0; }
  .method-step p { display: block; }
}
