/* 슈피겔만의 뮤직 카니발 — v5
   One idea: the real game footage is the page. Everything else stays quiet —
   near-black ground, hairlines, one typeface, one accent (magenta) reserved for
   the action and the active state. No glows, no gradients on text, no ornaments.

   Type scale (px): 13 / 15 / 17 / 20 / 28 / 40 / 56 — weights 400 / 600 / 800.
   Radius: 4px everywhere. Grid: 12 columns, 1200 max, 24 gutter.
   Motion: one reveal (opacity + 8px, 500ms) and the videos themselves.

   Logo images never get a fixed height+width pair: they get a width, a
   max-height and object-fit: contain, so a logo of another aspect ratio drops
   into the same box without stretching or moving the layout. */

:root {
  color-scheme: dark;
  --bg: #0B0A14;
  --surface: #15131F;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --text: #F4F1EA;
  --muted: #A49FB4;
  --faint: #6E6981;
  --accent: rgb(255, 45, 150);
  --accent-hi: rgb(255, 84, 170);
  --cyan: #46E1F0;

  --fs-13: .8125rem;
  --fs-15: .9375rem;
  --fs-17: 1.0625rem;
  --fs-20: 1.25rem;
  --fs-28: 1.75rem;
  --fs-40: 2.5rem;
  --fs-56: 3.5rem;

  --r: 4px;
  --max: 1200px;
  --pad: 24px;
  --gap: 24px;
  --nav-h: 64px;
  --sec: 128px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --phone: 2340 / 1080;          /* the phone recordings, 19.5:9 */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: var(--fs-17);
  font-weight: 400;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, video, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.nw { white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: fixed; left: 16px; top: -48px; z-index: 30;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: var(--r);
  font-size: var(--fs-15); font-weight: 600;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: var(--r);
  font-size: var(--fs-15); font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 14px; height: 14px; flex: none; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hi); }
.btn--line { border: 1px solid var(--line-2); color: var(--text); }
.btn--line:hover { border-color: var(--text); }
.btn:active { transform: scale(.98); }
.btn--sm { height: 38px; padding: 0 16px; font-size: var(--fs-13); }
.btn--lg { height: 52px; padding: 0 26px; font-size: var(--fs-17); }

/* ------------------------------------------------------------ nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.nav.is-solid, .nav.is-open { background: var(--bg); border-bottom-color: var(--line); }
.nav__in { height: 100%; display: flex; align-items: center; gap: 40px; }
.nav__brand { display: block; flex: none; }
.nav__brand img, .foot__brand img {
  height: 34px; width: auto; max-width: 150px;
  object-fit: contain; object-position: left center;
}
.nav__links { display: flex; gap: 32px; margin-right: auto; }
.nav__links a {
  font-size: var(--fs-15); font-weight: 600; color: var(--muted);
  transition: color .2s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-here { color: var(--text); box-shadow: 0 2px 0 var(--accent); }
.nav__end { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.nav__menu { display: none; width: 40px; height: 40px; position: relative; border-radius: var(--r); }
.nav__menu span {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--text);
  transition: transform .3s var(--ease);
}
.nav__menu span:first-child { top: 16px; }
.nav__menu span:last-child { top: 23px; }
.nav__menu[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__menu[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.menu { position: absolute; inset: var(--nav-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.menu ul { padding: 8px var(--pad) 24px; }
.menu a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs-20); font-weight: 600;
}
.menu li:last-child a { border-bottom: 0; }
.menu a svg { width: 14px; height: 14px; color: var(--muted); }

/* ------------------------------------------------------------ media frame
   A frame is a poster <img> with the looping <video> laid over it. The video
   stays transparent until it is actually playing, and its first frame IS the
   poster, so the swap never shows. */
