/* =========================================================
   HERO
   Fondo + iconos flotantes, logo centrado, CTAs, contador
   y redes sociales. Requiere las variables de :root definidas
   en style.min.css (--gold, --gold-light, --gold-dark,
   --brown, --brown-dark, --gold-glow).
   ========================================================= */

.hero {
  background-color: #000;
  background-image: none;
  box-shadow: inset 0 -20px 14px 10px #000;
  overflow: hidden;
  position: relative;
}

/* ---------- ก้อนหินจาก bg เดิม ตกลงมาวนลูป ---------- */

.hero-meteors {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.hero-meteor {
  --x: 50%;
  --delay: 0s;
  --dur: 6s;
  --drift: -18vw;
  --rot: 18deg;
  --size: 120px;
  animation: heroRockFall var(--dur) linear infinite;
  animation-delay: var(--delay);
  filter:
    drop-shadow(0 0 10px rgba(255, 140, 40, 0.45))
    drop-shadow(0 0 22px rgba(255, 100, 20, 0.28));
  height: auto;
  left: var(--x);
  opacity: 0;
  position: absolute;
  top: -18%;
  transform: rotate(var(--rot));
  width: var(--size);
  will-change: transform, opacity;
}

@keyframes heroRockFall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--rot)) scale(0.85);
  }
  8% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 130vh, 0) rotate(calc(var(--rot) + 48deg)) scale(1.05);
  }
}

@media (max-width: 767px) {
  .hero-meteor {
    opacity: 0.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-meteor {
    animation: none;
    opacity: 0;
  }
}

/* ---------- สไลด์ตัวละครอาชีพ (ขวา) ---------- */

.hero-cast {
  bottom: 0;
  height: 100%;
  max-width: 820px;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  width: min(54vw, 820px);
  z-index: 1;
}

.hero-cast-glow {
  background:
    radial-gradient(ellipse 55% 70% at 68% 48%, rgba(255, 140, 40, 0.38), transparent 70%),
    radial-gradient(ellipse 40% 50% at 72% 55%, rgba(255, 200, 80, 0.2), transparent 72%);
  filter: blur(2px);
  inset: 8% 0 6% 18%;
  position: absolute;
  z-index: 0;
}

.hero-cast-stage {
  height: 100%;
  position: relative;
  width: 100%;
  z-index: 1;
}

.hero-cast-stage img {
  filter:
    drop-shadow(0 0 18px rgba(255, 150, 40, 0.35))
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.65));
  height: 100%;
  left: 0;
  object-fit: contain;
  object-position: 78% 58%;
  opacity: 0;
  position: absolute;
  top: 0;
  transform: translateX(28px) scale(0.98);
  transition:
    opacity .9s ease,
    transform 1.1s ease;
  width: 100%;
  will-change: opacity, transform;
}

.hero-cast-stage img.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-cast-stage img.is-leaving {
  opacity: 0;
  transform: translateX(-22px) scale(1.02);
}

/* ---------- ข้อมูลอาชีพ (จาก S3) เปลี่ยนตามสไลด์ตัวละคร ---------- */

.hero-class-stats {
  color: #fff;
  font-family: Kanit, Tahoma, sans-serif;
  margin: 28px auto 0;
  max-width: 500px;
  pointer-events: none;
  text-align: left;
  text-shadow: 0 2px 8px #000, 0 0 12px rgba(0, 0, 0, 0.8);
  width: 100%;
}

.hero-class-stats.is-swap .ths-name,
.hero-class-stats.is-swap .ths-sub,
.hero-class-stats.is-swap .ths-buff {
  animation: thsFadeIn 0.45s ease;
}

