/* AgroQuipu360® — Pantalla 2: ¿Por qué existe? */

.why-screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.why-screen.reveal-on-scroll {
  transform: none;
}

.why-screen.reveal-on-scroll:not(.is-visible) {
  opacity: 1;
}

.why-screen__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.why-screen__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.02);
  transition: transform 12s ease-out;
}

.why-screen.is-visible .why-screen__photo {
  transform: scale(1.06);
}

.why-screen__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 50% 48%, rgba(217, 164, 65, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 45%, rgba(15, 23, 32, 0.35) 0%, rgba(15, 23, 32, 0.78) 100%),
    linear-gradient(105deg, rgba(15, 23, 32, 0.82) 0%, rgba(15, 23, 32, 0.45) 38%, rgba(15, 23, 32, 0.55) 68%, rgba(15, 23, 32, 0.88) 100%),
    linear-gradient(0deg, rgba(15, 23, 32, 0.75) 0%, transparent 28%, transparent 72%, rgba(15, 23, 32, 0.85) 100%);
}

.why-screen__stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  --why-panel-w: clamp(220px, 18vw, 300px);
  display: grid;
  grid-template-columns: var(--why-panel-w) minmax(320px, 1fr) var(--why-panel-w);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header header header"
    "copy hub dispersion"
    "foot foot foot";
   gap: clamp(0.5rem, 1.2vw, 1rem);
  align-items: center;
   padding:
    calc(var(--navbar-height) + 0.6rem)
    var(--section-pad-x)
    clamp(0.6rem, 2vh, 1.2rem);
  max-width: 1480px;
  margin: 0 auto;
}

.why-screen__header {
  grid-area: header;
  width: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: clamp(0.2rem, 1vh, 0.8rem);
  padding-bottom: clamp(0.4rem, 1.8vh, 1.2rem);
}

/* ── Izquierda ── */
.why-screen__copy {
  grid-area: copy;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(100%, var(--why-panel-w));
  max-width: min(100%, var(--why-panel-w));
}

.why-screen__title {
  font-size: clamp(2.05rem, 2.8vw, 2.7rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--white-soft);
  text-shadow:
    0 0 28px rgba(217, 164, 65, 0.13),
    0 18px 44px rgba(0, 0, 0, 0.44);
  margin: 0;
  text-wrap: balance;
  max-width: min(100%, 30ch);
}

.why-screen__title-accent {
  display: block;
  padding-top: 0.55em;
  color: var(--harvest-gold);
  white-space: nowrap;
  filter: drop-shadow(0 0 22px rgba(217, 164, 65, 0.22));
}

.why-screen__narrative {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.1rem;
  background: linear-gradient(160deg, rgba(15, 23, 32, 0.42) 0%, rgba(15, 23, 32, 0.38) 100%);
 
  border: 1px solid rgba(217, 164, 65, 0.22);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow-lg),
    0 0 40px rgba(217, 164, 65, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  width: 100%;
}

.why-screen__pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.why-screen__pillars li {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-soft);
  padding: 0.42rem 0.55rem;
  border-left: 2px solid var(--harvest-gold);
  background: linear-gradient(90deg, rgba(217, 164, 65, 0.12) 0%, transparent 100%);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.why-screen__narrative-hook {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(248, 250, 246, 0.92);
  margin: 0;
  letter-spacing: -0.02em;
}

.why-screen__narrative-payoff {
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--harvest-gold);
  letter-spacing: -0.01em;
}

/* ── Centro: hub orbital ── */
.why-hub {
  grid-area: hub;
  position: relative;
  justify-self: center;
  align-self: center;
  width: min(100%, 630px);
  aspect-ratio: 1;
  max-height: min(84vh, 630px);
  overflow: visible;
  z-index: 5;
  container-type: inline-size;
}

.why-hub__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}

.why-hub__center {
  fill: rgba(217, 164, 65, 0.92);
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(217, 164, 65, 0.85));
}

.why-screen.is-visible .why-hub__center {
  animation: whyCenterPulse 2.8s ease-in-out 0.35s infinite;
}

