:root {
  color-scheme: dark;
  --ink: #030508;
  --panel: #090c11;
  --blue: #0662e7;
  --white: #f5f7fb;
  --line: rgba(255, 255, 255, 0.15);
  --pad: clamp(8px, 1vw, 16px);
  --gap: clamp(7px, 0.75vw, 12px);
  --header: clamp(70px, 8.8vh, 94px);
  --dock: clamp(78px, 10.5vh, 112px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.dashboard {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--dock);
  gap: var(--gap);
  width: 100%;
  height: 100svh;
  min-height: 0;
  padding: var(--pad);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 28% 25%, rgba(6, 98, 231, 0.13), transparent 30%),
    linear-gradient(135deg, #080b10, #020305 62%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

body.site-ready .dashboard {
  opacity: 1;
  visibility: visible;
}

.dashboard::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, black, transparent 72%);
}

.dashboard__header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 clamp(8px, 1.1vw, 20px);
  overflow: hidden;
  background: linear-gradient(90deg, rgba(11, 15, 22, 0.98), rgba(7, 10, 15, 0.82));
  border: 1px solid var(--line);
}

.dashboard__header::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(28vw, 440px);
  height: 3px;
  background: linear-gradient(90deg, var(--blue), rgba(255, 255, 255, 0.9) 74%, transparent);
}

.dashboard__header::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue));
}

.brand {
  display: flex;
  align-items: center;
  align-self: stretch;
  width: clamp(205px, 16vw, 280px);
  filter: drop-shadow(0 7px 15px rgba(0, 0, 0, 0.7));
}

.brand img {
  width: 100%;
}

.shot-selector {
  display: flex;
  gap: 5px;
  align-items: center;
}

.shot-selector__button {
  min-width: 52px;
  height: 36px;
  padding: 0 11px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.shot-selector__button.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.dashboard__workspace {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--gap);
  min-width: 0;
  min-height: 0;
}

.dashboard__strip {
  display: grid;
  grid-template-columns: minmax(0, 16fr) minmax(0, 9fr);
  gap: var(--gap);
  align-items: center;
  min-width: 0;
  min-height: 0;
}

.stage,
.feed,
.win-card,
.sponsor-dock {
  border: 1px solid var(--line);
}

.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #11151a;
}

.stage__photo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.stage__backdrop {
  position: absolute;
  z-index: 0;
  inset: -22px;
  background:
    radial-gradient(circle at 70% 42%, rgba(6, 98, 231, 0.22), transparent 32%),
    radial-gradient(circle at 34% 72%, rgba(183, 86, 24, 0.24), transparent 38%),
    linear-gradient(135deg, #11151a 0%, #07090d 56%, #020305 100%);
  filter: none;
  transform: scale(1.06);
}

.stage__photo.is-active {
  z-index: 1;
  opacity: 1;
}

.stage__photo img,
.stage__photo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(calc(var(--stage-x, 0) * 1px), calc(var(--stage-y, 0) * 1px), 0) scale(1.025);
  transition: transform 0.7s cubic-bezier(0.2, 0.72, 0.18, 1);
  will-change: transform;
}

.stage__photo--main img,
.stage__photo--main video {
  object-fit: cover;
  object-position: 50% 52%;
}

.stage__photo--main video {
  opacity: 0;
  transition:
    opacity 0.65s ease,
    transform 0.7s cubic-bezier(0.2, 0.72, 0.18, 1);
}

.stage.is-video-ready .stage__photo--main video {
  opacity: 1;
}

.site-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 72px);
  background: #000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

body.site-ready .site-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader__logo {
  display: block;
  width: clamp(240px, 34vw, 520px);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.86));
  animation: site-loader-breathe 1.6s ease-in-out infinite alternate;
}

@keyframes site-loader-breathe {
  from { opacity: 0.72; transform: scale(0.975); }
  to { opacity: 1; transform: scale(1); }
}

.stage__grade {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 92% at 0 0, rgba(0, 0, 0, 0.62), transparent 72%),
    linear-gradient(90deg, rgba(1, 3, 6, 0.55), transparent 36%, transparent 78%, rgba(1, 3, 6, 0.18)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 42%, rgba(0, 0, 0, 0.3));
}

