:root {
  --paper: #F4F5F8;
  --surface: #FFFFFF;
  --ink: #1C1A33;
  --ink-2: #4E4C66;
  --muted: #6A6880;
  --line: #E2E3EA;
  --cobalt: #2F55E4;
  --cobalt-ink: #2547C9;
  --cobalt-soft: #E6ECFD;
  --sun: #FFC83D;
  --strip: #FFFFFF;
  --ui: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --s1: 0.875rem;
  --s2: 1.0625rem;
  --s3: 1.375rem;
  --s4: 1.875rem;
  --s5: clamp(2.375rem, 6.4vw, 4rem);
  --gutter: clamp(16px, 5vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15142B;
    --surface: #1F1E3A;
    --ink: #ECEBF7;
    --ink-2: #C3C1D9;
    --muted: #9C9AB5;
    --line: #34334F;
    --cobalt: #7B93FF;
    --cobalt-ink: #9DAFFF;
    --cobalt-soft: #252B57;
    --strip: #FFFFFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15142B;
  --surface: #1F1E3A;
  --ink: #ECEBF7;
  --ink-2: #C3C1D9;
  --muted: #9C9AB5;
  --line: #34334F;
  --cobalt: #7B93FF;
  --cobalt-ink: #9DAFFF;
  --cobalt-soft: #252B57;
  --strip: #FFFFFF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: var(--s2);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--cobalt-ink); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 머리 */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.brand img { border-radius: 8px; }

.theme {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.theme button {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.theme button[aria-checked="true"] { background: var(--cobalt-soft); color: var(--cobalt-ink); }

main { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.25; margin: 0; }
h2 { font-size: var(--s4); font-weight: 800; }
h3 { font-size: var(--s3); font-weight: 700; }

/* 첫 화면 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(24px, 6vw, 72px) 0 clamp(56px, 9vw, 112px);
}
.hero h1 {
  font-size: var(--s5);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.04em;
}
.lead {
  max-width: 32rem;
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: 1.125rem;
}

.get { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; }
.store {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--cobalt);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.store[hidden] { display: none; }
:root[data-theme="dark"] .store { color: #15142B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .store { color: #15142B; } }
.soon {
  margin: 0;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--cobalt-soft);
  color: var(--cobalt-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* 네컷 스트립 */
.strip-wrap { position: relative; margin: 0; justify-self: center; }
.strip {
  width: min(232px, 64vw);
  padding: 10px 10px 0;
  background: var(--strip);
  border-radius: 10px;
  transform: rotate(2.5deg);
  box-shadow: 0 1px 0 rgba(28, 26, 51, 0.06), 0 18px 40px -18px rgba(28, 26, 51, 0.45);
  display: grid;
  gap: 8px;
}
.cell {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg) center / cover no-repeat;
}
.cell svg, .mini svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.p { stroke: #fff; stroke-width: 2.4; paint-order: stroke; }
.slot { fill: rgba(255, 255, 255, 0.72); stroke: #F5B400; stroke-width: 2.4; stroke-dasharray: 4 3; }
.slot-plus { stroke: #F5B400; stroke-width: 3.4; stroke-dasharray: none; stroke-linecap: round; }
.strip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px 10px 4px;
  color: #1C1A33;
}
.strip-caption { font-size: 0.875rem; font-weight: 700; letter-spacing: -0.02em; }
.strip-qr { display: block; width: 44px; height: 44px; }

.turn {
  position: absolute;
  left: -18px;
  bottom: 23%;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--sun);
  color: #1C1A33;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  transform: rotate(-3deg);
  box-shadow: 0 8px 20px -10px rgba(28, 26, 51, 0.5);
  white-space: nowrap;
}

/* 한 번만 움직임: 사람이 한 명씩 들어오고, 빈자리와 안내가 뜸 */
@media (prefers-reduced-motion: no-preference) {
  .strip .p, .strip .slot, .turn { opacity: 0; }
  .strip .p { transform: translateY(10px); transform-box: fill-box; }
  .strip.play .p { animation: enter 0.5s cubic-bezier(.2, .8, .3, 1.2) forwards; }
  .strip.play .p1 { animation-delay: 0.55s; }
  .strip.play .p2 { animation-delay: 1.1s; }
  .strip.play .slot { animation: show 0.4s 1.75s forwards; }
  .strip.play ~ .turn { animation: pop 0.45s 2s cubic-bezier(.2, .8, .3, 1.3) forwards; }
}
.strip .p0 { animation-delay: 0s; }
@keyframes enter { to { opacity: 1; transform: none; } }
@keyframes show { to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: rotate(-3deg) scale(0.8); } to { opacity: 1; transform: rotate(-3deg); } }

/* 순서 */
.how { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; gap: 0; max-width: 46rem; }
.steps li {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 40px;
}
.steps li:last-child { padding-bottom: 0; }
/* 바통처럼 다음 칸으로 이어지는 선 */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 65px;
  top: 108px;
  bottom: 8px;
  border-left: 2px dashed var(--line);
}
.mini {
  position: relative;
  width: 132px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg) center / cover no-repeat;
  border: 4px solid var(--strip);
  box-shadow: 0 0 0 1px var(--line);
}
.steps h3::before {
  content: counter(step) ". ";
  color: var(--cobalt-ink);
}
.steps p { margin: 8px 0 0; color: var(--ink-2); }
.steps b { color: var(--ink); font-weight: 700; }

/* QR */
.qr {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
  padding: clamp(48px, 8vw, 96px) 0;
  border-top: 1px solid var(--line);
}
.qr-zoom {
  justify-self: center;
  width: min(220px, 60vw);
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line);
}
.qr-zoom img { display: block; width: 100%; height: auto; }
.qr-text { max-width: 38rem; }
.qr-text > p { margin: 16px 0 0; color: var(--ink-2); }
.qr-list { margin: 28px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; }
.qr-list dt { font-weight: 700; }
.qr-list dd { margin: 0; color: var(--ink-2); }
.qr-text .note { font-size: var(--s1); color: var(--muted); margin-top: 24px; }

/* 이용권 */
.plan { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.plan-lead { margin: 14px 0 0; color: var(--ink-2); max-width: 38rem; }
.plan-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; max-width: 52rem; }
.plan-cols > div { padding: 24px 26px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.plan-cols > div:last-child { background: var(--cobalt); box-shadow: none; color: #fff; }
:root[data-theme="dark"] .plan-cols > div:last-child { color: #15142B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plan-cols > div:last-child { color: #15142B; } }
.plan ul { margin: 14px 0 0; padding: 0 0 0 1.1em; }
.plan li { margin: 4px 0; }

/* FAQ */
.faq { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); max-width: 46rem; }
.faq h2 { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  position: relative;
  font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 20px; color: var(--ink-2); }

/* 꼬리 */
.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  font-size: var(--s1);
  color: var(--muted);
}
.foot p { margin: 0 0 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.foot nav > span:first-child { color: var(--ink-2); font-weight: 600; }
.foot a { color: var(--muted); }

/* 좁은 화면 */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .strip-wrap { margin-top: 8px; }
  .qr { grid-template-columns: 1fr; }
  .qr-zoom { justify-self: start; width: 160px; }
  .plan-cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .steps li { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .mini { width: 96px; }
  .steps li:not(:last-child)::after { left: 47px; top: 80px; }
  .qr-list { grid-template-columns: 1fr; gap: 2px; }
  .qr-list dd { margin-bottom: 10px; }
  .turn { left: -8px; }
}
