/* ============================================================================
   COUNTDOWN v2  ·  AX HACKATHON 2026  (loaded ONLY by AX-Hackathon-Landing-v1-37)
   ----------------------------------------------------------------------------
   Research: getdesign.md → linear.app DESIGN.md
     · surface ladder carries hierarchy WITHOUT shadow
     · 1px hairline borders, ~12–14px radius (never pill, rarely 16px)
     · no skeuomorphism / no gradients / no spotlight cards
     · tabular numerals, single chromatic accent used non-decoratively
   Applied inside AX brand (canvas #000 · surface #0c0c10 · accent orange #FBB03B),
   reusing the landing's own number system (.stat orange tick + Oswald clock face).

   This file is linked AFTER styles.css, so same-specificity rules win by source
   order. It overrides the previous metallic split-flap treatment. The shared
   styles.css / scroll.js (also used by the protected v37) are left untouched.
   ============================================================================ */

/* ── Venue layout ─ MIRROR the JOURNEY timeline grid so the map lines up exactly
   under the "결승·결과" card (.tl-card) above it ────────────────────────────────
   .timeline = max-width 980px centered, .tl-item = grid 1fr/1fr with
   column-gap clamp(40px,6vw,90px), and .tl-card sits in grid-column 1.
   We replicate that geometry on .venue__grid (which carries the .wrap class),
   place the MAP in column 1  → identical left-x and width as the card,
   and the COUNTDOWN in column 2.                                            */
.venue__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(40px, 6vw, 90px);
  align-items: center;
  width: min(100% - 48px, 980px);   /* == .timeline width */
  margin-inline: auto;
}
.venue__map {
  grid-column: 1; grid-row: 1;      /* same cell-column as .tl-card → matches position + width.
                                       grid-row:1 pins it beside the countdown (DOM order would
                                       otherwise drop this 2nd-in-source item to row 2). */
  width: 100%;                      /* fill column 1 = card width */
  aspect-ratio: 1 / 1;              /* height == width → square */
  height: auto;
}
.venue__dday {
  grid-column: 2; grid-row: 1;
  align-self: center;
}

/* ── D-day line ─ reuse the landing's .stat orange-tick number system ───────── */
.venue__dday { gap: clamp(18px, 2.6vh, 30px); }

.venue__dline {
  position: relative;
  padding-left: 16px;
  display: flex; align-items: baseline; gap: 10px;
  margin: 0;
  font-weight: 800; letter-spacing: -.02em; color: #fff;
  font-size: clamp(19px, 2.3vw, 26px);
}
.venue__dline::before {                 /* orange tick bar — identical to .stat::before */
  content: ""; position: absolute; left: 0; top: .14em; bottom: .14em;
  width: 3px; border-radius: 2px; background: var(--accent);
}
.venue__dline b {                       /* "D-37" — brand accent, not the old off-system red */
  font-family: "Oswald", var(--font-sans);
  font-weight: 600; font-size: 1.3em; letter-spacing: 0;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ── Clock cluster ──────────────────────────────────────────────────────────── */
.countdown__clock {
  display: flex; align-items: stretch; flex-wrap: wrap;
  gap: clamp(8px, 1vw, 12px);
}
.cd-unit { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ── Tile ─ flat charcoal surface · hairline border · NO metal / seam / shadow ── */
.cd-tile {
  position: relative;
  width: clamp(64px, 7.4vw, 104px);
  height: clamp(78px, 8.8vw, 116px);
  display: grid; place-items: center;
  border-radius: 14px;
  background: #0c0c10;                               /* surface-1 — same as .tl-card  */
  border: 1px solid var(--line-dark);               /* hairline rgba(255,255,255,.12) */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);  /* faint surface lift, no drop shadow */
  overflow: visible;
  transition: border-color .35s var(--ease, ease), background .35s var(--ease, ease);
}
.cd-tile:hover { border-color: rgba(255,255,255,.22); background: #141417; }

/* neutralise the old split-flap pseudo-elements (upper-flap shadow + seam line) */
.cd-tile::before { content: none; }
.cd-tile::after {
  content: ""; position: absolute; inset: auto;
  height: 0; background: none; box-shadow: none; transform: none; display: none;
}

/* ── Number ─ solid vivid white, flat, Oswald tabular (removes satin-metal fill) ─ */
.cd-num {
  position: relative; z-index: 1;
  font-family: "Oswald", var(--font-sans);
  font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: clamp(46px, 6vw, 78px); line-height: 1; letter-spacing: .01em;
  background: none;
  -webkit-background-clip: border-box; background-clip: border-box;
  -webkit-text-fill-color: #fff; color: #fff;       /* crisp pure white — no gradient */
  filter: none;
}

/* ── Caption ─ Linear-precise mono, muted; accent stays reserved ──────────────── */
.cd-cap {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(9px, 1vw, 11px); letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

/* ── Live indicator ─ the only animated accent: a blinking dot on SECONDS ─────── */
.cd-unit:last-child .cd-tile::after {
  content: ""; display: block;
  position: absolute; top: 9px; right: 9px; left: auto;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px rgba(251, 176, 59, .6);
  z-index: 2;
  animation: cdLive 1s steps(1, end) infinite;
}
@keyframes cdLive { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: .18; } }

@media (prefers-reduced-motion: reduce) {
  .cd-unit:last-child .cd-tile::after { animation: none; }
  .cd-tile { transition: none; }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  /* 1컬럼으로 접을 때 자식들이 base 의 grid-row:1 을 그대로 갖고 있으면
     같은 셀(1행1열)에 겹친다 → grid-row:auto 로 풀어 세로 스택(카운트다운 위, 지도 아래). */
  .venue__grid { grid-template-columns: 1fr; row-gap: clamp(26px, 6vw, 40px); }
  .venue__dday { grid-column: 1; grid-row: auto; }
  .venue__map  { grid-column: 1; grid-row: auto; width: 100%; aspect-ratio: 1 / 1; height: auto; }
}
@media (max-width: 420px) {
  .countdown__clock { gap: 7px; }
  .cd-tile { width: clamp(60px, 21vw, 76px); height: clamp(72px, 25vw, 92px); }
  .cd-num  { font-size: clamp(40px, 13vw, 52px); }
}
