/* ==========================================
   STRATEGY (Cómo pienso)
   ========================================== */
.strategy-section {
  position: relative;
  isolation: isolate;
  background: var(--darker-green);
  color: var(--white);
  padding: clamp(84px, 11vw, 150px) 0;
  overflow: hidden;
}

.strat-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 56% at 90% 66%, rgba(198, 221, 83, 0.17) 0%, rgba(198, 221, 83, 0) 70%),
    radial-gradient(60% 60% at 0% 100%, rgba(4, 68, 52, 0.85) 0%, rgba(4, 68, 52, 0) 72%),
    linear-gradient(180deg, #010c05 0%, #02160f 55%, #010c05 100%);
}

.strat-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.28;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  1.6 0 0 0 -0.55'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 260px 260px;
}

.strat-head {
  max-width: 780px;
  margin-bottom: clamp(44px, 6vw, 84px);
}

.strat-heading {
  font-size: clamp(36px, 5.4vw, 76px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 10px 0 24px;
}

.strat-lead {
  max-width: 36em;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
}

.strat-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
}

/* ---------- Questions ---------- */
.strat-item {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.strat-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.strat-tab {
  position: relative;
  display: block;
  width: 100%;
  padding: 26px 0 24px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.strat-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.strat-q {
  display: block;
  font-size: clamp(25px, 2.9vw, 42px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.4s ease;
}

.strat-tab:hover .strat-q {
  color: rgba(255, 255, 255, 0.78);
}

.strat-item.is-active .strat-q {
  color: var(--white);
}

.strat-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.strat-item.is-active .strat-progress {
  transform: scaleX(1);
}

.strategy-section.is-playing .strat-item.is-active .strat-progress {
  animation: stratFill var(--strat-dur, 7s) linear forwards;
}

.strategy-section.is-paused .strat-item.is-active .strat-progress {
  animation-play-state: paused;
}

@keyframes stratFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.strat-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.6s;
}

.strat-item.is-active .strat-panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}

.strat-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.strat-panel p {
  max-width: 30em;
  padding: 4px 0 18px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
}

.strat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 28px;
  list-style: none;
}

.strat-chips li {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(198, 221, 83, 0.35);
  background: rgba(198, 221, 83, 0.08);
  font-size: 14px;
  color: #e4f1a2;
}

/* ---------- Wireframe ---------- */
.strat-wire {
  position: relative;
  padding: 18px 0 60px;
}

.strat-browser {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.strat-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.strat-chrome i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.strat-url {
  flex: 1;
  height: 20px;
  margin-left: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.strat-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.strat-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 12px;
}

.strat-nav b {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
}

.strat-nav span {
  width: 44px;
  height: 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.28);
}

.strat-nav em {
  margin-left: auto;
  width: 70px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.strat-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: stretch;
}

.strat-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.strat-copy {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border-radius: 14px;
}

.strat-copy .ln {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
}

.strat-copy .ln-a { height: 16px; }
.strat-copy .short { width: 62%; }
.strat-copy .ln-b { height: 7px; background: rgba(255, 255, 255, 0.3); }
.strat-copy .mid { width: 78%; }

.strat-btn {
  position: relative;
  align-self: flex-start;
  width: 128px;
  height: 36px;
  margin-left: 14px;
  border-radius: 999px;
  background: var(--accent);
}

.strat-btn span {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--darker-green);
}

.strat-btn::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 14px;
  width: 52px;
  height: 8px;
  border-radius: 6px;
  background: rgba(1, 12, 5, 0.55);
}

.strat-btn.is-lit::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  animation: stratPing 1.9s ease-out infinite;
}

@keyframes stratPing {
  0% { transform: scale(0.94); opacity: 0.9; }
  100% { transform: scale(1.16, 1.5); opacity: 0; }
}

.strat-img {
  min-height: 160px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 36% 30%, #dcee74 0%, #8fc54e 36%, #1f6b45 70%, #0a3a2c 100%);
}

.strat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0;
  border-radius: 14px;
}

.strat-cards > div:not(.strat-note) {
  height: 66px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.strat-cards > div:first-child {
  background: rgba(198, 221, 83, 0.18);
  border-color: rgba(198, 221, 83, 0.35);
}

.strat-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
}

.strat-foot span {
  flex: 1;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.strat-foot em {
  width: 90px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.strat-wire [data-lit] {
  position: relative;
  outline: 1.5px solid transparent;
  outline-offset: 4px;
  transition: opacity 0.5s ease, box-shadow 0.5s ease, outline-color 0.5s ease;
}

.strat-wire [data-lit]:not(.is-lit) {
  opacity: 0.36;
}

.strat-wire [data-lit].is-lit {
  outline-color: rgba(198, 221, 83, 0.9);
  box-shadow: 0 0 0 7px rgba(198, 221, 83, 0.07), 0 0 36px rgba(198, 221, 83, 0.22);
}

/* ---------- Notes ---------- */
.strat-note {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 28, 20, 0.62);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(1, 12, 5, 0.35);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  translate: 0 10px;
  pointer-events: none;
  transition: opacity 0.5s ease, translate 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.strat-note::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
  rotate: 45deg;
  flex-shrink: 0;
}

.strat-note.is-on {
  opacity: 1;
  translate: 0 0;
}

.strat-note.n-left { left: 12px; top: -17px; }
.strat-note.n-right { right: 12px; top: -17px; }
.strat-note.n-side { left: calc(100% + 18px); top: 50%; margin-top: -20px; }

.strat-metric {
  position: absolute;
  z-index: 3;
  right: -16px;
  bottom: 0;
  width: min(210px, 52%);
  padding: 14px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 28, 20, 0.7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(1, 12, 5, 0.4);
  opacity: 0;
  translate: 0 14px;
  pointer-events: none;
  transition: opacity 0.5s ease, translate 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.strat-metric.is-on {
  opacity: 1;
  translate: 0 0;
}

.strat-metric-label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.strat-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 62px;
}

.strat-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--accent), rgba(198, 221, 83, 0.25));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.strat-metric.is-on .strat-bars i { transform: scaleY(1); }
.strat-metric.is-on .strat-bars i:nth-child(2) { transition-delay: 70ms; }
.strat-metric.is-on .strat-bars i:nth-child(3) { transition-delay: 140ms; }
.strat-metric.is-on .strat-bars i:nth-child(4) { transition-delay: 210ms; }
.strat-metric.is-on .strat-bars i:nth-child(5) { transition-delay: 280ms; }
.strat-metric.is-on .strat-bars i:nth-child(6) { transition-delay: 350ms; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .strat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .strat-wire {
    padding-top: 6px;
  }

  .strat-metric { right: 8px; }
}

@media (max-width: 520px) {
  .strat-page { padding: 12px; gap: 12px; }
  .strat-img { min-height: 120px; }
  .strat-cards > div:not(.strat-note) { height: 50px; }
  .strat-note { font-size: 12px; padding: 7px 12px 7px 10px; }
  .strat-panel p { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .strat-btn.is-lit::after,
  .strategy-section.is-playing .strat-item.is-active .strat-progress {
    animation: none !important;
  }

  .strat-wire [data-lit],
  .strat-note,
  .strat-metric,
  .strat-bars i,
  .strat-panel {
    transition: none !important;
  }
}
