@charset "UTF-8";

@font-face {
  font-family: "RF Dewi";
  src: url("fonts/rf-dewi-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "RF Dewi Expanded";
  src: url("fonts/rf-dewi-expanded-ultrabold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Druk Wide Cyr";
  src: url("fonts/druk-wide-cyr-heavy.otf") format("opentype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --bg: #06111e;
  --paper: #f6f9fc;
  --muted: #aebdce;
  --blue: #1768c4;
  --red: #e42d3c;
  --edge: rgba(255, 255, 255, 0.14);
  --ease: cubic-bezier(.22, .78, .24, 1);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  color: var(--paper);
  font-family: "RF Dewi", Arial, Helvetica, sans-serif;
  cursor: none;
  user-select: none;
}

img { display: block; }

.ambient-bg,
.ambient-grid,
.ambient-glow,
.ambient-vignette,
.flag-fragments {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient-bg {
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 15%, rgba(24, 100, 188, .22), transparent 35%),
    radial-gradient(circle at 88% 88%, rgba(201, 31, 47, .18), transparent 33%),
    linear-gradient(135deg, #081827 0%, #07131f 48%, #091520 100%);
}

.ambient-grid {
  opacity: .72;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 5.2vmin 5.2vmin;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.72), transparent 82%);
}

.ambient-grid::after {
  position: absolute;
  inset: -10%;
  background: repeating-linear-gradient(112deg, transparent 0 11vw, rgba(255,255,255,.026) 11.05vw 11.14vw);
  content: "";
  animation: technical-drift 24s linear infinite;
}

.ambient-glow::before,
.ambient-glow::after {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  content: "";
  filter: blur(8vw);
  opacity: .16;
  animation: glow-breathe 8s ease-in-out infinite alternate;
}

.hero-copy {
  text-transform: uppercase;
}
  

.ambient-glow::before {
  left: -20vw;
  top: 12vh;
  background: #0f6fcf;
}

.ambient-glow::after {
  right: -20vw;
  bottom: -14vh;
  background: #df2535;
  animation-delay: -4s;
}

.ambient-vignette {
  background:
    linear-gradient(90deg, rgba(1,6,12,.48), transparent 13%, transparent 87%, rgba(1,6,12,.48)),
    linear-gradient(rgba(1,6,12,.48), transparent 14%, transparent 86%, rgba(1,6,12,.5));
}

.flag-fragments { overflow: hidden; opacity: .64; }

.flag-band {
  position: absolute;
  left: -31vw;
  height: .82vh;
  min-height: 7px;
  border-radius: 999px;
  box-shadow: 0 0 1.45vw currentColor;
  opacity: .34;
  transform: translate3d(0,0,0) rotate(-11deg);
  animation: flag-drift linear infinite;
}

.flag-band.white { background: #fff; color: #fff; }
.flag-band.blue { background: #287ad7; color: #287ad7; }
.flag-band.red { background: #ed3c4a; color: #ed3c4a; }

.safe-frame {
  position: fixed;
  z-index: 2;
  inset: 2.6vmin;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}

.safe-frame::before,
.safe-frame::after {
  position: absolute;
  width: 6.5vmin;
  height: 6.5vmin;
  content: "";
}

.safe-frame::before {
  left: -1px;
  top: -1px;
  border-left: 2px solid rgba(255,255,255,.52);
  border-top: 2px solid rgba(255,255,255,.52);
}

.safe-frame::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid rgba(255,255,255,.52);
  border-bottom: 2px solid rgba(255,255,255,.52);
}

.screen-shell {
  position: relative;
  z-index: 3;
  display: flex;
  width: 100vw;
  height: 100vh;
  padding: 6.4vh 6.1vw;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1.2vw;
  margin: 0;
  color: #bfccda;
  font-family: "RF Dewi Expanded", Arial, sans-serif;
  font-size: clamp(11px, .82vw, 18px);
  font-weight: 700;
  letter-spacing: .24em;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 3.7vw;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0 33%, white 33% 66%, var(--blue) 66%);
  content: "";
}

.competition-title {
  width: min(56vw, 1080px);
  height: auto;
  filter: drop-shadow(0 1.3vw 2.8vw rgba(0,0,0,.35));
}

.intro-screen {
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  padding-top: 5.4vh;
  padding-bottom: 17vh;
  text-align: center;
}

.intro-screen .eyebrow { margin-bottom: 2.2vh; }

.intro-screen .competition-title {
  width: min(52vw, 1000px);
  margin-bottom: 2.1vh;
  animation: title-enter 1.3s var(--ease) both;
}

.event-description {
  position: absolute;
  left: 5vw;
  right: 5vw;
  top: 32.5vh;
  bottom: 17.4vh;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  margin: 0;
  color: #edf3fa;
  font-family: "Druk Wide Cyr", "RF Dewi Expanded", Arial, sans-serif;
  font-size: clamp(28px, 2.6vw, 50px);
  font-weight: 900;
  letter-spacing: -.018em;
  line-height: 1.1;
  text-wrap: balance;
  animation: rise-in 1.1s .3s var(--ease) both;
}

.partner-zone {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0;
  margin: 0;
  animation: rise-in 1.1s .3s var(--ease) both;
}

.partner-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75vw;
}

.partner-pill {
  display: grid;
  width: 10.6vw;
  height: 10.7vh;
  min-height: 82px;
  place-items: center;
  overflow: hidden;
  padding: 1.45vh 1.05vw;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 1.1vmin;
  background: rgba(255,255,255,.94);
  box-shadow: 0 1.6vh 4vh rgba(0,0,0,.18);
}

.partner-pill img {
  display: block;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-pill[data-logo="minsport"] img { max-width: 55%; max-height: 72%; }
.partner-pill[data-logo="federation"] img { max-width: 48%; max-height: 72%; }
.partner-pill[data-logo="gazprom"] img { max-width: 88%; max-height: 82%; }
.partner-pill[data-logo="department"] img { max-width: 78%; max-height: 92%; }
.partner-pill[data-logo="latat"] img { max-width: 88%; max-height: 72%; }

.logo-switch {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 3.4vh;
  width: min(24vw, 520px);
  height: min(14vh, 160px);
  min-height: 112px;
  transform: translateX(-50%);
  perspective: 1100px;
}

.logo-switch::before,
.logo-switch::after {
  position: absolute;
  top: 50%;
  width: 11vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.24));
  content: "";
}

.logo-switch::before { right: calc(100% + 2vw); }
.logo-switch::after { left: calc(100% + 2vw); transform: scaleX(-1); }

.swap-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  backface-visibility: hidden;
  filter: drop-shadow(0 1vh 1.2vh rgba(0,0,0,.3));
  animation: logo-front 10s var(--ease) infinite;
}

