/* ─────────────────────────────────────────────────────────────
   HackByte Workspace — 전역 토큰 & 공통 컴포넌트
   브랜드(hackbyte.kr)의 색/폰트/톤은 유지하되,
   "상자 안 상자 / 과한 라운드·보더·쉐도우" 같은 AI 클리셰는 배제.
   여백 · 얇은 구분선 · 타이포 · 모션으로 위계를 만든다.
   ───────────────────────────────────────────────────────────── */

:root {
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-ink: #0b1220; /* 다크 섹션용 잉크 */

  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e9edf3; /* 아주 옅은 구분선 */
  --line-strong: #d7dde7;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);

  --font: "Inter", "Nanum Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: rgba(37, 99, 235, 0.16);
}

/* ── 레이아웃 ─────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(80px, 12vh, 160px);
}

.section--tight {
  padding-block: clamp(56px, 8vh, 96px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--primary);
}

.eyebrow.is-light {
  color: #7aa2ff;
}
.eyebrow.is-light::before {
  background: #7aa2ff;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 800;
}

.h-display {
  font-size: clamp(40px, 6.4vw, 84px);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.h-section {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 800;
}

.lead {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--muted);
  line-height: 1.65;
  max-width: 60ch;
}

.text-muted {
  color: var(--muted);
}

/* ── 버튼 ─────────────────────────────────────────────────── */
.btn {
  --pad-y: 14px;
  --pad-x: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--primary-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--link {
  padding: 0;
  background: none;
  color: var(--primary);
  font-weight: 600;
}
.btn--link .arrow {
  transition: transform 0.2s var(--ease);
}
.btn--link:hover .arrow {
  transform: translateX(4px);
}

.btn--lg {
  --pad-y: 17px;
  --pad-x: 30px;
  font-size: 16px;
}

.btn--on-dark.btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn--on-dark.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ── 헤더 ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    transform 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand .mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
}
.brand .sub {
  color: var(--muted);
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}
.site-nav a {
  padding: 8px 13px;
  font-size: 14.5px;
  font-weight: 500;
  color: #475569;
  border-radius: 8px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.site-nav a:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.07);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ── 푸터 ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding-block: 64px 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.footer-brand .brand {
  margin-bottom: 14px;
}
.footer-brand p {
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 14.5px;
  padding: 5px 0;
  width: fit-content;
  transition: color 0.16s var(--ease), transform 0.16s var(--ease);
}
.footer-col a:hover {
  color: var(--primary);
  transform: translateX(3px);
}
.footer-bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 13.5px;
}

/* ── 공통: 칩/태그 ─────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── 반응형 헤더/푸터 ─────────────────────────────────────── */
@media (max-width: 860px) {
  .site-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .site-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav a {
    padding: 13px 12px;
    font-size: 16px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .header-cta .btn--ghost {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
