/* Pacto do Vazio: apresentação visual da abertura existente.
   O logo, o arco, a personagem e as animações continuam em intro.js/intro.css. */
.tm-intro {
  --tm-intro-gold: #e0c08a;
  --tm-intro-paper: #f6eee0;
  background-color: #080607;
}

/* As ruínas oficiais com inscrições complementam a atmosfera da capa do álbum. */
.tm-intro::before {
  background-color: #080607;
  background-image:
    radial-gradient(ellipse at 72% 38%, rgba(117, 31, 24, .19), transparent 48%),
    linear-gradient(90deg, rgba(6, 5, 5, .96) 0%, rgba(8, 6, 6, .88) 36%, rgba(9, 6, 7, .38) 72%, rgba(5, 4, 5, .57) 100%),
    url('../images/novas-artes/fundo-ruinas-siriaco-1411.webp');
  background-position: center, center, center;
  background-size: cover;
  background-repeat: no-repeat;
}

.tm-intro::after {
  background: radial-gradient(ellipse 30% 16% at 74% 28%, rgba(162, 38, 28, .18), transparent 76%),
    radial-gradient(ellipse 38% 15% at 20% 76%, rgba(174, 142, 104, .14), transparent 76%),
    radial-gradient(ellipse 30% 12% at 78% 82%, rgba(185, 150, 113, .13), transparent 78%);
}

.tm-intro__top {
  align-items: center;
  gap: clamp(14px, 3vw, 44px);
}
.tm-intro__top::before,
.tm-intro__top::after {
  content: '';
  flex: 1 1 0;
  max-width: 310px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 178, 111, .7));
}
.tm-intro__top::after {
  background: linear-gradient(90deg, rgba(215, 178, 111, .7), transparent);
}
.tm-intro__logo {
  width: min(48vw, 250px);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .8));
}

