/* ============================================================
   base: 리셋, 타입, 공용 부품
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, dt { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--pink); color: var(--ink); padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

/* 타입 7단계 */
.anton { font-family: var(--font-display); font-weight: 400; }
.bhs { font-family: var(--font-ko); font-weight: 400; letter-spacing: -.01em; }
.t-display { font-family: var(--font-display); font-size: var(--fs-display); line-height: .95; letter-spacing: .01em; }
.t-num { font-family: var(--font-display); font-size: var(--fs-num); line-height: 1; }
.t-h2 { font-family: var(--font-ko); font-weight: 400; letter-spacing: -.015em; font-size: var(--fs-h2); line-height: 1.15; }
.t-h3 { font-family: var(--font-ko); font-weight: 400; letter-spacing: -.01em; font-size: var(--fs-h3); line-height: 1.25; }
.t-lead { font-size: var(--fs-lead); line-height: 1.4; }
.t-body { font-size: var(--fs-body); line-height: 1.7; }
.t-label { font-family: var(--font-display); font-size: var(--fs-label); letter-spacing: .16em; line-height: 1.2; }
.c-pink { color: var(--pink); }
.c-mint { color: var(--mint); }
.c-paper { color: var(--paper); }

/* 레이아웃 */
.wrap { width: min(var(--wrap), calc(100% - var(--gutter) * 2)); margin-inline: auto; position: relative; z-index: 2; }
section, footer { position: relative; }

/* 종이 질감 */
.grain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 부품: 테이프 라벨 */
.tape { display: inline-block; padding: 6px 20px; letter-spacing: .16em; font-size: var(--fs-lead); line-height: 1.2; box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.tape--mint { background: var(--mint); transform: rotate(-2deg); }
.tape--pink { background: var(--pink); }
.tape--paper { background: rgba(241,234,226,.85); box-shadow: none; }

/* 부품: 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; font-family: var(--font-ko); font-weight: 400; letter-spacing: 0; font-size: var(--fs-lead); line-height: 1.2; padding: 14px 24px; border: 3px solid var(--paper); transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.btn:hover { transform: translate(-2px, -2px); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 currentColor; }
.btn--pink { background: var(--pink); color: var(--ink); box-shadow: 6px 6px 0 var(--paper); }
.btn--ghost { background: transparent; color: var(--paper); }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--ink); box-shadow: 6px 6px 0 var(--pink); }

/* 부품: 카드(종이) */
.card { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 26px; }

/* 네온 포인트 (딱 3곳) */
.glow-pink { color: var(--neon-text); text-shadow: 0 0 4px var(--white), 0 0 12px var(--neon-pink), 0 0 28px rgba(255,79,163,.8); }
.tube-pink { border: 3px solid var(--neon-pink-2); border-radius: 14px; box-shadow: 0 0 8px var(--neon-pink), 0 0 22px rgba(255,79,163,.7), inset 0 0 10px rgba(255,79,163,.5); }
.flicker { animation: flicker 6s infinite; }
@keyframes flicker { 0%, 21%, 23%, 25%, 100% { opacity: 1; } 22%, 24% { opacity: .4; } }

/* 회전 */
.spin { animation: spin 24s linear infinite; transform-origin: 50% 50%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 마키 */
.ticker, .marquee { overflow: hidden; width: 100%; }
.ticker__track, .marquee__track { display: inline-flex; white-space: nowrap; will-change: transform; }
.ticker__track { animation: tick 26s linear infinite; }
.marquee__track--l { animation: tick 40s linear infinite; }
.marquee__track--r { animation: tickr 46s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }
@keyframes tickr { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* 이퀄라이저 */
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.eq span { display: inline-block; width: 4px; height: 18px; background: currentColor; transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: .2s; } .eq span:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* 토스트 */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; background: var(--paper); color: var(--ink); padding: 12px 22px; font-size: var(--fs-label); letter-spacing: .1em; box-shadow: 6px 6px 0 var(--pink); }

/* 모달 */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.modal__box { position: relative; width: min(560px, calc(100% - 32px)); background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--pink); padding: 28px; }
.modal__close { position: absolute; right: 10px; top: 4px; font-size: var(--fs-h3); line-height: 1; }

/* 모션 감소 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flicker, .spin, .ticker__track, .marquee__track, .eq span { animation: none !important; }
  .marquee__track { flex-wrap: wrap; white-space: normal; }
  .btn { transition: none; }
}
