:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #f1e5bc;
  background: #043124;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --gold: #d6bc79;
  --gold-light: #f4e7b8;
  --green: #073e2d;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  min-height: 100svh;
  margin: 0;
  isolation: isolate;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background: #043124 url('/backgrounds/ornament.png') center / 100% 100% no-repeat;
  content: '';
  pointer-events: none;
}

body[data-background='classic']::before {
  background-image: url('/backgrounds/classic.png');
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.carousel:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 5px;
}

button:disabled {
  cursor: default;
}

svg {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.landing {
  width: min(650px, calc(100% - 100px));
  margin: 0 auto;
  padding: 36px 0 42px;
}

.intro {
  margin-bottom: 25px;
  text-align: center;
}

.nameplate {
  position: relative;
  display: grid;
  width: 264px;
  max-width: 100%;
  min-height: 44px;
  place-items: center;
  margin: 0 auto 22px;
  padding: 6px 45px;
  border: 1px solid var(--gold);
  border-radius: 40px;
  background: rgb(3 48 36 / 48%);
  box-shadow: 0 0 0 3px rgb(214 188 121 / 4%), inset 0 0 16px rgb(214 188 121 / 4%);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.nameplate__mark {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 29px;
  height: 29px;
  stroke: var(--gold);
  stroke-width: 1.2;
  transform: translateY(-50%);
}

h1 {
  max-width: 14em;
  margin: 0 auto;
  color: var(--gold-light);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(32px, 4.2vw, 46px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.015em;
  text-wrap: balance;
  text-transform: uppercase;
}

.ornament-divider {
  display: flex;
  width: 150px;
  height: 25px;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.ornament-divider::before,
.ornament-divider::after {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold));
  content: '';
}

.ornament-divider::after {
  transform: rotate(180deg);
}

.ornament-divider span {
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.intro__description {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  max-width: 32em;
  margin: 0 auto;
  color: #dedbbd;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.intro__description span {
  min-width: 0;
  text-wrap: balance;
}

.intro__description svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  stroke-width: 1.4;
}

.intro__description svg path {
  fill: var(--gold);
  stroke: none;
}

.carousel {
  position: relative;
  border-radius: 18px;
}

.carousel__viewport {
  overflow: hidden;
  border-radius: 18px;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.carousel__track {
  display: flex;
  align-items: flex-start;
  transition: transform 420ms cubic-bezier(0.2, 0.65, 0.2, 1);
}

.carousel__page {
  display: grid;
  min-width: 0;
  flex: 0 0 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.video-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 0.88;
  border: 1px solid #d2be88;
  border-radius: 17px;
  background: #0b3a2d;
  box-shadow: 0 5px 18px rgb(0 15 10 / 16%);
  isolation: isolate;
}

.video-card::after {
  position: absolute;
  z-index: 1;
  inset: 50% 0 0;
  background: linear-gradient(transparent 20%, rgb(0 20 13 / 45%));
  content: '';
  pointer-events: none;
}

.video-card__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b3a2d;
}

.video-card__surface {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.video-card__surface:focus-visible {
  outline-offset: -5px;
  border-radius: inherit;
}

.video-card__number {
  position: absolute;
  z-index: 3;
  top: 11px;
  left: 11px;
  display: grid;
  min-width: 29px;
  height: 24px;
  padding: 0 7px;
  place-items: center;
  border: 1px solid rgb(244 231 184 / 30%);
  border-radius: 20px;
  background: rgb(2 37 25 / 55%);
  color: #f9edc9;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.1em;
  pointer-events: none;
  backdrop-filter: blur(5px);
}

.video-card__controls {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.video-card__control,
.video-card__expand {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 10px;
  place-items: center;
  border: 1px solid #e0cd97;
  border-radius: 50%;
  background: rgb(3 54 37 / 85%);
  color: var(--gold-light);
  box-shadow: 0 2px 6px rgb(0 15 10 / 15%);
  pointer-events: auto;
  transition: background 180ms, transform 180ms;
  backdrop-filter: blur(6px);
}

.video-card__control svg {
  width: 21px;
  height: 21px;
}

.video-card__control[data-play] svg {
  margin-left: 2px;
}

.is-playing .video-card__control[data-play] svg {
  margin-left: 0;
}

.video-card__expand {
  position: absolute;
  z-index: 4;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  padding: 12px;
  border-color: rgb(244 231 184 / 40%);
  background: rgb(3 40 28 / 55%);
  opacity: 0;
  transition: opacity 180ms;
}

.video-card__expand svg {
  width: 17px;
  height: 17px;
}

.video-card:hover .video-card__expand,
.video-card:focus-within .video-card__expand {
  opacity: 1;
}

.video-card__progress {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 61px;
  left: 12px;
  width: calc(100% - 24px);
  height: 18px;
  margin: 0;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  --progress: 0%;
}

.video-card__progress::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--gold-light) var(--progress), rgb(255 255 255 / 38%) var(--progress));
  box-shadow: 0 1px 4px rgb(0 0 0 / 25%);
}

.video-card__progress::-moz-range-track {
  height: 3px;
  border-radius: 3px;
  background: rgb(255 255 255 / 38%);
}

.video-card__progress::-moz-range-progress {
  height: 3px;
  border-radius: 3px;
  background: var(--gold-light);
}

.video-card__progress::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 1px 5px rgb(0 0 0 / 30%);
}

