/* ============================================================
   Storage Medic — 다운로드 페이지
   팔레트: off-white 웜그레이 · 차콜 · 차분한 블루 한 점
   설계 원칙: 박스 최소화, 헤어라인과 여백으로 위계
   ============================================================ */

:root {
  /* 표면 — 베이지/크림이 아닌 중립적 웜그레이 */
  --bg: #f6f5f3;
  --surface: #fdfdfc;
  --surface-2: #efeeea;
  --surface-sunken: #eceae5;

  /* 잉크 */
  --ink: #1c1d20;
  --ink-soft: #3c3e43;
  --muted: #6b6d72;

  /* 선 */
  --line: #e6e4df;
  --line-strong: #d7d4cd;

  /* 강조 — 아이콘에서 끌어온 틸–블루 한 계열 */
  --accent: #1f88a3;
  --accent-ink: #136275;
  --accent-soft: #e3eff1;

  /* 상태색 (검증/안전 신호 전용) */
  --ok: #2f6a4a;
  --bad: #9a3b37;

  /* 제품 정체성 그라데이션 — 아이콘의 민트→블루 (절제된 아우라 전용) */
  --grad-mint: #57c596;
  --grad-blue: #3b82d9;

  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, "Consolas", monospace;

  --max: 940px;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden; /* 히어로 아우라가 좌측으로 새어 가로 스크롤 만드는 것 방지 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, a { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.025em; }
p { text-wrap: pretty; }

code, .mono { font-family: var(--mono); }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* ---- 공통 폭 ---- */
.site-head,
main,
.foot {
  width: min(100% - 44px, var(--max));
  margin-inline: auto;
}

/* ============================================================
   헤더
   ============================================================ */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-soft { color: var(--muted); font-weight: 600; }
.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: url("/assets/storage-medic/icon-66.png") center / cover no-repeat;
  box-shadow:
    0 1px 2px rgba(28, 29, 32, 0.12),
    0 3px 8px rgba(31, 136, 163, 0.18);
}
nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}
nav a { padding: 4px 0; }
nav a:hover { color: var(--ink); }

/* ============================================================
   히어로 — 페이지의 단 하나의 초점
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 56px;
  align-items: center;
  padding: 40px 0 72px;
}
/* 제품 정체성 아우라 — 아이콘 색을 끌어온 절제된 앰비언트 글로우 (네온 아님) */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -60px auto auto -10%;
  width: 78%;
  height: 360px;
  background:
    radial-gradient(58% 78% at 22% 28%, color-mix(in oklch, var(--grad-mint) 40%, transparent), transparent 70%),
    radial-gradient(54% 72% at 68% 64%, color-mix(in oklch, var(--grad-blue) 36%, transparent), transparent 72%);
  filter: blur(34px);
  opacity: 0.45;
  pointer-events: none;
}

.app-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.app-icon {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow:
    0 6px 16px rgba(31, 136, 163, 0.22),
    0 12px 30px rgba(59, 130, 217, 0.16);
}
.app-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 3px;
}
h1 {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
}
.hero-lead {
  max-width: 30em;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.hero-lead strong { font-weight: 650; color: var(--ink); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* ---- 버튼 ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(28, 29, 32, 0.18), 0 6px 16px rgba(28, 29, 32, 0.10);
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.18s ease;
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(28, 29, 32, 0.20), 0 12px 26px rgba(31, 136, 163, 0.22);
}
.btn-primary:active { transform: translateY(0); }
.btn-large { min-height: 50px; padding: 0 26px; font-size: 16px; }

.btn-mirror {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-ink);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
}
.btn-mirror:hover { border-bottom-color: currentColor; }

.btn-text {
  flex-shrink: 0;
  border: 0;
  background: none;
  padding: 4px 9px;
  color: var(--accent-ink);
  font: 600 13px / 1 var(--sans);
  cursor: pointer;
  border-radius: 7px;
}
.btn-text:hover { background: var(--accent-soft); }