.tm-intro__bottom {
  text-shadow: 0 2px 8px #000;
}
.tm-intro__title {
  order: 0;
  color: #f2e2c4;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 600;
  letter-spacing: .1em;
  text-indent: 0;
}
.tm-intro .tmk-intro-genre {
  order: 1;
  margin: 0 0 .2rem;
  color: #d7b989;
  font-size: .75rem;
  letter-spacing: .14em;
}
.tm-intro__album {
  order: 2;
  color: #e4c48b;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.2rem, 3.2vw, 2rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: .035em;
}
.tm-intro__album::after {
  display: block;
  width: min(100%, 260px);
  height: 1px;
  margin: .6rem auto .2rem;
  background: linear-gradient(90deg, transparent, #c7a66e, transparent);
  content: '';
}
.tm-intro__announcement {
  order: 3;
  color: #f0e4d3;
  font-family: Montserrat, Arial, sans-serif;
  font-size: .9375rem;
  line-height: 1.5;
}
.tm-intro__phrase {
  order: 4;
  margin-top: .2rem;
  color: #e3d4c2;
  line-height: 1.5;
}
.tm-intro__languages { order: 5; }
.tm-intro__languages button { color: #e5cfac; }
.tm-intro__enter {
  order: 6;
  min-width: 180px;
  border: 1px solid #e1bd7c;
  background: linear-gradient(135deg, #f0d8a3, #bc9053);
  color: #1b1009;
  font-family: Cinzel, Georgia, serif;
  font-weight: 700;
  text-shadow: none;
  box-shadow: 0 0 0 3px rgba(10, 7, 7, .75), 0 0 0 4px rgba(187, 146, 82, .45);
}
.tm-intro__enter:hover {
  border-color: #f4d99f;
  background: #f3dcab;
  color: #1b1009;
}
.tm-intro .official-streaming-links--intro {
  order: 7;
  flex-wrap: wrap;
  gap: 0;
  max-width: 100%;
}
.tm-intro .official-streaming-links--intro a {
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 0;
  color: #f2ddbc;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tm-intro .official-streaming-links--intro span { display: none; }
.tm-intro .official-streaming-links--intro i {
  flex: none;
  font-size: 16px;
  line-height: 1;
}

/* Pequenas correntes de luz acompanham a figura, sem girar fora da anatomia. */
.tm-intro__energy {
  position: absolute;
  top: 0;
  left: -1.7823%;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  animation: tm-intro-appear 1.8s ease both;
  mix-blend-mode: screen;
}
.tm-intro__ember {
  transform-box: fill-box;
  transform-origin: center;
  animation: tm-intro-ember-pulse 12s ease-in-out infinite;
}
.tm-intro__current {
  --tm-energy-peak: .72;
  --tm-energy-tail: .68;
  stroke: #ffd18a;
  stroke-width: 2.8;
  stroke-dasharray: 18 82;
  stroke-dashoffset: 100;
  opacity: 0;
  filter: drop-shadow(0 0 2.5px rgba(255, 126, 78, .72));
  animation: tm-intro-current 12s ease-in-out infinite;
}
.tm-intro__current--left-arm { stroke: #f06c5c; animation-delay: -2.4s; }
.tm-intro__current--right-arm { animation-delay: -4.8s; }
.tm-intro__current--left-leg { stroke: #f06c5c; animation-delay: -7.2s; }
.tm-intro__current--right-leg { animation-delay: -9.6s; }
@keyframes tm-intro-current {
  0% { stroke-dashoffset: 100; opacity: 0; }
  10% { opacity: var(--tm-energy-peak); }
  38% { stroke-dashoffset: 0; opacity: var(--tm-energy-tail); }
  50%, 100% { stroke-dashoffset: -4; opacity: 0; }
}
@keyframes tm-intro-ember-pulse {
  0%, 100% { opacity: .20; transform: scale(.9); }
  45% { opacity: .64; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .tm-intro__energy, .tm-intro__ember, .tm-intro__current {
    animation: none !important;
  }
  .tm-intro__energy { opacity: .35; }
  .tm-intro__ember { opacity: .18; }
  .tm-intro__current { opacity: 0; }
}

/* A composição horizontal ecoa a referência, sem tocar nas camadas animadas. */
@media (min-width: 901px) and (min-height: 621px) {
  .tm-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(min-content, 1fr);
    align-content: start;
    align-content: safe center;
    align-items: center;
    justify-items: center;
    gap: clamp(10px, 2vh, 24px) clamp(18px, 3vw, 52px);
    padding: max(16px, env(safe-area-inset-top)) max(4vw, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(4vw, env(safe-area-inset-left));
  }
  .tm-intro__top { grid-column: 1 / -1; grid-row: 1; }
  .tm-intro__logo {
    width: min(22vw, 280px);
    height: clamp(70px, 12vh, 116px);
    height: clamp(70px, 12dvh, 116px);
  }
  .tm-intro__stage {
    grid-column: 2;
    grid-row: 2;
    width: min(44vw, 66vh, 670px);
    width: min(44vw, 66dvh, 670px);
  }
  .tm-intro__bottom {
    grid-column: 1;
    grid-row: 2;
    align-items: flex-start;
    justify-self: end;
    width: min(100%, 650px);
    gap: clamp(6px, 1vh, 10px);
    text-align: left;
  }
  .tm-intro__title { font-size: 1.125rem; }
  .tm-intro__album { font-size: clamp(2.15rem, 3.65vw, 3.75rem); }
  .tm-intro__album::after {
    margin-left: 0;
    background: linear-gradient(90deg, #c7a66e, transparent);
  }
  .tm-intro__languages, .tm-intro .official-streaming-links--intro { justify-content: flex-start; }
}

/* Reflow e rolamento da abertura original continuam ativos em telas pequenas,
   paisagem e ampliação de texto; os controles mantêm seus alvos de 44 px. */
@media (max-width: 600px) {
  .tm-intro::before {
    background-image:
      radial-gradient(ellipse at 50% 27%, rgba(121, 25, 23, .18), transparent 52%),
      linear-gradient(to bottom, rgba(5, 4, 5, .55), rgba(7, 5, 6, .75) 46%, rgba(7, 5, 6, .94) 100%),
      url('../images/novas-artes/fundo-ruinas-siriaco-1411.webp');
    background-position: center, center, center;
    background-size: cover;
    background-repeat: no-repeat;
  }
  .tm-intro__top { gap: 12px; }
  .tm-intro__album { font-size: clamp(1.15rem, 5vw, 1.55rem); }
  .tm-intro__announcement { font-size: .9375rem; }
  /* Mantém os fios de luz finos, mas perceptíveis no palco menor do celular. */
  .tm-intro__current {
    --tm-energy-peak: .88;
    --tm-energy-tail: .82;
    stroke-width: 4.2;
    filter: drop-shadow(0 0 3px rgba(255, 137, 88, .8));
  }
}
/* Em retrato, a área útil do navegador pode variar quando suas barras aparecem.
   Fixar o início da composição e usar a altura pequena estável evita saltos,
   sem impedir a rolagem ou o zoom quando o conteúdo precisa de mais espaço. */
@media (max-width: 600px) and (orientation: portrait) {
  .tm-intro {
    justify-content: flex-start;
    gap: 4px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .tm-intro::after { animation: none; }
  .tm-intro__logo {
    height: clamp(44px, 9vh, 82px);
    height: clamp(44px, 9svh, 82px);
  }
  .tm-intro__stage {
    width: min(72vw, 30vh, 380px);
    width: min(72vw, 30svh, 380px);
  }
  .tm-intro__bottom { gap: 4px; }
  .tm-intro__enter { min-height: 44px; padding: 8px 20px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .tm-intro { align-content: start; }
  .tm-intro__logo { height: min(14vh, 64px); height: min(14svh, 64px); }
  .tm-intro__stage { width: min(44vw, 65vh, 360px); width: min(44vw, 65svh, 360px); }
  .tm-intro__top::before, .tm-intro__top::after { display: none; }
  .tm-intro__album { font-size: clamp(1.1rem, 2.6vw, 1.6rem); }
  .tm-intro__album::after { margin-top: .3rem; }
}
