/* =========================================================
   SONIC — 디자인 토큰과 공통 스타일
   색은 브릭스 Style Manager → 색상(SONIC 팔레트)에서 관리한다.
   아래 색 값은 팔레트가 비어 있을 때만 쓰이는 기본값이다(:where라서 브릭스 값이 항상 이긴다).
   ========================================================= */

:where(:root) {
  --ink: #0A0B10;
  --ink-2: #14161F;
  --paper: #ECEEF3;
  --cobalt: #2433FF;
  --standby: #FFB81C;
  --mute: #8B90A5;
  --mute-dark: #5A5F73;
  --line: rgba(236, 238, 243, 0.14);
  --line-dark: rgba(10, 11, 16, 0.14);
}

:root {
  /* 폰트 */
  --f-display: "Archivo", "Noto Sans KR", system-ui, sans-serif;
  --f-body: "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* 레이아웃 */
  --max: 1360px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --header-h: 72px;
  --sec-pad: clamp(80px, 10vw, 150px);

  /* 글자 크기 */
  --fs-hero: clamp(72px, 21vw, 380px);
  --fs-sub-word: clamp(60px, 16.5vw, 290px);
  --fs-say: clamp(30px, 5.2vw, 76px);
  --fs-h2: clamp(30px, 3.8vw, 54px);
  --fs-h3: clamp(18px, 1.6vw, 22px);
}
@media (min-width: 769px) {
  :root { --gutter: max(40px, env(safe-area-inset-left, 0px)); }
}
@media (max-width: 560px) {
  :root { --header-h: 60px; }
}

/* ---------- 기본 ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--standby); outline-offset: 3px; }
h1, h2, h3, h4 { text-wrap: balance; }

/* 브릭스 섹션·컨테이너 폭 (Theme Styles의 컨테이너 폭은 비워 두세요) */
.brxe-section { padding-inline: var(--gutter); }
.brxe-container { width: 100%; max-width: var(--max); }

/* Lenis 부드러운 스크롤 필수 CSS */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- 헤더: 투명 + 배경에 따라 반전 ---------- */
#brx-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: none;
  color: #fff;
  mix-blend-mode: difference;
}
#brx-header .btn { background: #fff; color: #000; }
#brx-header .btn:hover { background: #fff; }
/* 모바일 메뉴가 열려 있을 때는 반전을 풀어 메뉴 글씨가 읽히게 */
body.no-scroll #brx-header,
#brx-header:has(.brx-open) { mix-blend-mode: normal; }

#brx-header .brxe-section { padding-block: 0; padding-top: env(safe-area-inset-top, 0px); }
.brxe-container.hd-in {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

/* 로고: SONIC + 작은 ENTERTAINMENT */
.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  color: inherit;
}
.logo small {
  font-family: var(--f-mono);
  font-stretch: 100%;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.14em;
}

/* 메뉴 (Nav Nestable에 클래스 nav) */
.nav .brx-nav-nestable-items { gap: 32px; }
.nav .brx-nav-nestable-items > li > a,
.nav .brx-nav-nestable-items > .brxe-text-link {
  position: relative;
  padding-block: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
}
.nav .brx-nav-nestable-items a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.nav .brx-nav-nestable-items a:hover::after,
.nav .brx-nav-nestable-items a[aria-current="page"]::after { transform: scaleX(1); }
/* 모바일 메뉴가 열렸을 때 */
.nav.brx-open .brx-nav-nestable-items {
  background: var(--ink);
  color: var(--paper);
  gap: 20px;
  padding: calc(var(--header-h) + 32px) var(--gutter) 40px;
  align-items: flex-start;
  justify-content: flex-start;
}
.nav.brx-open .brx-nav-nestable-items a {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(36px, 10vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hd-right { display: flex; align-items: center; gap: 16px; }
.tc {
  font-family: var(--f-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 560px) { .tc { display: none; } }

/* ---------- 푸터 ---------- */
.ft { padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--mute); font-size: 13px; }
.ft .logo { color: var(--paper); }
.ft .logo small { color: var(--mute); }
.brxe-block.ft-top, .brxe-div.ft-top {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  width: 100%;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.brxe-block.ft-links, .brxe-div.ft-links { flex-direction: row; flex-wrap: wrap; gap: 24px; }
.ft-links a { text-decoration: none; color: inherit; transition: color 0.2s; }
.ft-links a:hover { color: var(--paper); }
.ft-info { margin-top: 28px; display: grid; gap: 4px; }

/* =========================================================
   글로벌 클래스 — 빌더에서는 클래스 이름만 붙이고 스타일은 여기서 관리
   ========================================================= */

/* 섹션 배경 */
.sec { padding-block: var(--sec-pad); }
.light { background: var(--paper); color: var(--ink); }
.cobalt { background: var(--cobalt); color: var(--paper); }

/* 라벨 (점 + 영문 대문자) */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--standby);
  box-shadow: 0 0 12px var(--standby);
}
.light .eyebrow { color: var(--mute-dark); }
.cobalt .eyebrow { color: rgba(236, 238, 243, 0.85); }
.cobalt .eyebrow::before { background: var(--paper); box-shadow: none; }

/* 제목 */
.h2 { font-size: var(--fs-h2); font-weight: 900; line-height: 1.2; letter-spacing: -0.035em; }
.big-say { font-size: var(--fs-say); font-weight: 900; line-height: 1.22; letter-spacing: -0.035em; }
.big-say .hl { color: color-mix(in srgb, var(--cobalt) 80%, white); }
.display {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.045em;
}
.sub-word { font-size: var(--fs-sub-word); white-space: nowrap; }
.lead { color: var(--mute); max-width: 40ch; }
.light .lead { color: var(--mute-dark); }
.mono { font-family: var(--f-mono); }

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding-inline: 20px;
  border: 0;
  border-radius: 999px;
  font: 700 14px/1 var(--f-body);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.btn:hover { background: var(--standby); }
.btn--cobalt { background: var(--cobalt); color: var(--paper); }
.btn--cobalt:hover { background: var(--standby); color: var(--ink); }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.btn--ghost:hover { background: var(--standby); color: var(--ink); box-shadow: none; }
.btn--lg { height: 56px; padding-inline: 28px; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
