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

* { box-sizing: border-box; }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-width: 280px;
  background: #004b58;
}

/* Keep the full photograph's framing, excluding its baked-in corner logo. */
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 177.777778svh);
  aspect-ratio: 16 / 9;
  background: url('/assets/portada-ppt-IVCongreso.jpg') center / contain no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% 91%, 81% 91%, 81% 100%, 0 100%);
}

.landing {
  position: relative;
  --page-inset: clamp(16px, 2vw, 32px);
  --brand-width: clamp(150px, 19vw, 245px);
  --brand-height: calc(var(--brand-width) * 400 / 720);
  --logo-gap: 12px;
  --footer-space: max(48px, calc(8.4svh + var(--logo-gap)));
  --player-height: max(180px, calc(100svh - var(--page-inset) - var(--brand-height) - var(--logo-gap) - var(--footer-space)));
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: var(--logo-gap);
  padding: var(--page-inset) clamp(12px, 2vw, 40px) var(--footer-space);
}

.header {
  align-self: center;
  height: var(--brand-height);
}
.brand { margin: 0; line-height: 0; }
.brand img {
  display: block;
  width: calc(var(--brand-width) * 0.7);
  height: auto;
}

.footer {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  line-height: 0;
}

.footer img {
  display: block;
  width: clamp(140px, 13vw, 210px);
  height: auto;
}

.main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.player {
  width: min(100%, 74vw, 1440px, calc(var(--player-height) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: rgb(0 27 34 / 85%);
  border: 1px solid rgb(255 255 255 / 18%);
  box-shadow: 0 16px 56px rgb(0 20 26 / 28%);
  overflow: hidden;
}

.player:has(.placeholder) {
  background: rgb(0 27 34 / 45%);
}

/* Use the reference as a size limit while preserving the video's proportions. */
@media (min-width: 1600px) and (min-height: 700px) {
  .landing {
    --footer-space: max(48px, calc(7.5svh + var(--logo-gap)));
  }
  .main {
    margin-top: -16px;
    transform: translateY(-24px);
  }
  .player { width: min(100%, 74vw, 1440px, calc((var(--player-height) + 16px) * 16 / 9)); }
}

.player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.placeholder {
  height: 100%;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.placeholder svg { width: 48px; height: 48px; color: #00bad2; }
.placeholder p { margin: 0; max-width: 28ch; font-size: clamp(16px, 2vw, 22px); line-height: 1.5; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  body::before { position: absolute; }
  .landing { --page-inset: 24px; padding-inline: 18px; }
  .player { width: 100%; }
  .placeholder { gap: 12px; padding: 16px; }
  .placeholder svg { width: 36px; height: 36px; }
}

@media (max-height: 600px) {
  body::before { position: absolute; }
}
