/* ===========================================================================
   JobFinder website — design system & components
   Plain CSS, no build step. Theming via [data-theme] on <html>.
   =========================================================================== */

/* ---- Theme tokens -------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f6fb;
  --bg-card: #ffffff;
  --text: #181a27;
  --text-soft: #565b71;
  --border: #e6e8f1;
  --primary: #5a4ff3;
  --primary-strong: #493ed7;
  --primary-contrast: #ffffff;
  --primary-soft: rgba(90, 79, 243, 0.10);
  --accent: #0eae9d;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(245, 158, 11, 0.4);
  --code-bg: #0e1020;
  --code-text: #e7e9f7;
  --code-comment: #7f87b3;
  --shadow-sm: 0 1px 2px rgba(20, 22, 40, 0.06), 0 2px 8px rgba(20, 22, 40, 0.05);
  --shadow-md: 0 8px 30px rgba(20, 22, 40, 0.10);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --bg: #0b0c14;
  --bg-soft: #11131f;
  --bg-card: #161927;
  --text: #eef0ff;
  --text-soft: #a4a9c2;
  --border: #242838;
  --primary: #9a94ff;
  --primary-strong: #b4b0ff;
  --primary-contrast: #0b0c14;
  --primary-soft: rgba(154, 148, 255, 0.14);
  --accent: #42d8c0;
  --warn-bg: rgba(245, 158, 11, 0.14);
  --warn-border: rgba(245, 158, 11, 0.45);
  --code-bg: #0a0b14;
  --code-text: #e7e9f7;
  --code-comment: #6b7299;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* ---- Base ---------------------------------------------------------------- */
* { box-sizing: border-box; }

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

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

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

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section__head p { color: var(--text-soft); font-size: 1.08rem; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--primary); background: var(--primary-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; font-family: inherit;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--primary); color: var(--primary-contrast); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-strong); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn svg { width: 18px; height: 18px; }

