/* ============================================================
   HERO · foto real + shot tracer WebGL + HUD tipo TrackMan
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 700px;
  overflow: hidden;
  background: var(--ink-900);
  color: #fff;
  isolation: isolate;
}

.hero__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  touch-action: pan-y;
  will-change: transform;
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
  transform-origin: 0 0;
}

.hero__photo.is-placed {
  inset: auto;
  object-fit: fill;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 20, 13, 0.92) 0%, rgba(10, 30, 20, 0.72) 30%, rgba(11, 30, 21, 0.18) 58%, rgba(11, 30, 21, 0) 72%),
    linear-gradient(180deg, rgba(10, 17, 13, 0.7) 0%, rgba(10, 17, 13, 0) 22%, rgba(10, 17, 13, 0) 62%, rgba(10, 17, 13, 0.85) 100%),
    linear-gradient(0deg, rgba(27, 67, 50, 0.28), rgba(27, 67, 50, 0.28));
}

.hero__inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  padding-top: calc(var(--nav-h) + clamp(18px, 3vh, 36px));
  padding-bottom: clamp(24px, 4vh, 44px);
  pointer-events: none;
}

.hero__inner > * {
  pointer-events: auto;
}

.hero__badge {
  justify-self: start;
}

.hero__copy {
  align-self: end;
  display: grid;
  gap: 22px;
  max-width: min(720px, 54vw);
  padding-bottom: clamp(20px, 4vh, 48px);
}

.hero__copy .tag {
  justify-self: start;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(164, 190, 123, 0.2);
}

.hero__copy .tag::before {
  display: none;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.1rem, 7.4vw, 7.6rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.hero__title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.hero__title .word {
  display: inline-block;
}

.hero__title .word.is-accent {
  color: var(--sage);
}

.hero__text {
  max-width: 48ch;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(242, 245, 239, 0.82);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.hero__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.slides-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.slides-nav__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: background 0.3s;
}

.slides-nav__arrow:hover {
  background: var(--forest-800);
}

.slides-nav__dots {
  display: flex;
  gap: 8px;
}

.slides-nav__dots button {
  position: relative;
  width: 28px;
  height: 22px;
}

.slides-nav__dots button::before,
.slides-nav__dots button span {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}

.slides-nav__dots button::before {
  background: rgba(255, 255, 255, 0.22);
}

.slides-nav__dots button span {
  background: var(--sage);
  transform-origin: left;
  transform: scaleX(0);
}

.slides-nav__dots button[aria-selected='true'] {
  width: 56px;
}

.slides-nav__count {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
}

.hero__hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: opacity 0.6s;
}

.hero__hint.is-done {
  opacity: 0;
}

.hero__hint-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  animation: hint-pulse 1.6s ease-in-out infinite;
}

.hint-touch {
  display: none;
}

.is-touch .hint-desktop {
  display: none;
}

.is-touch .hint-touch {
  display: inline;
}

@keyframes hint-pulse {
  50% {
    transform: scale(0.55);
    opacity: 0.5;
  }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.55);
  transform: translateX(-50%);
}

.hero__scroll i {
  width: 1px;
  height: 36px;
  background: linear-gradient(rgba(255, 255, 255, 0.7), transparent);
  animation: scroll-line 2s var(--ease-in-out) infinite;
  transform-origin: top;
}

@keyframes scroll-line {
  0% {
    transform: scaleY(0);
  }
  50% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  z-index: 4;
  bottom: calc(clamp(24px, 4vh, 44px) + 58px);
  right: var(--gutter);
  width: 288px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(16, 42, 30, 0.72), rgba(5, 11, 7, 0.72));
  border: 1px solid rgba(164, 190, 123, 0.18);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}

.hud__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hud__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sage);
}

.hud__live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 10px var(--sage);
  animation: hint-pulse 1.4s ease-in-out infinite;
}

.hud__shot {
  color: rgba(255, 255, 255, 0.5);
}

.hud__clubs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  margin-bottom: 12px;
}

.hud__clubs button {
  padding: 8px 4px;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  transition: background 0.3s, color 0.3s;
}

.hud__clubs button:hover {
  color: #fff;
}

.hud__clubs button[aria-checked='true'] {
  background: var(--sage);
  color: var(--ink-900);
}

.hud__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(164, 190, 123, 0.12);
}

.hud__metric {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: rgba(8, 18, 12, 0.82);
}

.hud__metric dt {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(233, 245, 219, 0.5);
}

.hud__metric dd {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-display);
}

.hud__metric b {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hud__metric small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(233, 245, 219, 0.45);
}

.hud__metric--main {
  grid-column: 1 / -1;
  background: linear-gradient(120deg, rgba(27, 67, 50, 0.95), rgba(10, 30, 20, 0.95));
}

.hud__metric--main b {
  font-size: 44px;
  line-height: 1;
  color: var(--sage);
}

.hud__metric--main small {
  font-size: 12px;
}

.hud.is-flash .hud__metric--main {
  animation: hud-flash 0.9s var(--ease-out);
}

@keyframes hud-flash {
  from {
    box-shadow: inset 0 0 0 2px var(--sage);
  }
}

/* ---------- Medidor de potencia ---------- */
.power {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s, transform 0.35s var(--ease-out);
}

