/* ========== 기본 설정 ========== */
:root {
  --bg: #0b0f17;
  --bg-alt: #0f1520;
  --surface: #141b28;
  --surface-2: #1a2333;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e6ebf3;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --max-w: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

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

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ========== 버튼 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--gradient);
  color: #06111c;
  box-shadow: 0 8px 24px -8px rgba(34, 211, 238, .55);
}
.btn-primary:hover { box-shadow: 0 12px 32px -8px rgba(34, 211, 238, .7); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

/* ========== 헤더 ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(11, 15, 23, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { height: 100%; display: flex; align-items: center; }

.logo { display: inline-flex; align-items: center; }
.logo img { height: 30px; width: auto; }
.logo-sm img { height: 24px; }

/* ========== 히어로 ========== */
.hero { position: relative; overflow: hidden; padding: 96px 0 120px; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 80% 20%, rgba(99, 102, 241, .22), transparent 70%),
    radial-gradient(500px 360px at 15% 70%, rgba(34, 211, 238, .14), transparent 70%);
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; margin-bottom: 24px; }
.lead { font-size: 18px; color: var(--text-muted); max-width: 520px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* 히어로 터미널 */
.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: 10% 5%;
  background: var(--gradient); filter: blur(70px); opacity: .25;
}
.window {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  overflow: hidden;
  animation: float 7s ease-in-out infinite;
}
.window-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.window-bar i { width: 10px; height: 10px; border-radius: 50%; }
.window-bar i:nth-child(1) { background: #f87171; }
.window-bar i:nth-child(2) { background: #fbbf24; }
.window-bar i:nth-child(3) { background: #34d399; }
.window-bar span { margin-left: 10px; font-size: 12px; color: var(--text-dim); font-family: ui-monospace, Consolas, monospace; }

.terminal {
  height: 340px; overflow: hidden;
  padding: 20px 22px;
  background: #0a0e15;
  font-family: ui-monospace, "Cascadia Code", Consolas, "Pretendard", monospace;
  font-size: 14px; line-height: 1.75;
  color: var(--text-muted);
}
.t-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.t-cmd { color: var(--text); }
.t-cmd:not(:first-child) { margin-top: 8px; }
.t-out { padding-left: 16px; }
.t-prompt { color: var(--accent); font-weight: 700; }
.t-ok { color: #34d399; }
.t-done { color: var(--accent); font-weight: 600; }
.t-bar { color: var(--accent); }
.t-rest { color: #334155; }
.t-cursor {
  display: inline-block; width: 8px; height: 1.1em; margin-left: 2px;
  vertical-align: text-bottom; background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ========== 공통 섹션 ========== */
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin-bottom: 14px; }
.section-head p:not(.eyebrow) { color: var(--text-muted); font-size: 17px; }

/* ========== 회사 소개 ========== */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value {
  padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .25s, transform .25s;
}
.value:hover { border-color: rgba(34, 211, 238, .4); transform: translateY(-4px); }
.value-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .25);
  margin-bottom: 20px;
}
.value-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.value h3 { font-size: 19px; margin-bottom: 10px; }
.value p { color: var(--text-muted); font-size: 15px; }

/* ========== 개발 분야 ========== */
.chips { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  color: var(--accent); background: rgba(34, 211, 238, .1);
}

/* ========== 푸터 ========== */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.footer-email {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-muted);
  transition: color .2s;
}
.footer-email:hover { color: var(--accent); }
.footer-email svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copyright { font-size: 13px; color: var(--text-dim); }

/* ========== 스크롤 등장 효과 ========== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .window, .t-cursor { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ========== 반응형 ========== */
@media (max-width: 960px) {
  .hero { padding: 64px 0 80px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 560px; width: 100%; margin: 0 auto; }
  .values { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .lead { font-size: 16px; }
  .hero-cta .btn { flex: 1; }
  .terminal { height: 300px; padding: 16px; font-size: 12px; }
  .value { padding: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
}