.swap-logo.sila {
  left: 29%;
  width: 42%;
  padding: 0;
  animation-name: logo-back;
}

.opening-screen {
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  padding-top: 17vh;
  padding-bottom: 9vh;
  text-align: center;
}

.opening-screen .competition-title {
  width: min(44vw, 845px);
  margin-bottom: 9.5vh;
  animation: title-enter 1.25s var(--ease) both;
}

.ceremony-heading {
  max-width: 71vw;
  margin: 0;
  font-family: "Druk Wide Cyr", "RF Dewi Expanded", Arial, sans-serif;
  font-size: clamp(34px, 3.55vw, 76px);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.04;
  text-wrap: balance;
  animation: rise-in 1.1s .25s var(--ease) both;
}

.award-screen {
  flex-direction: column;
  padding-right: 7vw;
  padding-bottom: 7vh;
  padding-left: 7vw;
}

.award-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3.5vh;
}

.award-header h1 {
  margin: .8vh 0 0;
  font-family: "Druk Wide Cyr", "RF Dewi Expanded", Arial, sans-serif;
  font-size: clamp(48px, 4.4vw, 88px);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1;
}

.grid-note {
  margin: 0 0 .7vh;
  color: #8fa2b7;
  font-family: "RF Dewi Expanded", Arial, sans-serif;
  font-size: clamp(10px, .7vw, 15px);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.partner-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4.1vmin 3.1vmin;
  min-height: 0;
  margin: 0 1.35vw 1vh;
}

.grid-cell {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: .9vmin;
  background: rgba(255,255,255,.075);
  opacity: 0;
  transform: translateY(1.5vh) scale(.98);
  transition: opacity .34s ease, transform .44s var(--ease), filter .34s ease,
    background-color .42s ease, border-color .42s ease, box-shadow .42s ease;
  animation: cell-enter .7s var(--ease) forwards;
}

.grid-cell.is-ready {
  opacity: 1;
  transform: none;
  animation: none;
}

.grid-cell.is-ready.is-updating {
  opacity: .3;
  filter: blur(2px);
  transform: scale(.94);
}

.grid-cell.pattern::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 46%, rgba(255,255,255,.1) 46.3% 46.8%, transparent 47.1%),
    repeating-linear-gradient(90deg, transparent 0 1.2vw, rgba(255,255,255,.075) 1.22vw 1.3vw);
  content: "";
}

.grid-cell.pattern::after {
  width: 2.8vmin;
  height: 2.8vmin;
  border: 1px solid rgba(255,255,255,.2);
  content: "";
  transform: rotate(45deg);
}

.grid-cell.logo {
  padding: 2.6vh 2.25vw;
  border-color: rgba(255,255,255,.28);
  background: rgba(244,248,252,.91);
  box-shadow: 0 .8vh 2vh rgba(0,0,0,.1);
}

.grid-cell.logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.grid-cell.logo[data-logo="minsport"] img,
.grid-cell.logo[data-logo="olympic"] img,
.grid-cell.logo[data-logo="federation"] img {
  max-width: 52%;
  max-height: 84%;
}

.grid-cell.logo[data-logo="gazprom"] img { max-width: 86%; max-height: 72%; }
.grid-cell.logo[data-logo="department"] img { max-width: 78%; max-height: 86%; }
.grid-cell.logo[data-logo="latat"] img { max-width: 84%; max-height: 68%; }

