/* Lunahouse — design tokens + trang công khai */
:root {
  --bg: #f4f2fb;
  --surface: #ffffff;
  --ink: #17143a;
  --ink-2: #403c66;
  --muted: #6f6c97;
  --line: #dedaf0;
  --line-2: #ece9f8;
  --accent: #4b3fd1;
  --on-accent: #ffffff;
  --accent-soft: #e9e6fb;
  --moon: #f4c23d;
  --ok: #1d7f55;
  --ok-soft: #dff3e9;
  --warn: #a8530a;
  --warn-soft: #fdeed9;
  --bad: #b8344a;
  --bad-soft: #fbe5e9;
  --display: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0c24; --surface: #171439; --ink: #ece9ff; --ink-2: #bdb8e8; --muted: #8e8abd;
    --line: #2b2760; --line-2: #211e4a; --accent: #9188ff; --on-accent: #0e0c24; --accent-soft: #26225a;
    --ok: #5fd39c; --ok-soft: #12362a; --warn: #f0a85a; --warn-soft: #3a2810; --bad: #f08a9b; --bad-soft: #3d1721;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0c24; --surface: #171439; --ink: #ece9ff; --ink-2: #bdb8e8; --muted: #8e8abd;
  --line: #2b2760; --line-2: #211e4a; --accent: #9188ff; --on-accent: #0e0c24; --accent-soft: #26225a;
  --ok: #5fd39c; --ok-soft: #12362a; --warn: #f0a85a; --warn-soft: #3a2810; --bad: #f08a9b; --bad-soft: #3d1721;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide { display: none !important; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* ---------- Header / footer ---------- */
.top { padding: 16px 0; }
.top .wrap { display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font: 700 19px/1 var(--display); letter-spacing: -.02em; }
.moon { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset -7px -3px 0 0 var(--moon); transform: rotate(-18deg); flex: none; }
.nav { margin-left: auto; display: flex; gap: 6px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; gap: 16px 28px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--ink-2); }
.foot .sp { margin-left: auto; }

/* ---------- Buttons / form ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border: 0;
  background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 12px 20px; border-radius: 10px; min-height: 46px;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent); filter: none; }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .field > .lab { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.field .opt { font-weight: 400; color: var(--muted); }
.field .help { font-size: 13px; color: var(--muted); }
.in {
  width: 100%; background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px;
  font-size: 16px; /* 16px: iOS không tự zoom */ transition: border-color .12s;
}
textarea.in { min-height: 96px; resize: vertical; line-height: 1.5; }
.in:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.in[aria-invalid="true"] { border-color: var(--bad); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.drop {
  display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--line); border-radius: 12px; cursor: pointer;
  background: var(--surface); transition: border-color .12s, background .12s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.drop .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 20px; flex: none; }
