:root {
  --bg: #0b0a10;
  --bg-2: #12111a;
  --surface: #17151f;
  --line: #2a2735;
  --text: #f1eee8;
  --muted: #a19cae;
  --faint: #6c6878;
  --accent: #ff5a1f;
  --accent-2: #ffd23f;
  --cyan: #3ee6d0;
  --violet: #8b5cf6;
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --font: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --display: "Space Grotesk", "Noto Sans KR", sans-serif;
  --pixel: "Press Start 2P", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  transition: background .25s, border-color .25s, backdrop-filter .25s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11,10,16,.78);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 26px; height: 26px; }
.mark i { border-radius: 4px; background: var(--accent); }
.mark i:nth-child(2) { background: var(--accent-2); }
.mark i:nth-child(3) { background: var(--cyan); }
.mark i:nth-child(4) { background: var(--violet); }
.brand:hover .mark i { animation: pop .5s ease; }
.brand:hover .mark i:nth-child(2) { animation-delay: .06s; }
.brand:hover .mark i:nth-child(3) { animation-delay: .12s; }
.brand:hover .mark i:nth-child(4) { animation-delay: .18s; }
@keyframes pop { 50% { transform: scale(.6) rotate(45deg); } }
.brand-text { font-family: var(--display); font-weight: 700; letter-spacing: .06em; font-size: 15px; }
.brand-text em { font-style: normal; color: var(--muted); margin-left: 6px; font-weight: 500; }
.links { display: flex; gap: 28px; align-items: center; }
.links a { text-decoration: none; font-family: var(--display); font-size: 14px; letter-spacing: .04em; color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--text); }
.links .cta-sm { color: var(--text); border: 1px solid var(--line); padding: 7px 16px; border-radius: 999px; }
.links .cta-sm:hover { border-color: var(--accent); color: var(--accent); }
.menu-btn { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 2px; background: var(--text); margin: 6px 0; transition: transform .25s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .02em;
  text-decoration: none; transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(255,90,31,.7); }
