/*
 * 공식 영상과 아카이브를 현재 사이트의 밝은 레이아웃과 전술적인 톤으로 연결합니다.
 */

.media-page {
  --media-ink: #11141b;
  --media-panel: #171b23;
  --media-yellow: #ffc000;
  background:
    radial-gradient(circle at 10% 35%, rgba(255, 192, 0, 0.06), transparent 28%),
    #ffffff;
}

.media-page.media-modal-open {
  overflow: hidden;
}

.media-main .site-container,
.media-page .site-footer .site-container {
  width: min(calc(100% - 96px), 1520px);
}

.media-hero {
  padding: 48px 0 28px;
}

.media-hero__frame {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border-radius: 30px;
  background: #11141b;
  isolation: isolate;
}

.media-hero__frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.74) contrast(1.08);
  transform: scale(1.012);
}

.media-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.95) 0%, rgba(7, 9, 13, 0.62) 34%, rgba(7, 9, 13, 0.08) 72%),
    linear-gradient(0deg, rgba(7, 9, 13, 0.54), transparent 60%);
}

.media-hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 310px;
  width: min(54%, 720px);
  padding: 54px clamp(40px, 5vw, 82px);
  justify-content: center;
  flex-direction: column;
  color: #ffffff;
}

.media-hero__copy p {
  color: var(--media-yellow);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.media-hero__copy h1 {
  margin: 5px 0 12px;
  font-size: clamp(42px, 4vw, 66px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.media-hero__copy > span {
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.7;
}

.media-content {
  padding-bottom: 120px;
}

.media-content__inner {
  position: relative;
}

.media-tabs {
  display: grid;
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid #d9dce2;
  border-radius: 16px;
  background: #f4f5f7;
  box-shadow: 0 18px 44px rgba(18, 24, 38, 0.08);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-tabs__button {
  position: relative;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #7a7f89;
  transition: background 180ms ease, color 180ms ease;
}

.media-tabs__button + .media-tabs__button::before {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 1px;
  background: #d9dce2;
  content: "";
}

.media-tabs__button span {
  font-size: 20px;
  font-weight: 800;
}

.media-tabs__button:hover,
.media-tabs__button:focus-visible {
  color: #11141b;
}

.media-tabs__button.is-active {
  background: linear-gradient(110deg, #ffc000, #ffad00);
  color: #11141b;
}

.media-video-grid {
  display: grid;
  gap: 34px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-video-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe1e5;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(22, 28, 41, 0.1);
  color: var(--media-ink);
  text-align: left;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.media-video-card:hover,
.media-video-card:focus-visible {
  border-color: rgba(255, 174, 0, 0.9);
  box-shadow: 0 26px 58px rgba(22, 28, 41, 0.17);
  transform: translateY(-6px);
}

.media-video-card__visual {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0e1118;
}

.media-video-card__visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 5, 8, 0.38), transparent 52%);
  content: "";
}

.media-video-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 260ms ease, transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.media-video-card:hover .media-video-card__visual img,
.media-video-card:focus-visible .media-video-card__visual img {
  filter: brightness(0.82);
  transform: scale(1.035);
}

.media-video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: clamp(64px, 5.2vw, 84px);
  height: clamp(64px, 5.2vw, 84px);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(255, 192, 0, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 0 10px rgba(255, 255, 255, 0.08);
  transform: translate(-50%, -50%);
  transition: background 180ms ease, transform 180ms ease;
}

.media-video-card__play::before {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #11141b;
  content: "";
}

.media-video-card:hover .media-video-card__play,
.media-video-card:focus-visible .media-video-card__play {
  background: #ffffff;
  transform: translate(-50%, -50%) scale(1.08);
}

.media-video-card__ribbon {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 3;
  padding: 9px 15px;
  border-radius: 7px;
  background: #4776c9;
  box-shadow: 0 7px 18px rgba(18, 43, 88, 0.32);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.media-video-card__copy {
  display: grid;
  min-height: 120px;
  padding: 20px 30px 22px;
  align-content: center;
}

.media-video-card__copy strong {
  font-size: clamp(23px, 2vw, 31px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.media-video-card__copy em {
  margin-top: 8px;
  color: #70747d;
  font-size: 15px;
  font-style: normal;
}

.media-archive-grid {
  column-count: 3;
  column-gap: 22px;
}

.media-archive-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #11141b;
  box-shadow: 0 14px 38px rgba(19, 24, 35, 0.12);
  break-inside: avoid;
  vertical-align: top;
}

.media-archive-card img {
  width: 100%;
  height: auto;
  transition: filter 280ms ease, transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.media-archive-card > span {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 25px;
  align-items: flex-end;
  justify-content: space-between;
  background: linear-gradient(0deg, rgba(5, 7, 11, 0.82), transparent 56%);
  color: #ffffff;
  opacity: 0;
  transition: opacity 220ms ease;
}

.media-archive-card b {
  color: var(--media-yellow);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.media-archive-card em {
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.media-archive-card:hover img,
.media-archive-card:focus-visible img {
  filter: brightness(0.72);
  transform: scale(1.035);
}

.media-archive-card:hover > span,
.media-archive-card:focus-visible > span {
  opacity: 1;
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  padding: 34px;
  place-items: center;
  opacity: 0;
  transition: opacity 180ms ease;
}

.media-modal.is-open {
  opacity: 1;
}

.media-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 10, 0.91);
  backdrop-filter: blur(10px);
}

.media-modal__dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 68px);
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  background: #11141b;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.6);
  color: #ffffff;
  transform: translateY(14px) scale(0.985);
  transition: transform 220ms ease;
}

.media-modal.is-open .media-modal__dialog {
  transform: translateY(0) scale(1);
}

.media-modal__header {
  display: flex;
  min-height: 64px;
  padding: 0 2px 18px 8px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.media-modal__header small {
  display: block;
  margin-bottom: 3px;
  color: var(--media-yellow);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.media-modal__header h2 {
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.25;
}

.media-modal__close {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.media-modal__close span::before,
.media-modal__close span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #ffffff;
  content: "";
}

.media-modal__close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.media-modal__close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.media-modal__video {
  overflow: hidden;
  border-radius: 12px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.media-modal__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.media-modal__archive {
  overflow: hidden;
  border-radius: 12px;
  background: #080a0f;
}

.media-modal__archive img {
  width: 100%;
  max-height: calc(100vh - 180px);
  margin: auto;
  object-fit: contain;
}

@media (max-width: 899px) {
  .media-main .site-container,
  .media-page .site-footer .site-container {
    width: min(calc(100% - 32px), 1520px);
  }

  .media-hero {
    padding-top: 24px;
  }

  .media-hero__frame,
  .media-hero__copy {
    min-height: 260px;
  }

  .media-hero__frame {
    border-radius: 22px;
  }

  .media-hero__copy {
    width: 70%;
    padding: 38px;
  }

  .media-content {
    padding-bottom: 84px;
  }

  .media-tabs {
    margin-bottom: 32px;
  }

  .media-video-grid {
    gap: 24px;
  }

  .media-archive-grid {
    column-count: 2;
  }
}

@media (max-width: 679px) {
  .media-hero__frame,
  .media-hero__copy {
    min-height: 230px;
  }

  .media-hero__frame > img {
    object-position: 62% center;
  }

  .media-hero__shade {
    background: linear-gradient(90deg, rgba(7, 9, 13, 0.94), rgba(7, 9, 13, 0.34));
  }

  .media-hero__copy {
    width: 86%;
    padding: 30px 26px;
  }

  .media-hero__copy > span {
    max-width: 320px;
    font-size: 14px;
  }

  .media-tabs {
    margin-bottom: 24px;
    border-radius: 12px;
  }

  .media-tabs__button {
    min-height: 70px;
  }

  .media-tabs__button span {
    font-size: 17px;
  }

  .media-video-grid {
    grid-template-columns: 1fr;
  }

  .media-video-card {
    border-radius: 15px;
  }

  .media-video-card__copy {
    min-height: 104px;
    padding: 16px 22px 18px;
  }

  .media-video-card__ribbon {
    top: 15px;
    left: 15px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .media-archive-grid {
    column-count: 1;
  }

  .media-archive-card {
    margin-bottom: 16px;
    border-radius: 13px;
  }

  .media-archive-card > span {
    padding: 18px;
    opacity: 1;
  }

  .media-modal {
    padding: 12px;
  }

  .media-modal__dialog {
    max-height: calc(100vh - 24px);
    padding: 13px;
    border-radius: 16px;
  }

  .media-modal__header {
    padding: 2px 2px 13px 5px;
  }

  .media-modal__close {
    width: 40px;
    height: 40px;
  }

  .media-modal__archive img {
    max-height: calc(100vh - 130px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .media-video-card,
  .media-video-card__visual img,
  .media-video-card__play,
  .media-archive-card img,
  .media-archive-card > span,
  .media-modal,
  .media-modal__dialog {
    transition: none;
  }
}