.why-hub__line {
  fill: none;
  stroke: url(#why-line-grad);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(217, 164, 65, 0.3));
}

.why-hub__line--soft {
  stroke-width: 1.08;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(217, 164, 65, 0.18));
}

.why-screen.is-visible .why-hub__lines--primary .why-hub__line {
  animation: whyLineIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.why-screen.is-visible .why-hub__lines--secondary .why-hub__line {
  animation: whyLineInSoft 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.why-screen.is-visible .why-hub__lines--primary .why-hub__line:nth-child(1) { animation-delay: 0.3s; }
.why-screen.is-visible .why-hub__lines--primary .why-hub__line:nth-child(2) { animation-delay: 0.38s; }
.why-screen.is-visible .why-hub__lines--primary .why-hub__line:nth-child(3) { animation-delay: 0.46s; }
.why-screen.is-visible .why-hub__lines--primary .why-hub__line:nth-child(4) { animation-delay: 0.54s; }
.why-screen.is-visible .why-hub__lines--primary .why-hub__line:nth-child(5) { animation-delay: 0.62s; }

.why-screen.is-visible .why-hub__lines--secondary .why-hub__line:nth-child(1) { animation-delay: 0.7s; }
.why-screen.is-visible .why-hub__lines--secondary .why-hub__line:nth-child(2) { animation-delay: 0.76s; }
.why-screen.is-visible .why-hub__lines--secondary .why-hub__line:nth-child(3) { animation-delay: 0.82s; }
.why-screen.is-visible .why-hub__lines--secondary .why-hub__line:nth-child(4) { animation-delay: 0.88s; }
.why-screen.is-visible .why-hub__lines--secondary .why-hub__line:nth-child(5) { animation-delay: 0.94s; }
.why-screen.is-visible .why-hub__lines--secondary .why-hub__line:nth-child(6) { animation-delay: 1s; }

.why-hub__ring {
  fill: none;
  stroke: url(#why-ring-grad);
  opacity: 0;
  transform-origin: 250px 250px;
}

.why-hub__ring--inner {
  stroke-width: 1.55;
}

.why-hub__ring--outer {
  stroke-width: 1.1;
  stroke-dasharray: 5 7;
}

.why-hub__ring--core {
  stroke-width: 2.15;
  opacity: 0;
}

.why-screen.is-visible .why-hub__ring--core {
  animation: whyRingPulse 2.8s ease-in-out 0.35s infinite;
}

.why-screen.is-visible .why-hub__ring--inner,
.why-screen.is-visible .why-hub__ring--outer {
  animation: whyRingPulse 2.8s ease-in-out 0.5s infinite;
}

.why-hub__core {
  position: absolute;
  left: 27%;
  top: 40%;
  z-index: 30;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  width: 46cqw;
  max-width: 100%;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.why-hub__plate {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46cqw;
  height: 46cqw;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(15, 23, 32, 0.74) 0%, rgba(15, 23, 32, 0.52) 54%, rgba(15, 23, 32, 0.2) 70%, transparent 78%);
  border: 2px solid rgba(217, 164, 65, 0.72);
  box-shadow:
    inset 0 0 76px rgba(217, 164, 65, 0.24),
    0 0 0 1px rgba(248, 250, 246, 0.08),
    0 0 94px rgba(217, 164, 65, 0.32),
    0 0 120px rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.why-hub__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66cqw;
  height: 66cqw;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.5) 0%, rgba(47, 122, 74, 0.22) 38%, transparent 66%);
  animation: whyGlowBreath 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.why-hub__brand {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0.15rem 0.35rem;
  line-height: 0.9;
  overflow: visible;
  filter: drop-shadow(0 10px 44px rgba(217, 164, 65, 0.65));
}

.why-hub__brand-line {
  display: block;
  font-weight: 800;
  letter-spacing: -0.035em;
  white-space: nowrap;
  background: linear-gradient(145deg, #fff 0%, var(--harvest-gold) 48%, #e8c878 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(2.06rem, 6.75cqw, 4.06rem);
}

.why-hub__brand-line--mark {
  font-size: clamp(2.44rem, 8cqw, 4.81rem);
  letter-spacing: -0.02em;
}

.why-hub__tag {
  position: relative;
  z-index: 3;
  display: block;
  margin-top: 0.4rem;
  font-size: clamp(0.55rem, 1.6cqw, 0.68rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 250, 246, 0.55);
}

.why-hub__orbit {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  z-index: 6;
}

.why-hub__orbit--primary {
  z-index: 4;
}

.why-hub__orbit--secondary {
  z-index: 3;
}

.why-hub__node {
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;
  z-index: 2;
}

.why-hub__node--primary {
  --orbit-r: 34cqw;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--orbit-r))) rotate(calc(-1 * var(--angle)));
}

