:root {
  color-scheme: dark;
  background: #100b09;
  color: #ffecd3;
  font: 100% system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; }

.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(17px, 3.4svh, 34px);
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px max(16px, 5vw) 50px;
  overflow: hidden;
}

.arena {
  position: absolute;
  z-index: -1;
  inset: 0;
  container-type: size;
  overflow: hidden;
  pointer-events: none;
  background: #120b0b;
}

.arena-view,
.arena-shade {
  position: absolute;
  inset: 0;
}
.arena-view {
  --left-lamp: 8.2%;
  --right-lamp: 91.8%;
  --lamp-height: 15%;
  inset: 50% auto auto 50%;
  width: max(100%, 150cqh);
  aspect-ratio: 3 / 2;
  translate: -50% -50%;
  background:
    radial-gradient(ellipse at center, #10090922 28%, #0e0b105c 95%),
    url("assets/arena-show.webp") center / cover no-repeat;
  transform: scale(var(--scene-scale, 1.02));
  animation: arena-reveal 4.8s cubic-bezier(.17,.57,.3,1) both;
}
.arena-shade {
  background:
    linear-gradient(to bottom, #04060c5c, transparent 27%, transparent 57%, #090707dc),
    radial-gradient(ellipse at 50% 41%, #0b080d80 0%, #110b0c47 37%, transparent 71%);
}
.ground-glow {
  position: absolute;
  inset: 57% -16% 6%;
  background: radial-gradient(ellipse at 50% 45%, #ff9a4848, #e96d2922 31%, transparent 67%);
  mix-blend-mode: screen;
  animation: ground-light 7s ease-in-out infinite alternate;
}
@keyframes ground-light {
  from { opacity: .28; transform: translateX(-12%); }
  to { opacity: .95; transform: translateX(12%); }
}

.floodlight {
  --direction: 1;
  position: absolute;
  width: min(43vw, 660px);
  height: 90%;
  top: var(--lamp-height);
  left: var(--left-lamp);
  transform-origin: 0 0;
  background: conic-gradient(
    from 97deg at 0 0,
    transparent 5deg, #ffd29832 11deg, #fff0c9a0 17deg,
    #ffc98a8b 23deg, #f4a45b40 28deg, transparent 47deg
  );
  filter: blur(7px);
  mix-blend-mode: screen;
  opacity: .64;
  animation: lights-up 6.2s ease-in-out infinite;
}
.floodlight::before {
  content: "";
  position: absolute;
  width: clamp(74px, 11vw, 180px);
  height: clamp(40px, 7vw, 105px);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #fff3d5, #ffdb8bd6 18%, #fc9d5275 37%, transparent 72%);
}
.floodlight-right {
  --direction: -1;
  left: var(--right-lamp);
  animation-duration: 7.4s;
  animation-delay: -2.8s;
}

.dust {
  position: absolute;
  inset: 22% -25% -14%;
  mix-blend-mode: screen;
}
.dust-low {
  background:
    radial-gradient(ellipse at 20% 72%, #f5af6e52, transparent 40%),
    radial-gradient(ellipse at 65% 65%, #e48d4e63, transparent 41%),
    radial-gradient(ellipse at 92% 85%, #f3aa625e, transparent 37%);
  filter: blur(14px);
  opacity: .66;
  animation: dust-bank 8s ease-in-out infinite alternate;
}
.dust-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

.entrance {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

.opening-pending .entrance,
.stage.is-opening .entrance { visibility: visible; }
.opening-pending .entrance { background: #170c09; }
.opening-pending .hero,
.opening-pending .hero .seal,
.opening-pending .actions { visibility: hidden; }
.skip-opening,
.intro-sound {
  position: absolute;
  z-index: 4;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: none;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #d0a57180;
  border-radius: 999px;
  background: #1a100de8;
  color: #ffe6c1;
  font: 600 .875rem system-ui, sans-serif;
  cursor: pointer;
}
.stage.is-opening .skip-opening { display: block; }
.intro-sound {
  right: auto;
  left: max(14px, env(safe-area-inset-left));
  border-color: #ffdb9e;
  background: linear-gradient(142deg, #ffe3ae, #ca8a4e);
  color: #211208;
}
.intro-sound span { margin-inline-end: 3px; }
.stage.is-opening .intro-sound:not([hidden]) { display: block; }
.skip-opening:focus-visible,
.intro-sound:focus-visible { outline: 2px solid #ffe0a4; outline-offset: 3px; }

.gate::before,
.gate::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 50.25%;
  background:
    linear-gradient(90deg, #0a0608bc, transparent 69%, #ffc17d44),
    url("assets/porteira.webp") left center / 200% 100% no-repeat,
    #170c09;
  box-shadow: inset -2px 0 #ffbe74b4, 0 0 36px #090405;
  --exit: -114%;
}
.gate::after {
  inset: 0 0 0 auto;
  --exit: 114%;
  background-position: center, right center;
  box-shadow: inset 2px 0 #ffbe74b4, 0 0 36px #090405;
}
.stage.is-opening .gate::before,
.stage.is-opening .gate::after {
  animation: gate-open 3.6s cubic-bezier(.5,.09,.24,1) both;
}
.stage.is-opening .arena { animation: arena-forging 9.4s ease both; }
.stage.is-opening .actions { visibility: hidden; }
.stage.is-opening .seal::before,
.stage.is-opening .shine { opacity: 0; }
.stage.is-opening .seal img {
  opacity: var(--seal-solid, 0);
}
.seal-heat {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
  mix-blend-mode: screen;
  mask: url("assets/detalhes-do-selo.webp") center / 100% 100% no-repeat;
  background: #ffba66;
}
.stage.is-opening .seal-heat { display: block; opacity: var(--heat, 0); }
.seal-flare {
  position: absolute;
  inset: -24%;
  display: none;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 51%, #ffc061a1, #f2823052 30%, transparent 66%),
    radial-gradient(ellipse at 50% 50%, transparent 36%, #ffac5063 47%, transparent 56%);
  mix-blend-mode: screen;
}
.stage.is-opening .seal-flare { display: block; opacity: var(--flare, 0); }
.seal-fire {
  position: absolute;
  inset: -6.64% -6.4%;
  width: 112.8%;
  height: 113.28%;
  display: none;
  pointer-events: none;
}
.stage.is-opening .seal-fire { display: block; }

@keyframes gate-open {
  0%, 49% { transform: translateX(0); }
  100% { transform: translateX(var(--exit)); }
}
@keyframes arena-forging {
  0%, 100% { filter: brightness(1); }
  39%, 70% { filter: brightness(.53); }
  87% { filter: brightness(.76); }
}

.hero { display: contents; }

.seal {
  position: relative;
  width: min(84vw, 61svh, 570px);
  max-width: 100%;
  transform-origin: center;
}
.seal::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6%;
  border-radius: 50%;
  box-shadow: 0 0 35px 9px #f8a33c46, 0 0 106px 27px #ba52225c;
}
.seal img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 28px #090506de) drop-shadow(0 0 24px #e49b5440);
}
.shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mask: url("assets/peao-apaixonado.webp") center / contain no-repeat;
  mix-blend-mode: screen;
}
.shine::before {
  content: "";
  position: absolute;
  inset: -22%;
  opacity: 0;
  background: linear-gradient(116deg, transparent 43%, #d9984c48 48%, #ffebaaad 50%, #f6bc5d61 52%, transparent 57%);
  animation: seal-glint 8s ease-in-out -.4s infinite;
}

.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 170px) 52px minmax(0, 1fr);
  width: min(100%, 390px);
  gap: 9px;
  align-items: start;
}
.music { display: contents; }
.music::details-content { grid-column: 1 / -1; }
.music:not([open]) .music-player { display: none; }
.contact-whatsapp {
  grid-column: 2;
  grid-row: 1;
}
.contact-music { grid-column: 3; grid-row: 1; }
.replay-opening {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: #ffe2b3;
  background: #0d0909a6;
  font: 600 .875rem system-ui, sans-serif;
  cursor: pointer;
}
.replay-opening span { padding-inline-end: 4px; font-size: 1.03em; }
.replay-opening:hover { background: #392318; }
.replay-opening:focus-visible { outline: 2px solid #ffe0a4; outline-offset: 3px; }
.contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #bd925972;
  border-radius: 999px;
  background: linear-gradient(140deg, #261814, #120c0b);
  color: #ffecd3;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color .22s ease, transform .22s ease;
}
.contact:hover { transform: translateY(-2px); background: #3c2417; }
.contact-whatsapp {
  border-color: #ffe0a7;
  color: #211208;
  background: linear-gradient(142deg, #ffe1a4 0%, #e4ab60 58%, #ba793f);
  box-shadow: 0 10px 32px #090505d0, inset 0 1px #fff0cc9e;
}
.contact-whatsapp:hover { background: #ffe4b1; }
.contact:focus-visible,
.music-player a:focus-visible { outline: 2px solid #ffe0a4; outline-offset: 4px; }
.music > summary { cursor: pointer; list-style: none; }
.music > summary::-webkit-details-marker { display: none; }
.contact-music {
  padding-inline: 0;
  border-color: #dfb3739c;
  background: #100b0be0;
  color: #ffdba5;
  box-shadow: 0 7px 25px #0905059c;
}
.contact-music:hover { background: #382317; }
.music-icon {
  font: 700 1.4rem/1 system-ui, sans-serif;
}
.music[open] .contact-music { background: #ffdfad; color: #241208; }
.chat-icon {
  flex: 0 0 13px;
  width: 13px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 4px 4px 4px 1px;
}

.music-player {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 9px 9px 12px;
  border: 1px solid #dfb1845c;
  border-radius: 12px;
  background: #170f11f5;
  box-shadow: 0 12px 32px #0a0709a6;
}
.music-player iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
}
.music-player a {
  color: inherit;
  font-size: .875rem;
  justify-self: center;
  text-underline-offset: 3px;
}

@keyframes arena-reveal {
  from { transform: scale(1.14); filter: brightness(.66); }
  to { transform: scale(var(--scene-scale, 1.02)); filter: none; }
}
@keyframes lights-up {
  0%, 100% { opacity: .31; transform: scaleX(var(--direction)) rotate(-13deg); }
  27% { opacity: 1; transform: scaleX(var(--direction)) rotate(9deg); }
  49% { opacity: .48; }
  72% { opacity: .92; transform: scaleX(var(--direction)) rotate(-2deg); }
}
@keyframes dust-bank {
  0% { transform: translate(-18%, 7%) scale(1.03); opacity: .53; }
  60% { opacity: .87; }
  100% { transform: translate(16%, -6%) scale(1.12); opacity: .72; }
}
@keyframes seal-glint {
  0%, 11% { opacity: 0; transform: translateX(-91%); }
  24% { opacity: .96; }
  34% { opacity: .65; }
  46%, 100% { opacity: 0; transform: translateX(91%); }
}
@media (max-width: 600px) {
  .stage {
    --arena-height: 100svh;
    --control-bottom: max(24px, env(safe-area-inset-bottom));
    align-content: start;
    gap: 0;
    padding: 0 max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  }
  .arena {
    bottom: auto;
    height: var(--arena-height);
  }
  .arena-view {
    --left-lamp: 7.7%;
    --right-lamp: 92.3%;
    --lamp-height: 22%;
    --scene-scale: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    translate: none;
    background-image:
      radial-gradient(ellipse at center, #10090922 30%, #0e0b1040 95%),
      url("assets/arena-show-mobile.webp");
    background-size: 100% 100%;
  }
  .arena-shade {
    background:
      radial-gradient(ellipse at 50% 44%, #11090959, transparent 66%),
      linear-gradient(to bottom, #100b092e, transparent 26%, transparent 59%, #100b09 100%);
  }
  .floodlight { width: 77%; }
  .hero {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: clamp(285px, 69svh, 680px);
    align-items: end;
    padding: max(38px, env(safe-area-inset-top)) 0 clamp(22px, 4.3svh, 42px);
  }
  .seal { width: min(83vw, 53svh, 375px); }
  .seal img {
    filter: drop-shadow(0 12px 24px #090506e8) drop-shadow(0 0 22px #ed9a4252);
  }

  .actions {
    width: min(100%, 390px);
    gap: 10px;
    padding-bottom: var(--control-bottom);
  }
  .contact {
    min-height: 54px;
    padding: 12px 8px;
    border-radius: 999px;
    font-size: .9375rem;
  }

  .music-player {
    margin-top: 2px;
    background: #1b1210;
    border-radius: 14px;
  }
  .music-player a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
}

@media (max-width: 350px) {
  .stage { padding-inline: 14px; }
  .contact { gap: 6px; padding-inline: 6px; font-size: .8125rem; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .arena-view, .floodlight, .dust, .ground-glow, .shine::before { animation: none; }
  .floodlight { transform: scaleX(var(--direction)); }
  .contact { transition: none; }
}
