/* =========================================================
   마이스토어팩 mystorepack — 스타일
   토큰 설명은 DESIGN.md 참고
   ========================================================= */

:root {
  /* 색상 */
  --paper: #F6F4EF;
  --surface: #FFFFFF;
  --ink: #1D2622;
  --ink-2: #3A4440;
  --ink-3: #4C5651;
  --line: #DDD8CD;
  --line-strong: #A9A396;
  --accent: #C94C17;
  --accent-hover: #B4410F;
  --accent-text: #A33D10;
  --night: #1E2B26;
  --night-2: #26352F;
  --night-line: #3D4F47;
  --night-chip-line: #4A5D54;
  --night-text: #F6F4EF;
  --night-text-2: #C9D2CD;
  --night-text-3: #B9C4BE;
  --accent-on-night: #F2A27E;
  --ok-bg: #E2EEE8;
  --ok-text: #1E5743;
  --ok-dot: #2F6A55;
  --wip-bg: #F7EBCF;
  --wip-text: #6E4A08;
  --wip-dot: #B07A12;
  --disabled-bg: #F1EEE7;

  /* 글꼴 */
  --font-sans: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* 크기 */
  --fs-h1: clamp(40px, 5.2vw, 76px);
  --fs-h2: clamp(30px, 3.2vw, 46px);
  --fs-pain: clamp(21px, 1.8vw, 25px);
  --fs-lead: clamp(18px, 1.5vw, 21px);
  --fs-body: 18px;
  --fs-small: 16px;
  --fs-label: 15px;
  --fs-micro: 14px;

  /* 간격 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 40px; --s-8: 48px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 7vw, 112px);
  --container: 1200px;

  /* 모서리·그림자 */
  --r-chip: 999px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-hard: 6px 6px 0 var(--ink);
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
section[id], main[id] { scroll-margin-top: 16px; }

.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.stack-xs { display: flex; flex-direction: column; gap: 10px; }
.stack-sm { display: flex; flex-direction: column; gap: 14px; }
.stack-md { display: flex; flex-direction: column; gap: 20px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.stack-xl { display: flex; flex-direction: column; gap: 48px; }
.narrow { max-width: 780px; }

.skip-link { position: absolute; left: 16px; top: -60px; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 8px; z-index: 100; text-decoration: none; }
.skip-link:focus { top: 12px; }
.noscript { padding: 24px; text-align: center; background: var(--wip-bg); color: var(--wip-text); }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 600; text-decoration: none; text-align: center;
  border: 0; border-radius: var(--r-md); cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.btn-lg { min-height: 58px; padding: 0 28px; font-size: 18px; }
.btn-md { min-height: 54px; padding: 0 22px; font-size: 17px; }
.btn-sm { min-height: 48px; padding: 0 20px; font-size: 17px; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #33403A; }
.btn-outline { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.btn-outline:hover { background: var(--paper); }
.btn-disabled, .btn:disabled { background: var(--disabled-bg); color: var(--ink-3); border: 1px dashed var(--line-strong); cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---------- 배지 ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: var(--fs-label); font-weight: 600; border-radius: var(--r-chip); line-height: 1.4; }
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-wip { background: var(--wip-bg); color: var(--wip-text); }
.badge-plain { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.badge-outline { padding: 4px 10px; font-size: var(--fs-micro); color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.badge .dot { width: 7px; height: 7px; }
.dot-ok { background: var(--ok-dot); }
.dot-wip { background: var(--wip-dot); }

/* ---------- 헤더 ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; }
.brand-en { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); }
.brand-sm { gap: 10px; }
.brand-sm .brand-name { font-size: 20px; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.nav-list { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 17px; font-weight: 500; text-decoration: none; border-radius: 8px; }
.nav-link:hover { background: #ECE8DF; }

/* ---------- ① 첫 화면 ---------- */
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; padding-top: clamp(48px, 6vw, 96px); padding-bottom: clamp(56px, 6vw, 88px); }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.eyebrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-chip); font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); }
.hero-title { font-size: var(--fs-h1); line-height: 1.2; font-weight: 700; letter-spacing: -0.035em; }
.hero-lead { max-width: 30em; font-size: var(--fs-lead); line-height: 1.7; color: var(--ink-2); }
.hero-note { font-size: var(--fs-small); color: var(--ink-3); }
.hero-art { flex: 1 1 420px; min-width: 0; display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 560px; height: auto; }

.awning { height: 20px; background: repeating-linear-gradient(90deg, var(--accent) 0 40px, #fff 40px 80px); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.awning-sm { height: 14px; border-top: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 28px, #fff 28px 56px); }

/* ---------- 섹션 공통 ---------- */
.section { padding: var(--section-y) 0; }
.section-surface { background: var(--surface); }
.section-night { background: var(--night); color: var(--night-text); }
.kicker { font-size: var(--fs-label); font-weight: 700; letter-spacing: .02em; color: var(--accent-text); }
.kicker-night { color: var(--accent-on-night); }
.h2 { font-size: var(--fs-h2); line-height: 1.3; font-weight: 700; letter-spacing: -0.03em; }
.section-night .h2 { font-size: clamp(30px, 3.4vw, 50px); }
.section-intro { font-size: var(--fs-body); color: var(--ink-2); max-width: 30em; }
.section-night .section-intro { color: var(--night-text-2); }
.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 48px; }
.split > :first-child { flex: 1 1 420px; }
.split > .section-intro { flex: 1 1 360px; }
.label { font-size: var(--fs-label); font-weight: 600; color: var(--ink-3); }
.footnote { font-size: var(--fs-label); color: var(--ink-3); }

/* ---------- ② 도구 행 ---------- */
.tool-list { border-top: 2px solid var(--ink); }
.tool-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 40px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.tool-pain { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pain-text { font-size: var(--fs-pain); line-height: 1.45; font-weight: 700; letter-spacing: -0.02em; }
.tool-desc { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.tool-desc p { color: var(--ink-2); }
.tool-name { font-size: 22px; font-weight: 700; }
.tool-action { flex: 0 1 250px; min-width: 220px; display: flex; flex-direction: column; gap: 12px; }
.link-note { font-size: var(--fs-micro); color: var(--ink-3); }

.case-name { font-family: var(--font-mono); font-size: 16px; color: var(--ink-3); }

/* ---------- 마이스토어팩 소개 ---------- */
.about-inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 72px; }
.about-head { flex: 1 1 280px; min-width: 0; }
.about-body { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.about-text { display: flex; flex-direction: column; gap: 18px; font-size: 19px; line-height: 1.8; }
.brand-principles { display: flex; flex-direction: column; gap: 12px; }
.brand-principles li { padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 17px; }
/* ---------- ⑥ 푸터 ---------- */
.site-footer { background: var(--surface); border-top: 2px solid var(--ink); padding: 56px 0 40px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 64px; }
.footer-brand { flex: 1 1 320px; min-width: 0; }
.footer-brand p { max-width: 30em; font-size: var(--fs-small); color: var(--ink-2); }
.footer-links { flex: 0 1 380px; display: flex; flex-direction: column; gap: 4px; }
.footer-links-title { margin-bottom: 6px; font-size: var(--fs-label); font-weight: 600; color: var(--ink-3); }
.footer-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 600; text-decoration: none; }
a.footer-link:hover .footer-link-meta { text-decoration: underline; }
.footer-link-meta { font-size: var(--fs-label); font-weight: 500; color: var(--accent-text); }
.footer-link.is-muted, .footer-link.is-muted .footer-link-meta { color: var(--ink-3); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: var(--fs-micro); color: var(--ink-3); }

/* ---------- 모바일 보정 (<640px) ---------- */
@media (max-width: 639px) {
  .header-inner { padding-top: 14px; padding-bottom: 12px; }
  .main-nav { width: 100%; justify-content: space-between; }
  .nav-list { gap: 0; margin-left: -10px; }
  .nav-link { padding: 0 10px; font-size: 16px; }
  .main-nav .btn-sm { width: 100%; }
  .hero-copy { gap: 22px; }
  .eyebrow { border-radius: var(--r-md); align-items: flex-start; }
  .eyebrow .dot { margin-top: .6em; }
  .hero-copy .btn-row .btn { flex: 1 1 100%; }
  .tool-action { min-width: 0; flex-basis: 100%; }
  .tool-action .btn { width: 100%; }
  .about-text { font-size: 18px; }
}

/* 원본 분위기를 유지하는 모바일 메뉴 */
.menu-toggle { display: none; }
@media (max-width: 639px) {
  .menu-toggle { display: inline-flex; }
  .main-nav:not(.is-open) { display: none; }
  .main-nav.is-open { display: flex; }
  .nav-list { width: 100%; display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; }
  .main-nav .nav-link { width: 100%; }
}
@media (forced-colors: active) { :focus-visible { outline: 3px solid Highlight; } }

/* 서비스 중심의 확장 카드 — 원본 색상·글꼴·점선 유지 */
.tool-list { display: flex; flex-direction: column; gap: 32px; border: 0; }
.service-card { display: grid; grid-template-columns: 1.1fr 1fr; border: 2px solid var(--ink); border-radius: var(--r-md); overflow: hidden; }
.service-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: clamp(24px,4vw,48px); }
.service-number { font-family: var(--font-mono); color: var(--accent-text); font-size: 16px; }
.service-intro .tool-name { font-size: clamp(30px,3vw,40px); line-height: 1.2; }
.service-intro > p { color: var(--ink-2); }
.service-intro .pain-text { color: var(--ink); }
.service-intro .btn { margin-top: 8px; }
.service-context { background: var(--paper); padding: clamp(24px,4vw,48px); display: flex; flex-direction: column; justify-content: center; gap: 32px; border-left: 1px dashed var(--line-strong); }
.service-audience { font-size: 23px; font-weight: 600; }
.service-scene { display: flex; flex-direction: column; gap: 16px; }
.scene-summary { border-top: 1px dashed var(--line-strong); padding-top: 20px; font-weight: 600; }
.availability-note { background: var(--wip-bg); padding: 12px 16px; border-radius: var(--r-sm); font-size: 16px; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.story-card { display: flex; flex-direction: column; gap: 16px; padding: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); }
.story-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.story-card h3 { font-size: 23px; line-height: 1.4; }
.story-card > p { color: var(--ink-2); font-size: 17px; }
.story-art { margin: auto 0 0; padding-top: 12px; }
.story-art img { width: 100%; height: 120px; object-fit: contain; }
.story-art figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
#about { border-top: 1px solid var(--line); }
.contact { border-top: 1px dashed var(--line-strong); padding-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.contact h2 { font-size: 24px; }
.contact p { font-size: 17px; color: var(--ink-2); }
@media (max-width: 767px) { .service-card { grid-template-columns: 1fr; } .service-context { border-left: 0; border-top: 1px dashed var(--line-strong); } .story-grid { grid-template-columns: 1fr; } }
@media (max-width: 639px) { .service-intro .btn { width: 100%; } }
