:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #020916;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #020916;
}

body.event-template-active {
  overflow: auto;
}

.live-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: #020916;
  overflow: hidden;
}

.live-screen::before {
  position: absolute;
  inset: -24px;
  content: "";
  background: linear-gradient(rgba(2, 9, 22, 0.22), rgba(2, 9, 22, 0.38)),
    url("castelo-borges-condolex-live.png") center / cover no-repeat;
  filter: blur(18px) saturate(0.9);
  opacity: 0.72;
  transform: scale(1.04);
}

.live-frame {
  position: relative;
  z-index: 1;
  width: min(100vw, 177.68vh);
  width: min(100vw, 177.68dvh);
  aspect-ratio: 1672 / 941;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
}

.live-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  user-select: none;
}

.event-template {
  display: none;
}

.live-screen[data-template="event"] {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  display: block;
  overflow: hidden;
  color: #071c42;
  background: #f6f2e9;
}

.live-screen[data-template="event"]::before {
  inset: 0;
  background:
    radial-gradient(circle at 0 0, rgba(215, 157, 41, 0.7) 0 2px, transparent 3px) 0 0 / 28px 28px,
    linear-gradient(135deg, rgba(4, 25, 63, 0.07), transparent 42%),
    #f6f2e9;
  filter: none;
  opacity: 1;
  transform: none;
}

.live-screen[data-template="event"] .event-template {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  box-shadow: 0 0 64px rgba(2, 15, 40, 0.16);
}

.live-screen[data-template="event"] .live-frame {
  display: none;
}

.event-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 58px);
  min-height: 320px;
  padding: 24px 36px;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 10% 130%, transparent 0 110px, rgba(225, 166, 43, 0.95) 111px 113px, transparent 114px),
    radial-gradient(circle at 97% -30%, transparent 0 130px, rgba(225, 166, 43, 0.95) 131px 133px, transparent 134px),
    linear-gradient(110deg, #031535, #092758 65%, #061a43);
}

.event-brand-logo {
  display: block;
  width: min(370px, 55%);
  height: auto;
  max-height: 270px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.2));
}

.event-presenter {
  align-self: stretch;
  display: flex;
  width: min(260px, 36%);
  margin: 0;
  align-items: flex-end;
  justify-content: center;
  flex: 0 1 260px;
  overflow: hidden;
  pointer-events: none;
}

.event-presenter img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.3));
}

.event-brand-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 2px solid #e8ae39;
  border-radius: 50%;
  color: #e8ae39;
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1;
}

.event-brand strong {
  display: block;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: 0.02em;
  line-height: 0.9;
}

.event-brand strong span {
  color: #e8ae39;
}

.event-brand p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

.event-content {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, 0.84fr);
  gap: clamp(24px, 4vw, 54px);
  padding: clamp(36px, 5vw, 72px) clamp(28px, 6vw, 76px) 30px;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.96), rgba(246, 242, 233, 0.86)),
    repeating-linear-gradient(45deg, rgba(6, 28, 66, 0.035) 0 2px, transparent 2px 18px);
}

.event-intro {
  align-self: center;
}

.event-kicker,
.countdown-eyebrow {
  margin: 0 0 10px;
  color: #bd7e0c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.event-intro h1 {
  max-width: 740px;
  margin: 0;
  color: #071c42;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5.6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
  overflow-wrap: anywhere;
}

.event-invitation {
  width: fit-content;
  max-width: 100%;
  margin: 26px 0 18px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #ffffff;
  background: #071c42;
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1.35;
}

.event-invitation strong {
  color: #e8ae39;
}

.event-description {
  max-width: 580px;
  margin: 0;
  color: #1d2d4a;
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.45;
}

.event-highlights {
  max-width: 590px;
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid rgba(7, 28, 66, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 32px rgba(7, 28, 66, 0.08);
}

.event-highlights > p {
  margin: 0;
  padding: 15px 20px;
  color: #f4c258;
  background: #071c42;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 2.4vw, 30px);
}

.event-highlights ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 18px 24px 19px 42px;
  color: #14284c;
  font-size: 16px;
  line-height: 1.34;
}

.event-highlights li::marker {
  color: #ca8c16;
}

.event-side {
  display: grid;
  align-content: center;
  gap: 22px;
}

.countdown-card,
.event-details {
  overflow: hidden;
  border: 1px solid rgba(7, 28, 66, 0.2);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(7, 28, 66, 0.13);
}

.countdown-card {
  padding: clamp(22px, 3vw, 34px);
  color: #ffffff;
  background:
    radial-gradient(circle at 100% 0, rgba(231, 174, 57, 0.28), transparent 40%),
    #071c42;
}

.countdown-card h2,
.event-details h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 500;
  line-height: 1;
}

.countdown-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 26px 0 18px;
}

