/* ===================================================================
   СравниЗП — Калькулятор справедливости
   Эстетика: индустриальный «чертёж / предупреждающий знак»
   Mobile-first
   =================================================================== */

:root {
  --bg:        #14110d;   /* тёплый угольный */
  --bg-2:      #1d1a14;
  --panel:     #211d16;
  --line:      #3a3327;   /* линии чертежа */
  --paper:     #ece5d6;   /* off-white "бумага" */
  --muted:     #a89e88;
  --amber:     #ffb000;   /* hazard amber — акцент */
  --amber-dk:  #cf8e00;
  --red:       #e5482f;   /* опасность */
  --green:     #5fbf8f;   /* гражданский сектор / выгода */

  --ff-disp: "Oswald", "Arial Narrow", sans-serif;
  --ff-body: "PT Sans", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 640px;
  --r: 4px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- фоновые декорации ---------- */
.blueprint-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .14;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { position: relative; z-index: 1; }

/* ---------- общие элементы ---------- */
.stamp {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 22px;
}

.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 0 0 26px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.section-head .idx {
  font-family: var(--ff-mono);
  font-size: 13px; font-weight: 700;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 2px 7px; border-radius: var(--r);
  flex: 0 0 auto;
}
.section-head h2 {
  font-family: var(--ff-disp);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .01em;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.08;
  margin: 0;
}
.section-head--light h2 { color: var(--bg); }
.section-head--light .idx { color: var(--bg); border-color: var(--bg); }
.section-head--light { border-color: rgba(20,17,13,.25); }

section { padding-block: 54px; }

/* ---------- кнопки ---------- */
.btn {
  --b: var(--amber);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-disp);
  text-transform: uppercase; letter-spacing: .03em;
  font-weight: 600; font-size: 17px;
  text-decoration: none; cursor: pointer;
  border: 2px solid var(--b);
  border-radius: var(--r);
  padding: 14px 22px;
  background: transparent; color: var(--paper);
  transition: transform .12s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn .arr { transition: transform .2s ease; }
.btn:active { transform: translateY(2px); }
.btn--primary {
  background: var(--amber); color: var(--bg);
  box-shadow: 5px 5px 0 var(--amber-dk);
}
.btn--primary:hover { box-shadow: 2px 2px 0 var(--amber-dk); transform: translate(3px,3px); }
.btn--primary:hover .arr { transform: translateX(4px); }
.btn--ghost:hover { background: var(--amber); color: var(--bg); }
.btn--ghost:hover .arr { transform: translateY(4px); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- HERO ---------- */
.hero {
  padding-block: 0;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255,176,0,.10), transparent 60%),
    var(--bg);
}
.hero .wrap { position: relative; z-index: 1; }

/* эмблема-печать в углу */
.emblem {
  position: absolute;
  top: 28px; right: 18px;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: rgba(229,72,47,.10);
  transform: rotate(-8deg);
  z-index: 2;
  box-shadow: inset 0 0 0 4px rgba(229,72,47,.18);
}
.emblem__star {
  font-size: 28px; color: var(--red);
  line-height: 1;
  text-shadow: 0 0 8px rgba(229,72,47,.45);
}
@media (min-width: 720px) {
  .emblem { width: 84px; height: 84px; top: 34px; right: 28px; }
  .emblem__star { font-size: 36px; }
}
.hero .wrap { padding-block: 48px 56px; }
.hazard-tape {
  height: 16px;
  background-image: repeating-linear-gradient(
    -45deg, var(--amber) 0 18px, var(--bg) 18px 36px
  );
  opacity: .85;
}
.hero__title {
  font-family: var(--ff-disp);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(38px, 12vw, 64px);
  line-height: .96;
  letter-spacing: -.01em;
  margin: 0 0 18px;
}
.hero__title .hl {
  display: block;
  color: var(--amber);
  position: relative;
}
.hero__title .hl::after {
  content: "";
  position: absolute; left: 0; right: 12%;
  bottom: 4px; height: 6px;
  background: var(--red);
  transform: skewX(-12deg);
  opacity: .9;
}
.hero__sub {
  font-size: 17px; color: var(--muted);
  max-width: 30em; margin: 0 0 30px;
}
.hero__cta { font-size: 19px; }

.ticker {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0; margin: 36px 0 0;
}
.ticker li {
  font-family: var(--ff-mono); font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 100px;
}

/* ---------- ФОРМЫ / ПОЛЯ ---------- */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 9px; }
.field__label {
  font-family: var(--ff-mono);
  font-size: 12px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.field__out { color: var(--amber); font-weight: 700; }
.field__hint { font-size: 12px; color: var(--muted); }

input[type="text"], select, textarea {
  width: 100%;
  font-family: var(--ff-body); font-size: 16px;
  color: var(--paper);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { resize: vertical; min-height: 76px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255,176,0,.18);
}
input.is-error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,72,47,.18); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ffb000'%3E%3Cpath d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
::placeholder { color: #6b6354; }

/* range */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 100px;
  background: var(--line); cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px;
  border-radius: 50%; background: var(--amber);
  border: 4px solid var(--bg); cursor: pointer;
  box-shadow: 0 0 0 1px var(--amber);
}
input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--amber); border: 4px solid var(--bg); cursor: pointer;
}
.range-scale {
  display: flex; justify-content: space-between;
  font-family: var(--ff-mono); font-size: 11px; color: var(--muted);
  margin-top: -2px;
}