.why-hub__node--secondary {
  --orbit-r: 42cqw;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--orbit-r))) rotate(calc(-1 * var(--angle)));
}

.why-screen.is-visible .why-hub__node {
  animation: whyNodeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.18s + var(--i) * 0.06s);
}

.why-hub__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition-fast);
}

.why-hub__badge--primary {
  gap: 0.28rem;
  padding: 0.45rem 0.8rem;
  font-size: clamp(0.58rem, 1.7cqw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 246, 0.82);
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(15, 23, 32, 0.72) 0%, rgba(15, 23, 32, 0.52) 100%);
  backdrop-filter: blur(12px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(12px) saturate(var(--glass-saturate));
  border: 1px solid rgba(217, 164, 65, 0.22);
  border-radius: var(--radius-pill);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0.88;
}

.why-hub__badge--secondary {
  padding: 0.34rem 0.65rem;
   font-size: clamp(0.5rem, 1.45cqw, 0.62rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 250, 246, 0.62);
  white-space: nowrap;
  background: rgba(15, 23, 32, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(248, 250, 246, 0.1);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  opacity: 0.78;
}

.why-hub__icon {
  width: 1rem;
  height:1rem;
  flex-shrink: 0;
  stroke: var(--harvest-gold);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.why-hub__icon path,
.why-hub__icon circle {
  vector-effect: non-scaling-stroke;
}

.why-hub__node--primary:hover .why-hub__badge--primary {
  border-color: rgba(217, 164, 65, 0.32);
  opacity: 0.95;
  transform: scale(1.02);
}

.why-hub__node--secondary:hover .why-hub__badge--secondary {
  border-color: rgba(217, 164, 65, 0.22);
  color: rgba(248, 250, 246, 0.72);
  opacity: 0.88;
}

/* ── Lateral: flujo dispersión ── */
.why-dispersion {
  grid-area: dispersion;
  align-self: center;
  justify-self: center;
  width: min(100%, var(--why-panel-w));
  max-width: min(100%, var(--why-panel-w));
  z-index: 4;
}

.why-dispersion__glass {
  padding: 1.25rem 1.15rem;
  background: linear-gradient(160deg, rgba(15, 23, 32, 0.82) 0%, rgba(15, 23, 32, 0.58) 100%);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid rgba(217, 164, 65, 0.2);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow-lg),
    0 0 36px rgba(217, 164, 65, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.why-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.why-flow::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  bottom: 1.1rem;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(217, 164, 65, 0.35) 8%, rgba(217, 164, 65, 0.35) 92%, transparent);
  pointer-events: none;
}

.why-flow__step {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  padding: 0.45rem 0.65rem;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(248, 250, 246, 0.9);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(248, 250, 246, 0.1);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.why-flow__connector {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 14px;
  margin: 0.1rem 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M5 0v10M2 8l3 4 3-4' fill='none' stroke='%23d9a441' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.85;
  animation: whyArrowPulse 2.4s ease-in-out infinite;
}

.why-flow__connector:nth-of-type(4) { animation-delay: 0.15s; }
.why-flow__connector:nth-of-type(6) { animation-delay: 0.3s; }
.why-flow__connector:nth-of-type(8) { animation-delay: 0.45s; }

.why-flow__connector--accent {
  height: 18px;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(217, 164, 65, 0.35));
}

.why-flow__outcome {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  text-align: center;
  padding: 0.55rem 0.4rem;
}

.why-flow__outcome--dim {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(248, 250, 246, 0.72);
}

.why-flow__outcome--final {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--white-soft);
  background: linear-gradient(180deg, rgba(217, 164, 65, 0.12) 0%, transparent 100%);
  border: 1px solid rgba(217, 164, 65, 0.28);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 24px rgba(217, 164, 65, 0.1);
}