.countdown-values div {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  padding: 12px 4px;
  border: 1px solid rgba(244, 194, 88, 0.48);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.countdown-values strong {
  color: #f4c258;
  font-size: clamp(25px, 3.5vw, 42px);
  line-height: 0.9;
}

.countdown-values span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.countdown-message {
  min-height: 20px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.35;
}

.countdown-card.is-starting .countdown-message {
  color: #f4c258;
  font-weight: 700;
}

.event-details h2 {
  padding: 18px 24px;
  color: #f4c258;
  background: #071c42;
}

.event-details dl {
  margin: 0;
  padding: 4px 24px 0;
}

.event-details dl div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(7, 28, 66, 0.17);
}

.event-details dt {
  color: #936416;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-details dd {
  margin: 0;
  color: #10264d;
  font-size: 18px;
  font-weight: 700;
}

.event-access {
  margin: 0;
  padding: 17px 24px;
  color: #ffffff;
  background: #071c42;
  font-size: 16px;
}

.event-access strong {
  color: #f4c258;
  font-size: 20px;
}

.event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 138px;
  padding: 20px clamp(28px, 6vw, 76px);
  color: #ffffff;
  background: linear-gradient(110deg, #061a40, #092657);
}

.event-footer-seal {
  display: flex;
  width: clamp(108px, 12vw, 136px);
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  padding: 14px;
  flex: 0 0 auto;
  border: 2px solid #e8ae39;
  border-radius: 50%;
  background: rgba(4, 21, 53, 0.72);
  color: #e8ae39;
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: normal;
  word-break: normal;
}

.event-footer p {
  margin: 0;
  color: #f4c258;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 38px);
  font-style: italic;
  text-align: right;
}

.event-footer p strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.music-controls {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 36px);
  padding: 8px;
  border: 1px solid rgba(255, 198, 78, 0.42);
  border-radius: 8px;
  background: rgba(1, 9, 22, 0.82);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.music-controls:hover,