.carousel-screen {
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.carousel-kicker {
  position: absolute;
  left: 6.1vw;
  top: 6.4vh;
}

.carousel-stage {
  position: relative;
  width: min(56vh, 42vw, 600px);
  height: min(56vh, 42vw, 600px);
  perspective: 1500px;
}

.carousel-stage::before,
.carousel-stage::after {
  position: absolute;
  z-index: -1;
  left: 50%;
  width: 72%;
  height: 2px;
  content: "";
  transform: translateX(-50%);
}

.carousel-stage::before {
  top: -6vh;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.26), transparent);
}

.carousel-stage::after {
  bottom: -6vh;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
}

.sequence-card {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10%;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 2.1vmin;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(234,241,248,.94));
  box-shadow: 0 3vh 8vh rgba(0,0,0,.32);
  transform: rotateY(0deg) scale(1);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease), opacity .46s ease, filter .46s ease;
}

.sequence-card.sila-card {
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.sequence-card img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sequence-card.sila-card img { max-width: 46%; max-height: 46%; }
.sequence-card[data-content="gazprom"] img { max-width: 86%; max-height: 62%; }
.sequence-card[data-content="federation"] img { max-width: 57%; max-height: 84%; }
.sequence-card[data-content="latat"] img { max-width: 86%; max-height: 60%; }

.sequence-card.is-flipping {
  opacity: 0;
  filter: blur(7px);
  transform: rotateY(88deg) scale(.9);
}

.sequence-card.is-revealing {
  opacity: 0;
  filter: blur(7px);
  transform: rotateY(-88deg) scale(.9);
  transition: none;
}

.qr-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: .35vmin dashed #1d4770;
  border-radius: 1.3vmin;
  color: #0f2f4d;
  text-align: center;
}

.qr-placeholder::before {
  width: 8vmin;
  height: 8vmin;
  margin-bottom: 2.5vh;
  border: 1.2vmin solid #173f64;
  box-shadow: inset 0 0 0 .8vmin #eef3f8, inset 0 0 0 1.4vmin #173f64;
  content: "";
}

.qr-placeholder strong {
  font-family: "Druk Wide Cyr", "RF Dewi Expanded", Arial, sans-serif;
  font-size: clamp(34px, 4vw, 80px);
  letter-spacing: -.045em;
  line-height: 1;
}

.qr-placeholder span {
  margin-top: 1vh;
  color: #5b7288;
  font-family: "RF Dewi Expanded", Arial, sans-serif;
  font-size: clamp(10px, .78vw, 17px);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.sequence-progress {
  position: absolute;
  left: 50%;
  bottom: 6.2vh;
  display: flex;
  gap: .55vw;
  transform: translateX(-50%);
}

.progress-dot {
  width: .42vw;
  min-width: 6px;
  height: .42vw;
  min-height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  transition: width .45s var(--ease), background .45s ease;
}

.progress-dot.active { width: 2.4vw; background: #fff; }

.paused-indicator {
  position: fixed;
  z-index: 20;
  right: 4.6vw;
  bottom: 4.5vh;
  padding: .7vh .8vw;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: .5vmin;
  background: rgba(2,10,18,.72);
  color: #c6d2df;
  font-size: clamp(9px, .6vw, 13px);
  font-weight: 700;
  letter-spacing: .16em;
  opacity: 0;
  text-transform: uppercase;
  transform: translateY(1vh);
  transition: opacity .25s ease, transform .25s ease;
}

body.is-paused .paused-indicator { opacity: 1; transform: none; }
body.is-paused *, body.is-paused *::before, body.is-paused *::after { animation-play-state: paused !important; }

@keyframes flag-drift {
  0% { transform: translate3d(0, 0, 0) rotate(-11deg); }
  100% { transform: translate3d(154vw, -29vw, 0) rotate(-11deg); }
}

@keyframes technical-drift { to { transform: translate3d(8vw, 0, 0); } }

@keyframes glow-breathe {
  from { opacity: .1; transform: scale(.88); }
  to { opacity: .21; transform: scale(1.12); }
}

@keyframes title-enter {
  from { opacity: 0; transform: scale(.92); filter: blur(12px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(2.5vh); }
  to { opacity: 1; transform: none; }
}

@keyframes logo-front {
  0%, 42% { opacity: 1; transform: rotateY(0deg) scale(1); }
  48%, 92% { opacity: 0; transform: rotateY(92deg) scale(.86); }
  98%, 100% { opacity: 1; transform: rotateY(0deg) scale(1); }
}

@keyframes logo-back {
  0%, 42% { opacity: 0; transform: rotateY(-92deg) scale(.86); }
  48%, 92% { opacity: 1; transform: rotateY(0deg) scale(1); }
  98%, 100% { opacity: 0; transform: rotateY(-92deg) scale(.86); }
}

@keyframes cell-enter { to { opacity: 1; transform: none; } }
@keyframes cell-leave { to { opacity: 0; transform: scale(.96); } }

@media (max-aspect-ratio: 4/3) {
  .event-description { left: 7vw; right: 7vw; }
  .partner-pill { width: 13.6vw; }
  .logo-switch { width: min(31vw, 480px); }
  .carousel-stage { width: min(57vh, 58vw); height: min(57vh, 58vw); }
}

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