/* ==========================================================================
   Vision House — Hub / Launcher
   Design system aligned with Personal Vision House (blue-led, Pretendard,
   navy dark header + light body). Vanilla static, no build step.
   ========================================================================== */

/* ---------- 0. Self-hosted font (no external CDN) ---------- */
@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url('assets/fonts/PretendardVariable.woff2') format('woff2-variations');
}

/* ---------- 1. Design tokens ---------- */
:root {
  color-scheme: light;

  --c-navy-950: #0a0f1e;
  --c-navy-900: #0f172a;
  --c-navy-800: #1e293b;
  --c-navy-700: #334155;
  --c-navy-600: #475569;
  --c-navy-400: #94a3b8;
  --c-navy-300: #cbd5e1;
  --c-navy-200: #e2e8f0;
  --c-navy-100: #f1f5f9;
  --c-navy-50:  #f8fafc;

  --color-bg:      #f8fafc;
  --color-surface: #ffffff;
  --color-border:  #e2e8f0;
  --color-text:    #0f172a;
  --color-text-2:  #475569;
  --color-text-3:  #94a3b8;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;

  /* Product accents (echo the house tiers: foundation teal, pillars sky) */
  --accent-teal:    #0d9488;
  --accent-teal-bg: #f0fdfa;
  --accent-teal-bd: #99f6e4;
  --accent-sky:     #0284c7;
  --accent-sky-bg:  #f0f9ff;
  --accent-sky-bd:  #bae6fd;
  --accent-indigo:    #4f46e5;
  --accent-indigo-bg: #eef2ff;
  --accent-indigo-bd: #c7d2fe;

  --font-base: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 9999px;

  --shadow-sm: 0 1px 4px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 14px rgba(15,23,42,0.08), 0 2px 5px rgba(15,23,42,0.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,0.12), 0 5px 12px rgba(15,23,42,0.06);

  --t-fast: 120ms ease;
  --t-base: 200ms ease;

  --wrap: 960px;
  --header-h: 60px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Korean line-break baseline (rules/cjk-rendering-safety §5): keep-all so an
   eojeol never splits mid-word; overflow-wrap rescues over-long tokens. */
:root, body {
  word-break: keep-all;
  overflow-wrap: break-word;
}

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

body {
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--sp-5);
}

main.wrap { flex: 1 0 auto; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 3. Header ---------- */
.site-header {
  background: var(--c-navy-900);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;            /* allow the wordmark to shrink before pushing the toggle off */
  text-decoration: none;
  color: #fff;
  font-weight: 700;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand-mark--sm {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
}
.brand-name { font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Language toggle (defaults tuned for the dark header) */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.72);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 11px;
  border-radius: var(--r-full);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.lang-btn:hover { color: #fff; }
.lang-btn.is-active,
.lang-btn[aria-pressed="true"] {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- 4. Continue (returning visitor) ---------- */
.continue-slot { margin-top: var(--sp-6); }
.continue-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.continue-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.continue-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-3);
  margin-bottom: 2px;
}
.continue-name { font-weight: 700; font-size: 15px; }
.continue-card .chev { margin-left: auto; color: var(--color-text-3); flex-shrink: 0; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  padding: var(--sp-16) 0 var(--sp-12);
  text-align: center;
}
.hero-mark {
  display: inline-grid;
  place-items: center;
  width: 72px; height: 72px;
  margin: 0 auto var(--sp-5);
  border-radius: 20px;
  background: linear-gradient(140deg, #60a5fa, #2563eb);
  color: #fff;
  box-shadow: 0 14px 34px rgba(37,99,235,0.34), inset 0 1px 0 rgba(255,255,255,0.4);
}
/* 분위기: 상단 브랜드 글로우 + 우상단 옅은 틸 (깊이) */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 440px;
  z-index: -1;
  background:
    radial-gradient(70% 130% at 50% -12%, rgba(37,99,235,0.10), transparent 70%),
    radial-gradient(42% 60% at 88% 6%, rgba(13,148,136,0.06), transparent 72%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--sp-3);
}
.hero-title {
  font-size: clamp(31px, 6.4vw, 48px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  background: linear-gradient(176deg, #0f172a 32%, #1e3a8a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-desc {
  margin: var(--sp-5) auto 0;
  max-width: 520px;
  font-size: clamp(15px, 2.4vw, 17px);
  line-height: 1.7;
  color: var(--color-text-2);
}

/* 페이지 로드: 위로 떠오르는 스태거드 등장 (reduced-motion에서는 섹션 10이 무력화) */
@keyframes vh-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-mark    { animation: vh-rise .6s ease backwards; }
.hero-eyebrow { animation: vh-rise .6s .06s ease backwards; }
.hero-title   { animation: vh-rise .6s .12s ease backwards; }
.hero-desc    { animation: vh-rise .6s .18s ease backwards; }
.section-title{ animation: vh-rise .6s .24s ease backwards; }
.product-grid > li { animation: vh-rise .55s ease backwards; }
.product-grid > li:nth-child(1) { animation-delay: .30s; }
.product-grid > li:nth-child(2) { animation-delay: .38s; }
.product-grid > li:nth-child(3) { animation-delay: .46s; }
#product-sub  { animation: vh-rise .55s .5s ease backwards; }

/* ---------- 6. Section title ---------- */
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-3);
  margin-bottom: var(--sp-4);
}

/* ---------- 7. Product list (한 줄에 버튼 하나, 세로로 쭉 나열) ---------- */
.catalog { padding-bottom: var(--sp-16); }
.product-grid {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
/* 서브(작은) 도구 그룹 */
.subsection-title {
  margin: var(--sp-8) 0 var(--sp-3);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-text-3);
}
.product-grid--sub { gap: var(--sp-3); }
.product-card.is-sub { padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); }
.product-card.is-sub .card-icon { width: 42px; height: 42px; }
.product-card.is-sub .card-name { font-size: 16px; }
.product-card.is-sub .card-tagline { font-size: 13px; }
.product-card.is-sub .card-go { width: 32px; height: 32px; }
.product-card {
  position: relative;
  display: flex; flex-direction: row; align-items: center; gap: var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  padding: var(--sp-5) var(--sp-6);
  text-decoration: none; color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
  overflow: hidden;
}
.product-card::before {                 /* 왼쪽 액센트 레일 (톤 그라데이션) */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--card-accent, var(--color-primary));
  background: linear-gradient(180deg, var(--card-accent, var(--color-primary)), color-mix(in srgb, var(--card-accent, var(--color-primary)) 55%, #000));
}
a.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-accent-bd, var(--color-border));
  box-shadow: var(--shadow-lg);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--card-accent, var(--color-primary)) 22%, transparent), 0 6px 14px rgba(15,23,42,0.06);
}

