/* =============================================================================
   CareerMate — public landing / install page.
   Self-contained: no external fonts, no CDN, no network (works fully offline).

   Design language synthesized from established install/registry sites
   (Homebrew, Bun, npm, MCP docs), not copied from any one:
     · restraint over decoration — one flat accent, warm-neutral paper, no
       gradients / glows / gradient-text
     · the two install paths (.mcpb one-click / terminal) are the focal point
     · system sans for prose, monospace for commands → reads as a real tool
     · trust through whitespace, hairlines and consistency
   Light + dark (system preference or manual toggle).
   ========================================================================== */

:root {
  /* warm paper neutrals (light) */
  --bg: #faf8f4;
  --bg-elev: #ffffff;
  --bg-subtle: #f2efe8;
  --bg-sunken: #ece8df;
  --surface: #ffffff;
  --surface-hover: #f5f2ec;
  --border: #e6e1d6;
  --border-strong: #d6d0c2;
  --text: #1c1a16;
  --text-secondary: #595449;
  --text-tertiary: #8b867a;

  /* single flat accent — deep emerald (growth / "proceed"), no gradient */
  --accent: #0f7256;
  --accent-hover: #0b5b44;
  --accent-soft: #e7f1ec;
  --accent-border: #bcdccd;
  --text-on-accent: #ffffff;

  --code-bg: #f4f1ea;
  --code-text: #2a2722;
  --warn-bg: #fbf3e3;
  --warn-border: #ecd9ac;
  --warn-text: #876214;

  --shadow-sm: 0 1px 2px rgba(28,26,22,.05);
  --shadow-md: 0 4px 14px rgba(28,26,22,.07);

  --radius-sm: 6px;
  --radius: 9px;
  --radius-lg: 12px;
  --maxw: 1000px;

  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic',
    'Apple SD Gothic Neo', 'Noto Sans KR', Roboto, sans-serif;
  --mono: 'Cascadia Code', 'SFMono-Regular', 'JetBrains Mono', Consolas, 'D2Coding', ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { color-scheme: dark; }
}
:root[data-theme='dark'] { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #14130f; --bg-elev: #1b1915; --bg-subtle: #201d17; --bg-sunken: #100f0b;
    --surface: #1b1915; --surface-hover: #262219;
    --border: #2e2a22; --border-strong: #3e3930;
    --text: #f2eee5; --text-secondary: #aaa599; --text-tertiary: #79746a;
    --accent: #34d399; --accent-hover: #6ee7b7; --accent-soft: #11281d; --accent-border: #1f4f3c; --text-on-accent: #05241a;
    --code-bg: #100f0b; --code-text: #d6d1c6;
    --warn-bg: #292008; --warn-border: #574510; --warn-text: #e6c578;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 4px 14px rgba(0,0,0,.45);
  }
}
:root[data-theme='dark'] {
  --bg: #14130f; --bg-elev: #1b1915; --bg-subtle: #201d17; --bg-sunken: #100f0b;
  --surface: #1b1915; --surface-hover: #262219;
  --border: #2e2a22; --border-strong: #3e3930;
  --text: #f2eee5; --text-secondary: #aaa599; --text-tertiary: #79746a;
  --accent: #34d399; --accent-hover: #6ee7b7; --accent-soft: #11281d; --accent-border: #1f4f3c;
  --code-bg: #100f0b; --code-text: #d6d1c6;
  --warn-bg: #292008; --warn-border: #574510; --warn-text: #e6c578;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 4px 14px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  word-break: keep-all; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.accent { color: var(--accent); }

/* ----------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  max-width: var(--maxw); margin: 0 auto; padding: 15px 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; }
.nav__brand:hover { text-decoration: none; }
.nav__logo {
  width: 24px; height: 24px; border-radius: 6px; flex: none;
  background: var(--accent); color: var(--text-on-accent); font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
.nav__name { font-size: 15.5px; font-family: var(--mono); letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 2px; margin-left: 12px; }
.nav__links a {
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: var(--radius-sm);
}
.nav__links a:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer; transition: background .15s, color .15s;
}
.theme-toggle:hover { background: var(--surface-hover); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .i-moon { display: none; }
.theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: block; }
:root[data-theme='dark'] .theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-moon { display: block; }
  :root:not([data-theme='light']) .theme-toggle .i-sun { display: none; }
}

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-hover); text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.btn--ghost:hover { color: var(--text); background: var(--surface-hover); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ----------------------------------------------------------------- hero */
/* single centered column — headline on top, the two install CTAs right below. */
.hero {
  max-width: 720px; margin: 0 auto; padding: 66px 24px 8px; text-align: center;
}
/* gentle staggered entrance on load */
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero > * { animation: riseIn .55s cubic-bezier(.22,.61,.36,1) both; }
.hero__title { animation-delay: .04s; }
.hero__lede { animation-delay: .10s; }
.hero__cta { animation-delay: .18s; }
.hero__note { animation-delay: .24s; }
.pill-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border);
}
.pill-badge__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
.hero__title { font-size: clamp(2.05rem, 5vw, 3rem); margin: 20px 0 0; letter-spacing: -0.028em; }
.hero__lede {
  font-size: clamp(1rem, 2vw, 1.12rem); color: var(--text-secondary);
  margin: 18px auto 0; max-width: 37rem;
}
.hero__lede strong { color: var(--text); font-weight: 650; }

