/* Idealny Resume — визуальная система.
   Тема: «прохождение скринеров» — резюме проходит два барьера (машина, человек).
   Палитра: чернила #0E1116, бумага #F7F5EF, сигнальный зелёный #22D67B (pass),
   янтарь #F4B740 (честный пробел/warning), сланец #8A93A0.
   Намеренно тёмная «инструментальная» эстетика: моно-акценты, сигнальный сканер,
   прозрачная рубрика — а не дефолтный cream+serif лендинг. */

:root {
  --ink: #0e1116;
  --ink-2: #161b22;
  --ink-3: #1f2630;
  --ink-soft: #11161d;
  --paper: #f7f5ef;
  --paper-dim: #cfd3da;
  --pass: #22d67b;
  --pass-dim: #168a52;
  --pass-glow: rgba(34, 214, 123, 0.16);
  --amber: #f4b740;
  --slate: #8a93a0;
  --line: #262d38;
  --line-2: #2f3744;
  --radius: 16px;
  --radius-sm: 11px;
  --maxw: 1140px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background:
    radial-gradient(1200px 620px at 78% -8%, rgba(34, 214, 123, 0.08), transparent 60%),
    var(--ink);
  color: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* --- Accessibility --- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--pass); color: var(--ink); font-family: var(--display);
  font-weight: 600; padding: 10px 16px; border-radius: 10px;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 12px; }

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

/* --- Top bar --- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(14, 17, 22, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.12rem;
}
.brand .dot { color: var(--pass); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--pass-glow); color: var(--pass);
  border: 1px solid var(--pass-dim);
}
.brand--sm { font-size: 1rem; }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: var(--slate); font-size: 0.92rem; transition: color 0.18s; }
.nav a:hover { color: var(--paper); }
.nav-quiet { color: var(--slate); }

/* --- Buttons --- */
.btn {
  font-family: var(--display); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-pass {
  background: var(--pass); color: var(--ink);
  box-shadow: 0 12px 30px -12px rgba(34, 214, 123, 0.55);
}
.btn-pass:hover { background: #2ee98a; box-shadow: 0 16px 36px -12px rgba(34, 214, 123, 0.7); }
.btn-ghost { background: rgba(255, 255, 255, 0.02); border-color: var(--line-2); color: var(--paper); }
.btn-ghost:hover { border-color: var(--slate); background: rgba(255, 255, 255, 0.05); }

/* --- Section heads --- */
.section-head { max-width: 64ch; }
.section-kicker {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--pass); display: inline-block; margin-bottom: 14px;
}
.section-h {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.55rem); letter-spacing: -0.025em; line-height: 1.08;
}
.section-sub { color: var(--paper-dim); margin-top: 14px; max-width: 60ch; font-size: 1.04rem; }

/* --- Hero --- */
.hero { position: relative; padding: 76px 0 56px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(138, 147, 160, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 147, 160, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(900px 520px at 22% 18%, #000 0%, transparent 72%);
  mask-image: radial-gradient(900px 520px at 22% 18%, #000 0%, transparent 72%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 52px; align-items: center;
}
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--pass); margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--pass); box-shadow: 0 0 0 4px var(--pass-glow);
}
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.03;
  letter-spacing: -0.035em; max-width: 17ch;
}
.hero h1 em { font-style: normal; color: var(--pass); }
.hero .lead {
  margin-top: 22px; max-width: 54ch; color: var(--paper-dim); font-size: 1.14rem;
}
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-trust {
  list-style: none; margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-size: 0.92rem; color: var(--paper-dim);
}
.hero-trust li { display: inline-flex; align-items: center; gap: 9px; }
.dotmark {
  width: 7px; height: 7px; border-radius: 2px; background: var(--pass); flex: none;
  transform: rotate(45deg);
}
.hero-mode { margin-top: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.ethics-note {
  margin-top: 40px; font-size: 0.9rem; color: var(--slate);
  border-left: 2px solid var(--amber); padding-left: 14px; max-width: 70ch;
}
.ethics-note strong { color: var(--paper); }

/* --- Signature: scan card --- */
.scan-card {
  position: relative; background: linear-gradient(180deg, var(--ink-2), var(--ink-soft));
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.scan-card__head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 0.72rem; color: var(--slate);
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px dashed var(--line-2);
}
.scan-card__live {
  color: var(--pass); display: inline-flex; align-items: center; gap: 7px;
}
.scan-card__live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pass);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.scan { position: relative; overflow: hidden; border-radius: var(--radius-sm); padding: 6px 2px; }
.scan::after {
  content: ""; position: absolute; left: -2px; right: -2px; height: 88px;
  background: linear-gradient(180deg, transparent, var(--pass-glow), transparent);
  border-top: 1px solid var(--pass); border-bottom: 1px solid var(--pass);
  animation: scanmove 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes scanmove { 0% { top: -88px; } 100% { top: 100%; } }
.scan-lines { display: flex; flex-direction: column; gap: 9px; }
.scan-lines i { display: block; height: 9px; border-radius: 4px; background: var(--ink-3); }
.scan-lines i.t { width: 62%; background: #2c343f; }
.scan-lines i.s { width: 90%; }
.scan-lines i.m { width: 74%; }
.scan-lines i.k { width: 40%; background: var(--pass-dim); }

.gauge {
  margin-top: 20px; display: flex; align-items: baseline; gap: 10px; font-family: var(--mono);
}
.gauge .num { font-size: 2.8rem; color: var(--pass); font-weight: 700; line-height: 1; }
.gauge .den { color: var(--slate); }
.gauge .lbl { margin-left: auto; font-size: 0.72rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.12em; }
.bar { height: 6px; border-radius: 3px; background: var(--ink-3); margin-top: 10px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--pass-dim), var(--pass)); width: 0; animation: fill 2.4s ease-out forwards; }
@keyframes fill { to { width: 91%; } }