.music-controls:focus-within,
.music-controls.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.track-title {
  width: 100%;
  max-width: min(520px, calc(100vw - 60px), 100%);
  min-height: 20px;
  padding: 2px 8px 0;
  color: #ffffff;
  font: 700 13px/1.25 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.control-button {
  min-width: 98px;
  min-height: 44px;
  border: 1px solid rgba(255, 198, 78, 0.72);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(1, 9, 22, 0.7);
  font: 700 14px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
  pointer-events: none;
}

.music-controls:hover .control-button,
.music-controls:focus-within .control-button,
.music-controls.is-visible .control-button {
  pointer-events: auto;
}

.control-primary {
  min-width: 138px;
  background: rgba(136, 37, 11, 0.86);
}

.control-button:hover,
.control-button:focus-visible {
  background: rgba(32, 20, 8, 0.92);
  outline: 2px solid rgba(255, 198, 78, 0.55);
  outline-offset: 2px;
}

.control-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.youtube-player {
  position: fixed;
  left: -9999px;
  bottom: 0;
  width: 320px;
  height: 180px;
  opacity: 0;
  pointer-events: none;
}

/*
 * Em telas de computador, o convite funciona como uma tela de espera: cada
 * area se adapta a altura visivel e nao cria uma barra de rolagem. Em celular
 * mantemos a rolagem, pois os blocos passam a ficar empilhados.
 */
@media (min-width: 921px) {
  body.event-template-active {
    overflow: hidden;
  }

  .live-screen[data-template="event"] {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  .live-screen[data-template="event"] .event-template {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .event-brand {
    min-height: 0;
    flex: 0 0 clamp(152px, 21dvh, 230px);
    padding: 10px 36px;
  }

  .event-brand-logo {
    width: min(300px, 26vw);
    max-height: calc(100% - 12px);
  }

  .event-presenter {
    width: min(210px, 19vw);
    max-height: calc(100% + 10px);
    margin-bottom: -10px;
    flex-basis: 210px;
  }

  .event-content {
    min-height: 0;
    gap: clamp(20px, 3vw, 40px);
    padding: clamp(16px, 2.6dvh, 30px) clamp(28px, 5vw, 66px);
    overflow: hidden;
  }

  .event-kicker,
  .countdown-eyebrow {
    margin-bottom: 6px;
  }

  .event-intro h1 {
    font-size: clamp(38px, 4.6vw, 64px);
  }

  .event-invitation {
    margin: clamp(12px, 1.8dvh, 18px) 0 clamp(10px, 1.5dvh, 14px);
    padding: 9px 16px;
    font-size: clamp(15px, 1.5vw, 19px);
  }

  .event-description {
    font-size: clamp(15px, 1.45vw, 19px);
    line-height: 1.35;
  }

  .event-highlights {
    margin-top: clamp(14px, 2dvh, 20px);
  }

  .event-highlights > p {
    padding: 10px 18px;
    font-size: clamp(20px, 2vw, 26px);
  }

  .event-highlights ul {
    gap: 5px;
    padding: 12px 20px 13px 38px;
    font-size: clamp(13px, 1.25vw, 15px);
    line-height: 1.28;
  }

  .event-side {
    gap: clamp(10px, 1.5dvh, 16px);
  }

  .countdown-card {
    padding: clamp(16px, 2.2dvh, 22px) clamp(18px, 2.4vw, 26px);
  }

  .countdown-card h2,
  .event-details h2 {
    font-size: clamp(24px, 2.3vw, 32px);
  }

  .countdown-values {
    margin: clamp(14px, 2dvh, 18px) 0 clamp(10px, 1.4dvh, 14px);
  }

  .countdown-values div {
    padding: 8px 3px;
  }

  .countdown-values strong {
    font-size: clamp(24px, 2.8vw, 34px);
  }

  .countdown-message {
    min-height: 0;
    font-size: 12px;
  }

  .event-details h2 {
    padding: 12px 20px;
  }

  .event-details dl {
    padding: 2px 20px 0;
  }

  .event-details dl div {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 9px 0;
  }

  .event-details dd {
    font-size: 16px;
  }

  .event-access {
    padding: 11px 20px;
    font-size: 14px;
  }

  .event-access strong {
    font-size: 17px;
  }

  .event-footer {
    min-height: 0;
    flex: 0 0 clamp(92px, 12dvh, 116px);
    padding: 8px clamp(28px, 5vw, 66px);
  }

  .event-footer-seal {
    width: clamp(96px, 11dvh, 108px);
    padding: 8px;
    font-size: clamp(9px, 0.72vw, 10px);
  }

  .event-footer p {
    font-size: clamp(22px, 2.3vw, 31px);
  }

  .event-footer p strong {
    font-size: 11px;
  }
}

@media (max-width: 920px) {
  .live-screen[data-template="event"] .event-template {
    width: 100%;
  }

  .event-content {
    grid-template-columns: 1fr;
  }

  .event-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .event-brand {
    min-height: 252px;
    padding: 24px;
    gap: 14px;
  }

  .event-brand-logo {
    width: min(300px, 54vw);
  }

  .event-presenter {
    width: min(190px, 34vw);
    max-height: 220px;
    flex-basis: 190px;
  }

  .event-brand-mark {
    width: 54px;
    height: 54px;
    font-size: 32px;
  }

  .event-brand p {
    font-size: 13px;
  }

  .event-content {
    padding: 38px 24px 24px;
  }

  .event-side {
    grid-template-columns: 1fr;
  }

  .music-controls {
    right: 12px;
    bottom: 12px;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    max-width: calc(100% - 24px);
  }

  .track-title {
    max-width: 100%;
    font-size: 12px;
  }

  .control-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .control-button,
  .control-primary {
    min-width: min(112px, calc((100vw - 42px) / 2), calc((100% - 18px) / 2));
    min-height: 42px;
    padding: 9px 12px;
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .event-brand {
    min-height: 220px;
    padding: 20px 16px;
    gap: 8px;
  }

  .event-brand-logo {
    width: min(220px, 48vw);
    max-height: 170px;
  }

  .event-presenter {
    width: min(150px, 34vw);
    max-height: 190px;
    flex-basis: 150px;
  }

  .event-brand strong {
    font-size: 32px;
  }

  .event-brand p {
    margin-top: 5px;
    font-size: 11px;
  }

  .event-content {
    gap: 22px;
    padding: 30px 16px 18px;
  }

  .event-intro h1 {
    font-size: clamp(38px, 12vw, 55px);
  }

  .event-invitation {
    margin-top: 20px;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 15px;
  }

  .event-description {
    font-size: 16px;
  }

  .event-highlights {
    margin-top: 22px;
  }

  .event-highlights > p {
    padding: 13px 16px;
    font-size: 23px;
  }

  .event-highlights ul {
    padding: 15px 18px 16px 34px;
    font-size: 14px;
  }

  .countdown-card,
  .event-details {
    border-radius: 13px;
  }

  .countdown-card {
    padding: 20px 14px;
  }

  .countdown-values {
    gap: 5px;
    margin: 18px 0 13px;
  }

  .countdown-values div {
    padding: 10px 2px;
  }

  .countdown-values strong {
    font-size: 27px;
  }

  .countdown-values span {
    font-size: 9px;
  }

  .event-details h2 {
    padding: 15px 18px;
    font-size: 27px;
  }

  .event-details dl {
    padding: 4px 18px 0;
  }

  .event-details dl div {
    grid-template-columns: 78px minmax(0, 1fr);
    padding: 13px 0;
  }

  .event-details dd {
    font-size: 16px;
  }

  .event-access {
    padding: 14px 18px;
  }

  .event-footer {
    min-height: 124px;
    padding: 16px;
    gap: 14px;
  }

  .event-footer-seal {
    width: 94px;
    padding: 10px;
    font-size: 10px;
    line-height: 1.2;
  }

  .event-footer p {
    font-size: 25px;
  }

  .event-footer p strong {
    font-size: 11px;
  }

  .music-controls {
    right: 8px;
    bottom: 8px;
    gap: 5px;
    padding: 5px;
    max-width: calc(100% - 16px);
  }

  .track-title {
    min-height: 16px;
    padding-top: 0;
    font-size: 10px;
  }

  .control-row {
    gap: 4px;
  }

  .control-button,
  .control-primary {
    min-width: auto;
    min-height: 30px;
    padding: 6px 8px;
    font-size: 10px;
  }
}
