/* Phase 2: Why ACEIIIT Section */
.why-section {
  position: relative;
  padding: 3rem 0 0 0;
  background-color: var(--paper);
  z-index: 2;
  min-height: auto;
}

.why-container {
  width: 100%;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.why-intro-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .why-intro-content {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

.why-intro-left {
  max-width: 600px;
}

.why-intro-right {
  max-width: 480px;
  padding-top: 2rem;
}

@media (min-width: 1024px) {
  .why-intro-right {
    padding-top: 3.5rem;
  }
}

.technical-label {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--muted, #8e877d);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
  font-weight: 700;
}

.why-main-statement {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1.1;
  color: var(--ink);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}

.why-main-statement .red-accent {
  color: var(--red);
}

.why-supporting-explanation {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

.contextual-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(20, 17, 15, 0.2);
  padding-bottom: 0.2rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.contextual-link:hover {
  color: var(--red);
  border-color: var(--red);
}

/* Methodology Line */
.methodology-line {
  display: flex;
  align-items: stretch;
  border-top: 1px solid rgba(20, 17, 15, 0.12);
}

.method-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 0 0;
  position: relative;
}

.method-stage:not(:first-child) {
  padding-left: 1.5rem;
}

.stage-number {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.75rem;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.stage-title {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.875rem;
  color: var(--ink);
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.stage-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 200px;
}

/* Proof Element */
.why-proof {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: -1rem;
  margin-bottom: 3rem; /* ensures slight breathing room before the next section */
}

.proof-text {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.7rem;
  color: var(--muted, #8e877d);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}

.proof-link {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.7rem;
  color: var(--ink);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.proof-link:hover {
  color: var(--red);
  transform: translateX(4px);
}

/* Animation classes */
.why-anim-element {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

@media (prefers-reduced-motion: reduce) {
  .why-anim-element {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.why-anim-element.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.05s; }
.delay-2 { transition-delay: 0.15s; }
.delay-3 { transition-delay: 0.25s; }
.delay-4 { transition-delay: 0.35s; }
.delay-5 { transition-delay: 0.45s; }
.delay-6 { transition-delay: 0.55s; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .why-section {
    padding: 3rem 0 3rem 0;
    min-height: auto;
  }
  
  .why-container {
    gap: 3.5rem;
  }
  
  .why-intro-content {
    gap: 2rem;
  }

  .why-intro-right {
    padding-top: 0;
  }
  
  .methodology-line {
    flex-direction: column;
    border-top: none;
  }
  
  .method-stage {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(20, 17, 15, 0.12);
  }
  
  .method-stage:not(:first-child) {
    padding-left: 0;
  }

  .method-stage:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .why-proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 0;
  }
  
  .aceiiit-method-mobile {
    display: block !important;
    position: relative;
    padding-left: 1.5rem;
    margin-top: 2rem;
  }
  
  .vertical-journey-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--red);
    clip-path: inset(0 0 100% 0); /* Hidden by default */
  }
}

.aceiiit-method-mobile {
  display: none;
}

/* Scroll Animation Visualization */
.aceiiit-method {
  position: relative;
  width: 100%;
  margin-top: -10vw; /* Reduced from -14vw to add a bit of breathing room */
  margin-bottom: -6vw;
}
.aceiiit-method__sticky {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}
.aceiiit-method__frame {
  position: relative;
  width: min(96vw, 1500px);
  aspect-ratio: 2171 / 724;
}
.aceiiit-method__frame > img {
  position: absolute;
  top: 0;
  height: 100%;
  display: block;
  object-fit: fill;
}
.aceiiit-method__frame > [data-method-journey] {
  left: 0;
  width: 100%;
  clip-path: inset(0 100% 0 0);
  z-index: 2;
}
.aceiiit-method__frame > [data-method-stage] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.65s cubic-bezier(0.2, 0.75, 0.25, 1), transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1);
  z-index: 3;
}
.aceiiit-method__frame > [data-method-stage].is-visible {
  opacity: 1;
  transform: none;
}
.aceiiit-method__frame > [data-method-stage="1"] { left: 0; width: 23.030861%; }
.aceiiit-method__frame > [data-method-stage="2"] { left: 23.030861%; width: 25.564256%; }
.aceiiit-method__frame > [data-method-stage="3"] { left: 48.595117%; width: 23.952095%; }
.aceiiit-method__frame > [data-method-stage="4"] { left: 72.547213%; width: 11.054813%; }
.aceiiit-method__frame > [data-method-stage="5"] { left: 83.602026%; width: 16.397973%; }

@media (max-width: 768px) {
  .aceiiit-method {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aceiiit-method { height: auto; }
  .aceiiit-method__frame > [data-method-stage] {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }
  .aceiiit-method__frame > [data-method-journey] {
    clip-path: none !important;
  }
}