.stage__brand {
  position: absolute;
  z-index: 4;
  top: clamp(12px, 1.35vw, 22px);
  left: clamp(12px, 1.35vw, 22px);
  width: clamp(220px, 22vw, 300px);
  pointer-events: none;
  filter: drop-shadow(0 9px 18px rgba(0, 0, 0, 0.78));
}

.stage__brand img {
  width: 100%;
  height: auto;
}

.stage__cut {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 0;
  width: min(36%, 420px);
  height: 5px;
  background: linear-gradient(90deg, var(--blue), white 68%, transparent);
}

.stage::after {
  display: none;
}

.feeds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  min-width: 0;
  min-height: 0;
  align-items: center;
}

.feed {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #07090c;
  aspect-ratio: 16 / 9;
}

.feed video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.feed__grade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, transparent 32%, rgba(0, 0, 0, 0.4) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 28%, rgba(0, 0, 0, 0.22));
}

.feed__line {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue));
}

.feed__live {
  position: absolute;
  z-index: 4;
  bottom: clamp(9px, 1vw, 14px);
  left: clamp(10px, 1.1vw, 16px);
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: clamp(0.58rem, 0.62vw, 0.72rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 8px #000;
}

.feed__live span {
  width: 7px;
  height: 7px;
  background: #f0222d;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(240, 34, 45, 0.18), 0 0 10px rgba(240, 34, 45, 0.7);
}

.wins {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  min-width: 0;
  min-height: 0;
  align-items: center;
}

.win-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #130702;
  border-radius: 0;
  aspect-ratio: 1;
}

.win-card picture,
.win-card img {
  display: block;
  width: 100%;
  height: 100%;
}

.win-card picture {
  position: absolute;
  inset: 0;
  opacity: 1;
}

.win-card img {
  object-fit: contain;
  object-position: 50% 50%;
}

.sponsor-dock {
  --sponsor-width: 14.285714%;
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #050608;
}

.sponsor-dock__track {
  display: grid;
  grid-auto-columns: var(--sponsor-width);
  grid-auto-flow: column;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.sponsor-dock__track.is-moving {
  transition: transform 780ms cubic-bezier(0.22, 0.72, 0.18, 1);
}

.sponsor-dock::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 auto auto 0;
  width: 24%;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.82), transparent);
}

.sponsor {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: clamp(6px, 0.8vw, 14px);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.sponsor--4wp {
  background: #000;
}

.sponsor img,
.sponsor svg {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: clamp(30px, 4.8vh, 52px);
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.story-layer {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 32px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0s linear 0.35s, opacity 0.35s ease;
}

.story-layer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.story-layer__backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: rgba(0, 2, 5, 0.88);
  backdrop-filter: blur(14px);
}

.story-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  width: min(1180px, 94vw);
  height: min(760px, 88svh);
  min-height: 0;
  overflow: hidden;
  background: #090c11;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72);
}

.story-panel::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--blue));
}

.story-panel__close {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  cursor: pointer;
  color: #fff;
  background: rgba(3, 5, 8, 0.78);
  font-size: 2rem;
  font-weight: 200;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
}

.story-panel__visual {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1a0c04;
}

.story-panel__visual picture,
.story-panel__visual img {
  width: 100%;
  height: 100%;
}

.story-panel__visual img {
  object-fit: cover;
}

.story-panel__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: clamp(34px, 4vw, 70px);
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(6, 98, 231, 0.12), transparent 31%),
    #090c11;
}