.ths-name {
  color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ths-sub {
  color: #d8d8d8;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.6px;
  line-height: 1.3;
  overflow: hidden;
  padding-top: 6px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ths-buff {
  color: #9ad7ff;
  font-size: 0.75rem;
  line-height: 1.35;
  min-height: 1.35em;
  overflow: hidden;
  padding: 10px 0 16px;
  text-transform: uppercase;
}

.ths-row {
  color: #eee;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  overflow: hidden;
  padding: 0 0 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ths-row span {
  display: inline-block;
  vertical-align: middle;
  width: 78px;
}

.ths-track {
  background: rgba(255, 255, 255, 0.18);
  display: inline-block;
  height: 6px;
  margin-left: 6px;
  overflow: hidden;
  vertical-align: middle;
  width: min(380px, calc(100% - 90px));
}

.ths-track b {
  background: #fff;
  box-shadow: 0 0 8px rgba(200, 230, 255, 0.85);
  display: block;
  height: 6px;
  transition: width 0.45s ease;
  width: 0;
}

@keyframes thsFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  .hero-class-stats {
    margin-top: 20px;
    max-width: 100%;
  }

  .ths-name {
    font-size: 1.25rem;
  }

  .ths-row span {
    width: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-class-stats.is-swap .ths-name,
  .hero-class-stats.is-swap .ths-sub,
  .hero-class-stats.is-swap .ths-buff {
    animation: none;
  }

  .ths-track b {
    transition: none;
  }
}

@media (max-width: 991px) {
  .hero-cast {
    max-width: 560px;
    opacity: .92;
    width: min(62vw, 560px);
  }
}

@media (max-width: 767px) {
  .hero-cast {
    max-width: none;
    opacity: .55;
    width: 78vw;
  }

  .hero-cast-stage img {
    object-position: 85% 62%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cast-stage img {
    transition: opacity .35s ease;
    transform: none !important;
  }
}

/* ---------- iconos flotantes (parallax) ---------- */

.parallax-layer {
  height: 100%;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 1;
}

.floating-item {
  animation-name: heroFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  position: absolute;
  will-change: transform;
}

/* recorrido más orgánico: deriva en varias direcciones, no solo sube/baja */
@keyframes heroFloat {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(6px, -16px) rotate(4deg);
  }
  50% {
    transform: translate(-5px, -26px) rotate(-3deg);
  }
  75% {
    transform: translate(-9px, -10px) rotate(3deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* cada ícono con su propia velocidad y arranque para que no se muevan
   todos en espejo al mismo tiempo */
.chaos {
  animation-duration: 7.5s;
  animation-delay: 0s;
  left: 5%;
  top: 15%;
  width: 80px;
}

.feather {
  animation-duration: 5.8s;
  animation-delay: .9s;
  left: 45%;
  top: 10%;
  transform: rotate(15deg);
  width: 60px;
}

.life {
  animation-duration: 8.4s;
  animation-delay: 1.7s;
  bottom: 20%;
  left: 10%;
  width: 90px;
}

.eye {
  animation-duration: 6.6s;
  animation-delay: .4s;
  left: 25%;
  opacity: .8;
  top: 5%;
  width: 50px;
}

.soul {
  animation-duration: 7.1s;
  animation-delay: 1.3s;
  bottom: 15%;
  left: 40%;
  width: 70px;
}

/* ---------- contenido central ---------- */

.hero .hero-content {
  align-items: center;
  background:
    radial-gradient(45% 55% at 50% 42%, rgba(0, 0, 0, .32), transparent 72%),
    linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, transparent 18%, transparent 78%, rgba(0, 0, 0, .55) 100%);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 2;
  /* spacer only — real content is fixed to the viewport */
  pointer-events: none;
}

.hero .hero-inner {
  /* จัดขอบบนให้สูงเท่าแผงอันดับเทพ (top: 50% - ครึ่งความสูงแผง) */
  --hero-align-top: min(39vh, 360px, calc((100vh - 120px) / 2));
  --hero-sink: 0px;
  align-items: center;
  background: transparent;
  color: #f8f9fa;
  display: flex;
  flex-direction: column;
  font-family: Metropolis-bold, sans-serif;
  left: 50%;
  max-width: min(720px, calc(100vw - 48px));
  padding: 0 48px 32px;
  pointer-events: auto;
  position: fixed;
  text-align: center;
  top: calc(50% - var(--hero-align-top));
  transform: translate(-50%, var(--hero-sink));
  width: min(720px, calc(100vw - 48px));
  will-change: opacity, transform;
  z-index: 20;
}

.hero .hero-inner.is-scroll-hidden {
  pointer-events: none !important;
  visibility: hidden;
}

.hero .hero-inner.container {
  margin-left: 0;
  margin-right: 0;
}

/* ---------- logo ---------- */

.hero-logo-text {
  animation: heroLogoFadeIn 1s ease-out;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35));
  height: auto;
  margin-inline: auto;
  max-width: 600px;
  width: 100%;
}

@keyframes heroLogoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Online Now ---------- */

.hero-status {
  align-items: center;
  animation: heroLogoFadeIn 1s ease-out .1s both;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(221, 171, 94, .3);
  border-radius: 999px;
  display: inline-flex;
  gap: 11px;
  margin-top: 26px;
  padding: 10px 24px;
}

.hero-status-dot {
  background: #3ddc73;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(61, 220, 115, .55);
  display: inline-block;
  flex-shrink: 0;
  height: 9px;
  width: 9px;
  animation: heroStatusPulse 1.8s ease-out infinite;
}

@keyframes heroStatusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(61, 220, 115, .55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(61, 220, 115, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(61, 220, 115, 0);
  }
}

.hero-status-text {
  color: #c2c8d4;
  font-family: 'Play', sans-serif;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero-status-value {
  color: var(--gold-light);
  font-family: Cinzel, serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-shadow: 0 0 10px var(--gold-glow);
}

/* ---------- botones (estilo Valorant, en dorado) ---------- */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-block: 34px 8px;
  width: 100%;
}

.hero .hero-content .btn-hero {
  align-items: center;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  display: inline-flex;
  flex: 1 1 0;
  font-family: Cinzel, serif;
  font-size: .92rem;
  font-weight: 700;
  gap: 12px;
  isolation: isolate;
  justify-content: center;
  min-width: 0;
  letter-spacing: 2px;
  overflow: hidden;
  padding: 16px 34px;
  position: relative;
  text-decoration: none;
  transition: color .25s ease, transform .15s ease;
}

.hero .hero-content .btn-hero span {
  position: relative;
  z-index: 1;
}

.hero .hero-content .btn-hero .btn-arrow {
  font-size: .7rem;
  position: relative;
  transition: transform .25s ease;
  z-index: 1;
}

.hero .hero-content .btn-hero:hover .btn-arrow {
  transform: translateX(5px);
}

.hero .hero-content .btn-hero:active {
  transform: translateY(1px);
}

/* barrido de luz al pasar el mouse, como los menús de Valorant */
.hero .hero-content .btn-hero:before {
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-130%) skewX(-20deg);
  transition: transform .55s ease;
  z-index: 0;
}

.hero .hero-content .btn-hero:hover:before {
  transform: translateX(130%) skewX(-20deg);
}

/* Register Now — relleno dorado sólido */
.hero .hero-content .btn-hero.btn-start {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 0 rgba(221, 171, 94, 0);
  color: #1a1400;
  transition: color .25s ease, transform .18s ease, box-shadow .3s ease, background .3s ease, letter-spacing .25s ease;
}

.hero .hero-content .btn-hero.btn-start:hover {
  background: linear-gradient(135deg, #fff5de, var(--gold-light));
  box-shadow: 0 0 0 3px rgba(221, 171, 94, .18), 0 0 34px var(--gold-glow);
  color: #1a1400;
  letter-spacing: 2.6px;
  transform: translateY(-3px);
}

.hero .hero-content .btn-hero.btn-start:hover .btn-arrow {
  transform: translateX(7px);
}

.hero .hero-content .btn-hero.btn-start:active {
  box-shadow: 0 0 16px var(--gold-glow);
  transform: translateY(-1px);
}

/* Download Now — solo contorno, sin relleno */
.hero .hero-content .btn-hero.btn-download {
  background: transparent;
  border: 1px solid rgba(221, 171, 94, .5);
  color: var(--gold-light);
  transition: color .25s ease, transform .18s ease, box-shadow .3s ease, border-color .25s ease, letter-spacing .25s ease;
}

.hero .hero-content .btn-hero.btn-download:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(221, 171, 94, .1), 0 0 22px rgba(221, 171, 94, .28);
  color: #fff;
  letter-spacing: 2.6px;
  transform: translateY(-3px);
}

.hero .hero-content .btn-hero.btn-download:hover .btn-arrow {
  transform: translateX(7px);
}

.hero .hero-content .btn-hero.btn-download:active {
  box-shadow: 0 0 14px rgba(221, 171, 94, .22);
  transform: translateY(-1px);
}

.hero .hero-content .btn-hero.btn-download:before {
  background: linear-gradient(100deg, transparent 0%, rgba(221, 171, 94, .3) 50%, transparent 100%);
}

/* ---------- contador: Apertura Oficial ---------- */

.hero-countdown-official {
  margin-top: 10px;
  width: 100%;
}

.countdown-official-label {
  align-items: center;
  display: inline-flex;
  font-family: Cinzel, serif;
  font-size: 1.15rem;
  font-weight: 800;
  gap: 16px;
  justify-content: center;
  letter-spacing: 6px;
  margin-bottom: 20px;
  text-transform: uppercase;
  width: 100%;
}

.countdown-official-label:before,
.countdown-official-label:after {
  background: linear-gradient(90deg, transparent, var(--gold-glow));
  content: "";
  height: 1px;
  max-width: 70px;
  width: 100%;
}

.countdown-official-label:after {
  background: linear-gradient(270deg, transparent, var(--gold-glow));
}

.countdown-official-label span {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px var(--gold-glow);
}

.countdown-timer--official {
  align-items: stretch;
  display: inline-flex;
  gap: 0;
  padding: 0;
}

.countdown-timer--official .countdown-unit {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-inline: 20px;
  position: relative;
}

.countdown-timer--official .countdown-unit + .countdown-unit:before {
  background: linear-gradient(180deg, transparent, rgba(221, 171, 94, .4), transparent);
  content: "";
  left: 0;
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 1px;
}

.countdown-timer--official .countdown-value {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: Cinzel, serif;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  min-width: 46px;
  text-align: center;
  text-shadow: 0 0 22px var(--gold-glow);
}

.countdown-timer--official .countdown-unit small {
  color: #8b95a5;
  font-size: .62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-countdown-official.countdown-live .countdown-value,
.hero-countdown-official.countdown-ended .countdown-value {
  background: linear-gradient(180deg, #6ef5a0, #3ddc73);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(61, 220, 115, .5);
}

.hero-countdown-official.countdown-live .countdown-official-label span {
  color: #3ddc73;
}

/* el separador visual ahora es la línea dorada entre unidades;
   se oculta el ":" literal del markup */
.countdown-sep {
  display: none;
}

/* ---------- redes sociales ---------- */

.hero-social {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

.hero-social .redes-top {
  align-items: center;
  border: 1px solid rgba(221, 171, 94, .3);
  border-radius: 50%;
  display: inline-flex;
  font-size: 19px;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.hero-social .redes-top:hover {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 14px var(--gold-glow);
  color: #241708;
  text-shadow: none;
}

/* ---------- responsive ---------- */

@media (max-width: 991px) {
  .hero {
    background-position: 40% center;
  }

  .hero .hero-inner {
    --hero-align-top: min(35vh, 300px, calc((100vh - 120px) / 2));
  }
}

@media (max-width: 767px) {
  .hero {
    background-position: 20% center;
  }

  .hero .hero-content {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero .hero-inner {
    --hero-align-top: min(30vh, 230px, calc((100vh - 100px) / 2));
    max-width: min(720px, calc(100vw - 24px));
    padding: 0 20px 24px;
    width: min(720px, calc(100vw - 24px));
  }

  .hero-logo-text {
    margin-bottom: .5rem;
    max-width: 420px;
  }

  .hero-status {
    margin-top: 18px;
    padding: 8px 18px;
  }

  .hero-status-text {
    font-size: .68rem;
  }

  .hero-status-value {
    font-size: .95rem;
  }

  .hero-actions {
    gap: 12px;
    margin-block: 26px 6px;
    width: 100%;
  }

  .hero .hero-content .btn-hero {
    flex: 1 1 auto;
    font-size: .78rem;
    justify-content: center;
    letter-spacing: 1.5px;
    padding: 14px 18px;
  }

  .countdown-timer--official .countdown-unit {
    padding-inline: 10px;
  }

  .countdown-timer--official .countdown-value {
    font-size: 1.4rem;
    min-width: 38px;
  }

  .countdown-official-label {
    font-size: .85rem;
    gap: 10px;
    letter-spacing: 4px;
  }

  .countdown-official-label:before,
  .countdown-official-label:after {
    max-width: 34px;
  }

  .hero-social .redes-top {
    font-size: 16px;
    height: 44px;
    width: 44px;
  }
}

@media (max-width: 576px) {
  .hero-logo-text {
    max-width: 320px;
  }

  .hero .hero-content .btn-hero {
    font-size: .72rem;
    letter-spacing: 1.2px;
    padding: 13px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-item,
  .hero-logo-text,
  .hero-status,
  .hero-status-dot,
  .hero .hero-content .btn-hero:before {
    animation: none;
    transition: none;
  }
}