.scan-card__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  font-family: var(--mono); font-size: 0.7rem; padding: 4px 9px; border-radius: 7px;
  border: 1px solid var(--line-2); color: var(--slate);
}
.chip--ok { color: var(--pass); border-color: var(--pass-dim); }
.chip--warn { color: var(--amber); border-color: rgba(244, 183, 64, 0.4); }

/* --- Metrics band --- */
.metrics { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.012); }
.metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.metric { padding: 30px 26px; border-left: 1px solid var(--line); }
.metric:first-child { border-left: none; padding-left: 0; }
.metric__n { display: block; font-family: var(--display); font-weight: 700; font-size: 1.7rem; color: var(--paper); letter-spacing: -0.02em; }
.metric__l { display: block; margin-top: 8px; color: var(--slate); font-size: 0.9rem; max-width: 26ch; }

/* --- Gates --- */
.gates { padding: 84px 0 70px; }
.gate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
.gate {
  background: linear-gradient(180deg, var(--ink-2), var(--ink-soft));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.gate:hover { border-color: var(--line-2); transform: translateY(-2px); }
.gate .tag {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--pass); display: block; margin-bottom: 12px;
}
.gate h3 { font-family: var(--display); font-size: 1.32rem; letter-spacing: -0.01em; }
.gate p { color: var(--paper-dim); margin-top: 10px; font-size: 0.98rem; }
.gate-list { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.gate-list li { position: relative; padding-left: 26px; color: var(--paper-dim); font-size: 0.94rem; }
.gate-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 8px;
  border-left: 2px solid var(--pass); border-bottom: 2px solid var(--pass);
  transform: rotate(-45deg);
}

/* --- Steps --- */
.steps { padding: 70px 0; border-top: 1px solid var(--line); }
.step-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; counter-reset: step; }
.step {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px;
  background: var(--ink-2); position: relative;
}
.step-mark {
  font-family: var(--mono); color: var(--pass); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; display: inline-block;
  padding: 4px 10px; border: 1px solid var(--pass-dim); border-radius: 99px;
}
.step h4 { font-family: var(--display); margin-top: 16px; font-size: 1.1rem; }
.step p { color: var(--slate); font-size: 0.92rem; margin-top: 8px; }

/* --- Rubric --- */
.rubric { padding: 70px 0; border-top: 1px solid var(--line); }
.rubric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.rubric-item {
  display: flex; gap: 16px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--ink-2);
}
.rubric-w {
  font-family: var(--mono); font-weight: 700; font-size: 1.4rem; color: var(--pass);
  min-width: 2.4ch; line-height: 1.1;
}
.rubric-item h4 { font-family: var(--display); font-size: 1.02rem; }
.rubric-item p { color: var(--slate); font-size: 0.88rem; margin-top: 4px; }

/* --- FAQ --- */
.faq { padding: 70px 0; border-top: 1px solid var(--line); }
.faq-list { margin-top: 34px; display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ink-2);
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-family: var(--display); font-weight: 600; font-size: 1.04rem;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-family: var(--mono); color: var(--pass); font-size: 1.3rem; line-height: 1;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--paper-dim); padding: 0 0 18px; font-size: 0.96rem; max-width: 70ch; }

/* --- CTA --- */
.cta { padding: 80px 0; border-top: 1px solid var(--line); }
.cta-inner {
  text-align: center; border: 1px solid var(--line-2); border-radius: 22px;
  padding: 56px 28px;
  background:
    radial-gradient(700px 300px at 50% -10%, rgba(34, 214, 123, 0.12), transparent 70%),
    linear-gradient(180deg, var(--ink-2), var(--ink-soft));
}
.cta h2 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -0.025em; }
.cta p { color: var(--paper-dim); margin: 16px auto 30px; max-width: 50ch; }