.frame {
  position: relative; overflow: hidden; border-radius: var(--r);
  background: var(--surface);
}
.frame::after { /* hairline that sits above the footage */
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1;
  box-shadow: inset 0 0 0 1px var(--line); pointer-events: none;
}
.frame__poster, .frame__video, .frame__embed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame__video { opacity: 0; transition: opacity .2s linear; }
.frame.is-live .frame__video { opacity: 1; }
.frame__embed { border: 0; background: #000; z-index: 2; }
.frame--tall { aspect-ratio: 608 / 1080; }
.frame--wide { aspect-ratio: 16 / 9; }
.frame--phone { aspect-ratio: var(--phone); }
.frame--room { aspect-ratio: 978 / 550; }
.frame--skins { aspect-ratio: 1152 / 720; }
.frame--result { aspect-ratio: 1296 / 728; }

.cap {
  display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px;
  font-size: var(--fs-13); line-height: 1.5; color: var(--muted);
}
.cap b { color: var(--text); font-weight: 600; }

/* play button: the trailer, and any [data-youtube-id] slot that has an id */
.play {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.play svg { width: 26px; height: 26px; margin-left: 4px; }
.is-clickable { cursor: pointer; }
.is-clickable:hover .play { background: var(--accent-hi); transform: scale(1.02); }
.play.is-gone, .frame__poster.is-gone { display: none; }
.frame.is-playing { cursor: auto; }
.frame.is-playing .frame__video { opacity: 1; }

/* without main.js the trailer is a plain <video controls> */
html:not(.js) .pv .frame__poster,
html:not(.js) .play { display: none; }
html:not(.js) .pv .frame__video { opacity: 1; }

/* ------------------------------------------------------------ hero */
.hero { position: relative; }
.hero__logo { margin: 0; }
.hero__logo img {
  width: 100%; height: auto;
  object-fit: contain; object-position: left bottom;
}
.hero__lead { font-size: var(--fs-20); font-weight: 600; line-height: 1.5; letter-spacing: -.01em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__platform {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px;
  margin-top: 20px; font-size: var(--fs-15); color: var(--muted);
}
.hero__platform b { color: var(--text); font-weight: 600; }
.hero__note { margin-top: 4px; font-size: var(--fs-15); color: var(--muted); }

/* hero: logo row, then the phone-ratio clip at full content width.
   The logo row is capped by viewport height so the clip's judgement line
   (72% down the frame) stays above the fold on 1366x768 / 1280x720 laptops. */
.hero { padding: calc(var(--nav-h) + 28px) 0 0; }
.hero__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.hero__logo { grid-column: 1 / span 6; }
.hero__logo img { max-width: 520px; max-height: clamp(120px, 20svh, 240px); }
.hero__side { grid-column: 8 / span 5; padding-bottom: 2px; }
.hero__stage { margin-top: 28px; }
/* on short laptop screens shrink the clip so the whole highway, judgement
   line included, is on the first screen (330px = nav + logo row + gaps) */
.hero__media { width: min(100%, calc((100svh - 330px) * 2.1667)); min-width: min(100%, 720px); }

/* ------------------------------------------------------------ sections */
.sec { padding: var(--sec) 0 0; }
.sec__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 48px; border-bottom: 1px solid var(--line);
}
.sec__head h2 { font-size: var(--fs-40); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.sec__meta { font-size: var(--fs-15); color: var(--muted); font-variant-numeric: tabular-nums; }

/* feature rows */
.rows { display: grid; gap: 112px; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
.row__media { grid-column: 1 / span 7; }
.row__text { grid-column: 9 / span 4; }
.row--flip .row__media { grid-column: 6 / span 7; grid-row: 1; }
.row--flip .row__text { grid-column: 1 / span 4; grid-row: 1; }
.row h3, .band h3, .mob h3 { font-size: var(--fs-28); font-weight: 800; line-height: 1.3; letter-spacing: -.02em; }
.row__text p, .band__text p { margin-top: 16px; color: var(--muted); }
.row__text .fine { margin-top: 16px; font-size: var(--fs-15); color: var(--faint); }
.row__text .kicker, .band__text .kicker {
  margin: 0 0 6px; font-size: var(--fs-15); font-weight: 600; line-height: 1.4; color: var(--muted);
}

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.spec { margin-top: 32px; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: var(--fs-13); font-weight: 600; color: var(--muted); }
.spec dd { font-size: var(--fs-15); display: flex; flex-wrap: wrap; gap: 6px; }
kbd {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  font: 600 var(--fs-13)/1 inherit; color: var(--text);
}
kbd.wide { min-width: 52px; }

.band__text { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); margin-bottom: 32px; align-items: end; }
.band__text h3 { grid-column: 1 / span 4; }
.band__text p { grid-column: 6 / span 6; margin-top: 0; }

/* mobile (touch mode) block inside the features: text left, slot clip right */
.mob { scroll-margin-top: calc(var(--nav-h) + 16px); }
.mob__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
.mob__text { grid-column: 1 / span 4; }
.mob__text .kicker { margin: 0 0 6px; font-size: var(--fs-15); font-weight: 600; line-height: 1.4; color: var(--muted); }
.mob__text h3 + p { margin-top: 16px; }
.mob__text p:not(.kicker) { color: var(--muted); }
.mob__text p + p { margin-top: 12px; }
.mob__main { grid-column: 5 / span 8; }
.mob__clips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.notes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap);
  margin-top: 48px; border-top: 1px solid var(--line);
}
.notes > div { padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.notes dt { font-size: var(--fs-15); font-weight: 600; }
.notes dd { margin-top: 4px; font-size: var(--fs-15); color: var(--muted); }

/* songs */
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: calc(var(--r) + 2px); }
.seg button {
  height: 36px; padding: 0 14px; border-radius: var(--r);
  font-size: var(--fs-15); font-weight: 600; color: var(--muted);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.seg em { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] em { color: var(--muted); }
.songs__note { margin: -24px 0 40px; font-size: var(--fs-15); color: var(--muted); }
.songs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px var(--gap); }
.song__jacket { border-radius: var(--r); overflow: hidden; background: var(--surface); aspect-ratio: 1; }
.song__jacket img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease), filter .35s var(--ease); }
.song:hover .song__jacket img { transform: scale(1.02); filter: brightness(1.08); }
.song__title { margin-top: 14px; font-size: var(--fs-17); font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.song__meta { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: var(--fs-13); color: var(--muted); }
.tag { font-size: var(--fs-13); font-weight: 600; color: var(--text); }
.tag--free { color: var(--cyan); }
.tag--coin s { color: var(--faint); font-weight: 400; margin-right: 4px; }
.songs__empty { color: var(--muted); padding: 40px 0; }
.songs__foot { margin-top: 56px; font-size: var(--fs-15); color: var(--muted); }

/* news */
.news { border-top: 1px solid var(--line); margin-top: -48px; }
.news__item { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--line); align-items: start; }
.news__thumb { border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface); }
.news__thumb img { width: 100%; height: 100%; object-fit: cover; }
.news__meta { display: flex; gap: 12px; align-items: center; font-size: var(--fs-13); color: var(--muted); font-variant-numeric: tabular-nums; }
.news__meta .tag { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: var(--fs-13); font-weight: 600; color: var(--text); line-height: 1.5; }
.news__meta .tag--now { border-color: var(--accent); color: var(--accent); }
.news__title { margin-top: 10px; font-size: var(--fs-20); font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.news__text { margin-top: 8px; font-size: var(--fs-15); color: var(--muted); max-width: 64ch; }
.news__list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: var(--fs-15); counter-reset: rm; }
.news__list li { color: var(--text); }
.news__list li::before { content: counter(rm, decimal-leading-zero) " "; counter-increment: rm; color: var(--faint); font-variant-numeric: tabular-nums; }
.news__fine { margin-top: 12px; font-size: var(--fs-13); color: var(--faint); }

