/* Швейная фабрика «Перспектива» — та же сетка и приёмы, что у сайта ЛШФ
   (сайты группы — родственники), но в цветах знака «Перспективы»:
   синий #264488 — основной, оранжевый #EE741D — акцент и целевые кнопки.
   Сквозной приём — косой срез, как у ЛШФ. */
:root {
  /* фирменные — из logo.svg со старого perspex.ru */
  --blue: #264488;
  --orange: #EE741D;
  --blue-2: #1C3570;
  --blue-d: #14234A;
  --blue-l: #EEF2FA;
  --sky: #C9D6EE;
  --orange-d: #C95E10;
  --ink: #18202F;
  --muted: #566074;
  --line: #DFE4EE;
  --bg: #FFFFFF;
  --bg-2: #F5F7FB;
  --r: 14px;
  --wrap: 1200px;
  --slant: 56px;
  --gutter: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font: 400 17px/1.6 Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; }
h2 { font-size: clamp(30px, 3.8vw, 48px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
/* надзаголовок с оранжевой косой чертой — как мазок в знаке */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700; color: var(--blue);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px;
}
.kicker::before { content: ""; width: 9px; height: 18px; background: var(--orange); transform: skewX(-22deg); flex: none; }
.lead { font-size: 19px; color: var(--muted); max-width: 720px; }
.small { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
section { padding: 96px 0; }
section.alt { background: var(--bg-2); }
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; align-items: end; margin-bottom: 40px; }
.head h2, .head .lead { margin-bottom: 0; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center; text-align: center;
  padding: 15px 26px; border-radius: 10px; border: 2px solid transparent;
  font: 600 16px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--orange); color: #fff; }
.btn-main:hover { background: var(--orange-d); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-line { border-color: var(--blue); color: var(--blue); background: none; }
.btn-line:hover { background: var(--blue); color: #fff; }

/* Верхняя строка и шапка */
.bar { background: var(--blue-d); color: #C3CDE2; font-size: 14px; }
.bar .wrap { display: flex; gap: 24px; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.bar a { color: #fff; text-decoration: none; }
.bar .wrap > div { display: flex; gap: 20px; flex-wrap: wrap; }
header.top {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 40px; width: auto; }
nav.menu { display: flex; gap: 24px; margin-left: auto; }
nav.menu a { color: var(--ink); text-decoration: none; font-size: 16px; }
nav.menu a:hover { color: var(--blue); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 6px; }
header.top .btn { padding: 10px 18px; font-size: 15px; }
.menu-cta, .menu-tel { display: none; }
.burger { display: none; margin-left: auto; background: none; border: 0; color: var(--blue); font-size: 28px; cursor: pointer; padding: 6px; }

/* Первый экран: текст на тёмно-синем, цех справа за косым срезом */
.hero {
  position: relative; padding: 0; background: var(--blue-d); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: min(680px, calc(100vh - 110px));
}
.hero-text { position: relative; z-index: 2; padding: 96px 120px 120px var(--gutter); align-self: center; }
.hero .kicker { color: #FFB27A; }
.hero h1 { max-width: 640px; }
.hero .lead { color: #D3DBEC; max-width: 600px; }
.hero .act { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.trust { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 15px; color: #B9C5DE; }
.trust li { display: flex; gap: 10px; align-items: center; }
.trust li::before { content: ""; width: 8px; height: 16px; background: var(--orange); transform: skewX(-22deg); flex: none; }
.hero-photo {
  position: relative; margin-left: -100px;
  background: var(--orange);
  clip-path: polygon(100px 0, 100% 0, 100% 100%, 0 100%);
}
.hero-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% center;
  clip-path: polygon(120px 0, 100% 0, 100% 100%, 20px 100%);
}

/* Факты */
.facts { padding: 0; position: relative; z-index: 3; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); transform: translateY(-56px); margin-bottom: -56px; }
.fact { background: #fff; padding: 28px 26px; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(20,35,74,.08); }
.fact + .fact { border-left: 0; }
.fact:first-child { border-radius: var(--r) 0 0 var(--r); }
.fact:last-child { border-radius: 0 var(--r) var(--r) 0; }
.fact b { display: block; font-size: 30px; font-weight: 800; color: var(--blue); line-height: 1.1; margin-bottom: 8px; white-space: nowrap; }
.fact span { color: var(--muted); font-size: 15px; line-height: 1.45; display: block; }

/* Фото в карточках */
.ph {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  display: flex; align-items: flex-end; min-height: 220px;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ph:hover img { transform: scale(1.03); }

/* О фабрике */
.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about-photos figure { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--bg-2); }
.about-photos img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about-photos .ap-main { grid-column: 1 / -1; }

/* Продукция: фото костюмов на белом фоне — целиком, без обрезки */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(20,35,74,.12); }
.card .ph { border-radius: 0; min-height: 0; aspect-ratio: 570 / 560; background: #fff; }
.card .ph img { object-fit: contain; object-position: center top; }
.card .body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; border-top: 1px solid var(--line); }
.card p { color: var(--muted); font-size: 16px; margin-bottom: .6em; }
.card .prot { margin: auto 0 0; padding-top: 12px; font-size: 14px; color: var(--blue); display: flex; gap: 10px; align-items: baseline; }
.card .prot::before { content: ""; width: 7px; height: 13px; background: var(--orange); transform: skewX(-22deg); flex: none; }
.catalog {
  margin-top: 28px; background: var(--blue); color: #fff; border-radius: var(--r); padding: 30px 34px;
  display: flex; gap: 24px 40px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.catalog::before { content: ""; position: absolute; top: 0; right: 30%; width: 22px; height: 100%; background: var(--orange); transform: skewX(-22deg); }
.catalog > * { position: relative; }
.catalog > div { flex: 1 1 420px; }
.catalog h3 { margin-bottom: 6px; }
.catalog p { color: #D3DBEC; margin: 0; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chips span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 500; }
.note { margin-top: 22px; font-size: 15px; color: var(--muted); }

/* Производство */
.wide-photo { margin: 0 0 28px; border-radius: var(--r); overflow: hidden; background: var(--bg-2); }
.wide-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 55%; }
.wide-photo figcaption { font-size: 14px; color: var(--muted); padding: 12px 16px 14px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 56px; counter-reset: s; }
.step { border-top: 3px solid var(--blue); padding-top: 18px; }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font-weight: 800; font-size: 30px; color: var(--orange); margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 16px; margin: 0; }

/* Работа */
.jobs { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.perks { display: grid; gap: 14px; margin-top: 28px; }
.perks .ph { min-height: 0; aspect-ratio: 3 / 2; }
.job { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--orange); border-radius: var(--r); padding: 32px; position: sticky; top: 100px; }
.badge { display: inline-block; background: var(--blue-l); color: var(--blue); font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .04em; }
.job h3 { font-size: 28px; }
.vac { list-style: none; padding: 0; margin: 6px 0 24px; display: grid; gap: 0; }
.vac li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.vac li:last-child { border-bottom: 0; }
.vac b { font-size: 18px; }
.vac span { color: var(--muted); font-size: 15px; }
.job .btn { width: 100%; margin-top: 10px; }

/* Тёмная секция с косым срезом сверху */
.cut { clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%); padding-top: calc(96px + var(--slant)); margin-top: calc(var(--slant) * -1); }
.dark { background: var(--blue-d); color: #fff; position: relative; z-index: 1; }
.dark .kicker { color: #FFB27A; }
.dark .lead { color: #D3DBEC; }

/* События */
.event { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: center; }
.ev-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ev-photos figure { margin: 0; border-radius: var(--r); overflow: hidden; }
.ev-photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ev-photos .ev-main { grid-column: 1 / -1; }

/* Группа */
.group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.fab { position: relative; overflow: hidden; border-radius: var(--r); padding: 28px; border: 1px solid var(--line); border-top: 5px solid var(--brand, var(--line)); background: #fff; text-decoration: none; color: var(--ink); display: block; transition: transform .15s, box-shadow .15s; }
a.fab:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(20,35,74,.12); border-color: var(--brand); }
.fab small { color: var(--muted); font-size: 14px; }
.fab h3 { margin: 6px 0 8px; }
.fab p { color: var(--muted); font-size: 16px; margin: 0 0 14px; }
.fab .go { font-weight: 600; color: var(--brand); }
/* каждая фабрика — в своих фирменных цветах, как на сайте ЛШФ */
.fab-ini { --brand: #0f2238; --brand-2: #c8501c; }
.fab-lshf { --brand: #834CB1; --brand-2: #DECDFA; }
.fab.me { --brand: var(--blue); --brand-2: var(--orange); }
.fab-logo { display: flex; align-items: center; gap: 10px; height: 84px; margin-bottom: 18px; color: var(--brand); }
.fab-logo img { height: 40px; width: auto; max-width: 100%; }
.fab-logo svg { height: 56px; width: auto; flex: none; }
.fab-logo b { font-size: 15px; letter-spacing: .12em; font-weight: 800; }
a.fab .go::after { content: ""; display: block; width: 36px; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--brand-2); transition: width .2s; }
a.fab:hover .go::after { width: 72px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.cinfo dl { margin: 24px 0 0; display: grid; grid-template-columns: 130px 1fr; gap: 12px 16px; }
.cinfo dt { color: var(--muted); }
.cinfo dd { margin: 0; font-weight: 500; }
.map { margin-top: 26px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); height: 300px; background: var(--bg-2); }
.map iframe { width: 100%; height: 100%; border: 0; }
.req { background: var(--blue-d); color: #fff; border-radius: var(--r); padding: 34px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.req::before { content: ""; position: absolute; top: 0; right: 56px; width: 22px; height: 100%; background: var(--blue); transform: skewX(-22deg); }
.req > * { position: relative; }
.req h3 { font-size: 28px; margin: 0; }
.req p { color: #C3CDE2; font-size: 16px; margin: 0; }
.req-list { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 8px; color: #DCE3F1; font-size: 16px; }
.req-list li { display: flex; gap: 10px; align-items: baseline; }
.req-list li::before { content: ""; width: 7px; height: 13px; background: var(--orange); transform: skewX(-22deg); flex: none; }
.req .btn { width: 100%; }

/* Подвал */
footer.site { background: var(--blue-d); color: #A9B6D1; font-size: 14px; padding: 44px 0; }
footer.site .wrap { display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; }
footer.site a { color: #fff; }
footer.site .brand img { height: 36px; }

/* Фото костюмов крупно */
a.zoom { cursor: zoom-in; }
a.zoom::after {
  content: ""; position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 22px no-repeat;
  opacity: .85; transition: opacity .2s, transform .2s;
}
a.zoom:hover::after, a.zoom:focus-visible::after { opacity: 1; transform: scale(1.08); }
.lb { border: 0; padding: 0; border-radius: var(--r); max-width: min(920px, calc(100vw - 32px)); width: 100%; max-height: calc(100vh - 32px); overflow: auto; background: #fff; color: var(--ink); }
.lb::backdrop { background: rgba(20,35,74,.78); }
.lb[open] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
.lb img { width: 100%; height: 100%; max-height: calc(100vh - 32px); object-fit: contain; background: #fff; }
.lb-cap { padding: 48px 36px 36px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-left: 1px solid var(--line); }
.lb-cap h3 { font-size: 28px; }
.lb-cap p { color: var(--muted); margin-bottom: 20px; }
.lb-close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg-2); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; z-index: 1; }
.lb-close:hover { background: var(--line); }
@media (max-width: 640px) {
  .lb[open] { grid-template-columns: 1fr; }
  .lb img { max-height: 60vh; }
  .lb-cap { border-left: 0; border-top: 1px solid var(--line); padding: 20px; }
  .lb-cap h3 { font-size: 22px; }
  .lb-cap .btn { width: 100%; }
}

/* Появление при прокрутке; без JS и при отключённой анимации всё видно сразу */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .ph img, .card, a.fab { transition: none; }
}

/* Адаптив */
@media (max-width: 1100px) {
  nav.menu, header.top .btn { display: none; }
  .burger { display: block; }
  nav.menu.open {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; padding: 8px 24px 20px; box-shadow: 0 12px 24px rgba(20,35,74,.12);
  }
  nav.menu.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  nav.menu.open .menu-cta { display: flex; justify-content: center; margin-top: 16px; padding: 14px; border: 0; border-radius: 10px; background: var(--orange); color: #fff; font-weight: 600; text-decoration: none; }
  nav.menu.open .menu-tel { display: block; text-align: center; border: 0; color: var(--blue); font-weight: 600; }
}
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding: 64px 24px 96px; order: 2; max-width: 860px; }
  .hero-photo { margin-left: 0; height: clamp(240px, 40vw, 420px); order: 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 40px)); }
  .hero-photo img { clip-path: none; }
}
@media (max-width: 1020px) {
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact, .fact:first-child, .fact:last-child { border-radius: 0; border-left: 1px solid var(--line); }
  .head { grid-template-columns: 1fr; }
  .story, .jobs, .contacts, .event { grid-template-columns: 1fr; gap: 32px; }
  .job { position: static; }
  .cards, .group { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  :root { --slant: 32px; }
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .cut { padding-top: calc(64px + var(--slant)); }
  .bar .wrap > div:last-child span { display: none; }
  .bar .wrap { padding-top: 0; padding-bottom: 0; }
  .bar a { display: inline-block; padding: 10px 0; }
  .brand img { height: 32px; }
  .hero-photo { height: 200px; }
  .hero-text { padding: 40px 16px 88px; }
  .hero .act .btn { width: 100%; }
  .trust { margin-top: 28px; }
  .facts .wrap { transform: translateY(-40px); margin-bottom: -40px; }
  .fact { padding: 18px 16px; }
  .fact b { font-size: 22px; }
  .cards, .group, .steps { grid-template-columns: 1fr; }
  .fab { padding: 22px 20px; }
  .fab-logo { height: 48px; margin-bottom: 12px; }
  .fab-logo svg { height: 44px; }
  .fab-logo img { height: 34px; }
  .card .ph { aspect-ratio: 4 / 3; }
  .catalog { padding: 24px 20px; }
  .catalog::before { display: none; }
  .catalog .btn { width: 100%; }
  .wide-photo img { aspect-ratio: 4 / 3; }
  .job { padding: 24px 20px; }
  .cinfo dl { grid-template-columns: 1fr; gap: 2px; }
  .cinfo dd { margin-bottom: 10px; }
  .req { padding: 24px 18px; }
}
@media (max-width: 400px) {
  .brand img { height: 28px; }
  .bar .wrap { justify-content: center; }
  .bar .wrap > div:first-child { display: none; }
}