.video-card__progress::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--gold-light);
}

.has-started .video-card__progress,
.video-card__progress:focus-visible {
  opacity: 1;
}

.video-card__message {
  position: absolute;
  z-index: 3;
  inset: 30% 12px auto;
  padding: 12px;
  border-radius: 8px;
  background: rgb(1 30 20 / 90%);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
}

.is-loading .video-card__controls [data-play] {
  animation: loading 1s ease-in-out infinite alternate;
}

.video-card--upcoming {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border-color: rgb(214 188 121 / 35%);
  background: radial-gradient(ellipse at 50% 40%, #104c36, #062d22);
}

.video-card__upcoming-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 17px;
  place-items: center;
  border: 1px solid rgb(214 188 121 / 40%);
  border-radius: 50%;
  color: var(--gold);
}

.video-card__upcoming-mark svg {
  margin-left: 3px;
  opacity: 0.65;
}

.video-card__upcoming-title {
  margin: 0 0 7px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 400;
}

.video-card__upcoming-note {
  color: #a7b99c;
  font-size: 12px;
}

.carousel__arrow {
  position: absolute;
  z-index: 6;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 11px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgb(3 48 34 / 94%);
  color: var(--gold-light);
  transform: translateY(-50%);
  transition: background 180ms, box-shadow 180ms;
}

.carousel__arrow svg {
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.7;
}

.carousel__arrow--previous {
  left: -65px;
}

.carousel__arrow--next {
  right: -65px;
}

.carousel-footer {
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: center;
  gap: 21px;
}

.carousel-footer__line {
  width: 76px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(214 188 121 / 80%));
}

.carousel-footer__line:last-child {
  transform: rotate(180deg);
}

.carousel__pagination {
  display: flex;
  align-items: center;
  gap: 3px;
}

.carousel__dot {
  position: relative;
  display: grid;
  width: 36px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
}

.carousel__dot::after {
  width: 6px;
  height: 6px;
  border: 1px solid #bdab76;
  border-radius: 50%;
  background: transparent;
  content: '';
  transition: background 180ms, transform 180ms;
}

.carousel__dot[aria-current='true']::after {
  background: var(--gold-light);
  transform: scale(1.3);
}

.telegram-link {
  display: flex;
  min-height: 81px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 15px 25px;
  border: 1px solid var(--gold);
  border-radius: 38px;
  background: linear-gradient(180deg, rgb(30 91 63 / 86%), rgb(4 45 32 / 96%));
  box-shadow: inset 0 1px 0 rgb(255 238 183 / 17%), 0 6px 25px rgb(0 19 10 / 20%);
  color: var(--gold-light);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(19px, 2.5vw, 27px);
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 180ms, box-shadow 180ms, transform 180ms;
}

.telegram-link__icon {
  display: grid;
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-light);
  color: #104c35;
}

.telegram-link__icon svg {
  width: 26px;
  height: 26px;
  margin-left: -1px;
  fill: currentColor;
}