.story-panel__copy > time {
  display: block;
  margin-bottom: clamp(18px, 2vh, 28px);
  color: #8bb7ff;
  font-size: clamp(0.67rem, 0.7vw, 0.8rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.story-panel h2 {
  max-width: 15ch;
  margin: 0 0 clamp(22px, 3vh, 38px);
  color: #fff;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(2rem, 3.2vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.story-panel h2 span {
  white-space: nowrap;
}

.story-panel__copy > p {
  max-width: 62ch;
  margin: 0 0 1.15em;
  color: #c2c7d0;
  font-size: clamp(0.92rem, 1vw, 1.08rem);
  line-height: 1.55;
}

.story-panel__results {
  display: grid;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.story-panel__results p {
  margin: 0;
  padding: clamp(9px, 1.2vh, 14px) 0;
  color: #fff;
  font-size: clamp(0.8rem, 0.9vw, 1rem);
  font-weight: 800;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (orientation: landscape) {
  :root {
    --pad: clamp(6px, 0.65vw, 10px);
    --gap: clamp(5px, 0.5vw, 8px);
    --dock: clamp(62px, 8.8vh, 82px);
  }

  .stage__brand {
    top: clamp(7px, 0.7vw, 12px);
    left: clamp(8px, 0.8vw, 14px);
    width: clamp(172px, 16vw, 220px);
  }
}

@media (orientation: portrait) {
  :root {
    --pad: 6px;
    --gap: 6px;
    --header: clamp(58px, 7.8vh, 70px);
    --dock: clamp(82px, 10.5vh, 102px);
  }

  .dashboard__workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .brand {
    width: clamp(176px, 34vw, 250px);
  }

  .shot-selector__button {
    min-width: 40px;
    height: 32px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .dashboard__strip {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .stage__brand {
    top: 10px;
    left: 10px;
    width: clamp(150px, 43vw, 245px);
  }

  .stage__photo--main img,
  .stage__photo--main video {
    object-fit: cover;
    object-position: 50% 54%;
  }

  .wins {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
  }

  .win-card picture {
    opacity: 1;
  }

  .win-card img {
    object-fit: contain;
  }

  .feed video {
    object-position: 50% 47%;
  }

  .win-card__caption {
    padding: 7px;
  }

  .win-card__caption time {
    font-size: 0.42rem;
  }

  .win-card__caption strong {
    font-size: clamp(0.56rem, 2vw, 0.72rem);
  }

  .sponsor-dock {
    --sponsor-width: 25%;
  }

  .sponsor {
    padding: 5px 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
  }

  .sponsor img,
  .sponsor svg {
    max-height: clamp(28px, 5.5vh, 48px);
  }

  .story-layer {
    padding: 6px;
  }

  .story-panel {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(108px, 18vh) minmax(0, 1fr);
    width: 100%;
    height: 100%;
  }

  .story-panel__visual img {
    object-position: 50% 48%;
  }

  .story-panel__copy {
    padding: clamp(18px, 5vw, 34px);
  }

  .story-panel__copy > time {
    margin-bottom: 11px;
    font-size: 0.58rem;
  }

  .story-panel h2 {
    max-width: 18ch;
    margin-bottom: 14px;
    font-size: clamp(1.3rem, 5.8vw, 2rem);
  }

  .story-panel__copy > p {
    margin-bottom: 0.85em;
    font-size: clamp(0.72rem, 2.8vw, 0.9rem);
    line-height: 1.42;
  }

  .story-panel__results p {
    padding: 7px 0;
    font-size: clamp(0.68rem, 2.6vw, 0.82rem);
  }
}

@media (max-width: 520px) and (orientation: portrait) {
  :root {
    --header: 58px;
    --dock: 86px;
  }

  .brand {
    width: 176px;
  }

  .dashboard__strip {
    grid-template-rows: auto auto;
  }

  .stage::after {
    width: 34px;
    height: 34px;
  }

  .story-panel {
    grid-template-rows: 112px minmax(0, 1fr);
  }

  .story-panel__close {
    top: 7px;
    right: 7px;
    width: 36px;
    height: 36px;
    font-size: 1.7rem;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  :root {
    --pad: 5px;
    --gap: 5px;
    --header: 50px;
    --dock: 64px;
  }

  .brand {
    width: 146px;
  }

  .shot-selector__button {
    height: 28px;
  }

  .dashboard__workspace {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .stage__photo--main img,
  .stage__photo--main video {
    object-fit: cover;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .sponsor {
    padding: 6px 10px;
  }

  .sponsor img,
  .sponsor svg {
    max-height: 30px;
  }

  .story-panel {
    height: 96svh;
  }

  .story-panel__copy {
    padding: 22px 32px;
  }

  .story-panel__copy > time {
    margin-bottom: 9px;
  }

  .story-panel h2 {
    margin-bottom: 13px;
    font-size: clamp(1.5rem, 4.4vh, 2.2rem);
  }

  .story-panel__copy > p {
    margin-bottom: 0.7em;
    font-size: clamp(0.72rem, 2.2vh, 0.9rem);
    line-height: 1.4;
  }

  .story-panel__results p {
    padding: 5px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sponsor-dock {
    --sponsor-width: 7.692308%;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .stage__photo img,
  .stage__photo video {
    transform: scale(1.025) !important;
  }
}