.card-icon {
  flex: none; display: inline-grid; place-items: center;
  width: 56px; height: 56px; border-radius: var(--r-lg);
  color: #fff;
  background: var(--card-accent, var(--accent-teal));
  background: linear-gradient(140deg, color-mix(in srgb, var(--card-accent, var(--accent-teal)) 76%, #fff), var(--card-accent, var(--accent-teal)));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--card-accent, var(--color-primary)) 34%, transparent), inset 0 1px 0 rgba(255,255,255,0.45);
}
.card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.card-name { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
.card-tagline { font-size: 14.5px; line-height: 1.55; color: var(--color-text-2); }
.card-go {
  flex: none; margin-left: var(--sp-2);
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: var(--r-full);
  color: var(--card-accent, var(--color-primary));
  background: var(--card-accent-bg, var(--accent-teal-bg));
  transition: transform var(--t-base), background var(--t-base), color var(--t-base);
}
a.product-card:hover .card-go { transform: translateX(3px); background: var(--card-accent, var(--color-primary)); color: #fff; }

/* 프리미엄 (팀): 골드 테두리 + 골드 글로우 + 배지로 플래그십 표시 */
.product-card.is-premium { border-color: #fcd34d; }
a.product-card.is-premium:hover {
  border-color: #f59e0b;
  box-shadow: 0 18px 40px rgba(245,158,11,0.20), 0 6px 14px rgba(15,23,42,0.06);
}
.premium-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; line-height: 1;
  color: #7a5300;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  border: 1px solid #f59e0b;
  padding: 3px 9px; border-radius: var(--r-full);
  box-shadow: 0 2px 6px rgba(245,158,11,0.25);
}
.premium-badge svg { color: #a16207; }

/* Coming-soon variant */
.product-card.is-soon {
  border-style: dashed; background: var(--color-bg); box-shadow: none; cursor: default;
}
.product-card.is-soon::before { opacity: 0.4; }
.product-card.is-soon .card-icon { filter: grayscale(0.4) opacity(0.85); }
.card-soon-badge {
  font-size: 11px; font-weight: 700;
  color: var(--color-text-3);
  background: var(--c-navy-100);
  border: 1px solid var(--color-border);
  padding: 3px 9px; border-radius: var(--r-full);
}
.product-card.is-soon .card-name { color: var(--color-text-2); }

/* ---------- 8. Footer ---------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: var(--sp-8) 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  color: var(--color-text);
}
.footer-brand .brand-mark--sm {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}
.footer-meta, .footer-legal {
  font-size: 13px;
  color: var(--color-text-2);
}
.footer-legal { color: var(--color-text-3); }
.footer-meta a { color: var(--color-text-2); text-decoration: none; }
.footer-meta a:hover { color: var(--color-primary); text-decoration: underline; }
.footer-version { font-variant-numeric: tabular-nums; }
.dot { margin: 0 6px; color: var(--color-text-3); }

/* ---------- 9. Responsive ---------- */
@media (max-width: 600px) {
  .wrap { padding-inline: var(--sp-4); }
  .hero { padding: var(--sp-10) 0 var(--sp-8); }
  .product-card { padding: var(--sp-4); gap: var(--sp-3); }
  .card-icon { width: 46px; height: 46px; }
  .lang-btn { padding: 6px 9px; }
}

/* ---------- 10. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  a.product-card:hover, .continue-card:hover { transform: none; }
}
