/*
 * 다운로드 페이지 전용 레이아웃과 아코디언, 표 스타일입니다.
 * 게임정보 페이지와 같은 공통 영웅/푸터 구조를 재사용합니다.
 */

.download-page {
  --page-hero-vehicle-shift-x: clamp(24px, 3vw, 50px);
  --page-accent: #f1bb1d;
  --page-ink: #11151d;
  --page-panel: #f6f6fa;
  --page-border: #e2e2e7;
  --page-muted: #8c919c;
  --page-footer: #f3f0e7;
}

.download-page body,
.download-page {
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

.download-page .site-navigation__ctaA {
  padding: 16px 30px;
  border-radius: 12px;
  background: linear-gradient(110deg, #ffc000 0%, #ffa600 100%);
  color: #111111;
}

.game-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.game-site-brand__icon {
  width: 36px;
  height: 36px;
  object-fit: cover;
}

.game-site-brand__wordmark {
  width: 154px;
  height: 36px;
  object-fit: contain;
}

.download-main {
  padding-bottom: 120px;
}

.page-hero {
  padding-block: 60px 38px;
}

.page-hero__frame {
  position: relative;
  height: 200px;
  min-height: 200px;
  overflow: visible;
  border-radius: 30px;
  isolation: isolate;
  background: #1a1a1a;
}

.page-hero__visual {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.page-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.62);
}

.page-hero__background,
.page-hero__shadow,
.page-hero__vehicle {
  position: absolute;
  display: block;
  max-width: none;
}

.page-hero__background {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.page-hero__background--rear {
  mix-blend-mode: luminosity;
}

.page-hero__shadow {
  left: 50%;
  bottom: -1px;
  width: 100%;
  z-index: 1;
  border-radius: inherit;
  transform: translateX(-50%);
}

.page-hero__vehicle {
  z-index: 2;
}

.page-hero__vehicle--truck {
  top: -150px;
  left: calc(34% + var(--page-hero-vehicle-shift-x) + 50px);
  z-index: 3;
  width: min(40vw, 675px);
  transform: rotate(5deg);
  transform-origin: 50% 50%;
  animation: download-truck-arrive 980ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  will-change: transform, opacity;
}

.page-hero__vehicle--helicopter {
  top: -5px;
  right: calc(8% - var(--page-hero-vehicle-shift-x));
  z-index: 2;
  width: min(24vw, 360px);
  transform: rotate(-8deg);
  transform-origin: 50% 50%;
  animation: download-helicopter-arrive 1100ms 100ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
  will-change: transform, opacity;
}

@keyframes download-truck-arrive {
  0% {
    opacity: 0;
    transform: translate(-190px, -120px) scale(0.48) rotate(5deg);
  }

  72% {
    opacity: 1;
    transform: translate(14px, 8px) scale(1.03) rotate(5deg);
  }

  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(5deg);
  }
}

@keyframes download-helicopter-arrive {
  0% {
    opacity: 0;
    transform: translate(320px, -72px) scale(0.82) rotate(-13deg);
  }

  74% {
    opacity: 1;
    transform: translate(-12px, 5px) scale(1.02) rotate(-7deg);
  }

  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(-8deg);
  }
}

.page-hero__copy {
  position: absolute;
  top: 50px;
  left: 64px;
  z-index: 4;
  width: min(620px, calc(100% - 128px));
  color: #ffffff;
}

.page-hero__eyebrow {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.72);
}

.page-hero h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.page-hero__description {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 22px;
  line-height: 1.5;
}

.page-hero__description span {
  display: block;
  white-space: nowrap;
}

.download-content__inner {
  width: min(100%, 1250px);
}

.download-content__header {
  margin-bottom: 28px;
}

.download-content__header h2 {
  margin: 0;
  color: #191d28;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.download-content__header p {
  margin-top: 6px;
  color: #9c9da4;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.download-launcher {
    display: grid;
    justify-items: center;
    gap: 20px;
    margin-bottom: 34px;
    padding: 48px 24px 46px;
    border: 1px solid #e2e2e7;
    border-radius: 12px;
    background: #f6f6fa;
}

.download-launcher__lead {
  color: #5d5f68;
  font-size: 15px;
}

.download-launcher__button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    border-radius: 12px;
    background: #f1bb1d;
    color: #000000;
    font-size: 20px;
    font-weight: 800;
}

.download-launcher__button img {
  width: 24px;
  height: 24px;
}

.download-launcher__support {
  color: #9c9da4;
  font-size: 13px;
}

.download-launcher__feedback,
.driver-grid__feedback {
  min-height: 20px;
  color: #5d5f68;
  font-size: 13px;
}

.download-accordion-group {
  display: grid;
  gap: 18px;
}

.download-accordion__trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: #191d28;
  font-size: 16px;
  font-weight: 800;
}

.download-accordion__trigger::after {
  content: "−";
  font-size: 20px;
  line-height: 1;
}

.download-accordion__trigger[aria-expanded="false"]::after {
  content: "+";
}

.download-accordion__panel {
  padding-top: 14px;
}