.telegram-link__arrow {
  width: 21px;
  height: 21px;
  margin-left: auto;
  stroke: var(--gold);
  stroke-width: 1.3;
}

[data-telegram-label] {
  min-width: 0;
  text-align: center;
  text-wrap: balance;
}

.load-error,
.noscript {
  padding: 12px;
  color: #e2d6b5;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

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

.has-fullscreen-player {
  overflow: hidden;
}

.fullscreen-player {
  --player-side: clamp(12px, 3vw, 24px);
  --player-bottom: calc(16px + env(safe-area-inset-bottom));
  position: fixed;
  inset: 0;
  overflow: hidden;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #030b08;
  color: var(--gold-light);
}

.fullscreen-player::backdrop {
  background: #030b08;
}

.fullscreen-player__content {
  position: relative;
  width: 100%;
  height: 100%;
  background: #030b08;
}

.fullscreen-player__stage {
  position: absolute;
  inset: 0;
  touch-action: none;
}

.fullscreen-player .video-card {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: #030b08;
}

.fullscreen-player .video-card::after {
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(transparent, rgb(0 10 5 / 80%));
}

.fullscreen-player .video-card__video {
  object-fit: contain;
}

.fullscreen-player__top {
  position: absolute;
  z-index: 8;
  top: calc(12px + env(safe-area-inset-top));
  right: max(var(--player-side), env(safe-area-inset-right));
  left: max(var(--player-side), env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.fullscreen-player__counter {
  padding: 9px 13px;
  border: 1px solid rgb(214 188 121 / 25%);
  border-radius: 24px;
  background: rgb(3 28 18 / 70%);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}

.fullscreen-player__close,
.fullscreen-player__arrow {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 11px;
  place-items: center;
  border: 1px solid rgb(214 188 121 / 65%);
  border-radius: 50%;
  background: rgb(3 37 24 / 85%);
  color: var(--gold-light);
  pointer-events: auto;
}

.fullscreen-player__arrow {
  position: absolute;
  z-index: 7;
  top: 50%;
  transform: translateY(-50%);
}

.fullscreen-player__arrow--previous {
  left: max(var(--player-side), env(safe-area-inset-left));
}

.fullscreen-player__arrow--next {
  right: max(var(--player-side), env(safe-area-inset-right));
}

.fullscreen-player .video-card__number {
  display: none;
}

.fullscreen-player .video-card__expand {
  top: auto;
  right: max(var(--player-side), env(safe-area-inset-right));
  bottom: var(--player-bottom);
  width: 44px;
  height: 44px;
  padding: 11px;
  opacity: 1;
}

.fullscreen-player .video-card__controls {
  right: auto;
  bottom: var(--player-bottom);
  left: max(var(--player-side), env(safe-area-inset-left));
  gap: 14px;
}

.fullscreen-player .video-card__control {
  width: 44px;
  height: 44px;
  padding: 11px;
}

.fullscreen-player .video-card__expand svg,
.fullscreen-player .video-card__control svg {
  width: 22px;
  height: 22px;
}

.fullscreen-player .video-card__progress {
  right: max(var(--player-side), env(safe-area-inset-right));
  bottom: calc(var(--player-bottom) + 59px);
  left: max(var(--player-side), env(safe-area-inset-left));
  width: calc(100% - max(var(--player-side), env(safe-area-inset-left)) - max(var(--player-side), env(safe-area-inset-right)));
  height: 24px;
  opacity: 1;
}

@keyframes loading {
  to { opacity: 0.4; }
}

@media (hover: hover) {
  .video-card__control:hover,
  .carousel__arrow:hover {
    background: #1d6041;
    box-shadow: 0 0 0 4px rgb(214 188 121 / 8%);
  }

  .video-card__control:hover {
    transform: scale(1.05);
  }

  .telegram-link:hover {
    border-color: #f6e4a6;
    box-shadow: inset 0 1px 0 rgb(255 238 183 / 25%), 0 8px 30px rgb(0 19 10 / 35%);
    transform: translateY(-2px);
  }
}

@media (min-width: 760px) {
  .landing {
    width: min(calc(100% - 140px), clamp(360px, calc((100svh - 360px) * 1.06), 650px));
    padding-top: 20px;
    padding-bottom: 20px;
  }

  h1 {
    font-size: 34px;
  }

  .nameplate {
    min-height: 39px;
    margin-bottom: 14px;
    font-size: 19px;
  }

  .ornament-divider {
    height: 20px;
  }

  .intro {
    margin-bottom: 16px;
  }

  .video-card {
    aspect-ratio: 1.06;
  }

  .carousel-footer {
    height: 44px;
  }

  .telegram-link {
    min-height: 70px;
    font-size: 24px;
  }

  .telegram-link__icon {
    width: 39px;
    height: 39px;
  }
}

@media (max-width: 759px) {
  .landing {
    width: calc(100% - 48px);
    max-width: 550px;
    padding-top: max(28px, env(safe-area-inset-top));
    padding-bottom: max(30px, env(safe-area-inset-bottom));
  }

  .nameplate {
    width: 224px;
    min-height: 39px;
    margin-bottom: 18px;
    padding: 4px 42px;
    font-size: 18px;
  }

  .nameplate__mark {
    width: 28px;
    height: 28px;
  }

  h1 {
    max-width: 13em;
    font-size: clamp(29px, 6.7vw, 42px);
    line-height: 1.1;
  }

  .intro {
    margin-bottom: 19px;
  }

  .intro__description {
    gap: 7px;
    font-size: clamp(13px, 3.2vw, 16px);
    line-height: 1.45;
  }

  .intro__description svg {
    width: 19px;
    height: 19px;
  }

  .carousel__page {
    gap: 9px;
  }

  .video-card,
  .carousel,
  .carousel__viewport {
    border-radius: 13px;
  }

  .video-card {
    aspect-ratio: 0.8;
  }

  .carousel__arrow {
    width: 44px;
    height: 44px;
    padding: 10px;
    background: #073c2b;
  }

  .carousel__arrow--previous {
    left: -22px;
  }

  .carousel__arrow--next {
    right: -22px;
  }

  .video-card__controls {
    right: 8px;
    bottom: 9px;
    left: 8px;
  }

  .video-card__control {
    width: 44px;
    height: 44px;
    padding: 12px;
  }

  .video-card__control svg {
    width: 18px;
    height: 18px;
  }

  .video-card__progress {
    right: 9px;
    bottom: 59px;
    left: 9px;
    width: calc(100% - 18px);
  }

  .video-card__number {
    top: 8px;
    left: 8px;
    min-width: 25px;
    height: 22px;
    font-size: 9px;
  }

  .video-card__expand {
    top: 3px;
    right: 3px;
    opacity: 1;
  }

  .carousel-footer {
    height: 49px;
    gap: 13px;
  }

  .carousel-footer__line {
    width: 55px;
  }

  .telegram-link {
    min-height: 70px;
    gap: 12px;
    padding: 13px 17px;
    border-radius: 28px;
    font-size: clamp(17px, 4.5vw, 24px);
  }

  .telegram-link__icon {
    width: 37px;
    height: 37px;
  }

  .telegram-link__icon svg {
    width: 22px;
    height: 22px;
  }

  .telegram-link__arrow {
    display: none;
  }

  .video-card__upcoming-title {
    font-size: 18px;
  }
}

@media (max-width: 360px) {
  .landing {
    padding-top: max(22px, env(safe-area-inset-top));
  }

  h1 {
    font-size: 27px;
  }

  .telegram-link {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 17px;
  }
}

@media (min-width: 760px) and (max-width: 1023px) and (orientation: portrait) {
  .landing {
    width: min(620px, calc(100% - 112px));
    padding-top: max(32px, env(safe-area-inset-top));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .video-card {
    aspect-ratio: 0.92;
  }

  .carousel__arrow--previous {
    left: -52px;
  }

  .carousel__arrow--next {
    right: -52px;
  }
}

@media (pointer: coarse) {
  .video-card__expand {
    opacity: 1;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .landing {
    width: min(560px, calc(100% - 112px));
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .video-card {
    aspect-ratio: 1.12;
  }

  .nameplate {
    margin-bottom: 12px;
  }

  h1 {
    font-size: 30px;
  }

  .carousel__arrow--previous {
    left: -52px;
  }

  .carousel__arrow--next {
    right: -52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