/* ── Abajo ── */
.why-screen__foot {
  grid-area: foot;
  text-align: center;
   padding-top: 0.4rem;
  max-width: 52rem;
  margin: 0 auto;
  width: 100%;
}

.why-screen__closing {
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: rgba(248, 250, 246, 0.92);
  text-wrap: balance;
  padding: 0.65rem 1.2rem;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 32, 0.55) 15%, rgba(15, 23, 32, 0.55) 85%, transparent);
  border-top: 1px solid rgba(217, 164, 65, 0.25);
  border-bottom: 1px solid rgba(217, 164, 65, 0.25);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
}

.why-screen__closing strong {
  font-weight: 800;
  color: var(--harvest-gold);
  text-shadow: 0 0 24px rgba(217, 164, 65, 0.25);
}

.why-rise {
  opacity: 0;
  transform: translateY(20px);
}

.why-screen.is-visible .why-rise {
  animation: whyRise 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.why-screen.is-visible .why-rise--1 { animation-delay: 0.08s; }
.why-screen.is-visible .why-rise--2 { animation-delay: 0.2s; }
.why-screen.is-visible .why-rise--3 { animation-delay: 0.32s; }
.why-screen.is-visible .why-rise--4 { animation-delay: 0.44s; }
.why-screen.is-visible .why-rise--5 { animation-delay: 0.56s; }

@keyframes whyRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes whyLineIn {
  from {
    stroke-dashoffset: 200;
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 0.92;
  }
}

@keyframes whyLineInSoft {
  from {
    stroke-dashoffset: 200;
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 0.58;
  }
}

@keyframes whyRingPulse {
  0%,
  100% {
    opacity: 0.36;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.72;
    transform: scale(1.02);
  }
}

@keyframes whyCenterPulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes whyGlowBreath {
  0%,
  100% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.07);
  }
}

@keyframes whyNodeIn {
  to {
    opacity: 1;
  }
}

@keyframes whyArrowPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .why-screen__photo,
  .why-hub__glow,
  .why-hub__ring,
  .why-flow__connector {
    animation: none !important;
  }

  .why-rise,
  .why-hub__line,
  .why-hub__node {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .why-hub__node--primary {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--orbit-r))) rotate(calc(-1 * var(--angle)));
  }

  .why-hub__node--secondary {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--orbit-r))) rotate(calc(-1 * var(--angle)));
  }
}

@media (max-width: 1100px) {
  .why-screen__stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "copy"
      "hub"
      "dispersion"
      "foot";
    max-width: 720px;
    --why-panel-w: min(100%, 220px);
  }

  .why-screen__copy {
    justify-self: center;
    width: min(100%, 320px);
    max-width: min(100%, 320px);
    text-align: center;
  }

  .why-hub {
    width: min(100%, 520px);
  }

  .why-dispersion {
    justify-self: center;
  }

  .why-screen__foot {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .why-screen__stage {
    padding-top: calc(var(--navbar-height) + 1rem);
    --why-panel-w: min(100%, 220px);
  }

  .why-hub {
    width: min(100%, 340px);
    max-height: none;
  }

  .why-screen__copy {
    width: 100%;
    max-width: 100%;
  }

  .why-screen__title {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .why-hub__brand-line {
    font-size: clamp(1.5rem, 9.4cqw, 2.06rem);
  }

  .why-hub__brand-line--mark {
    font-size: clamp(1.75rem, 10.6cqw, 2.44rem);
  }
}