/* --- Footer --- */
.footer { border-top: 1px solid var(--line); margin-top: 0; }
.footer-inner { padding: 36px 24px; display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-brand p { color: var(--slate); font-size: 0.9rem; margin-top: 10px; max-width: 42ch; }
.footer-meta { display: flex; flex-direction: column; gap: 6px; color: var(--slate); font-size: 0.85rem; font-family: var(--mono); text-align: right; }

/* --- Badge --- */
.badge-mode {
  font-family: var(--mono); font-size: 0.72rem; padding: 5px 11px; border-radius: 99px;
  border: 1px solid var(--line-2); color: var(--slate); white-space: nowrap;
}
.badge-mode.on { color: var(--pass); border-color: var(--pass-dim); background: var(--pass-glow); }

/* --- Login widget host --- */
.login-host { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* --- Cabinet --- */
.cab-wrap { padding: 40px 0 60px; }
.cab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.cab-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.025em; }
.cab-head .muted { margin-top: 10px; max-width: 60ch; font-size: 0.96rem; }
.cab-head__mode { margin-top: 6px; }

.cab { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; }
.cab-main { display: flex; flex-direction: column; gap: 20px; }
.cab-side { display: flex; flex-direction: column; gap: 18px; }
.panel { background: linear-gradient(180deg, var(--ink-2), var(--ink-soft)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-family: var(--display); font-size: 1.18rem; }
.side-h { margin-bottom: 14px; }

label.fld { display: block; font-size: 0.8rem; color: var(--slate); margin: 0 0 7px; font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
label.fld + textarea { margin-bottom: 16px; }
textarea, input[type=text] {
  width: 100%; background: var(--ink); color: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 13px; font-family: var(--body); font-size: 0.95rem; resize: vertical;
}
textarea::placeholder { color: #5d6570; }
textarea:focus, input:focus { outline: none; border-color: var(--pass-dim); box-shadow: 0 0 0 3px var(--pass-glow); }
textarea { min-height: 150px; }
.form-actions { margin-top: 6px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.user-card { display: flex; align-items: center; gap: 14px; }
.user-avatar {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pass-glow); color: var(--pass); border: 1px solid var(--pass-dim);
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;
}
.user-name { font-size: 1.1rem; }
.panel--hint { background: var(--ink-soft); }

.result-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.score-head { display: flex; align-items: baseline; gap: 12px; font-family: var(--mono); }
.score-head .big { font-size: 2.3rem; font-weight: 700; }
.score-head .v { color: var(--slate); font-size: 0.9rem; }
.score-head .badge-mode { margin-left: auto; }
.score-head.pass .big { color: var(--pass); }
.score-head.warn .big { color: var(--amber); }
.breakdown { margin-top: 16px; display: flex; flex-direction: column; gap: 11px; }
.brk { font-size: 0.86rem; }
.brk .top { display: flex; justify-content: space-between; font-family: var(--mono); color: var(--paper-dim); }
.brk .note { color: var(--slate); font-size: 0.8rem; margin-top: 3px; }
.brk .bar2 { height: 5px; background: var(--ink-3); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.brk .bar2 > span { display: block; height: 100%; background: linear-gradient(90deg, var(--pass-dim), var(--pass)); }

.resume-out {
  margin-top: 16px; background: var(--paper); color: var(--ink); border-radius: var(--radius-sm);
  padding: 24px; white-space: pre-wrap; font-family: var(--body); max-height: 540px; overflow: auto;
  font-size: 0.92rem; line-height: 1.6;
}
.history-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s; display: flex; justify-content: space-between; align-items: center;
}
.history-item:hover { border-color: var(--slate); background: rgba(255, 255, 255, 0.03); }
.history-item .sc { font-family: var(--mono); color: var(--pass); font-weight: 700; }
.muted { color: var(--slate); font-size: 0.9rem; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--slate); border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Responsive --- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .scan-card { max-width: 460px; }
  .gate-row { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .metric { border-left: none; border-top: 1px solid var(--line); padding-left: 0; }
  .metric:first-child, .metric:nth-child(2) { border-top: none; }
  .rubric-grid { grid-template-columns: 1fr 1fr; }
  .cab { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .step-grid { grid-template-columns: 1fr 1fr; }
  .nav { gap: 14px; }
  .nav a:not(.btn):not(.nav-quiet) { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 56px 0 44px; }
  .step-grid, .rubric-grid, .metrics-row { grid-template-columns: 1fr; }
  .metric { border-top: 1px solid var(--line); padding: 22px 0; }
  .metric:first-child { border-top: none; }
  .footer-meta { text-align: left; }
  .cta-inner { padding: 40px 20px; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .scan::after { top: 40%; opacity: 0.5; }
  .bar > span { width: 91%; }
  .scan-card__live::before { opacity: 1; }
}
