/* ==========================================================
   정식 출시 카운트다운 + 출시 알림 예약 (대표 11-21)
   첫 화면 글 아래 카드 한 장 — js/launch.js · js/launch-config.js
   ========================================================== */

/* 예약 버튼은 노란색 — 파란 버튼이 많은 첫 화면에서 눈에 띄게 (대표 11-21). 과정 전환의 '토익·토플' 노랑과 같은 색 */
.launch {
  --yellow: #FFC61A; --yellow-deep: #F2B300;
  margin-top: 34px; max-width: 520px; padding: 22px 24px 20px;
  border-radius: 24px; background: var(--white);
  box-shadow: 0 18px 44px rgba(8, 24, 53, .12), 0 0 0 1px var(--line);
}
.launch-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.launch-title { font-size: 18px; font-weight: 900; color: var(--navy); }
.launch-date { font-size: 15px; font-weight: 800; color: var(--blue); }

.launch-clock { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.launch-clock div {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px 10px; border-radius: 16px; background: var(--navy); color: var(--white);
}
.launch-clock b { font-size: clamp(28px, 3.2vw, 38px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.launch-clock small { font-size: 13px; font-weight: 800; color: var(--sky); }

.launch-open {
  margin-top: 14px; width: 100%; height: 54px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--yellow); color: var(--navy); font: inherit; font-size: 18px; font-weight: 900;
  box-shadow: 0 8px 20px rgba(255, 198, 26, .45);
  transition: background .2s, transform .2s;
}
.launch-open:hover { background: var(--yellow-deep); transform: translateY(-1px); }

.launch-form { display: none; margin-top: 14px; }
.launch-row { display: flex; gap: 8px; }
.launch-row input {
  flex: 1; min-width: 0; height: 54px; padding: 0 16px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--gray); color: var(--navy);
  font: inherit; font-size: 17px; font-weight: 700;
}
.launch-row input:focus { outline: none; border-color: var(--blue); background: var(--white); }
.launch-send {
  flex: none; height: 54px; padding: 0 22px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--yellow); color: var(--navy); font: inherit; font-size: 17px; font-weight: 900; white-space: nowrap;
}
.launch-send:hover { background: var(--yellow-deep); }
.launch-send:disabled { opacity: .6; cursor: default; }
.launch-agree { margin-top: 10px; display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.5; word-break: keep-all; }
.launch-agree input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--blue); }
.launch-agree b { color: var(--blue); }
.launch-terms { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.55; }
.launch-terms summary { cursor: pointer; padding-left: 26px; text-decoration: underline; }
.launch-terms ul { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--gray); list-style: none; word-break: keep-all; }
.launch-terms li + li { margin-top: 4px; }
.launch-terms li b { color: var(--navy); margin-right: 4px; }
.launch-msg { margin-top: 6px; min-height: 1em; font-size: 14px; font-weight: 800; color: var(--muted); }
.launch-msg[data-tone="err"] { color: #D93636; }
.launch-done, .launch-live { display: none; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--ice); color: var(--navy); font-size: 17px; font-weight: 900; text-align: center; }

.launch.is-open .launch-open { display: none; }
.launch.is-open .launch-form { display: block; }
.launch.is-done .launch-open, .launch.is-done .launch-form { display: none; }
.launch.is-done .launch-done { display: block; }
/* 출시 시각이 지나면 시계·예약 대신 '출시했어요' 한 줄 */
.launch.is-live .launch-clock, .launch.is-live .launch-open, .launch.is-live .launch-form, .launch.is-live .launch-done { display: none; }
.launch.is-live .launch-live { display: block; }

@media (max-width: 1024px) {
  .launch { margin-left: auto; margin-right: auto; text-align: left; }
}
@media (max-width: 760px) {
  /* 휴대폰 첫 화면 순서(mobile.css): 작은 표시 1 → 제목 2 → 부제목 3 → [출시 시계 4] → 사진 4 → 버튼 5
     같은 4번이면 글 순서대로 — 시계가 사진보다 먼저 나온다. */
  .hero .launch { order: 4; width: 100%; }
  .launch { margin-top: 22px; padding: 16px 14px 14px; border-radius: 20px; }
  .launch-title { font-size: 16px; }
  .launch-date { font-size: 13px; }
  .launch-clock { gap: 6px; margin-top: 10px; }
  .launch-clock div { padding: 10px 2px 8px; border-radius: 12px; }
  .launch-clock b { font-size: 26px; }
  .launch-clock small { font-size: 12px; }
  .launch-open, .launch-row input, .launch-send { height: 50px; font-size: 16px; }
  .launch-send { padding: 0 16px; }
}
@media (max-width: 340px) {
  .launch-row input { padding: 0 12px; font-size: 15px; }
  .launch-send { padding: 0 12px; }
  .launch-clock b { font-size: 22px; }
}

/* ---------- 스토어 버튼(출시 준비 중)을 누르면 뜨는 팝업 (대표 11-21) ---------- */
html.launch-lock { overflow: hidden; }
.launch-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.launch-modal[hidden] { display: none; }
.launch-modal-back { position: absolute; inset: 0; background: rgba(8, 24, 53, .55); }
.launch-modal-box {
  position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 28px 22px 22px; border-radius: 28px; background: var(--white); text-align: center;
  box-shadow: 0 30px 80px rgba(8, 24, 53, .35);
  animation: launch-pop .25s var(--ease);
}
@keyframes launch-pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.launch-modal-x {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--gray); color: var(--navy); font-size: 18px; font-weight: 900; cursor: pointer;
}
.launch-modal-title { font-size: 26px; font-weight: 900; color: var(--navy); letter-spacing: -.03em; }
.launch-modal-lead { margin-top: 6px; font-size: 16px; font-weight: 700; color: var(--muted); line-height: 1.5; word-break: keep-all; }
.launch-modal .launch { margin: 18px 0 0; max-width: none; padding: 0; box-shadow: none; text-align: left; }
@media (max-width: 480px) {
  .launch-modal-box { padding: 24px 16px 18px; border-radius: 24px; }
  .launch-modal-title { font-size: 22px; }
  .launch-modal-lead { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .launch-modal-box { animation: none; } }
