/* Hallmark · macrostructure: Marquee Hero (custom) · genre: atmospheric · tone: luxury + live
 * theme: custom (vibe: "night stadium, heartbeat, broadcast, premium")
 * paper oklch(14% 0.035 262) · accents: sky oklch(78% 0.13 232) + ember oklch(74% 0.17 52) — from the SB app icon
 * display: Archivo (wide 112–125) · body: Pretendard · axes: dark / display-wide-sans / cool+warm brand pair
 * signature: SVG heartbeat line drawn across the hero on load (one orchestrated moment) + broadcast ticker
 */
:root {
  --color-paper: oklch(14% 0.035 262);
  --color-paper-2: oklch(17.5% 0.04 262);
  --color-paper-3: oklch(22% 0.045 262);
  --color-line: oklch(30% 0.04 262);
  --color-ink: oklch(96.5% 0.008 250);
  --color-ink-2: oklch(76% 0.025 255);
  --color-ink-3: oklch(60% 0.03 258);
  --color-sky: oklch(78% 0.13 232);
  --color-sky-deep: oklch(58% 0.15 245);
  --color-ember: oklch(74% 0.17 52);
  --color-ember-deep: oklch(60% 0.19 38);
  --color-store: oklch(98% 0.005 250);
  --color-store-ink: oklch(18% 0.03 262);
  --color-focus: oklch(82% 0.13 232);

  --font-display: "Archivo", "Pretendard Variable", "Pretendard", system-ui, sans-serif;
  --font-body: "Pretendard Variable", "Pretendard", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;

  --text-display: clamp(2.6rem, 1.4rem + 5.2vw, 5.9rem);
  --text-h2: clamp(1.9rem, 1.3rem + 2.4vw, 3.3rem);
  --text-promise: clamp(2.2rem, 1.2rem + 5vw, 5.4rem);
  --text-body-l: clamp(1.06rem, 1rem + .35vw, 1.25rem);
  --text-body: 1rem;
  --text-small: .875rem;

  --space-2xs: .25rem; --space-xs: .5rem; --space-sm: .75rem; --space-md: 1rem; --space-lg: 1.5rem;
  --space-xl: 2rem; --space-2xl: 3rem; --space-3xl: 4.5rem; --space-4xl: 7rem;

  --radius-shot: 30px;
  --radius-btn: 14px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: 160ms;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
.wrap { width: min(1180px, 100% - 2 * var(--space-lg)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--space-sm); top: -80px; z-index: 20; background: var(--color-sky); color: var(--color-store-ink); padding: var(--space-xs) var(--space-sm); border-radius: 8px; }
.skip:focus { top: var(--space-sm); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 6px; }

/* ── 위 줄 ───────────────────────────── */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in oklch, var(--color-paper) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in oklch, var(--color-line) 60%, transparent); }
.bar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--space-md); }
.brand { display: inline-flex; align-items: center; gap: var(--space-sm); text-decoration: none; }
.brand img { border-radius: 9px; }
.brand-word { font-family: var(--font-display); font-weight: 850; font-stretch: 118%; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-word .s { color: var(--color-ink); }
.brand-word .b { color: var(--color-sky); }
.bar-right { display: flex; align-items: center; gap: var(--space-sm); }
.bar-get { font-weight: 700; font-size: var(--text-small); text-decoration: none; padding: var(--space-xs) var(--space-md); border-radius: 999px; border: 1px solid var(--color-line); white-space: nowrap; transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.bar-get:hover { border-color: var(--color-sky); color: var(--color-sky); }
.lang select { appearance: none; background: transparent; color: var(--color-ink-2); border: 1px solid var(--color-line); border-radius: 999px; font: inherit; font-size: var(--text-small); padding: var(--space-xs) var(--space-md); min-height: 40px; cursor: pointer; }
.lang select:hover { color: var(--color-ink); }
.lang select option { background: var(--color-paper-2); color: var(--color-ink); }

/* ── 첫 화면 ─────────────────────────── */
.hero { position: relative; isolation: isolate; padding: var(--space-3xl) 0 var(--space-4xl); overflow: clip; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(60% 55% at 12% 15%, color-mix(in oklch, var(--color-sky-deep) 30%, transparent), transparent 70%),
  radial-gradient(50% 50% at 92% 88%, color-mix(in oklch, var(--color-ember-deep) 24%, transparent), transparent 70%); }
.pulse { position: absolute; z-index: -1; left: 0; width: 100%; top: 46%; height: 42%; overflow: visible; pointer-events: none; }
.pulse path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pulse-line { stroke: url(#pg); stroke-width: 3; }
.pulse-glow { stroke: url(#pg); stroke-width: 16; opacity: .35; filter: blur(10px); }
.pulse-dot { fill: var(--color-ink); filter: drop-shadow(0 0 10px var(--color-sky)); opacity: 0; }
.st-sky0 { stop-color: var(--color-sky); stop-opacity: 0; }
.st-sky { stop-color: var(--color-sky); }
.st-white { stop-color: var(--color-ink); }
.st-ember { stop-color: var(--color-ember); }
.st-ember0 { stop-color: var(--color-ember); stop-opacity: 0; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: var(--space-2xl); align-items: center; }
.display { font-family: var(--font-display); font-weight: 900; font-stretch: 112%; font-size: var(--text-display); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 var(--space-lg); text-wrap: balance; min-width: 0; overflow-wrap: anywhere; }
:lang(ko) .display, :lang(ja) .display { letter-spacing: -.045em; line-height: 1.12; font-weight: 800; }
.lead { font-size: var(--text-body-l); color: var(--color-ink-2); max-width: 32em; margin: 0 0 var(--space-xl); }
.stores { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.store { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: 58px; padding: var(--space-xs) var(--space-lg) var(--space-xs) var(--space-md); border-radius: var(--radius-btn); text-decoration: none; font-family: var(--font-display); font-weight: 800; font-stretch: 105%; font-size: 1.15rem; line-height: 1.1; white-space: nowrap; }
.store small { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 600; opacity: .7; }
.store.play { background: var(--color-store); color: var(--color-store-ink); transition: transform var(--dur-fast) var(--ease-out), box-shadow 300ms var(--ease-out); }
.store.play:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px color-mix(in oklch, var(--color-sky) 55%, transparent); }
.store.play:active { transform: translateY(0); }
.store.soon { color: var(--color-ink-3); border: 1px solid var(--color-line); background: var(--color-paper); cursor: default; }

.hero-shot, .spot-shot, .pick-shot { margin: 0; }
.spot-shot img, .pick-shot img { border-radius: var(--radius-shot); border: 1px solid color-mix(in oklch, var(--color-ink) 12%, transparent); }
/* PC: 손 사진은 오른쪽 칸보다 크게(왼쪽 아래는 투명한 팔이라 글과 겹쳐도 됨) */
.hero-shot { justify-self: end; width: min(700px, 135%); max-width: none; position: relative; align-self: end; margin-bottom: calc(-1 * var(--space-4xl)); margin-right: calc(-1 * var(--space-xl)); }

/* ── 손 영상(제미니 영상에 앱 화면을 합성, 배경 투명 VP9) — 크롬·엣지·파이어폭스·안드로이드. 사파리·움직임 줄이기는 아래 사진 판 ── */
.hand-video { display: block; width: 100%; height: auto; aspect-ratio: 600 / 1067;
  /* 영상 왼쪽 끝에서 팔이 세로로 잘려 보이지 않게 부드럽게 */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%); mask-image: linear-gradient(to right, transparent 0, #000 16%); }
.car.has-video .car-stage { display: none; }

/* ── 앱 화면 넘기기 — 왼손 사진(팔은 첫 화면 아래 끝 밖으로 이어진다) + 분홍 화면 자리에 앱 화면 ── */
.car-stage { position: relative; aspect-ratio: 1220 / 1800; }
.car-view { position: absolute; left: 47.869%; top: 4.167%; width: 37.787%; height: 54.111%;
  border-radius: 9% / 4.3%; overflow: hidden; background: var(--color-paper); z-index: 1;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.car-view.dragging { cursor: grabbing; }
.car-track { display: flex; height: 100%; will-change: transform; }
.car-slide { flex: 0 0 100%; min-width: 0; height: 100%; }
.car-slide img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.hand-photo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 30px 40px oklch(0% 0 0 / .45)); }
.tap-ripple { position: absolute; z-index: 3; left: 74.75%; top: 40.44%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--color-ink) 70%, transparent), transparent 70%); opacity: 0; pointer-events: none; }

/* 처음 그리기 전 숨김(GSAP 가 풀어 줌) */
.anim-pending .hero .display, .anim-pending .hero .lead, .anim-pending .hero .stores, .anim-pending .hero-shot { opacity: 0; }
.anim-pending .pulse-line, .anim-pending .pulse-glow { stroke-dasharray: 1; stroke-dashoffset: 1; }

/* ── 종목 띠 ─────────────────────────── */
.ticker { border-block: 1px solid var(--color-line); background: var(--color-paper-2); overflow: hidden; padding: var(--space-md) 0; }
.ticker-track { display: flex; width: max-content; gap: var(--space-2xl); animation: tick 48s linear infinite; }
.ticker-track span { font-family: var(--font-display); font-weight: 800; font-stretch: 120%; font-size: 1.05rem; color: var(--color-ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: var(--space-2xl); }
.ticker-track span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-ember); box-shadow: 0 0 12px var(--color-ember); }
.ticker-track span:nth-child(even)::after { background: var(--color-sky); box-shadow: 0 0 12px var(--color-sky); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ── 트래커 ───────────────────────────── */
.spot { padding: var(--space-4xl) 0 var(--space-3xl); }
.spot-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-3xl); align-items: center; }
.spot-shot { width: min(380px, 100%); justify-self: center; }
.spot-shot img { box-shadow: 0 40px 90px -30px oklch(0% 0 0 / .8), 0 0 90px -20px color-mix(in oklch, var(--color-ember) 30%, transparent); }
.h2 { font-family: var(--font-display); font-weight: 850; font-stretch: 110%; font-size: var(--text-h2); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 var(--space-md); text-wrap: balance; min-width: 0; overflow-wrap: anywhere; }
:lang(ko) .h2, :lang(ja) .h2 { font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.body-l { font-size: var(--text-body-l); color: var(--color-ink-2); max-width: 34em; margin: 0; }
.facts { margin: var(--space-2xl) 0 0; display: grid; gap: 0; }
.facts div { padding: var(--space-lg) 0; border-top: 1px solid var(--color-line); display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: var(--space-lg); }
.facts div:last-child { border-bottom: 1px solid var(--color-line); }
.facts dt { font-weight: 800; color: var(--color-ink); }
.facts dd { margin: 0; color: var(--color-ink-2); }

/* ── 고르기 ───────────────────────────── */
.pick { padding: var(--space-3xl) 0 var(--space-4xl); }
.pick-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--space-3xl); align-items: center; }
.pick-shot { width: min(360px, 100%); justify-self: center; }
.pick-shot img { box-shadow: 0 40px 90px -30px oklch(0% 0 0 / .8), 0 0 90px -20px color-mix(in oklch, var(--color-sky) 30%, transparent); }
.langs { list-style: none; padding: 0; margin: var(--space-xl) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.langs li { padding: var(--space-xs) var(--space-md); border: 1px solid var(--color-line); border-radius: 999px; color: var(--color-ink-2); font-size: var(--text-small); }

/* ── 약속 ─────────────────────────────── */
.promise { padding: var(--space-4xl) 0; background: var(--color-paper-2); border-block: 1px solid var(--color-line); text-align: center; }
.promise-line { font-family: var(--font-display); font-weight: 900; font-stretch: 118%; font-size: var(--text-promise); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 var(--space-lg); display: flex; flex-wrap: wrap; justify-content: center; column-gap: .35em; }
:lang(ko) .promise-line, :lang(ja) .promise-line { font-weight: 800; letter-spacing: -.045em; line-height: 1.2; }
.promise-line span:nth-child(1) { color: var(--color-ink); }
.promise-line span:nth-child(2) { color: var(--color-sky); }
.promise-line span:nth-child(3) { color: var(--color-ember); }
.promise-sub { margin-inline: auto; }

/* ── 받기 ─────────────────────────────── */
.get { padding: var(--space-4xl) 0; }
.get-in { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-lg); }
.get-icon { border-radius: 28px; box-shadow: 0 30px 70px -20px oklch(0% 0 0 / .8), 0 0 70px -10px color-mix(in oklch, var(--color-sky) 35%, transparent); }
.get .h2 { margin: 0; }