.drop .t { font-weight: 600; }
.drop .s { font-size: 13px; color: var(--muted); }
.drop.has { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.drop.has .ico { background: var(--ok); color: var(--surface); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 15px; margin-bottom: 16px; }
.alert.err { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--accent-soft); color: var(--ink); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 12.5px/1 var(--body); padding: 6px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--ink-2); white-space: nowrap; }
.chip.mono { font-family: var(--mono); font-size: 12px; }
.chip.nice { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.tag { font: 600 12px/1 var(--body); letter-spacing: .02em; padding: 5px 8px; border-radius: 6px; background: var(--moon); color: #2a2100; }

/* ---------- Home ---------- */
.hero { padding: 40px 0 28px; }
.eyebrow { font: 600 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(34px, 7.4vw, 68px); max-width: 15ch; }
.hero h1 mark { background: linear-gradient(transparent 66%, color-mix(in srgb, var(--moon) 70%, transparent) 66%); color: inherit; padding: 0 2px; }
.lede { margin-top: 20px; max-width: 54ch; font-size: clamp(16px, 2.2vw, 18px); color: var(--ink-2); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 36px 0 8px; border-top: 1px solid var(--line); counter-reset: s; }
.steps li { list-style: none; padding: 18px 16px 6px 0; counter-increment: s; }
.steps li::before { content: counter(s); font: 700 13px/1 var(--mono); color: var(--accent); display: block; margin-bottom: 10px; }
.steps b { display: block; font-family: var(--display); font-size: 17px; margin-bottom: 4px; }
.steps span { font-size: 14px; color: var(--muted); }
.steps { padding: 0; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr 1fr; } }

.sec-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 48px 0 16px; }
.sec-head h2 { font-size: 28px; }
.sec-head .count { font: 500 14px/1 var(--mono); color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .in { max-width: 320px; min-height: 44px; padding: 9px 14px; }
.pill { border: 1.5px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; min-height: 40px; }
.pill:hover { border-color: var(--accent); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.jobs { border-top: 1px solid var(--line); }
.job {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; padding: 20px 4px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; position: relative; transition: background .12s, padding .12s;
}
.job:hover { background: var(--surface); padding-left: 14px; padding-right: 14px; }
.job h3 { font-size: 21px; }
.job .meta { color: var(--muted); font-size: 14px; display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 6px; }
.job .meta b { color: var(--ink-2); font-weight: 600; }
.job .chips { margin-top: 12px; grid-column: 1; }
.job .go { grid-row: 1 / span 3; grid-column: 2; align-self: center; font-size: 22px; color: var(--accent); transition: transform .12s; }
.job:hover .go { transform: translateX(4px); }
.empty { padding: 36px 4px; color: var(--ink-2); max-width: 52ch; }
.empty h3 { font-size: 20px; margin-bottom: 8px; }

.pool { margin-top: 32px; display: flex; gap: 18px 28px; align-items: center; flex-wrap: wrap; padding: 22px 24px; border-radius: 14px; background: var(--ink); color: var(--bg); }
.pool h3 { font-size: 22px; color: inherit; }
.pool p { color: color-mix(in srgb, var(--bg) 78%, transparent); max-width: 46ch; margin-top: 6px; }
.pool .btn { background: var(--moon); color: #2a2100; margin-left: auto; }
@media (max-width: 560px) { .pool .btn { margin-left: 0; width: 100%; } }

/* ---------- JD ---------- */
.crumb { padding: 8px 0 0; font-size: 14px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.jd-head { padding: 22px 0 8px; }
.jd-head h1 { font-size: clamp(30px, 6vw, 48px); max-width: 20ch; margin: 12px 0 14px; }
.jd-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); }
.jd-meta b { font-weight: 600; }
.jd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; margin-top: 20px; align-items: start; }
@media (max-width: 880px) { .jd-grid { grid-template-columns: 1fr; gap: 8px; } }
.jd-body section { margin-top: 32px; }
.jd-body h2 { font-size: 20px; margin-bottom: 12px; }
.jd-body ul { margin: 0; padding: 0; list-style: none; }
.jd-body li { position: relative; padding: 5px 0 5px 22px; }
.jd-body li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset -3px -1px 0 0 var(--moon); transform: rotate(-18deg); }
.jd-body p { color: var(--ink-2); }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.facts dl { margin: 0; display: grid; gap: 14px; }
.facts dt { font: 600 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--ink); }
.side { position: sticky; top: 16px; display: grid; gap: 14px; }
@media (max-width: 880px) { .side { position: static; order: -1; } }

.apply-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-top: 48px; scroll-margin-top: 20px; }
.apply-box > h2 { font-size: 26px; margin-bottom: 6px; }
.apply-box > .sub { color: var(--muted); margin-bottom: 24px; }
@media (max-width: 560px) { .apply-box { padding: 20px 16px; border-radius: 14px; } }
.stickybar { display: none; }
@media (max-width: 880px) {
  .stickybar { display: block; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); z-index: 20; }
  .stickybar.gone { display: none; }
  body.has-sticky { padding-bottom: 76px; }
}