/* community */
.community { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
.community__media { grid-column: 1 / span 7; }
.community__text { grid-column: 9 / span 4; }
.community__text h2 { font-size: var(--fs-40); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.community__text p { margin-top: 16px; color: var(--muted); }
.community__text .btn { margin-top: 32px; }
.community__text .fine { margin-top: 16px; font-size: var(--fs-13); color: var(--faint); }

/* footer */
.foot { margin-top: var(--sec); border-top: 1px solid var(--line); padding: 48px 0 56px; }
.foot__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; align-items: start; }
.foot__brand { grid-column: 1 / span 3; }
.foot__links { grid-column: 4 / span 4; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: var(--fs-15); font-weight: 600; }
.foot__links a { color: var(--muted); transition: color .2s var(--ease); }
.foot__links a:hover { color: var(--text); }
.foot__legal { grid-column: 8 / span 5; font-size: var(--fs-13); color: var(--faint); line-height: 1.7; }
.foot__legal p + p { margin-top: 8px; }

/* ------------------------------------------------------------ reveal
   Hidden state exists only under html.rv-on, which the head script sets when
   motion is allowed and lifts again if main.js never arrives. */
html.rv-on .rv { opacity: 0; transform: translateY(8px); }
html.rv-on .rv.is-in {
  opacity: 1; transform: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--d, 0ms);
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .songs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .row__text { grid-column: 8 / span 5; }
  .row--flip .row__text { grid-column: 1 / span 5; }
  .community__text { grid-column: 8 / span 5; }
  .hero__side { grid-column: 7 / span 6; }
}