.check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--muted);
}
.check input { margin-top: 2px; accent-color: var(--amber); width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- РЕЗУЛЬТАТ ---------- */
.result { background: var(--bg-2); }
.verdict {
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  background: var(--panel);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 26px;
}
.verdict.is-good { border-left-color: var(--green); }
.verdict__head {
  font-family: var(--ff-disp); text-transform: uppercase;
  font-weight: 600; font-size: 20px; line-height: 1.12;
  margin: 0 0 12px; color: var(--red);
}
.verdict.is-good .verdict__head { color: var(--green); }
.verdict__row {
  display: flex; justify-content: space-between; gap: 14px;
  font-family: var(--ff-mono); font-size: 14px;
  padding: 7px 0; border-top: 1px dashed var(--line);
}
.verdict__row b { color: var(--paper); white-space: nowrap; }
.verdict__note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* chart */
.chart { display: grid; gap: 14px; margin-bottom: 30px; }
.bar { display: grid; gap: 6px; }
.bar__top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--ff-mono); font-size: 13px;
}
.bar__name { color: var(--paper); }
.bar__val { color: var(--amber); font-weight: 700; }
.bar__track {
  height: 22px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.bar__fill {
  height: 100%; width: 0;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, var(--amber-dk) 10px 20px);
  transition: width .9s cubic-bezier(.2,.7,.2,1);
}
.bar--you .bar__fill { background: var(--paper); }
.bar--you .bar__val { color: var(--paper); }
.bar--alt .bar__fill { background: repeating-linear-gradient(-45deg, var(--green) 0 10px, #4aa377 10px 20px); }
.bar--alt .bar__val { color: var(--green); }

/* inflation */
.inflation {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px dashed var(--line); border-radius: var(--r);
  padding: 18px; background: var(--bg);
}
.inflation__big {
  font-family: var(--ff-disp); font-weight: 700;
  font-size: 44px; line-height: 1; color: var(--red);
  flex: 0 0 auto;
}
.inflation p { margin: 0; font-size: 14px; color: var(--muted); }
.result__cta { margin-top: 28px; }

/* ---------- ПОЧЕМУ ВЫГОДНЕЕ ---------- */
.why { background: var(--bg); }
.cards { display: grid; gap: 16px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%; background: var(--green);
}
.card__ico { font-size: 28px; margin-bottom: 10px; }
.card h3 {
  font-family: var(--ff-disp); text-transform: uppercase;
  font-weight: 500; font-size: 18px; margin: 0 0 8px; letter-spacing: .01em;
}
.card p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta {
  background: var(--amber);
  color: var(--bg);
  position: relative;
}
.cta .field__label { color: #5e4a12; }
.cta .field__hint, .cta .check { color: #5e4a12; }
.cta input, .cta textarea {
  background: #fff6e2; color: var(--bg); border-color: var(--amber-dk);
}
.cta input:focus, .cta textarea:focus {
  border-color: var(--bg); box-shadow: 0 0 0 3px rgba(20,17,13,.2);
}
.cta ::placeholder { color: #9a814a; }
.cta .check input { accent-color: var(--bg); }
.cta .btn--primary {
  background: var(--bg); color: var(--amber);
  box-shadow: 5px 5px 0 rgba(20,17,13,.35); border-color: var(--bg);
}
.cta .btn--primary:hover { box-shadow: 2px 2px 0 rgba(20,17,13,.35); }
.cta__lead {
  font-size: 17px; max-width: 32em; margin: 0 0 28px; color: #2c2410;
}
.form__status {
  font-family: var(--ff-mono); font-size: 14px; min-height: 1.2em;
  margin: 6px 0 0; font-weight: 700;
}
.form__status.ok { color: #1d6b3f; }
.form__status.err { color: #8c1d0f; }

/* ---------- FOOTER ---------- */
.foot {
  background: var(--bg); padding-block: 26px;
  border-top: 1px solid var(--line);
}
.foot .wrap {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--ff-mono); font-size: 12px; color: var(--muted);
}
.foot a { color: var(--amber); text-decoration: none; }

/* выпадающий список: группы профессий */
select optgroup {
  background: var(--bg-2);
  color: var(--amber);
  font-family: var(--ff-mono);
  font-style: normal;
  font-weight: 700;
}
select option { color: var(--paper); background: var(--bg-2); font-weight: 400; }

/* ---------- появление результата ---------- */
.reveal { animation: reveal .5s ease both; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

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

/* ---------- планшет / десктоп ---------- */
@media (min-width: 720px) {
  section { padding-block: 80px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .hero .wrap { padding-block: 70px 80px; }
}
