* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --panel: rgb(1 35 45 / 72%);
  --teal: #16b9ae;
  --teal-bright: #23c8ba;
  --ink: #ffffff;
  --muted: #a7d8d6;
  --focus: #ffcf3f;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #052630;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-default, Roboto, Arial, sans-serif);
  font-synthesis: none;
  letter-spacing: 0;
  isolation: isolate;
  background: #052630;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(0 12 24 / 80%)), url("assets/touch/background-3840.webp") center / cover no-repeat;
  filter: hue-rotate(24deg) saturate(.8) brightness(.85);
}

button,
a { -webkit-tap-highlight-color: transparent; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

a { color: inherit; }

button:focus-visible,
a:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 5px;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 14px 18px;
  background: #002a35;
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.kiosk {
  width: 100%;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 156px minmax(min-content, 1fr) minmax(140px, auto);
  overflow: hidden;
}

.site-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(310px, 520px) minmax(0, 1fr) 86px;
  align-items: center;
  gap: 34px;
  min-width: 0;
  padding: 18px 64px 18px 76px;
  background: linear-gradient(90deg, rgb(0 121 116 / 82%), rgb(0 24 36 / 92%));
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.company-logo {
  filter: brightness(0) invert(1);
  width: 310px;
  max-height: 104px;
  object-fit: contain;
  object-position: left center;
}

.company-tagline {
  min-width: 0;
  margin: 0;
  font-family: var(--font-heading, Arial, sans-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
  text-transform: uppercase;
}

.language-switch {
  display: grid;
  align-content: center;
  justify-items: stretch;
  min-width: 72px;
}

.language-switch button {
  min-width: 64px;
  min-height: 48px;
  padding: 4px 8px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.language-switch button[aria-pressed="true"] {
  color: white;
  font-weight: 700;
}

.gallery {
  min-height: min-content;
  padding: 34px 76px 24px;
}

.video-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(min-content, 1fr));
  gap: 20px 70px;
}

.video-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(140px, 1fr) auto;
  gap: 7px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: white;
  background: transparent;
  text-align: left;
}

.video-poster {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: block;
  overflow: hidden;
  background: #e7efef;
  box-shadow: 0 8px 30px rgb(0 15 23 / 18%);
}

.video-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgb(255 255 255 / 13%);
  pointer-events: none;
}

.video-poster > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-caption {
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  padding: 5px 8px;
  background: #063c46;
}

.video-caption strong {
  display: block;
  min-width: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.video-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal-bright);
  box-shadow: 0 8px 22px rgb(0 55 60 / 24%);
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, background-color 180ms ease;
}

.video-play img {
  width: 34px;
  height: 34px;
  filter: brightness(0) invert(1);
  transform: translateX(2px);
}

.video-card:hover .video-play,
.video-card:focus-visible .video-play,
.video-card:active .video-play {
  background: #00a99d;
  transform: translate(-50%, -50%) scale(1.08);
}

.kiosk-footer {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 10px 76px 12px;
  background: linear-gradient(90deg, rgb(0 117 112 / 78%), rgb(0 22 34 / 92%));
}

.betaren-address {
  align-self: center;
  flex: 1 1 max-content;
  min-width: 0;
  max-width: 100%;
  color: #12b9af;
  font-size: 96px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 24px 32px;
  max-width: 100%;
  margin-left: auto;
}

.academy-actions {
  display: flex;
  align-items: center;
  gap: 34px;
}

.academy-logo {
  width: 230px;
  height: 76px;
  object-fit: contain;
}

.qr-strip {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.qr-link {
  width: 78px;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: white;
  font-size: 8px;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.qr-link img {
  width: 68px;
  height: 68px;
  display: block;
  padding: 3px;
  background: white;
}

.footer-festival-logo {
  display: block;
  filter: brightness(0) invert(1);
  flex: 0 0 auto;
  width: 90px;
  height: 90px;
  object-fit: contain;
}

html[lang="en"] .academy-actions { display: none; }
html[lang="en"] .footer-festival-logo { width: 280px; max-width: 100%; }

.player-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: white;
  background: #001b24;
  overscroll-behavior: contain;
}

.player-dialog::backdrop { background: #001b24; }

.player-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #001b24;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #001b24;
  object-fit: contain;
}

.player-close {
  position: absolute;
  z-index: 4;
  top: 28px;
  right: 28px;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgb(255 255 255 / 78%);
  border-radius: 50%;
  background: rgb(0 31 40 / 80%);
}

.player-close img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}

.player-language-switch {
  position: absolute;
  z-index: 4;
  top: 24px;
  left: 28px;
  display: flex;
  padding: 6px;
  background: rgb(0 31 40 / 82%);
}

.player-language-switch button { min-width: 72px; }

.player-placeholder {
  width: min(840px, calc(100% - 48px));
  padding: 72px 48px;
  border: 1px solid rgb(255 255 255 / 25%);
  background: rgb(0 50 59 / 72%);
  text-align: center;
}

.placeholder-number {
  display: block;
  margin-bottom: 16px;
  color: var(--teal-bright);
  font-size: 30px;
}

.player-placeholder h2 {
  margin: 0;
  font-size: 42px;
}

.player-placeholder button {
  min-height: 64px;
  margin-top: 32px;
  padding: 14px 26px;
  border: 0;
  color: #00363d;
  background: white;
  font-weight: 700;
}