/* ── 아래 ─────────────────────────────── */
.foot { border-top: 1px solid var(--color-line); padding: var(--space-xl) 0 var(--space-2xl); color: var(--color-ink-3); font-size: var(--text-small); }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); flex-wrap: wrap; }
.foot nav { display: flex; gap: var(--space-lg); }
.foot nav a { text-decoration: none; padding: var(--space-xs) 0; white-space: nowrap; }
.foot nav a:hover { color: var(--color-ink); }
.foot p { margin: 0; }
.brand.small .brand-word { font-size: 1rem; }

@media (max-width: 900px) {
  .hero { padding: var(--space-2xl) 0 var(--space-3xl); }
  .hero-grid, .spot-grid, .pick-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
  /* 휴대폰: 맥박 선은 글과 앱 화면 사이 한 줄로(글자 위를 지나가지 않게) */
  .pulse { position: static; order: 2; width: 100vw; margin-inline: calc(50% - 50vw); height: 120px; margin-block: calc(-1 * var(--space-lg)); }
  .hero-copy { order: 1; }
  .hero-shot { order: 3; justify-self: center; width: min(460px, 108%); margin-right: 0; margin-bottom: calc(-1 * var(--space-3xl)); }
  .pick-shot { order: 2; }
  .spot { padding: var(--space-3xl) 0 var(--space-2xl); }
  .pick { padding: var(--space-2xl) 0 var(--space-3xl); }
}
@media (max-width: 600px) {
  .bar-get { display: none; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .store { flex: 1 1 100%; justify-content: center; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  * { transition: none !important; }
}