@media (max-width: 959px) {
  :root { --sec: 96px; }
  .nav__links { display: none; }
  .nav__menu { display: block; }
  .nav__in { gap: 16px; }

  .hero__logo, .hero__side { grid-column: 1 / -1; }
  .hero__side { margin-top: 28px; }
  .hero__media { width: 100%; min-width: 0; }
  .hero__cta .btn--lg { height: 48px; padding: 0 20px; font-size: var(--fs-15); }

  .rows { gap: 80px; }
  .row__media, .row--flip .row__media { grid-column: 1 / -1; grid-row: 1; }
  .row__text, .row--flip .row__text { grid-column: 1 / -1; grid-row: 2; margin-top: 28px; }
  .band__text h3, .band__text p { grid-column: 1 / -1; }
  .band__text p { margin-top: 12px; }
  .mob__text, .mob__main { grid-column: 1 / -1; }
  .mob__main { margin-top: 28px; }
  .mob__clips { gap: 16px; }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .community__media, .community__text { grid-column: 1 / -1; }
  .community__text { margin-top: 32px; }

  .foot__brand, .foot__links, .foot__legal { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  :root { --pad: 16px; --gap: 16px; --sec: 80px; --nav-h: 56px; }
  body { font-size: var(--fs-15); }
  .nav__brand img { height: 30px; }
  .hero__logo img { max-height: 200px; }
  .hero__stage { margin-top: 32px; padding: 0; }
  .hero__media .frame { border-radius: 0; }
  .hero__media .cap { padding: 0 var(--pad); }
  .hero__lead { font-size: var(--fs-17); }
  .hero__cta { margin-top: 20px; }
  .hero__cta .btn { flex: 1 1 140px; }
  kbd { min-width: 24px; height: 26px; padding: 0 5px; }
  kbd.wide { min-width: 44px; }
  .spec > div { grid-template-columns: 64px 1fr; }
  .spec dd { gap: 4px; }
  .sec__head { margin-bottom: 32px; }
  .sec__head h2, .community__text h2 { font-size: var(--fs-28); }
  .row h3, .band h3, .mob h3 { font-size: var(--fs-20); }
  .pair { gap: 10px; }
  .mob__clips { grid-template-columns: 1fr; gap: 28px; }
  .notes { grid-template-columns: 1fr; }
  .songs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .songs__note { margin: -12px 0 28px; }
  .song__title { font-size: var(--fs-15); }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 0 8px; }
  .news { margin-top: -32px; }
  .news__item { grid-template-columns: 1fr; gap: 16px; padding: 24px 0; }
  .news__title { font-size: var(--fs-17); }
  .play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .play svg { width: 20px; height: 20px; }
}

@media (min-width: 560px) and (max-width: 767px) {
  .songs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