/* ---------- Vé nhận hồ sơ (signature) ---------- */
.stub { max-width: 520px; margin: 0 auto; filter: drop-shadow(0 10px 28px color-mix(in srgb, var(--ink) 14%, transparent)); }
.stub-top, .stub-bot { background: var(--surface); border: 1px solid var(--line); padding: 22px 26px; }
.stub-top {
  border-radius: 16px 16px 0 0; border-bottom: 0;
  -webkit-mask: radial-gradient(circle 11px at 0 100%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 100%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 100%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 100%, #0000 98%, #000) right / 51% 100% no-repeat;
  border-bottom: 2px dashed var(--line);
}
.stub-bot {
  border-radius: 0 0 16px 16px; border-top: 0;
  -webkit-mask: radial-gradient(circle 11px at 0 0, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 0, #0000 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 0, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 0, #0000 98%, #000) right / 51% 100% no-repeat;
}
.stub .kicker { font: 600 11.5px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stub .ttl { font: 700 22px/1.2 var(--display); letter-spacing: -.01em; margin: 10px 0 18px; }
.stub .code { font: 700 clamp(26px, 8vw, 36px)/1 var(--mono); letter-spacing: .1em; color: var(--accent); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stub .code button { font: 600 13px/1 var(--body); letter-spacing: 0; border: 1.5px solid var(--line); background: transparent; border-radius: 8px; padding: 8px 12px; color: var(--ink-2); }
.stub .code button:hover { border-color: var(--accent); color: var(--accent); }
.stub .state { font: 700 26px/1.15 var(--display); letter-spacing: -.01em; }
.stub .state.good { color: var(--ok); }
.stub .state.end { color: var(--ink-2); }
.stub .hint { margin-top: 10px; color: var(--ink-2); }
.stub .note { margin-top: 14px; padding: 12px 14px; background: var(--accent-soft); border-radius: 10px; font-size: 15px; }
.stub .note b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stub .when { margin-top: 14px; font-size: 13px; color: var(--muted); }

.tl { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.tl li { position: relative; padding: 0 0 18px 30px; color: var(--muted); }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 6px; top: 20px; bottom: -2px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl li::after { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); }
.tl li.done { color: var(--ink); }
.tl li.done::after { background: var(--accent); box-shadow: none; }
.tl li.done::before { background: var(--accent); }
.tl li.now { color: var(--ink); font-weight: 700; }
.tl li.now::after { background: var(--moon); box-shadow: 0 0 0 4px color-mix(in srgb, var(--moon) 30%, transparent); }
.tl li.end::after { background: var(--ink-2); box-shadow: none; }
.tl .d { display: block; font: 400 12.5px/1.4 var(--mono); color: var(--muted); margin-top: 2px; }

.panel { max-width: 520px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
@media (max-width: 560px) { .panel { padding: 20px 16px; } }
.page-title { text-align: center; padding: 40px 0 28px; }
.page-title h1 { font-size: clamp(30px, 6vw, 44px); }
.page-title p { color: var(--ink-2); margin-top: 12px; }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.prose { max-width: 66ch; }
.prose h2 { font-size: 22px; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 20px; }

.spin { width: 18px; height: 18px; border: 2.5px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { padding: 48px 0; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 0.01ms !important; } }

/* Header gọn trên điện thoại */
@media (max-width: 560px) {
  .top .wrap { gap: 8px; }
  .nav { gap: 0; flex-shrink: 0; }
  .nav a { white-space: nowrap; padding: 8px 9px; font-size: 14px; }
  .top .logo { font-size: 18px; }
}

/* Cộng đồng */
.comm { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.comm-i { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .12s, transform .12s; }
.comm-i:hover { border-color: var(--accent); transform: translateY(-1px); }
.comm-i b { display: block; font-weight: 600; line-height: 1.3; }
.comm-i small { color: var(--muted); font-size: 13px; }
.ci { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font: 700 16px/1 var(--display); background: var(--ink); color: var(--bg); }
.ci.linkedin { background: #0a66c2; color: #fff; } .ci.facebook { background: #1877f2; color: #fff; } .ci.zalo { background: #0068ff; color: #fff; }
.foot .wrap { flex-wrap: wrap; gap: 6px 16px; }
