/* =========================================================
   KeyPuda - styles.css
   디자인 토큰 + 반응형 레이아웃
========================================================= */

:root {
  --bg: #121113;
  --surface: #1a1819;
  --elevated: #221f21;
  --text: #f2f0ec;
  --muted: #bcb7b0;
  --line: #322e30;
  --accent: #ee7d4d;
  --accent-dark: #d96a3c;
  --accent-soft: rgba(238, 125, 77, 0.15);
  --dark: #0b0a0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
  --max: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(238, 125, 77, 0.32); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--full { width: 100%; }

/* ---------- 네비게이션 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 17, 19, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-size: 15px; font-weight: 600; color: var(--muted); transition: color 0.15s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { padding: 9px 18px; border-radius: 999px; background: var(--accent-soft); color: var(--accent) !important; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }

/* ---------- 히어로 ---------- */
.hero {
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(238, 125, 77, 0.18), transparent 60%),
    linear-gradient(180deg, #181517 0%, #121113 100%);
  padding: 72px 0 80px;
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero__text h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; }
.hero__text p { margin: 20px 0 28px; font-size: 17px; color: var(--muted); max-width: 460px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__stats { list-style: none; display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 24px; font-weight: 800; color: var(--text); }
.hero__stats span { font-size: 14px; color: var(--muted); }

/* 키보드 목업 (실제 이미지로 교체 전 placeholder) */
.mock-keyboard {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1c1a1b, #262325);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  overflow: hidden;
  padding: 28px;
}
.mock-keyboard--solo { aspect-ratio: 4 / 3; }
.mock-keyboard__deck {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 78%;
}
.mock-keyboard__deck span {
  aspect-ratio: 1; border-radius: 8px;
  background: linear-gradient(180deg, #2e2b2d, #242123);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.25);
}
.mock-keyboard__deck span:nth-child(3n) { background: linear-gradient(180deg, #ee7d4d, #e8632f); }
.mock-keyboard__label {
  position: absolute; bottom: 14px;
  font-size: 12px; color: rgba(255,255,255,0.45); letter-spacing: 0.04em;
}

/* 실제 이미지 (assets 폴더의 사진을 넣으면 표시됨) */
.media {
  display: block; width: 100%;
  aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
  background: var(--elevated);
}
.media--square { aspect-ratio: 4 / 3; }

/* ---------- 공통 섹션 ---------- */
.section { padding: 88px 0; }
.section--alt { background: var(--surface); }
.section--story { background: var(--dark); color: #fff; }
.section__head { max-width: 640px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.02em; line-height: 1.2; font-weight: 800; }
.section__head p { margin-top: 14px; color: var(--muted); font-size: 17px; }

/* ---------- 카드(자석축 차이) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--elevated); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- 키보드 찾기(3단계) ---------- */
.finder {
  background: var(--elevated); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow);
}
.finder__step { padding: 20px 0; border-bottom: 1px solid var(--line); }
.finder__step:first-child { padding-top: 0; }
.finder__q { font-weight: 700; font-size: 17px; margin-bottom: 14px; }
.finder__opts { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid #514c50; background: #2c282c;
  font-size: 15px; font-weight: 600; cursor: pointer; color: #e4ded6;
  transition: 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.finder__result {
  margin-top: 24px; padding: 28px;
  background: var(--accent-soft); border-radius: var(--radius); text-align: center;
}
.finder__result h3 { font-size: 24px; margin: 6px 0 8px; }
.finder__result p { color: var(--muted); margin-bottom: 18px; }

/* ---------- 대표 제품 ---------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.product__tagline { color: var(--muted); font-size: 17px; margin: 8px 0 24px; }
.spec { list-style: none; border-top: 1px solid var(--line); }
.spec li { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec span { color: var(--muted); }
.spec strong { font-weight: 700; }
.product__cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- 브랜드 스토리 ---------- */
.story { max-width: 720px; }
.story h2 { font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 20px; }
.story p { color: rgba(255,255,255,0.78); font-size: 17px; margin-bottom: 16px; }
.section--story .eyebrow { color: #9b9bff; }

/* ---------- 문의 폼 ---------- */
.contact .section__head { margin-bottom: 32px; text-align: center; margin-left: auto; margin-right: auto; }
.form { max-width: 620px; margin: 0 auto; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--muted); }
.form input, .form textarea {
  width: 100%; margin-top: 8px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; color: var(--text); background: var(--bg);
  transition: border-color 0.15s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form textarea { resize: vertical; }
.form__note { margin-top: 14px; color: var(--accent); font-weight: 600; font-size: 15px; }

/* ---------- 푸터 ---------- */
.footer { background: var(--dark); color: #fff; padding: 48px 0; }
.footer__inner { text-align: center; }
.footer .brand { font-size: 22px; }
.footer p { color: rgba(255,255,255,0.7); margin: 10px 0 6px; }
.footer small { color: rgba(255,255,255,0.4); font-size: 14px; }

/* =========================================================
   반응형
========================================================= */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 440px; }
  .cards { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px; transform: translateY(-130%);
    transition: transform 0.25s ease; visibility: hidden;
  }
  .nav__links.is-open { transform: translateY(0); visibility: visible; }
  .nav__links a { width: 100%; padding: 12px 0; }
  .nav__cta { margin-top: 6px; }
  .nav__toggle { display: flex; }
  .section { padding: 64px 0; }
}

@media (max-width: 520px) {
  .form__row { grid-template-columns: 1fr; }
  .hero__stats { gap: 18px; }
}