/* ---- Navigation ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px; flex: none;
  color: var(--text); font-size: 1.12rem; font-weight: 780; letter-spacing: -0.045em;
}
.brand:hover { text-decoration: none; }
.brand__logo {
  width: 36px; height: 36px; flex: none; display: block;
  filter: drop-shadow(0 4px 8px rgba(76, 66, 213, 0.18));
}
.brand__word { display: inline-flex; align-items: baseline; }
.brand__finder { color: var(--primary); }
.nav__links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav__links a {
  color: var(--text-soft); font-weight: 500; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); background: var(--primary-soft); text-decoration: none; }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav__toggle { display: none; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 60% at 15% 0%, var(--primary-soft), transparent 70%),
    radial-gradient(50% 50% at 90% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 18px; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { font-size: 1.18rem; color: var(--text-soft); max-width: 540px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--text-soft); font-size: 0.9rem; }
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--accent); }

/* Terminal mock */
.terminal {
  background: var(--code-bg); border-radius: var(--radius);
  box-shadow: var(--shadow-md); border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden; font-family: var(--mono); font-size: 0.86rem;
}
.terminal__bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: rgba(255, 255, 255, 0.04); }
.terminal__bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.terminal__bar i:nth-child(1) { background: #ff5f57; }
.terminal__bar i:nth-child(2) { background: #febc2e; }
.terminal__bar i:nth-child(3) { background: #28c840; }
.terminal__bar span { margin-left: 8px; color: #8b91b6; font-size: 0.78rem; }
.terminal__body { padding: 18px 18px 22px; color: var(--code-text); line-height: 1.9; }
.terminal__body .c { color: var(--code-comment); }
.terminal__body .p { color: #6ee7b7; }
.terminal__body .o { color: #93b6ff; }

/* ---- Pipeline (flow) ----------------------------------------------------- */
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.flow__node {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 14px; text-align: center; box-shadow: var(--shadow-sm); position: relative;
}
.flow__node .step { font-size: 0.72rem; font-weight: 700; color: var(--primary); }
.flow__node .ico { width: 26px; height: 26px; margin: 6px auto 8px; color: var(--accent); display: block; }
.flow__node strong { display: block; font-size: 0.92rem; }
.flow__node span { font-size: 0.8rem; color: var(--text-soft); }
.flow__node.opt { border-style: dashed; }
.flow__node.opt .badge-opt {
  position: absolute; top: -9px; right: 10px; font-size: 0.62rem; font-weight: 700;
  background: var(--accent); color: #04201d; padding: 2px 8px; border-radius: 999px;
}

/* ---- Cards / grids ------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.card__ico {
  width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 16px;
}
.card__ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-soft); margin: 0; font-size: 0.96rem; }
.card--link { display: block; color: inherit; }
.card--link:hover { text-decoration: none; }
.card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 600; color: var(--primary); font-size: 0.9rem; }

/* ---- Callout ------------------------------------------------------------- */
.callout {
  display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius-sm);
  background: var(--warn-bg); border: 1px solid var(--warn-border); margin: 20px 0;
}
.callout svg { width: 22px; height: 22px; flex: none; color: #d97706; margin-top: 2px; }
.callout p { margin: 0; font-size: 0.94rem; }
.callout--info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.callout--info svg { color: var(--primary); }

/* ---- Code block + copy --------------------------------------------------- */
.code { position: relative; margin: 16px 0; }
.code pre {
  margin: 0; background: var(--code-bg); color: var(--code-text);
  border-radius: var(--radius-sm); padding: 18px 54px 18px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: 0.86rem; line-height: 1.7;
}
.code pre .c { color: var(--code-comment); }
.code pre .o { color: #93b6ff; }
.code .copy {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.08); color: #cfd4ef; border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px; padding: 6px 9px; cursor: pointer; font-size: 0.74rem; font-family: inherit;
  transition: background 0.15s ease;
}
.code .copy:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.code .copy.copied { background: var(--accent); color: #04201d; border-color: transparent; }
.code .copy svg { width: 14px; height: 14px; }

/* ---- Tabs ---------------------------------------------------------------- */
.tabs__list { display: inline-flex; gap: 4px; padding: 5px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; margin-bottom: 24px; }
.section--soft .tabs__list { background: var(--bg); }
.tabs__btn {
  border: none; background: transparent; color: var(--text-soft); font-family: inherit;
  font-weight: 600; font-size: 0.9rem; padding: 9px 18px; border-radius: 999px; cursor: pointer;
}
.tabs__btn:hover { color: var(--text); }
.tabs__btn.is-active { background: var(--primary); color: var(--primary-contrast); }
.tabs__panel { display: none; }
.tabs__panel.is-active { display: block; animation: fade 0.3s ease; }

/* ---- Steps --------------------------------------------------------------- */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step-row { display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.step-row__num {
  counter-increment: step; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-contrast); font-weight: 800; font-size: 1.05rem;
}
.step-row__num::before { content: counter(step); }
.step-row__body { padding-top: 3px; }
.step-row__body h3 { margin-bottom: 6px; }
.step-row__body p { color: var(--text-soft); margin: 0 0 8px; }

/* ---- Command builder ----------------------------------------------------- */
.builder { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.builder__controls { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.8rem; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.field select {
  font-family: inherit; font-size: 0.92rem; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); min-width: 220px; cursor: pointer;
}
.field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ---- Accordion (FAQ) ----------------------------------------------------- */
.accordion { max-width: 800px; margin: 0 auto; }
.acc-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--bg-card); overflow: hidden; }
.acc-trigger {
  width: 100%; text-align: left; background: transparent; border: none; cursor: pointer;
  font-family: inherit; font-size: 1.02rem; font-weight: 600; color: var(--text);
  padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.acc-trigger .chev { width: 20px; height: 20px; flex: none; color: var(--text-soft); transition: transform 0.25s ease; }
.acc-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); color: var(--primary); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-panel__inner { padding: 0 20px 18px; color: var(--text-soft); }
.acc-panel__inner p { margin: 0; }
.acc-panel__inner code { background: var(--primary-soft); color: var(--primary); padding: 2px 6px; border-radius: 5px; font-family: var(--mono); font-size: 0.86em; }

/* ---- CTA band ------------------------------------------------------------ */
.cta {
  text-align: center; border-radius: 22px; padding: 56px 28px; margin: 0 auto;
  background: linear-gradient(115deg, var(--primary), color-mix(in srgb, var(--accent) 75%, var(--primary)));
  color: #fff; box-shadow: var(--shadow-md);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.9); max-width: 560px; margin: 0 auto 24px; }
.cta .btn--primary { background: #fff; color: var(--primary-strong); }
.cta .btn--primary:hover { background: #f1f0ff; }
.cta .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.cta .btn--ghost:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, 0.12); }

/* ---- Footer -------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 52px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer__brand p { color: var(--text-soft); font-size: 0.92rem; max-width: 280px; margin-top: 12px; }
.footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); margin-bottom: 14px; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer__links a { color: var(--text); font-size: 0.92rem; }
.footer__links a:hover { color: var(--primary); }
.footer__bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; color: var(--text-soft); font-size: 0.85rem; }
.footer__bottom a { color: var(--text-soft); }

/* ---- Doc page specifics -------------------------------------------------- */
.page-head { padding: 56px 0 12px; }
.page-head .eyebrow { margin-bottom: 16px; }
.prose h2 { margin-top: 8px; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { font-weight: 700; color: var(--text); background: var(--bg-soft); }
td { color: var(--text-soft); }
td code, .prose p code, .prose li code { background: var(--primary-soft); color: var(--primary); padding: 2px 6px; border-radius: 5px; font-family: var(--mono); font-size: 0.85em; }

/* ---- Reveal animation ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__visual { order: -1; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .nav__toggle { display: inline-flex; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 68px; left: 0; right: 0; margin: 0; padding: 12px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .nav.open .nav__links a { padding: 12px; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 540px) {
  .nav__inner { gap: 9px; padding: 0 14px; }
  .brand { gap: 8px; font-size: 1.02rem; }
  .brand__logo { width: 33px; height: 33px; }
  .nav__actions { gap: 6px; }
  .github-btn { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .github-btn span { display: none; }
}

@media (max-width: 460px) {
  .flow { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}