.power.is-on {
  opacity: 1;
  transform: scale(1);
}

.power svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.power circle {
  fill: none;
  stroke-width: 4;
}

.power__track {
  stroke: rgba(255, 255, 255, 0.18);
}

.power__bar {
  stroke: var(--sage);
  stroke-linecap: round;
  stroke-dasharray: 163.4;
  stroke-dashoffset: 163.4;
  filter: drop-shadow(0 0 6px rgba(164, 190, 123, 0.8));
}

.power__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* ---------- Etiquetas de aterrizaje ---------- */
.tracer-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.tracer-label {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

.tracer-label__tag {
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(10, 17, 13, 0.82);
  border: 1px solid rgba(164, 190, 123, 0.4);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: #fff;
}

.tracer-label__tag b {
  color: var(--sage);
  font-size: 14px;
}

.tracer-label__stem {
  width: 1px;
  height: 18px;
  background: linear-gradient(rgba(164, 190, 123, 0.9), rgba(164, 190, 123, 0));
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hud {
    width: 252px;
  }

  .hud__metric--main b {
    font-size: 36px;
  }
}

@media (max-width: 860px) {
  .hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    padding-bottom: 20px;
  }

  .hero__inner {
    order: 1;
    height: auto;
    grid-template-rows: auto;
    gap: 22px;
    padding-bottom: 22px;
  }

  .hero__copy {
    max-width: none;
    padding-bottom: 0;
    gap: 16px;
  }

  .hero__title {
    font-size: clamp(2.7rem, 13vw, 4.4rem);
  }

  .hero__stage {
    position: relative;
    order: 2;
    inset: auto;
    height: 64svh;
    min-height: 420px;
    margin-inline: var(--gutter);
    border-radius: 26px;
    box-shadow: 0 0 0 1px rgba(164, 190, 123, 0.15);
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(10, 17, 13, 0.35) 0%, rgba(10, 17, 13, 0) 30%, rgba(10, 17, 13, 0) 70%, rgba(10, 17, 13, 0.6) 100%),
      linear-gradient(0deg, rgba(27, 67, 50, 0.2), rgba(27, 67, 50, 0.2));
  }

  .hero__controls {
    order: 3;
  }

  .hud {
    position: relative;
    order: 3;
    top: auto;
    bottom: auto;
    right: auto;
    width: auto;
    margin: 12px var(--gutter) 0;
    padding: 12px;
  }

  .hud__metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .hud__metric--main {
    grid-column: auto;
  }

  .hud__metric--main b,
  .hud__metric b {
    font-size: 20px;
  }

  .hud__metric:nth-child(n + 4) {
    display: none;
  }

  .hero__scroll {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero__ctas .btn {
    flex: 1 1 auto;
  }

  .hero__controls {
    flex-wrap: wrap;
  }
}
