/* =========================================================
   NQS — Design tokens & global styles
   Minimalist white, Apple-inspired
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #fbfbfd;
  --bg-panel: #f5f5f7;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #86868b;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --accent: #0066cc;
  --accent-ink: #003d7a;
  --success: #1a8754;

  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06), 0 12px 40px rgba(0,0,0,.05);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.08), 0 24px 80px rgba(0,0,0,.06);

  --container: 1240px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.003em;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Typography ------------------------------------------------ */
.h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(44px, 6vw, 88px); line-height: 1.02; letter-spacing: -0.04em; }
.h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.05; }
.h3 { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.h4 { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.lead {
  font-size: clamp(18px, 1.35vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 62ch;
  text-wrap: pretty;
}

/* Layout ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: clamp(80px, 12vw, 160px) 0;
}
.section-sm { padding: clamp(64px, 8vw, 100px) 0; }
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

/* Nav ------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line-soft); }
.nav-inner {
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand-mark {
  width: 28px; height: 28px;
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-panel); }
.nav-link.is-active { color: var(--ink); font-weight: 600; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-panel);
  border-radius: 999px;
  padding: 3px;
  margin-left: 12px;
  position: relative;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 999px;
  letter-spacing: 0.08em;
  transition: color .2s;
  position: relative;
  z-index: 1;
}
.lang-toggle button.is-active { color: #fff; }
.lang-toggle-thumb {
  position: absolute;
  top: 3px; bottom: 3px;
  width: calc(50% - 3px);
  background: var(--ink);
  border-radius: 999px;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.lang-toggle[data-lang="ko"] .lang-toggle-thumb { transform: translateX(100%); }

/* Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform .15s, background .2s, color .2s, box-shadow .2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-panel); border-color: var(--ink); }
.btn-link {
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}
.btn-link:hover { color: var(--accent-ink); }
.btn-sm { padding: 10px 18px; font-size: 13px; }

/* Reveal on scroll ----------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* Footer ---------------------------------------------------- */
.footer {
  background: var(--bg-panel);
  padding: 72px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a:hover { color: var(--ink); }
.footer-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}
.footer-admin-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

/* Utility --------------------------------------------------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; } .mt-16 { margin-top: 64px; }
.max-prose { max-width: 720px; }

/* Responsive ----------------------------------------------- */
@media (max-width: 900px) {
  .nav-links .nav-link:not(.nav-cta) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  body { font-size: 16px; }
}
