/* 빛나 웹 — 공통 토큰·틀. 모든 페이지가 먼저 읽는다. */
:root {
  color-scheme: dark;
  /* 바탕: 어둠 (따뜻한 검정) */
  --bg: oklch(0.12 0.006 70);
  --bg-2: oklch(0.155 0.007 70);
  --bg-3: oklch(0.19 0.008 70);
  --line: oklch(1 0 0 / 0.08);
  --line-2: oklch(1 0 0 / 0.14);
  /* 글자 */
  --ink: oklch(0.965 0.008 85);
  --ink-2: oklch(0.80 0.01 80);
  --ink-3: oklch(0.62 0.012 75);
  --ink-4: oklch(0.47 0.01 75);
  /* 빛 — 앰버(브랜드)·달빛 블루(선택)·상태 */
  --amber: oklch(0.83 0.15 75);
  --amber-2: oklch(0.74 0.16 62);
  --amber-glow: oklch(0.83 0.15 75 / 0.35);
  --warm-white: oklch(0.96 0.04 85);
  --blue: oklch(0.62 0.19 255);
  --blue-2: oklch(0.72 0.14 245);
  --green: oklch(0.78 0.17 150);
  --red: oklch(0.66 0.22 25);
  /* 유리판 */
  --glass: oklch(0.2 0.008 70 / 0.55);
  --glass-strong: oklch(0.22 0.008 70 / 0.78);
  --glass-edge: oklch(1 0 0 / 0.1);
  --blur: 22px;
  /* 모양 */
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --r-xl: 36px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
  --nav-h: 64px;
  /* 글꼴 */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: oklch(0.83 0.15 75 / 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 1; letter-spacing: 0; }
.tnum { font-variant-numeric: tabular-nums; }

/* ── 글자 위계 ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }
.h-display { font-size: clamp(44px, 8.4vw, 124px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 760; margin: 0; }
.h-1 { font-size: clamp(34px, 5.4vw, 76px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 740; margin: 0; }
.h-2 { font-size: clamp(26px, 3.4vw, 46px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; margin: 0; }
.h-3 { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 680; margin: 0; }
.lead { font-size: clamp(17px, 1.55vw, 21px); line-height: 1.65; color: var(--ink-2); margin: 0; }
.muted { color: var(--ink-3); }
.glow-text {
  background: linear-gradient(100deg, var(--warm-white) 0%, var(--amber) 45%, var(--amber-2) 70%, var(--warm-white) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: glowpan 8s var(--ease-io) infinite alternate;
}
@keyframes glowpan { to { background-position: 100% 0; } }

/* ── 버튼 ── */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line-2); background: oklch(1 0 0 / 0.04);
  font-weight: 620; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap;
  cursor: pointer; transition: transform .25s var(--ease-out), background .25s, border-color .25s, box-shadow .35s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: oklch(1 0 0 / 0.08); border-color: oklch(1 0 0 / 0.24); }
.btn:active { transform: scale(0.97); }
.btn-go {
  color: oklch(0.2 0.03 70); border: 0;
  background: linear-gradient(180deg, oklch(0.88 0.14 82), oklch(0.78 0.16 68));
  box-shadow: 0 0 0 1px oklch(0.9 0.12 80 / 0.5) inset, 0 10px 40px -8px var(--amber-glow), 0 0 80px -20px var(--amber-glow);
}
.btn-go:hover { background: linear-gradient(180deg, oklch(0.91 0.13 84), oklch(0.81 0.16 70)); box-shadow: 0 0 0 1px oklch(0.95 0.1 85 / 0.6) inset, 0 14px 50px -6px var(--amber-glow), 0 0 120px -10px var(--amber-glow); }
.btn-lg { --h: 56px; padding: 0 28px; font-size: 16px; }
.btn .arrow { transition: transform .3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ── 유리판 ── */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-l);
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  box-shadow: 0 1px 0 0 oklch(1 0 0 / 0.06) inset, 0 30px 80px -40px oklch(0 0 0 / 0.8);
}

/* ── 상단 내비 ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled, .nav.is-solid {
  background: oklch(0.12 0.006 70 / 0.62);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom-color: var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.nav-brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-brand span { font-size: 17px; }
.nav-brand small { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.12em; font-weight: 500; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: oklch(1 0 0 / 0.06); }
.nav .btn { --h: 38px; padding: 0 16px; font-size: 14px; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: oklch(1 0 0 / 0.04); cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 4px auto; transition: transform .3s var(--ease-out), opacity .2s; }
@media (max-width: 860px) {
  .nav-links, .nav .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open { background: oklch(0.12 0.006 70 / 0.96); height: 100dvh; align-items: flex-start; padding-top: 12px; backdrop-filter: blur(24px); }
  .nav.is-open .wrap { flex-wrap: wrap; }
  .nav.is-open .nav-links { display: flex; flex-direction: column; width: 100%; order: 3; margin: 24px 0 0; gap: 2px; }
  .nav.is-open .nav-links a { font-size: 22px; padding: 14px 6px; border-radius: 12px; }
  .nav.is-open .nav-cta { display: inline-flex; order: 4; width: 100%; margin-top: 16px; --h: 52px; }
  .nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
}

/* ── 하단 ── */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--ink-3); font-size: 14px; position: relative; z-index: 2; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h4 { color: var(--ink); font-size: 13px; margin: 0 0 12px; font-weight: 650; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: var(--ink); }
.footer-brand img { width: 150px; height: auto; margin-bottom: 14px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 12.5px; color: var(--ink-4); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ── 폼 공통 ── */
.field { display: grid; gap: 8px; }
.field > label, .field > .label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 13px; color: var(--ink-4); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 14px;
  background: oklch(0.1 0.005 70 / 0.7); border: 1px solid var(--line-2);
  font-size: 16px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: oklch(0.83 0.15 75 / 0.7); box-shadow: 0 0 0 4px oklch(0.83 0.15 75 / 0.14); background: oklch(0.12 0.006 70 / 0.9); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: oklch(1 0 0 / 0.03); font-size: 14.5px; color: var(--ink-2);
  transition: all .2s var(--ease-out);
}
.chip input:checked + span { border-color: oklch(0.83 0.15 75 / 0.75); background: oklch(0.83 0.15 75 / 0.12); color: var(--ink); box-shadow: 0 0 24px -8px var(--amber-glow); }
.chip input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ── 등장 (스크롤) ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── 페이지 첫 화면: 검정에서 페이드 인 ── */
.fade-from-black { position: fixed; inset: 0; background: #000; z-index: 100; pointer-events: none; animation: fromblack 1.1s var(--ease-io) .05s forwards; }
@keyframes fromblack { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
