/* 2026 CMC Seoul — Main */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--color-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #f26a21 url("../img/main-bg.jpg") center / cover no-repeat;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(6, 26, 48, 0.12) 0%,
    rgba(6, 26, 48, 0.02) 50%,
    rgba(6, 26, 48, 0.08) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  /* 1728 ≈ 0.96 — hero-copy/countdown 함께 스케일 */
  --hero-scale: clamp(0.72, 100vw / 1800px, 1);

  position: relative;
  z-index: 2;
  flex: 1;
  max-width: var(--max-w);
  width: 90%;
  margin: 0 auto;
  padding-top: clamp(8vw, 12vw, 16vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(40px * var(--hero-scale));
  align-items: start;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 380px;
  animation: fadeUp 0.9s ease both;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(8px * var(--hero-scale));
}

.hero-title {
  width: min(100%, calc(500px * var(--hero-scale)));
  min-width: 320px;
  height: auto;
  mix-blend-mode: screen;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.15));
}

.hero-date {
  color: #111;
  font-size: calc(18px * var(--hero-scale));
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

.hero-countdown {
  justify-self: end;
  min-width: 360px;
  text-align: center;
  animation: fadeUp 0.9s ease 0.15s both;
}

.countdown-label {
  font-size: calc(22px * var(--hero-scale));
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: calc(22px * var(--hero-scale));
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.countdown-board {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: calc(28px * var(--hero-scale));
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(12px * var(--hero-scale));
}

.countdown-unit .unit-label {
  font-size: calc(13px * var(--hero-scale));
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.flip-group {
  display: flex;
  gap: calc(6px * var(--hero-scale));
}

.flip-card {
  position: relative;
  width: calc(58px * var(--hero-scale));
  height: calc(80px * var(--hero-scale));
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2729;
  border-radius: calc(8px * var(--hero-scale));
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.flip-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.flip-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0) 46%,
    rgba(0, 0, 0, 0.18) 54%,
    rgba(0, 0, 0, 0.28) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.flip-card span {
  position: relative;
  z-index: 3;
  font-size: calc(46px * var(--hero-scale));
  font-weight: 700;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 1024px 이하 또는 세로가 가로보다 길 때 → 세로 정렬 */
@media (max-width: 1024px), (orientation: portrait), (max-aspect-ratio: 1/1) {
  .hero-inner {
    --hero-scale: clamp(0.68, 100vw / 1400px, 0.82);
    width: min(92%, 720px);
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: start;
    gap: clamp(24px, 4vw, 40px);
    padding-top: clamp(10vw, 14vw, 20vw);
  }

  .hero-copy,
  .hero-countdown,
  .hero-title {
    min-width: 0;
  }

  .hero-copy {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .hero-brand {
    align-items: center;
    width: 100%;
  }

  .hero-title {
    width: min(68vw, 400px);
  }

  .hero-countdown {
    justify-self: center;
    width: 100%;
  }

  .countdown-board {
    gap: clamp(10px, 2.5vw, 22px);
  }

  .countdown-unit {
    gap: clamp(6px, 1.5vw, 12px);
  }

  .countdown-unit .unit-label {
    font-size: clamp(10px, 2.4vw, 13px);
    letter-spacing: 0.08em;
  }

  .countdown-label {
    font-size: clamp(14px, 3.6vw, 20px);
    letter-spacing: 0.14em;
    margin-bottom: clamp(12px, 3vw, 20px);
  }

  .flip-group {
    gap: clamp(3px, 0.8vw, 6px);
  }

  .flip-card {
    width: clamp(30px, 8vw, 52px);
    height: clamp(42px, 11vw, 72px);
    border-radius: clamp(5px, 1.2vw, 8px);
  }

  .flip-card span {
    font-size: clamp(22px, 6vw, 40px);
  }
}

@media (max-width: 720px) {
  .hero-inner {
    width: 90%;
    --hero-scale: clamp(0.62, 100vw / 900px, 0.78);
    padding-top: clamp(22vw, 28vw, 34vw);
    gap: clamp(20px, 5vw, 32px);
  }

  .hero-title {
    width: min(70vw, 340px);
  }

  .countdown-board {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }

  .flip-card {
    width: clamp(28px, 9.2vw, 44px);
    height: clamp(40px, 12.5vw, 60px);
  }

  .flip-card span {
    font-size: clamp(20px, 6.5vw, 34px);
  }
}

@media (max-width: 400px) {
  .hero-inner {
    padding-top: clamp(18vw, 24vw, 30vw);
  }

  .hero-title {
    width: 74vw;
  }

  .flip-card {
    width: 7.8vw;
    height: 11vw;
    min-width: 26px;
    min-height: 36px;
  }

  .flip-card span {
    font-size: 5.6vw;
  }

  .countdown-unit .unit-label {
    font-size: 2.4vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

  .hero-copy,
  .hero-countdown {
    animation: none;
  }
}