.btn.primary:hover { transform: translateY(-2px); background: #ff6d38; }
.btn.ghost { border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--text); }
.btn.wide { margin-top: 36px; }
.btn.big { font-size: clamp(15px, 2.4vw, 20px); padding: 18px 34px; word-break: break-all; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--gutter) 60px;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(139,92,246,.22), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(255,90,31,.18), transparent 70%),
    var(--bg);
}
#field { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
}
.hero-inner { position: relative; z-index: 2; max-width: var(--max); width: 100%; margin: 0 auto; }
.eyebrow { font-family: var(--display); font-size: 13px; letter-spacing: .18em; color: var(--muted); display: flex; align-items: center; gap: 10px; margin: 0 0 24px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.hero h1 { margin: 0; font-weight: 900; font-size: clamp(42px, 8.6vw, 124px); line-height: 1.05; letter-spacing: -.04em; }
.hero h1 .line { display: block; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.hero h1 .line:nth-child(2) { animation-delay: .15s; }
.hero h1 .accent { background: linear-gradient(90deg, var(--accent), var(--accent-2) 60%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
.lead { margin: 30px 0 0; max-width: 620px; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); animation: rise .9s .35s both; }
.lead b { color: var(--text); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; animation: rise .9s .5s both; }
.hero-stats {
  position: relative; z-index: 2; max-width: var(--max); width: 100%; margin: 72px auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.hero-stats div { padding: 22px 18px 0 0; }
.hero-stats b { display: block; font-family: var(--display); font-size: clamp(28px, 4vw, 44px); line-height: 1; }
.hero-stats span { font-size: 13px; color: var(--faint); }
.scroll { position: absolute; z-index: 2; right: var(--gutter); bottom: 28px; font-family: var(--pixel); font-size: 9px; letter-spacing: .2em; color: var(--faint); text-decoration: none; writing-mode: vertical-rl; }
.scroll::after { content: ""; display: inline-block; width: 1px; height: 40px; background: var(--faint); margin-top: 10px; animation: drop 1.8s infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- MARQUEE ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--accent); color: #0b0a10; padding: 14px 0; transform: rotate(-1.2deg) scale(1.02); }
.track { display: flex; gap: 28px; width: max-content; animation: slide 38s linear infinite; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .06em; white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- SECTIONS ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 140px) var(--gutter) 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.kicker { font-family: var(--pixel); font-size: 10px; letter-spacing: .14em; color: var(--accent); margin: 0 0 18px; }
h2 { font-size: clamp(30px, 5vw, 56px); line-height: 1.15; letter-spacing: -.035em; margin: 0; font-weight: 900; }
.desc { color: var(--muted); margin: 18px 0 0; font-size: 16px; }

/* ---------- GAMES ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { font: inherit; font-size: 14px; color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.game {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
}
.game:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c1) 60%, transparent); box-shadow: 0 24px 50px -24px var(--c1); }
.game.hide { display: none; }
.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.cover canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.game:hover .cover canvas { transform: scale(1.06); }
.cover .logo {
  position: absolute; left: 18px; bottom: 16px; right: 18px;
  font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; letter-spacing: -.01em; color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.5);
}
.cover .badge { position: absolute; top: 14px; left: 14px; font-family: var(--pixel); font-size: 8px; letter-spacing: .08em; background: rgba(0,0,0,.55); color: #fff; padding: 7px 9px; border-radius: 6px; backdrop-filter: blur(6px); }
.game-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-body h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.game-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tags span { font-size: 12px; color: var(--faint); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; }

/* ---------- FACTORY ---------- */
.layers { display: grid; gap: 10px; }
.layer {
  display: flex; gap: 22px; align-items: center;
  padding: 22px 26px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255,255,255,.04), transparent);
  border: 1px solid var(--line);
  margin-left: calc(var(--i) * 3%);
  transition: border-color .3s, transform .3s;
}
.layer:hover { border-color: var(--cyan); transform: translateX(6px); }
.ln { flex: none; font-family: var(--pixel); font-size: 12px; color: var(--bg); background: var(--cyan); padding: 10px; border-radius: 8px; }
.layer:nth-child(2) .ln { background: var(--accent-2); }
.layer:nth-child(3) .ln { background: var(--accent); }
.layer:nth-child(4) .ln { background: var(--violet); color: #fff; }
.layer h3 { margin: 0; font-family: var(--display); font-size: 19px; }
.layer p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.principles article { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pi { color: var(--accent); font-size: 14px; }
.principles h3 { margin: 12px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.principles p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- JOURNAL ---------- */
.journal { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.journal li { border-bottom: 1px solid var(--line); }
.journal a { display: grid; grid-template-columns: 110px 1fr auto; gap: 24px; align-items: baseline; padding: 24px 4px; text-decoration: none; transition: background .2s, padding .25s; }
.journal a:hover { background: rgba(255,255,255,.03); padding-left: 14px; }
.journal time { font-family: var(--pixel); font-size: 9px; color: var(--faint); }
.journal h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.journal p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.journal .arrow { color: var(--faint); transition: color .2s, transform .2s; }
.journal a:hover .arrow { color: var(--accent); transform: translateX(4px); }

/* ---------- STUDIO ---------- */
.studio-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; padding: clamp(32px, 6vw, 64px); border-radius: 28px; background: linear-gradient(140deg, #1b1726, #0f0e15); border: 1px solid var(--line); position: relative; overflow: hidden; }
.studio-grid::before { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(255,210,63,.18), transparent 70%); }
.studio-copy p { color: var(--muted); margin: 0 0 16px; }
.studio-copy b { color: var(--text); }
.values { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.values li { padding-left: 26px; position: relative; color: var(--muted); }
.values li::before { content: ""; position: absolute; left: 0; top: .6em; width: 12px; height: 12px; background: var(--accent); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* ---------- TEAM ---------- */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.member { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s; }
.member:hover { transform: translateY(-5px); border-color: var(--mc); }
.avatar { flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-weight: 900; font-size: 18px; letter-spacing: -.02em; color: #0b0a10; background: var(--mc); box-shadow: 0 12px 28px -12px var(--mc); }
.who { display: flex; flex-direction: column; min-width: 0; }
.who small { font-family: var(--pixel); font-size: 8px; letter-spacing: .08em; color: var(--mc); margin-bottom: 8px; }
.who b { font-size: 18px; letter-spacing: .02em; line-height: 1.2; }
.who span { font-size: 14px; color: var(--muted); }
.member.director { grid-column: 1 / -1; padding: 30px; background: linear-gradient(120deg, color-mix(in srgb, var(--mc) 18%, var(--surface)), var(--surface) 60%); border-color: color-mix(in srgb, var(--mc) 45%, var(--line)); }
.member.director .avatar { width: 92px; height: 92px; border-radius: 24px; font-size: 26px; }
.member.director .who small { font-size: 10px; }
.member.director .who b { font-size: clamp(24px, 3vw, 32px); }
.member.director .who span { font-size: 16px; }
@media (max-width: 860px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .team { grid-template-columns: 1fr; }
  .member.director { padding: 22px; }
  .member.director .avatar { width: 72px; height: 72px; font-size: 20px; }
}

/* ---------- CONTACT ---------- */
.contact { margin-top: clamp(80px, 12vw, 140px); padding: clamp(80px, 12vw, 140px) var(--gutter); text-align: center; background: radial-gradient(60% 80% at 50% 100%, rgba(255,90,31,.25), transparent 70%); border-top: 1px solid var(--line); }
.contact-inner { max-width: 760px; margin: 0 auto; }
.contact p:not(.kicker) { color: var(--muted); margin: 18px 0 34px; }

/* ---------- FOOTER ---------- */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--gutter); border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot p { margin: 0; }
.foot a { text-decoration: none; font-family: var(--pixel); font-size: 9px; }
.brand.small .brand-text { font-size: 13px; }
.brand.small .mark { width: 20px; height: 20px; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11,10,16,.97); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; transform: translateY(-120%); transition: transform .3s;
  }
  .links.open { transform: none; }
  .links a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .links .cta-sm { border: 0; border-radius: 0; padding: 14px 0; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 8px; }
  .principles { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; gap: 24px; }
  .layer { margin-left: 0; padding: 18px; gap: 16px; }
  .journal a { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .journal time { grid-column: 1 / -1; }
  .scroll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- FEATURE: CLONE PROTOCOL ---------- */
.feature {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 0;
  border-radius: 24px; overflow: hidden; margin-bottom: 56px;
  background: linear-gradient(160deg, #141826, #0d0c13 60%);
  border: 1px solid #2c3550;
  box-shadow: 0 40px 80px -40px rgba(62,230,208,.35);
}
.feature-art { position: relative; min-height: 340px; overflow: hidden; }
.feature-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.feature:hover .feature-art img { transform: scale(1.04); }
.feature-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, #121522); }
.badge.live { position: absolute; z-index: 2; top: 18px; left: 18px; font-family: var(--pixel); font-size: 8px; letter-spacing: .08em; color: #0b0a10; background: var(--cyan); padding: 8px 10px; border-radius: 6px; }
.feature-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.feature-kicker { margin: 0; font-family: var(--pixel); font-size: 9px; letter-spacing: .12em; color: var(--cyan); }
.feature-title { margin: 0; font-family: var(--display); font-size: clamp(30px, 4vw, 48px); line-height: 1; letter-spacing: -.02em;
  background: linear-gradient(90deg, #fff, var(--cyan) 70%, #ff4fd8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feature-title small { display: block; margin-top: 10px; font-family: var(--font); font-size: 15px; font-weight: 500; letter-spacing: .1em; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.feature-lead { margin: 0; color: var(--muted); font-size: 15px; }
.feature-lead b { color: var(--text); }
.feature-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.feature-points li { padding-left: 18px; position: relative; }
.feature-points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--cyan); transform: rotate(45deg); }
.feature-points b { color: var(--text); }
.feature .tags { margin-top: 4px; }
.heroes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #2c3550; }
.heroes figure, .shots figure { margin: 0; position: relative; overflow: hidden; }
.heroes img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 62% 30%; filter: saturate(.9); transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s; }
.heroes figure:hover img { transform: scale(1.06); filter: saturate(1.15); }
.heroes figure + figure { border-left: 1px solid #2c3550; }
.heroes figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.85)); font-size: 12px; color: var(--muted); }
.heroes figcaption b { display: block; font-family: var(--display); font-size: 18px; color: #fff; letter-spacing: .08em; }
.shots { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #2c3550; }
.shots figure + figure { border-left: 1px solid #2c3550; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots figcaption { position: absolute; left: 14px; bottom: 12px; font-family: var(--pixel); font-size: 8px; letter-spacing: .08em; color: #fff; background: rgba(0,0,0,.6); padding: 6px 8px; border-radius: 5px; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature-art { min-height: 0; aspect-ratio: 16 / 9; }
  .feature-art::after { background: linear-gradient(180deg, transparent 60%, #121522); }
  .heroes { grid-template-columns: repeat(2, 1fr); }
  .heroes figure:nth-child(3) { border-left: 0; }
  .heroes figure:nth-child(n+3) { border-top: 1px solid #2c3550; }
  .shots { grid-template-columns: 1fr; }
  .shots figure + figure { border-left: 0; border-top: 1px solid #2c3550; }
}
