/* code404 홈. 색은 CI(code404-brand)를 따른다. 하위 페이지는 style.css를 쓴다. */
:root {
  --night: #0F0D24;
  --ink: #1E1B4B;
  --violet: #7C3AED;
  --lavender: #A78BFA;
  --lilac: #C4B5FD;
  --paper: #FAFAFC;
  --text: #1E1B4B;
  --muted: #5B5874;
  --line: #E7E5F0;
  --card: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0F0D24; --text: #EDEBF7; --muted: #A1A1B8; --line: #2A2747; --card: #18163A; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.7 "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a { color: var(--lavender); } }

/* 언어: html[data-lang]에 맞는 쪽만 보인다. */
html[data-lang="ko"] [lang="en"], html[data-lang="en"] [lang="ko"] { display: none; }

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(15, 13, 36, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.top .mark { line-height: 0; }
.switch { display: flex; gap: 4px; background: rgba(255,255,255,0.08); border-radius: 999px; padding: 4px; }
.switch button {
  border: 0; background: transparent; color: #CFCBE6; font: 600 13px/1 "Pretendard", sans-serif;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
html[data-lang="ko"] .switch [data-set="ko"], html[data-lang="en"] .switch [data-set="en"] { background: var(--violet); color: #fff; }

.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 110px clamp(16px, 5vw, 48px) 80px;
  color: #fff;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(124, 58, 237, 0.45), transparent 70%),
    radial-gradient(50% 45% at 10% 90%, rgba(167, 139, 250, 0.25), transparent 70%),
    var(--night);
  position: relative; overflow: hidden;
}
.hero::before {
  /* 옅은 격자: 코드 화면 느낌 */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
}
.hero > * { position: relative; }
.hero .logo { width: min(440px, 82vw); height: auto; margin-bottom: 44px; }
.hero h1 {
  margin: 0; font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(40px, 8vw, 88px); line-height: 1.12;
  background: linear-gradient(180deg, #fff 40%, var(--lilac));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { max-width: 640px; margin: 28px auto 0; color: #CFCBE6; font-size: clamp(16px, 2.2vw, 19px); }
.hero .down {
  margin-top: 48px; color: var(--lilac); font-size: 24px; width: 48px; height: 48px; line-height: 46px;
  border: 1px solid rgba(196, 181, 253, 0.4); border-radius: 50%;
  animation: bob 2.4s ease-in-out infinite;
}
.hero .down:hover { text-decoration: none; background: rgba(196, 181, 253, 0.1); }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hero .down { animation: none; } html { scroll-behavior: auto; } }

main { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.block { padding: clamp(64px, 10vw, 112px) 0 0; }
.eyebrow { margin: 0 0 20px; color: var(--violet); font-weight: 700; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--lavender); } }

.cards { display: grid; gap: 16px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .cards.three, .cards.two { grid-template-columns: 1fr; } }

.card, .game {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover, .game:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(30, 27, 75, 0.45); }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--ink); color: var(--lavender); font: 800 18px/1 "Pretendard", sans-serif; margin-bottom: 18px;
}
.card h3, .game h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.01em; }
.card p, .game p { margin: 0; color: var(--muted); font-size: 16px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li {
  display: flex; gap: 20px; align-items: baseline;
  padding: 22px 26px; border-radius: 18px; border: 1px solid var(--line); background: var(--card);
  font-size: clamp(17px, 2.2vw, 20px); font-weight: 600;
}
.steps b { color: var(--violet); font-size: 15px; font-weight: 800; min-width: 28px; }
@media (prefers-color-scheme: dark) { .steps b { color: var(--lavender); } }

.game { display: flex; gap: 22px; align-items: flex-start; }
.game img { width: 96px; height: 96px; border-radius: 22px; flex: none; box-shadow: 0 8px 20px -10px rgba(0,0,0,0.4); }
.game .tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; font-weight: 600; color: var(--ink); background: #EDE9FE; padding: 4px 10px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .tag { color: var(--lilac); background: #2A2560; } }
.game .links { margin-top: 14px; font-weight: 700; }
@media (max-width: 480px) { .game { flex-direction: column; } }

.contact { text-align: center; padding-bottom: 24px; }
.contact h2 { margin: 0 0 18px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.02em; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 28px; font-size: 18px; font-weight: 600; margin: 0; }

.foot {
  margin-top: clamp(64px, 10vw, 104px); padding: 40px 16px 48px; text-align: center;
  background: var(--night); color: #A1A1B8; font-size: 14px;
}
.foot img { margin-bottom: 14px; }
.foot p { margin: 6px 0; }
.foot a { color: #C4B5FD; }
.foot .copy { color: #6E6A8A; }