/* ---- 앱 미리보기 창 (히어로의 유일한 프레임) ---- */
.app-preview {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 14px 20px 44px rgba(28, 29, 32, 0.07);
}
.app-preview::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--grad-mint) 55%, transparent), color-mix(in oklch, var(--grad-blue) 50%, transparent), transparent);
  pointer-events: none;
}
.window-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #e0867a; }
.dot.yellow { background: #e1c172; }
.dot.green { background: #84bd8f; }
.window-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.window-body { padding: 20px 18px 22px; }
.preview-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}
.preview-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 9px;
}
.preview-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 14px;
}
.preview-list li.muted { opacity: 0.66; }
.preview-list em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent-ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.preview-list li.muted em { color: var(--muted); }
.preview-note {
  margin-top: 15px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ============================================================
   섹션 공통
   ============================================================ */
.section {
  padding: 60px 0;
  border-top: 1px solid var(--line);
}
.section-head { margin-bottom: 34px; }
.section-head h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 8px;
}
.section-head p { color: var(--muted); font-size: 15px; }

/* ============================================================
   하는 일 / 하지 않는 일 — 박스 없이 헤어라인으로 분리
   ============================================================ */
.ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.ledger-col { padding: 4px 0; }
.ledger-col:first-child { padding-right: 40px; }
.ledger-col:last-child {
  padding-left: 40px;
  border-left: 1px solid var(--line);
}
.ledger-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.ledger-title.is-does { color: var(--accent-ink); }
.ledger-title.is-donts { color: var(--muted); }

.ticks {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
}
.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--ink-soft);
}
.ticks li::before {
  position: absolute;
  left: 0;
  top: 0.05em;
  font-weight: 700;
}
.ticks li::before { content: "✓"; color: var(--accent); }
.ticks.no li::before { content: "—"; color: var(--muted); font-weight: 600; }

/* ============================================================
   다운로드 + 검증
   ============================================================ */
.get-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(28, 29, 32, 0.04), 0 12px 30px rgba(28, 29, 32, 0.06);
  margin-bottom: 14px;
}
.get-copy h2 { font-size: 21px; margin-bottom: 9px; }
.get-desc {
  color: var(--muted);
  font-size: 15px;
  max-width: 40em;
}
.file-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--surface-sunken);
  padding: 2px 7px;
  border-radius: 6px;
  word-break: break-all;
}
.get-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ---- disclosure: 배포 사실은 기본 노출, 검증 절차는 접을 수 있음 ---- */
.release-disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.release-disclosure summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  list-style: none;
}
.release-disclosure summary::-webkit-details-marker { display: none; }
.release-disclosure summary::after {
  content: "펼치기";
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
}
.release-disclosure[open] summary::after { content: "접기"; }
.summary-hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.release-disclosure[open] summary { border-bottom: 1px solid var(--line); }
.release-body { padding: 22px 20px; }

.release-facts { display: grid; gap: 0; margin: 0 0 22px; }
.release-facts > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.release-facts > div:first-child { padding-top: 0; }
.release-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.release-facts dt { color: var(--muted); font-weight: 600; }
.release-facts dd { margin: 0; min-width: 0; }
.hash-row dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hash-value {
  font-family: var(--mono);
  font-size: 12px;
  word-break: break-all;
  color: var(--ink-soft);
  line-height: 1.5;
}

