/* ==========================================================================
   UP AL — Why UP AL
   Editorial two-column layout rather than a feature-card grid: a sticky
   question on one side, an ordered, numbered answer list on the other.
   The numerals are rendered permanently in the CTA's chrome gradient — a
   constant, quiet brand mark rather than a hover trick — so the section
   reads as authored, not templated.
   ========================================================================== */

.why {
  position: relative;
  padding-block: var(--space-10);
  scroll-margin-top: var(--header-height);
  border-top: 1px solid var(--color-border-soft);
  /* Safety net for the sticky column below: even if its computed sticky
     range were ever miscalculated (e.g. by a grid/browser quirk), it can
     never paint past this section's own box into the next section. */
  overflow: hidden;
  overflow: clip;
}

/* Ambient light source — sits behind the two-column content, never a
   visible shape, just depth. Content above is lifted onto its own stack
   level so it always paints above the orb regardless of DOM order. */

.why__orb {
  width: 620px;
  height: 620px;
  inset-inline-end: -240px;
  top: -140px;
  background: radial-gradient(circle, rgba(158, 207, 247, 0.13), transparent 70%);
  opacity: 0.8;
}

.why__inner,
.why__cta {
  position: relative;
  z-index: 1;
}

.why__inner {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: var(--space-10);
  align-items: start;
}

/* ---------- Intro (sticky question) ---------- */

.why__intro {
  position: sticky;
  top: calc(var(--header-height) + var(--space-8));
  padding-inline-start: var(--space-6);
}

.why__intro::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.35em;
  bottom: 0.35em;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-accent) 45%, transparent);
  opacity: 0.4;
}

.why__heading {
  font-size: var(--fs-h2);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  color: var(--color-text-primary);
  text-wrap: balance;
  margin-block-end: var(--space-5);
}

.why__lead {
  font-size: var(--fs-lead);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
  max-width: 36ch;
}

/* ---------- Answer list ---------- */

.why__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
}

.why__item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding-block: var(--space-7);
  border-top: 1px solid var(--color-border);
  transition: border-color var(--duration-base) var(--ease-premium);
}

.why__item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.why__item:hover,
.why__item:focus-within {
  border-top-color: var(--color-border-strong);
}

.why__item::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background-color: var(--color-accent);
  opacity: 0.8;
  transform: scaleX(0);
  transform-origin: right center;
  box-shadow: 0 0 0 rgba(158, 207, 247, 0);
  transition: transform var(--duration-base) var(--ease-premium), box-shadow var(--duration-base) var(--ease-premium);
}

.why__item:hover::after,
.why__item:focus-within::after {
  transform: scaleX(1);
  box-shadow: var(--glow-underline);
}

/* Numeral — a permanent, signature mark in the CTA's chrome material,
   not a plain digit. A thin accent tick beneath it grows in on hover,
   echoing the underline/gloss-line motif used across the header and CTA. */

.why__index {
  position: relative;
  flex: none;
  min-width: 2.6ch;
  font-size: clamp(2rem, 1.7rem + 1.4vw, 2.75rem);
  font-weight: var(--fw-extrabold);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  transition: transform var(--duration-slow) var(--ease-premium), filter var(--duration-slow) var(--ease-premium);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .why__index {
    background: var(--gradient-chrome);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .why__item:hover .why__index,
  .why__item:focus-within .why__index {
    background: var(--gradient-chrome-hover);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.why__item:hover .why__index,
.why__item:focus-within .why__index {
  transform: scale(1.06);
  filter: drop-shadow(0 6px 16px rgba(158, 207, 247, 0.32));
}

.why__index::after {
  content: "";
  position: absolute;
  inset-inline-start: 0.1ch;
  bottom: -0.3em;
  width: 1.5ch;
  height: 2px;
  background-color: var(--color-accent);
  opacity: 0.4;
  transform: scaleX(0.55);
  transform-origin: center;
  transition: opacity var(--duration-slow) var(--ease-premium), transform var(--duration-slow) var(--ease-premium);
}

.why__item:hover .why__index::after,
.why__item:focus-within .why__index::after {
  opacity: 1;
  transform: scaleX(1);
}

.why__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.why__title {
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  line-height: var(--lh-snug);
}

.why__desc {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
  max-width: 52ch;
}

/* ---------- Bottom CTA ----------
   Quiet continuation of the section, not a second banner: a line of text
   and a text-link with an animated underline + arrow, deliberately lighter
   than the chrome hero CTA. */

.why__cta {
  margin-block-start: var(--space-8);
  padding-block-start: var(--space-7);
  border-top: 1px solid var(--color-border-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}

.why__cta-text {
  font-size: var(--fs-lead);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  color: var(--color-text-secondary);
  margin: 0;
}

.why__cta-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-1);
  font-size: 1.0625rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-premium);
}

.why__cta-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 1px;
  background-color: var(--color-text-primary);
  transform: scaleX(0.4);
  transform-origin: right center;
  transition: transform var(--duration-base) var(--ease-premium), background-color var(--duration-base) var(--ease-premium);
}

.why__cta-arrow {
  transition: transform var(--duration-base) var(--ease-premium);
}

.why__cta-link:hover,
.why__cta-link:focus-visible {
  color: var(--color-accent);
}

.why__cta-link:hover::after,
.why__cta-link:focus-visible::after {
  transform: scaleX(1);
  background-color: var(--color-accent);
}

.why__cta-link:hover .why__cta-arrow,
.why__cta-link:focus-visible .why__cta-arrow {
  transform: translateX(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .why__cta-link:hover .why__cta-arrow,
  .why__cta-link:focus-visible .why__cta-arrow {
    transform: none;
  }
}

/* ---------- Scroll reveal stagger ----------
   The shared [data-reveal] base rule (and its reduced-motion override)
   lives in base.css, since it's used sitewide, not just here. */

.why__list .why__item:nth-child(1) { transition-delay: 20ms; }
.why__list .why__item:nth-child(2) { transition-delay: 60ms; }
.why__list .why__item:nth-child(3) { transition-delay: 100ms; }
.why__list .why__item:nth-child(4) { transition-delay: 140ms; }
.why__cta[data-reveal] { transition-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .why__item:hover .why__index,
  .why__item:focus-within .why__index {
    transform: none;
    filter: none;
  }
}

/* ---------- Breakpoints ---------- */

@media (max-width: 900px) {
  .why__inner {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }

  .why__intro {
    position: static;
    padding-inline-start: var(--space-5);
  }
}

@media (max-width: 560px) {
  .why {
    padding-block: var(--space-8);
  }

  .why__item {
    gap: var(--space-3);
    padding-block: var(--space-5);
  }

  .why__index {
    font-size: 1.75rem;
  }

  .why__title {
    font-size: 1.125rem;
  }
}