.player-status {
  position: absolute;
  z-index: 3;
  bottom: 8%;
  left: 50%;
  max-width: calc(100% - 48px);
  padding: 14px 20px;
  background: rgb(0 31 40 / 88%);
  font-size: 20px;
  text-align: center;
  transform: translateX(-50%);
}

.player-status:empty { display: none; }
body.is-player-open { overflow: hidden; }

.external-dialog {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #052630;
  color: white;
}
.external-dialog[open] { display: flex; flex-direction: column; }
.external-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; }
.external-toolbar h2 { margin: 0; font-size: 22px; }
.external-toolbar button { min-height: 64px; padding: 12px 24px; border: 0; color: #052630; background: white; }
.external-help { margin: 0; padding: 0 20px 16px; font-size: 16px; }
.external-dialog iframe { flex: 1; width: 100%; min-height: 0; border: 0; background: white; }
@media (min-width: 2560px) {
  .external-toolbar { padding: 32px 48px; }
  .external-toolbar h2, .external-toolbar button { font-size: 36px; }
  .external-toolbar button { min-height: 100px; }
  .external-help { font-size: 28px; padding: 0 48px 24px; }
}

@media (min-width: 2560px) and (min-height: 1400px) {
  .kiosk { grid-template-rows: 318px minmax(min-content, 1fr) minmax(310px, auto); }
  .site-header {
    grid-template-columns: minmax(820px, 1fr) minmax(0, 2.3fr) 150px;
    gap: 70px;
    padding: 30px 300px;
  }
  .brand-lockup { gap: 54px; }
  .company-logo { width: 500px; max-height: 200px; }
  .company-tagline { font-size: 58px; }
  .language-switch { min-width: 120px; }
  .language-switch button { min-width: 120px; min-height: 72px; font-size: 38px; }
  .gallery { padding: 72px 304px 40px; }
  .video-grid { gap: 30px 270px; }
  .video-card { grid-template-rows: minmax(280px, 1fr) auto; gap: 10px; }
  .video-caption { min-height: 88px; }
  .video-caption strong { font-size: 29px; line-height: 1.25; }
  .video-play { width: 132px; height: 132px; }
  .video-play img { width: 64px; height: 64px; }
  .kiosk-footer { gap: 100px; padding: 18px 304px 22px; }
  .betaren-address { font-size: 224px; }
  .academy-actions { gap: 72px; }
  .academy-logo { width: 470px; height: 150px; }
  .qr-strip { gap: 42px; }
  .qr-link { width: 154px; gap: 8px; font-size: 17px; }
  .qr-link img { width: 138px; height: 138px; padding: 6px; }
  .footer-partners { column-gap: 64px; }
  .footer-festival-logo { width: 180px; height: 160px; }
  html[lang="en"] .footer-festival-logo { width: 500px; }
  .player-close { top: 48px; right: 48px; width: 132px; height: 132px; }
  .player-close img { width: 60px; height: 60px; }
  .player-language-switch { top: 46px; left: 48px; padding: 10px; }
}

@media (min-width: 1101px) and (max-width: 1399px) {
  .betaren-address { font-size: 64px; }
}

@media (max-width: 1100px), (orientation: portrait) {
  body { background-attachment: scroll; }
  .kiosk { display: block; min-height: 100svh; overflow: visible; }
  .site-header {
    position: sticky;
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 18px;
    min-height: 104px;
    padding: 12px 20px;
  }
  .brand-lockup { gap: 12px; }
  .company-logo { width: min(230px, 64vw); min-width: 0; max-height: 72px; flex: 1 1 auto; }
  .company-tagline {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 14px;
    text-align: left;
  }
  .language-switch { grid-column: 2; grid-row: 1; display: flex; min-width: 0; }
  .language-switch button { min-width: 52px; min-height: 48px; font-size: 18px; }
  .gallery { padding: 28px 20px 36px; }
  .video-grid {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 28px 20px;
  }
  .video-card { grid-template-rows: auto minmax(42px, auto); }
  .video-caption { min-height: 42px; }
  .video-poster { aspect-ratio: 16 / 9; }
  .video-caption strong { overflow: visible; white-space: normal; }
  .kiosk-footer { min-height: 136px; padding: 20px; }
  .betaren-address { font-size: 56px; }
  .academy-actions { gap: 18px; }
  .academy-logo { width: 160px; height: auto; }
  .qr-link { width: 70px; font-size: 8px; }
  .qr-link img { width: 64px; height: 64px; }
  .footer-festival-logo { width: 72px; height: 80px; }
  html[lang="en"] .footer-festival-logo { width: 230px; }
}

@media (max-width: 620px) {
  .site-header { min-height: 96px; padding-inline: 14px; }
  .company-logo { width: min(188px, 55vw); }
  .company-tagline { font-size: 12px; }
  .gallery { padding: 22px 14px 30px; }
  .video-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .video-card { grid-template-rows: auto minmax(36px, auto); }
  .video-caption { min-height: 36px; }
  .video-caption strong { font-size: 16px; }
  .video-play { width: 64px; height: 64px; }
  .kiosk-footer { gap: 20px; }
  .footer-partners { width: 100%; }
  .betaren-address { font-size: 40px; }
  .academy-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .academy-logo { width: 100%; max-width: 145px; }
  .qr-strip { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