/* hero call-to-action — two install paths */
.hero__cta { margin: 28px auto 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero__cta .btn { height: 42px; padding: 0 18px; font-size: 14.5px; }

.hero__note {
  margin: 18px auto 0; max-width: 38rem; font-size: 12.5px; line-height: 1.6;
  color: var(--text-tertiary);
}
.hero__note strong { color: var(--text-secondary); font-weight: 600; }
.hero__note code { font-family: var(--mono); font-size: .92em; background: var(--bg-sunken); padding: 1px 5px; border-radius: 4px; color: var(--text-secondary); }

/* ----------------------------------------------------------------- sections */
.section { max-width: var(--maxw); margin: 0 auto; padding: 112px 24px 0; scroll-margin-top: 80px; }
.section__head { max-width: 46rem; margin: 0 auto 34px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 9px;
}
.section__head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.section__head p { margin-top: 11px; color: var(--text-secondary); font-size: 1rem; }

/* how-it-works */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 20px; transition: border-color .15s;
}
.feature:hover { border-color: var(--border-strong); }
.feature__icon {
  width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 14px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border);
}
.feature__icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { color: var(--text-secondary); font-size: 14px; }
.feature code { font-family: var(--mono); font-size: .85em; background: var(--bg-sunken); padding: 1px 5px; border-radius: 4px; }

/* checklist */
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 840px; margin: 0 auto; }
.check {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px;
}
.check > svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 1px; }
.check strong { display: block; font-size: 14.5px; font-weight: 650; }
.check span { display: block; color: var(--text-secondary); font-size: 13px; margin-top: 2px; }

/* ----------------------------------------------------------------- install */
/* install track (A: .mcpb / B: terminal) */
.track {
  max-width: 720px; margin: 0 auto;
  padding: 26px 0 0;
}
.track + .track { margin-top: 14px; padding-top: 30px; border-top: 1px solid var(--border); }
.track__head { max-width: 720px; margin: 0 auto 18px; }
.track__tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.track__head h3 { font-size: 1.15rem; }
.track__head h3 code { font-family: var(--mono); font-size: .82em; background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.track__head > p { margin-top: 7px; color: var(--text-secondary); font-size: 14px; }
.track .steps, .track .note, .track .acc { margin-left: 0; margin-right: 0; }
.track .step__body .btn { margin-top: 4px; }

.note {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: var(--radius);
  padding: 13px 17px; margin: 0 auto 24px; max-width: 720px;
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
}
.note strong { color: var(--text); }
.note code { font-family: var(--mono); background: var(--bg-sunken); padding: 1px 5px; border-radius: 4px; font-size: .88em; color: var(--text); }

.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; }
.step { display: flex; gap: 15px; padding: 2px 0 24px; position: relative; }
.step__no {
  width: 30px; height: 30px; flex: none; border-radius: 999px;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border); z-index: 1;
}
.step:not(:last-of-type)::before {
  content: ''; position: absolute; left: 15px; top: 34px; bottom: 6px; width: 1px;
  background: var(--border); z-index: 0;
}
.step__body { flex: 1; min-width: 0; padding-top: 3px; }
.step__body h3 { font-size: 16px; margin-bottom: 5px; }
.step__body > p { color: var(--text-secondary); font-size: 14px; margin-bottom: 11px; }
.step__body code { font-family: var(--mono); background: var(--bg-sunken); padding: 1px 5px; border-radius: 4px; font-size: .86em; }
.step__tip { margin-top: 11px; font-size: 13px; color: var(--text-secondary); }
.step__tip code { font-family: var(--mono); background: var(--bg-sunken); padding: 1px 5px; border-radius: 4px; }

