/* Visual identity REMESLO: бело-синяя база + медно-оранжевый сигнал.
   Manrope — заголовки/смыслы, Roboto — длинный текст/интерфейс. Много воздуха, левое выравнивание. */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Roboto:wght@400;500;700&display=swap');

:root {
  --blue: #0D1B2A;        /* МетСтайл Deep Navy — заголовки, ключевое */
  --orange: #4A90E2;      /* Steel Blue — единственный акцент: CTA, активное */
  --orange-hover: #357ABD;
  --orange-soft: #E8F1FB;
  --steel: #737D8C;       /* стальной серый — подложки, разделители */
  --graphite: #3D4757;    /* графит — текст, иконки */
  --bg: #F5F7F9;          /* лёгкий воздух */
  --card: #FFFFFF;
  --line: #E3E7EC;
  --text: #3D4757;
  --muted: #737D8C;
  --accent: #D97722;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}

#app { max-width: 700px; margin: 0 auto; padding: 32px 20px 72px; }

.center { display: flex; align-items: center; justify-content: center; min-height: 70vh; color: var(--muted); }

/* бренд-якорь: модульный знак + вордмарк */
.brandmark { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.brandmark .mark { width: 18px; height: 22px; flex: none; }
.brandmark .wm { font-family: 'Manrope', sans-serif; font-weight: 800; letter-spacing: .14em; font-size: 15px; color: var(--blue); }
.brandmark small { font-family: 'Roboto', sans-serif; font-weight: 400; letter-spacing: .01em; color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 16px;
}

h1 { font-family: 'Manrope', sans-serif; font-size: 26px; margin: 0 0 10px; font-weight: 800; letter-spacing: -.01em; color: var(--blue); }
h2 { font-family: 'Manrope', sans-serif; font-size: 17px; margin: 0 0 10px; font-weight: 700; color: var(--blue); }
.serif { font-family: 'Roboto', sans-serif; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; }

.btn {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 26px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--orange-hover); }
.btn:disabled { background: #E7EAEE; color: var(--muted); cursor: not-allowed; }

input[type="text"] {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Roboto', sans-serif;
  padding: 13px 14px;
  font-size: 15px;
  margin: 12px 0 18px;
}
input[type="text"]:focus { outline: none; border-color: var(--orange); }

/* прогресс + таймер */
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.progress { flex: 1; height: 4px; background: #E7EAEE; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--orange); width: 0; transition: width .25s; }
.timer {
  font-family: 'Manrope', sans-serif; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px;
  min-width: 50px; text-align: right; color: var(--steel); letter-spacing: .02em;
}
.timer.warn { color: var(--graphite); }
.timer.crit { color: var(--orange); }

.qtitle { font-family: 'Manrope', sans-serif; font-size: 12px; color: var(--steel); margin-bottom: 10px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }
.qtext { font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 20px; line-height: 1.5; margin-bottom: 22px; color: var(--blue); }

.option {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 17px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.45;
  color: var(--graphite);
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.option:hover { border-color: var(--steel); }
.option.selected { border-color: var(--orange); background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange); }

.row-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }

.badge { display: inline-block; padding: 3px 11px; border-radius: 99px; font-size: 12px; font-weight: 700; font-family: 'Manrope', sans-serif; }
.badge.strong { background: rgba(28,47,74,.10); color: var(--blue); }
.badge.neutral { background: rgba(115,125,140,.14); color: var(--steel); }
.badge.risk { background: rgba(217,119,34,.14); color: var(--orange); }
.badge.accent { background: rgba(217,119,34,.14); color: var(--orange); }
/* алиасы старых семантик -> бренд: высокий=синий, средний=сталь, низкий=оранжевый(внимание) */
.badge.green { background: rgba(28,47,74,.10); color: var(--blue); }
.badge.amber { background: rgba(115,125,140,.14); color: var(--steel); }
.badge.red { background: rgba(217,119,34,.14); color: var(--orange); }

.warnbar {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--orange); color: #fff;
  text-align: center; padding: 11px; font-size: 14px; font-weight: 700; font-family: 'Manrope', sans-serif;
  transform: translateY(-100%); transition: transform .2s; z-index: 50;
}
.warnbar.show { transform: translateY(0); }

.big-num { font-family: 'Manrope', sans-serif; font-size: 48px; font-weight: 800; letter-spacing: -.02em; color: var(--blue); }

/* ---------- титульная страница ---------- */
.landing { position: relative; min-height: 92vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lgrid {
  position: absolute; inset: -40px;
  background-image: linear-gradient(rgba(28,47,74,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(28,47,74,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 70%);
  opacity: 0; animation: fadeIn 1.4s ease .2s forwards, gridPan 50s linear infinite;
}
.lcontent { position: relative; text-align: center; padding: 24px; max-width: 740px; }

.lmark { display: flex; flex-direction: column-reverse; align-items: center; gap: 5px; margin-bottom: 26px; }
.lmark span { display: block; border-radius: 3px; background: var(--blue); opacity: 0; transform: translateY(16px); animation: blockRise .6s cubic-bezier(.2,.8,.2,1) forwards; }
.lmark .b1 { width: 58px; height: 21px; animation-delay: .15s; }
.lmark .b2 { width: 42px; height: 18px; animation-delay: .32s; }
.lmark .b3 { width: 25px; height: 14px; background: var(--orange); animation-delay: .49s; }

.lhero { margin: 0; line-height: 1; }
.lhero .l1 {
  display: block; font-family: 'Manrope', sans-serif; font-weight: 800; color: var(--blue);
  font-size: clamp(46px, 12vw, 108px); letter-spacing: .03em;
  opacity: 0; animation: fadeUp .9s cubic-bezier(.2,.8,.2,1) .5s forwards;
}
.lhero .l2 {
  display: block; font-family: 'Manrope', sans-serif; font-weight: 700; color: var(--steel);
  font-size: clamp(14px, 3.4vw, 26px); letter-spacing: .44em; margin-top: 14px; padding-left: .44em;
  opacity: 0; animation: fadeUp .9s ease .78s forwards;
}
.lhero .l2 i { color: var(--orange); font-style: normal; }

.laccent { width: 60px; height: 3px; background: var(--orange); border-radius: 2px; margin: 26px auto; transform: scaleX(0); animation: lineGrow .7s ease .95s forwards; }

.lmanifest {
  font-family: 'Roboto', sans-serif; font-size: clamp(15px, 2.1vw, 18px); line-height: 1.68; color: var(--graphite);
  max-width: 560px; margin: 0 auto 32px; opacity: 0; animation: fadeUp .85s ease 1.08s forwards;
}
.lmanifest b { color: var(--blue); font-weight: 600; }

.lbtn {
  display: inline-block; background: var(--orange); color: #fff; font-family: 'Manrope', sans-serif; font-weight: 700;
  font-size: 15px; padding: 14px 32px; border-radius: 9px; text-decoration: none; cursor: pointer;
  opacity: 0; animation: fadeUp .85s ease 1.28s forwards; transition: background .15s, transform .15s, box-shadow .15s;
}
.lbtn:hover { background: var(--orange-hover); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(217,119,34,.28); }

.lfoot { margin-top: 32px; font-size: 12px; letter-spacing: .08em; color: var(--steel); text-transform: uppercase; opacity: 0; animation: fadeIn 1s ease 1.55s forwards; }

@keyframes blockRise { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes lineGrow { to { transform: scaleX(1); } }
@keyframes gridPan { from { background-position: 0 0; } to { background-position: 46px 46px; } }
/* анимированная сцена «суета стройки и офиса»: фон — SVG (кран/окна), люди — HTML-слой */
.landing { padding-bottom: 234px; }
.lscene { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; pointer-events: none; z-index: 0; opacity: 0; overflow: hidden; animation: fadeIn 1.4s ease 1.4s forwards; }
.lscene .bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lcontent { z-index: 2; }
.walker { position: absolute; bottom: 28px; will-change: transform; }
.walker .wbob { animation: wbob var(--b,.5s) ease-in-out infinite alternate; }
.jib { transform-box: fill-box; transform-origin: 0% 50%; animation: craneSwing 6s ease-in-out infinite alternate; }
.win-on { animation: blink var(--t,3s) steps(1) infinite; }
.floorblk { opacity: 0; animation: floorIn var(--t,4s) ease-in-out infinite; }
@keyframes wbob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes craneSwing { from { transform: rotate(-3deg); } to { transform: rotate(4deg); } }
@keyframes blink { 0%, 45% { opacity: 1; } 55%, 92% { opacity: .2; } 100% { opacity: 1; } }
@keyframes floorIn { 0%, 100% { opacity: 0; } 25%, 75% { opacity: 1; } }

/* анимации рядом с заголовком */
.lcontent { position: relative; }
.lhero .l1 {
  background: linear-gradient(100deg, #1C2F4A 0%, #1C2F4A 40%, #4f81bd 50%, #1C2F4A 60%, #1C2F4A 100%);
  background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: fadeUp .9s cubic-bezier(.2,.8,.2,1) .5s forwards, shine 6s ease-in-out 1.7s infinite;
}
.lhero .l2 i { display: inline-block; animation: dotPulse 1.9s ease-in-out infinite; }
.lblock { position: absolute; border-radius: 3px; opacity: 0; pointer-events: none; }
.lblock.b1 { width: 16px; height: 16px; background: var(--orange); top: 4%; left: 12%; animation: floatA 5.5s ease-in-out 1.7s infinite; }
.lblock.b2 { width: 11px; height: 11px; background: var(--blue); top: 24%; right: 14%; animation: floatB 6.5s ease-in-out 2s infinite; }
.lblock.b3 { width: 9px; height: 9px; background: var(--steel); top: 0%; right: 26%; animation: floatA 7.5s ease-in-out 2.4s infinite; }
.lblock.b4 { width: 12px; height: 12px; background: var(--orange); bottom: 12%; left: 20%; animation: floatB 6s ease-in-out 2.2s infinite; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes dotPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.55); opacity: .55; } }
@keyframes floatA { 0% { opacity: 0; transform: translateY(12px) rotate(0deg); } 25% { opacity: .85; } 50% { transform: translateY(-10px) rotate(45deg); } 75% { opacity: .85; } 100% { opacity: 0; transform: translateY(12px) rotate(90deg); } }
@keyframes floatB { 0% { opacity: 0; transform: translateY(-12px) rotate(0deg); } 25% { opacity: .8; } 50% { transform: translateY(10px) rotate(-40deg); } 75% { opacity: .8; } 100% { opacity: 0; transform: translateY(-12px) rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { .lblock { display: none; } .lhero .l2 i { animation: none; } }

/* летящие портфели и бумаги */
.lflyers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.flyer { position: absolute; left: 0; will-change: transform, opacity; opacity: 0; }
.flyer svg { display: block; filter: drop-shadow(0 4px 6px rgba(28,47,74,.12)); }
@media (prefers-reduced-motion: reduce) { .lflyers { display: none; } }

@media (prefers-reduced-motion: reduce) { .lmark span, .lhero .l1, .lhero .l2, .laccent, .lmanifest, .lbtn, .lfoot, .lgrid, .lscene, .walker, .walker .wbob, .jib, .floorblk, .win-on { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; opacity: 1 !important; } }