.download-table {
    width: 100%;
    border: 1px solid #e2e2e7;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

    .download-table th,
    .download-table td {
        padding: 16px 20px;
        border-bottom: 1px solid #e2e2e7;
        font-size: 14px;
        line-height: 1.5;
        vertical-align: middle;
    }

.download-table tbody tr:last-child th,
.download-table tbody tr:last-child td {
  border-bottom: 0;
}

.download-table--launcher th,
.download-table thead th {
  background: #252b38;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
}

.download-table--launcher th {
  width: 220px;
  text-align: left;
}

.download-table td {
  color: #191d28;
}

.download-table tbody tr:nth-child(even) td {
  background: #f9f9fb;
}

.download-table--spec th:first-child {
  width: 160px;
  background: #eef0f4;
  color: #4a4f5b;
  font-weight: 700;
}

.download-table--spec thead th:first-child {
  background: #252b38;
}

.download-table--spec td,
.download-table--spec th[scope="row"] {
  text-align: center;
}

.download-table--spec tbody th[scope="row"] {
  text-align: left;
}

.download-table--spec td span {
  display: block;
  margin-top: 4px;
  color: #9c9da4;
  font-size: 12px;
}

.system-requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.system-requirements__card {
    overflow: hidden;
    border: 1px solid #e2e2e7;
    border-radius: 10px;
    background: #ffffff;
}

.system-requirements__card h4 {
  margin: 0;
  padding: 14px 16px;
  background: #252b38;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.system-requirements__card dl {
  display: grid;
  gap: 0;
  padding: 8px 20px 16px;
}

.system-requirements__card dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 8px 0;
}

.system-requirements__card dt {
  color: #30333d;
  font-size: 13px;
  font-weight: 700;
}

.system-requirements__card dd {
  color: #5d5f68;
  font-size: 13px;
  text-align: right;
}

.driver-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.driver-card {
    overflow: hidden;
    border: 1px solid #e2e2e7;
    border-radius: 10px;
    background: #ffffff;
    text-align: left;
}

.driver-card img {
  display: block;
  width: 100%;
  aspect-ratio: 288 / 179;
  object-fit: cover;
  background: var(--page-panel);
}

.driver-card span {
  display: block;
  padding: 12px 16px 14px;
  color: #191d28;
  font-size: 14px;
  font-weight: 700;
}

.game-site-footer {
  padding-block: 60px;
  background: var(--page-footer);
  color: #5d5f68;
}

.game-site-footer__inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.game-site-footer__content {
  width: min(100%, 640px);
}

.game-site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 25px;
  margin-bottom: 20px;
}

.game-site-footer__links a {
  position: relative;
  color: #30333d;
  font-size: 14px;
  font-weight: 600;
}

.game-site-footer__links a + a::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  width: 1px;
  height: 11px;
  background: #bcbdc3;
  transform: translateY(-50%);
}

.game-site-footer__text {
  display: grid;
  gap: 3px;
  color: #5d5f68;
  font-size: 12px;
  line-height: 1.45;
}

.game-site-footer__dragonfly {
  display: block;
  width: 96px;
  margin-top: 20px;
}

.game-site-footer__brand {
  display: flex;
  align-items: end;
  gap: 16px;
}

.game-site-footer__social {
  display: flex;
  gap: 6px;
}

.game-site-footer__social-link {
  display: inline-flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
}

.game-site-footer__social-link img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.game-site-footer__rating {
  width: 98px;
  height: 113px;
  object-fit: contain;
}

@media (max-width: 1199px) {
  .page-hero__copy {
    top: 50px;
    left: 40px;
  }

  .page-hero__description {
    font-size: 18px;
  }

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

@media (max-width: 899px) {
  .download-main {
    padding-bottom: 80px;
  }

  .page-hero {
    padding-block: 24px 24px;
  }

  .page-hero__frame {
    min-height: 235px;
    height: 235px;
    overflow: hidden;
    border-radius: 24px;
  }

  .page-hero__vehicle--truck {
    top: 14px;
    left: calc(62% + var(--page-hero-vehicle-shift-x) + 24px);
    width: 108px;
  }

  .page-hero__vehicle--helicopter {
    top: 26px;
    right: calc(34px - var(--page-hero-vehicle-shift-x));
    width: 160px;
  }

  .page-hero__copy {
    top: auto;
    bottom: 14px;
    left: 24px;
    width: calc(100% - 48px);
  }

  .page-hero h1 {
    font-size: 32px;
  }

  .page-hero__description {
    margin-top: 18px;
    font-size: clamp(10px, 2.8vw, 16px);
  }

  .download-launcher {
    padding-inline: 18px;
  }

  .download-launcher__button {
    width: 100%;
    justify-content: center;
    padding-inline: 20px;
  }

  .download-table {
    display: block;
    overflow-x: auto;
  }

  .download-table--launcher th {
    width: 140px;
  }

  .system-requirements,
  .driver-grid,
  .game-site-footer__inner,
  .game-site-footer__brand {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  .system-requirements__card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .system-requirements__card dd {
    text-align: left;
  }

  .game-site-footer__social-link {
    width: 56px;
    height: 56px;
  }

  .game-site-footer__social-link img {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-hero__vehicle--truck,
  .page-hero__vehicle--helicopter {
    animation: none;
  }
}