kbd {
  font-family: inherit; font-size: .82em; background: var(--bg-sunken);
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px;
}

/* code blocks */
.code {
  position: relative; margin: 11px 0; background: var(--code-bg);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.code__label {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .03em;
  color: var(--text-tertiary); padding: 9px 13px 0;
}
.code pre {
  margin: 0; padding: 11px 13px 13px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--code-text); white-space: pre;
}
.copy-btn {
  position: absolute; top: 7px; right: 7px; font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 3px 10px; cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { color: var(--text-on-accent); background: var(--accent); border-color: var(--accent); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 4px 0 0; flex-wrap: wrap; }
.tab {
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 8px 12px; cursor: pointer; transition: color .12s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.panel { display: none; padding-top: 11px; }
.panel[data-active='true'] { display: block; }
.path-note { font-size: 12.5px; color: var(--text-tertiary); margin-bottom: 6px; line-height: 1.6; }
.path-note code { font-family: var(--mono); font-size: .9em; background: var(--bg-sunken); padding: 1px 5px; border-radius: 4px; }

/* troubleshooting accordion */
.acc {
  max-width: 720px; margin: 4px auto 0; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); overflow: hidden;
}
.acc > summary {
  cursor: pointer; list-style: none; padding: 15px 17px; font-weight: 650; font-size: 14.5px;
  display: flex; align-items: center; gap: 10px;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: '＋'; margin-left: auto; color: var(--text-tertiary); font-weight: 400; }
.acc[open] > summary::after { content: '－'; }
.acc > summary:hover { background: var(--surface-hover); }
.acc__hint { font-weight: 500; font-size: 12.5px; color: var(--text-tertiary); }
.acc__body { padding: 0 17px 16px; }
.trouble { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.trouble__item h4 { font-size: 14px; margin-bottom: 4px; }
.trouble__item p { color: var(--text-secondary); font-size: 13px; }
.trouble__item code { font-family: var(--mono); background: var(--bg-sunken); padding: 1px 5px; border-radius: 4px; font-size: .86em; }

/* privacy */
.privacy-card {
  max-width: 800px; margin: 0 auto; display: flex; gap: 20px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 30px;
}
.privacy-card__icon {
  width: 50px; height: 50px; flex: none; border-radius: 12px; display: grid; place-items: center;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border);
}
.privacy-card__icon svg { width: 26px; height: 26px; }
.privacy-card__text h2 { font-size: 1.3rem; }
.privacy-card__text > p { color: var(--text-secondary); margin-top: 9px; font-size: 14.5px; }
.privacy-card__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; }
.privacy-card__list li { font-size: 13.5px; color: var(--text-secondary); }
.privacy-card__list strong { color: var(--text); margin-right: 8px; }
.privacy-card__list code { font-family: var(--mono); font-size: .86em; background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px; color: var(--text); }

/* footer */
.foot {
  max-width: var(--maxw); margin: 104px auto 0; padding: 32px 24px 56px;
  border-top: 1px solid var(--border); text-align: center; color: var(--text-tertiary);
}
.foot__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); font-size: 15px; font-family: var(--mono); }
.foot p { margin: 11px 0 0; font-size: 13px; }
.foot__links { display: flex; justify-content: center; gap: 16px; margin-top: 14px; font-size: 13px; }
.foot__links a { color: var(--text-secondary); }

/* a11y */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* scroll reveal — JS adds .reveal only when motion is allowed, so no-JS /
   reduced-motion shows everything immediately (no hidden content risk) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.cards-3 .feature:nth-child(2).reveal { transition-delay: .07s; }
.cards-3 .feature:nth-child(3).reveal { transition-delay: .14s; }
.checks .check:nth-child(even).reveal { transition-delay: .05s; }

/* responsive */
@media (max-width: 820px) {
  .cards-3 { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .trouble { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}
@media (max-width: 540px) {
  .hero { padding-top: 46px; }
  .privacy-card { flex-direction: column; gap: 15px; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
