/* Вход (login.html) и выбор отдела (landing.html).
   Фирменный синий сайта zavodpirs.ru: #4B89E0. Шрифты - системные (без интернета).
   Тема: переменные base.html (--bg-card, --text-primary ...) + [data-theme]. */

:root {
  --pirs: #4b89e0;
  --pirs-deep: #2f6fd6;        /* кнопки: белый текст, контраст >= 4.5 */
  --pirs-night: #0a1f4a;
  --pirs-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ====================================================================== */
/* ВХОД                                                                   */
/* ====================================================================== */
.pl-body *, .pl-body *::before, .pl-body *::after { box-sizing: border-box; }
.pl-body h1, .pl-body p { margin-top: 0; }
body.pl-body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--pirs-font); color: #fff;
  background: var(--pirs-night);
  display: block; overflow-x: hidden;
}
.pl-stage {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; isolation: isolate;
}
.pl-media, .pl-media video, .pl-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.pl-poster { background: var(--pirs-night) center / cover no-repeat; }
.pl-media video { opacity: 0; transition: opacity 1.2s ease; }
.pl-media video.is-playing { opacity: 1; }
.pl-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(6, 22, 60, .93) 0%, rgba(10, 38, 96, .78) 45%, rgba(16, 52, 120, .55) 100%),
    linear-gradient(0deg, rgba(5, 16, 44, .65), transparent 40%);
}
.pl-main {
  flex: 1; display: flex; align-items: center;
  padding: 2rem clamp(1rem, 7vw, 7rem);
}
.pl-card {
  width: 100%; max-width: 430px;
  padding: 2rem 2rem 1.75rem;
  border-radius: 22px;
  background: rgba(10, 28, 70, .58);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 24px 70px rgba(0, 8, 30, .55);
  animation: pl-rise .7s cubic-bezier(.2, .7, .2, 1) both;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pl-card { background: rgba(10, 28, 70, .93); }
}
@keyframes pl-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.pl-logo { height: 40px; width: auto; display: block; margin-bottom: 1.25rem; }
.pl-title { font-size: 2rem; font-weight: 700; letter-spacing: -.01em; margin: 0; color: #fff; }
.pl-sub { margin: .15rem 0 0; color: #fff; opacity: .85; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.pl-tag { margin: .5rem 0 1.4rem; color: #d3e1fa; font-size: .95rem; line-height: 1.4; }
.pl-hint {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .6rem .8rem; margin-bottom: 1.1rem; border-radius: 12px;
  background: rgba(75, 137, 224, .22); border: 1px solid rgba(147, 188, 245, .4);
  color: #e6efff; font-size: .85rem; line-height: 1.35;
}
.pl-hint i { font-size: 1.15rem; color: #a9c9fb; }
.pl-hint code { color: #fff; background: rgba(255, 255, 255, .14); padding: 0 .3rem; border-radius: 4px; }
.pl-alert {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .7rem .9rem; margin-bottom: 1.1rem; border-radius: 12px;
  background: rgba(255, 255, 255, .96); color: #1e293b; font-size: .92rem;
  border-left: 5px solid #2f6fd6; animation: pl-rise .4s ease both;
}
.pl-alert.is-danger { border-left-color: #c62828; }
.pl-alert.is-danger i { color: #c62828; }
.pl-alert.is-success { border-left-color: #1b7f3b; }
.pl-alert.is-success i { color: #1b7f3b; }
.pl-alert.is-warning { border-left-color: #b26a00; }
.pl-alert.is-warning i { color: #b26a00; }
.pl-alert i { margin-top: .1rem; color: #2f6fd6; }
.pl-label { display: block; margin: 0 0 .35rem; font-size: .85rem; font-weight: 600; color: #e1ecff; }
.pl-field { position: relative; margin-bottom: 1rem; }
.pl-input {
  width: 100%; padding: .75rem 1rem; font-size: 1rem; font-family: inherit;
  border-radius: 12px; border: 2px solid transparent;
  background: rgba(255, 255, 255, .96); color: #1e293b;
  transition: border-color .2s, box-shadow .2s;
}
.pl-input::placeholder { color: #64748b; }
.pl-input:focus { outline: none; border-color: var(--pirs); box-shadow: 0 0 0 4px rgba(75, 137, 224, .35); }
.pl-eye {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: 10px;
  background: transparent; color: #475569; cursor: pointer;
}
.pl-eye:hover { color: var(--pirs-deep); }
.pl-eye:focus-visible { outline: 3px solid var(--pirs); }
.pl-field .pl-input.has-eye { padding-right: 3rem; }
.pl-check { display: flex; align-items: center; gap: .55rem; color: #e1ecff; font-size: .9rem; cursor: pointer; }
.pl-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--pirs); }
.pl-btn {
  width: 100%; margin-top: 1.25rem; padding: .85rem 1rem;
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  border: 0; border-radius: 12px; cursor: pointer;
  font: 600 1rem/1.2 var(--pirs-font); color: #fff; background: var(--pirs-deep);
  box-shadow: 0 6px 18px rgba(47, 111, 214, .5);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.pl-btn:hover { background: #3b7be4; transform: translateY(-1px); }
.pl-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; animation: pl-breathe 2.4s ease-in-out infinite; }
.pl-btn:active { transform: none; }
@keyframes pl-breathe {
  0%, 100% { box-shadow: 0 6px 18px rgba(47, 111, 214, .5), 0 0 0 0 rgba(75, 137, 224, .55); }
  50% { box-shadow: 0 6px 18px rgba(47, 111, 214, .5), 0 0 0 10px rgba(75, 137, 224, 0); }
}
.pl-foot {
  padding: 1rem clamp(1rem, 7vw, 7rem) 1.25rem;
  font-size: .8rem; color: #cfdcf3; display: flex; flex-wrap: wrap; gap: .25rem .9rem;
}
.pl-foot a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.pl-foot a:hover { color: #bcd5fb; }
@media (max-width: 767.98px) {
  .pl-main { padding: 1.25rem 1rem; align-items: flex-start; justify-content: center; }
  .pl-card { padding: 1.5rem 1.25rem; margin-top: 1rem; }
  .pl-title { font-size: 1.65rem; }
  .pl-foot { justify-content: center; text-align: center; }
  .pl-media video { display: none; }
}
@media (max-width: 360px) { .pl-card { padding: 1.25rem 1rem; } }

/* ====================================================================== */
/* ВЫБОР ОТДЕЛА                                                           */
/* ====================================================================== */
.lp { max-width: 1320px; margin: 0 auto; font-family: var(--pirs-font); }

/* --- шапка-герой --- */
.lp-hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  border-radius: 22px; padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--pirs-night) center / cover no-repeat;
  box-shadow: var(--shadow-md);
  animation: pl-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.lp-hero video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: -2; opacity: 0; transition: opacity 1.2s ease;
}
.lp-hero video.is-playing { opacity: 1; }
.lp-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(6, 22, 60, .92), rgba(10, 38, 96, .75) 55%, rgba(16, 52, 120, .5)),
    linear-gradient(0deg, rgba(5, 16, 44, .55), transparent 50%);
}
.lp-kicker { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #c9dcfa; margin: 0 0 .4rem; }
.lp-hello { font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 700; margin: 0; letter-spacing: -.01em; color: #fff; }
.lp-date { margin: .3rem 0 0; color: #d3e1fa; font-size: 1rem; }
.lp-lead { margin: .9rem 0 0; color: #e8f0ff; font-size: 1.02rem; max-width: 46ch; }
.lp-hero-row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: flex-end; justify-content: space-between; }
.lp-hero-tools { flex: 1 1 360px; max-width: 520px; display: grid; gap: .8rem; }
.lp-search {
  display: flex; align-items: center; gap: .4rem; padding: .35rem .35rem .35rem 1rem;
  border-radius: 14px; background: rgba(255, 255, 255, .97); color: #1e293b;
  box-shadow: 0 8px 24px rgba(0, 8, 30, .35);
  border: 2px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.lp-search:focus-within { border-color: var(--pirs); box-shadow: 0 0 0 4px rgba(75, 137, 224, .4); }
.lp-search i { color: #475569; }
.lp-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: 0;
  font: 1rem var(--pirs-font); color: #1e293b; padding: .55rem 0;
}
.lp-search input::placeholder { color: #64748b; }
.lp-search kbd {
  background: #e8eef8; color: #334155; border: 1px solid #c5d3ea; border-radius: 6px;
  padding: 0 .4rem; font-size: .75rem;
}
.lp-search button, .lp-continue {
  border: 0; border-radius: 10px; font: 600 .95rem var(--pirs-font); color: #fff;
  background: var(--pirs-deep); padding: .6rem 1.1rem; text-decoration: none; cursor: pointer;
  transition: background .2s, transform .2s;
}
.lp-search button:hover, .lp-continue:hover { background: #3b7be4; color: #fff; transform: translateY(-1px); }
.lp-continue {
  display: inline-flex; align-items: center; gap: .55rem; justify-self: start;
  padding: .7rem 1.2rem; border-radius: 12px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lp-continue:hover { background: rgba(255, 255, 255, .28); }
.lp-continue:focus-visible, .lp-search button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* --- заголовок раздела --- */
.lp-h2 { font-size: 1.35rem; font-weight: 700; margin: 2.2rem 0 .3rem; color: var(--text-primary); }
.lp-sub { color: var(--text-secondary); margin: 0 0 1.2rem; }

/* --- карточки отделов --- */
.lp-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.lp-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 270px; overflow: hidden; isolation: isolate; border-radius: 18px;
  color: #fff; background: var(--pirs-night);
  border: 2px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  animation: pl-rise .55s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.lp-card img.lp-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: -2; transition: transform .6s ease;
}
.lp-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7, 24, 62, .38) 0%, rgba(7, 24, 62, .62) 40%, rgba(5, 16, 44, .95) 78%);
}
.lp-card:hover, .lp-card:focus-within {
  transform: translateY(-5px); border-color: var(--pirs);
  box-shadow: 0 14px 34px rgba(30, 80, 170, .35);
}
.lp-card:hover img.lp-photo { transform: scale(1.05); }
.lp-card-top { position: absolute; top: .9rem; left: 1rem; right: 1rem; display: flex; justify-content: space-between; align-items: center; }
.lp-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 1.45rem; color: #fff; background: var(--pirs-deep);
  box-shadow: 0 4px 14px rgba(0, 10, 40, .4);
}
.lp-num {
  min-width: 1.7rem; height: 1.7rem; padding: 0 .4rem; border-radius: 8px;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .45);
}
.lp-card-body { padding: 1rem 1.1rem 1.1rem; }
.lp-card h3 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .25rem; color: #fff; }
.lp-card h3 a { color: inherit; text-decoration: none; }
.lp-card h3 a:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 6px; }
.lp-note { margin: 0 0 .5rem; color: #e1ecfd; font-size: .93rem; line-height: 1.35; }
.lp-meta { margin: 0 0 .7rem; color: #c9dcfa; font-size: .8rem; }
.lp-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; position: relative; z-index: 2; }
.lp-chips a {
  display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem;
  border-radius: 999px; font-size: .8rem; text-decoration: none; color: #fff;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  transition: background .2s, border-color .2s;
}
.lp-chips a:hover { background: var(--pirs-deep); border-color: #a9c9fb; color: #fff; }
.lp-chips a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* --- что мы производим --- */
.lp-prod { position: relative; overflow: hidden; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border-color); padding: 1rem 0; }
.lp-track { display: flex; width: max-content; animation: lp-marquee 48s linear infinite; }
.lp-prod:hover .lp-track { animation-play-state: paused; }
.lp-prod-item { flex: 0 0 auto; width: 260px; margin: 0 1rem; text-align: center; }
.lp-prod-item img { width: 100%; height: auto; display: block; }
.lp-prod-item figcaption { margin-top: .2rem; font-weight: 600; color: var(--text-primary); }
@keyframes lp-marquee { to { transform: translateX(-50%); } }
.lp-prod::before, .lp-prod::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 1; pointer-events: none;
}
.lp-prod::before { left: 0; background: linear-gradient(90deg, var(--bg-secondary), transparent); }
.lp-prod::after { right: 0; background: linear-gradient(-90deg, var(--bg-secondary), transparent); }

/* --- подвал --- */
.lp-foot {
  margin-top: 2.2rem; padding: 1.2rem 0 .4rem; border-top: 1px solid var(--border-color);
  display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between;
  color: var(--text-secondary); font-size: .88rem;
}
.lp-foot img { height: 28px; width: auto; }

@media (max-width: 575.98px) {
  .lp-hero { border-radius: 16px; }
  .lp-grid { grid-template-columns: 1fr; }
  .lp-card { min-height: 240px; }
  .lp-prod-item { width: 200px; }
  .lp-search kbd { display: none; }
}

/* Меньше движения: без видео-анимации, карточки без подъёма, лента - сетка. */
@media (prefers-reduced-motion: reduce) {
  .pl-card, .lp-hero, .lp-card, .pl-alert { animation: none !important; }
  .lp-card, .lp-card img.lp-photo, .pl-btn { transition: none !important; }
  .lp-card:hover, .lp-card:focus-within { transform: none; }
  .lp-card:hover img.lp-photo { transform: none; }
  .lp-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .lp-track [aria-hidden="true"] { display: none; }
  .lp-prod::before, .lp-prod::after { display: none; }
  .pl-btn:focus-visible { animation: none; }
}