.verify-block { margin-top: 4px; }
.verify-intro {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}
.curl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 13px 14px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
}
.curl-row code {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.file-picker {
  display: block;
  position: relative;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.file-picker:hover { border-color: var(--accent); color: var(--ink); }
.file-picker.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.file-picker.is-ok { border-color: var(--ok); border-style: solid; }
.file-picker.is-bad { border-color: var(--bad); border-style: solid; }
.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.verify-result {
  display: block;
  min-height: 20px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}
.verify-result.ok { color: var(--ok); }
.verify-result.bad { color: var(--bad); }
.verify-result.pending { color: var(--muted); }
.verify-result .calc-hash {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  word-break: break-all;
}

/* ============================================================
   MyDisplay — 작은 준비 중 스트립 (CTA 없음)
   ============================================================ */
.coming-later {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: min(100% - 44px, var(--max));
  margin: 0 auto;
  padding: 26px 0 4px;
  border-top: 1px solid var(--line);
}
.coming-tag {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.coming-text h2 { font-size: 16px; margin-bottom: 3px; }
.coming-text p { font-size: 14px; color: var(--muted); max-width: 44em; }

/* ============================================================
   FAQ — 박스 없이 헤어라인으로 구분한 행
   ============================================================ */
.faq-list {
  border-top: 1px solid var(--line);
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 2px 18px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 52em;
}

/* ============================================================
   푸터
   ============================================================ */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 30px 0 52px;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.foot a { font-weight: 600; }
.foot a:hover { color: var(--ink); }

/* ---- 토스트 ---- */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(28, 29, 32, 0.12);
  font-size: 14px;
}

/* ============================================================
   다크 모드
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    /* 의도적인 딥 틸–차콜 — 단순 반전이 아닌 설계된 다크 */
    --bg: #11151a;
    --surface: #191f26;
    --surface-2: #212932;
    --surface-sunken: #1d242c;

    --ink: #eef1f0;
    --ink-soft: #c7cdcd;
    --muted: #909896;

    --line: #2b333c;
    --line-strong: #3a434d;

    --accent: #54bcd2;
    --accent-ink: #84d3e6;
    --accent-soft: #16313a;

    --ok: #6fbf8f;
    --bad: #e08a84;

    --grad-mint: #4eb98a;
    --grad-blue: #3f86d6;
  }
  .btn-primary {
    background: #eef1f0;
    color: #11151a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
  .btn-primary:hover {
    background: #fff;
    box-shadow: 0 12px 26px rgba(84, 188, 210, 0.20);
  }
  .app-preview { box-shadow: 14px 20px 44px rgba(0, 0, 0, 0.30); }
  .app-icon {
    box-shadow:
      0 6px 18px rgba(84, 188, 210, 0.20),
      0 14px 34px rgba(63, 134, 214, 0.16);
  }
  .get-panel { box-shadow: none; }
  .hero::before { opacity: 0.5; }
}

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 800px) {
  .site-head { gap: 16px; }
  nav { flex-wrap: wrap; justify-content: flex-end; }
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 28px 0 52px;
  }
  .app-preview { order: -1; max-width: 460px; justify-self: stretch; }
}

@media (max-width: 620px) {
  .site-head, main, .foot, .coming-later { width: min(100% - 32px, var(--max)); }
  .site-head {
    flex-direction: column;
    align-items: flex-start;
  }
  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
  }
  .app-preview { max-width: none; }
  .section { padding: 48px 0; }

  .ledger-grid { grid-template-columns: 1fr; gap: 36px; }
  .ledger-col:first-child { padding-right: 0; }
  .ledger-col:last-child {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 36px;
  }

  .get-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 22px 20px;
  }
  .get-actions { align-items: stretch; }
  .get-actions .btn-primary { width: 100%; }
  .get-actions .btn-mirror { text-align: center; }

  .release-facts > div { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ============================================================
   다중 제품 허브 / 제품별 배포 구조
   ============================================================ */
.hub-page main {
  min-height: 58vh;
}
.hub-hero {
  position: relative;
  isolation: isolate;
  padding: 54px 0 42px;
}
.hub-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -72px auto auto -16%;
  width: min(760px, 92vw);
  height: 330px;
  background:
    radial-gradient(58% 78% at 22% 28%, color-mix(in oklch, var(--grad-mint) 34%, transparent), transparent 70%),
    radial-gradient(54% 72% at 68% 64%, color-mix(in oklch, var(--grad-blue) 28%, transparent), transparent 72%);
  filter: blur(36px);
  opacity: 0.42;
  pointer-events: none;
}
.hub-hero h1 {
  max-width: 780px;
  font-size: clamp(34px, 6vw, 58px);
  margin: 6px 0 20px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 14px 0 84px;
}
.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  min-height: 360px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 20px 60px rgba(28, 29, 32, 0.06);
}
.product-card.is-coming-soon {
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}
.product-card-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(28, 29, 32, 0.08);
}
.product-card-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-placeholder {
  color: var(--accent-ink);
  font-size: 26px;
  font-weight: 750;
  background:
    radial-gradient(circle at 28% 24%, color-mix(in oklch, var(--grad-mint) 35%, transparent), transparent 52%),
    radial-gradient(circle at 74% 74%, color-mix(in oklch, var(--grad-blue) 32%, transparent), transparent 56%),
    var(--surface);
}
.product-card h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 8px;
}
.product-card p {
  color: var(--ink-soft);
}
.product-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.brand-mark-generic {
  background:
    radial-gradient(circle at 30% 25%, var(--grad-mint), transparent 58%),
    radial-gradient(circle at 72% 76%, var(--grad-blue), transparent 58%),
    var(--ink);
}
.product-placeholder-page {
  max-width: 760px;
  padding-bottom: 86px;
}
.coming-text .btn-mirror {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    min-height: 0;
    padding: 24px;
  }
}
