/* 공통: 색·글꼴 변수, 페이지 틀, 맨 위 소개·언어 선택·커뮤니티 링크 */

:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --text: #1c1a17;
  --muted: #6f6a62;
  --line: #e4ded4;
  --accent: #b4532a;
  --thumb: #ebe5da;
  --foot-bg: #ede6db;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e0d;
    --surface: #1a1816;
    --text: #ece7df;
    --muted: #9a9389;
    --line: #2c2925;
    --accent: #e08a5c;
    --thumb: #25221f;
    --foot-bg: #161412;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 20px 48px;
}

.intro { margin-bottom: 48px; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 700;
}

.lede {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 960px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* 언어 선택 */
.intro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.intro-top .eyebrow { margin: 0; }

.langs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.langs a {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.langs a:hover { color: var(--text); }

.langs a.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

@media (max-width: 480px) {
  .intro-top { flex-direction: column-reverse; align-items: flex-start; gap: 20px; }
  .langs { align-self: flex-end; }
}

/* 상단 커뮤니티 링크 (디스코드·카카오 오픈채팅): PC에선 제목 오른쪽, 좁은 화면에선 아래 */
.intro-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.intro-text { min-width: 0; }
.intro-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.community-note { margin: 0; color: var(--text); font-size: 14px; font-weight: 600; }
.community { display: flex; flex-wrap: wrap; gap: 10px; flex: none; justify-content: flex-end; }
.community-link { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 700; text-decoration: none; transition: transform .15s, filter .15s; box-shadow: 0 4px 14px rgb(0 0 0 / .18); }
.community-link svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.community-discord { background: #5865f2; color: #fff; }
.community-kakao { background: #fee500; color: #191919; }
.community-link:hover { transform: translateY(-1px); filter: brightness(1.06); }
@media (max-width: 720px) {
  .intro-main { flex-direction: column; align-items: stretch; gap: 18px; }
  .intro-side { align-items: flex-start; }
  .community { justify-content: flex-start; }
}
