@font-face {
  font-family: "Overpass";
  src: url("assets/Overpass.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --night: #080B12;
  --asphalt: #0E1420;
  --lane: #1B2130;
  --edge: #263049;
  --signal: #4C8DFF;
  --sign: #1F4FAF;
  --paint: #E6EAF2;
  --muted: #8792AB;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--night);
  color: var(--paint);
  font: 400 17px/1.6 "Overpass", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* подвал прижат к низу даже на короткой странице */
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: var(--signal); text-underline-offset: 3px; }
a:hover { color: #7FAEFF; }

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

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
/* узкие разделы стоят по той же левой линии, что и широкие, — просто короче строка */
.narrow > * { max-width: 760px; }

[hidden] { display: none !important; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--signal); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

/* ---------- шапка ---------- */

.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 11, 18, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lane);
}
.top-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand img { width: 120px; height: auto; }

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paint); background: var(--lane); }

.menu-btn {
  display: none; margin-left: auto;
  font: inherit; font-weight: 600; color: var(--paint);
  background: var(--lane); border: 1px solid var(--edge); border-radius: 6px; padding: 6px 14px;
}

/* ---------- первый экран ---------- */

.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8, 11, 18, .2), var(--night) 92%),
    url("assets/streets.jpg") center / cover no-repeat;
  padding: 88px 0 72px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }

h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 800; max-width: 13ch; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 750; margin-bottom: 28px; }
h3 { font-size: 20px; font-weight: 700; }

.lead { font-size: 20px; color: #C4CBDA; max-width: 34ch; margin: 22px 0 32px; }
.lead:empty { display: none; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  padding: 13px 22px 11px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
}
.btn-main { background: var(--signal); color: #fff; }
.btn-main:hover { background: #6AA0FF; color: #fff; }
.btn-line { color: var(--paint); border-color: var(--edge); background: rgba(14, 20, 32, .6); }
.btn-line:hover { color: var(--paint); border-color: var(--signal); }

/* дорожный указатель: главный элемент страницы */

.gantry { display: flex; flex-direction: column; align-items: center; }

.sign { position: relative; width: min(100%, 470px); padding-top: 30px; }

.sign-tab {
  position: absolute; top: 0; right: 28px;
  background: var(--sign); color: #fff;
  font-weight: 700; font-size: 15px; line-height: 1;
  padding: 9px 14px 8px;
  border: 3px solid #fff; border-bottom: 0; border-radius: 8px 8px 0 0;
  box-shadow: 0 0 0 3px var(--sign);
  clip-path: inset(-3px -3px 0 -3px);
}

.sign-face {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--sign);
  border-radius: 16px;
  padding: 26px 32px 24px;
  box-shadow:
    inset 0 0 0 4px var(--sign),
    inset 0 0 0 7px #fff,
    0 30px 60px -20px rgba(0, 0, 0, .7);
  color: #fff;
}
/* лёгкий блик светоотражающей плёнки */
.sign-face::after {
  content: ""; position: absolute; inset: 7px; border-radius: 10px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 45%);
}

.sign-kicker { font-weight: 600; font-size: 18px; opacity: .92; }
.sign-name { font-weight: 800; font-size: clamp(64px, 9vw, 104px); line-height: .95; margin-top: 6px; letter-spacing: -0.015em; }
.sign-rule { width: 100%; height: 4px; background: #fff; border-radius: 2px; margin: 18px 0 14px; }

.sign-addr {
  display: inline-flex; align-items: center; gap: 12px;
  font: inherit; font-weight: 700; font-size: clamp(20px, 2.6vw, 27px); color: #fff;
  background: none; border: 0; padding: 4px 6px; margin-left: -6px; border-radius: 6px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.sign-addr svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; opacity: .75; }
.sign-addr:hover { background: rgba(255, 255, 255, .12); }
.sign-addr:hover svg { opacity: 1; }
.sign-addr:focus-visible { outline-color: #fff; }

.posts { width: min(100%, 470px); display: flex; justify-content: space-between; padding: 0 22%; height: 46px; }
.posts i {
  width: 12px; height: 100%;
  background: linear-gradient(90deg, #5B6478, #9AA3B5 45%, #4A5265);
}

.countdown { margin: 18px 0 0; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; min-height: 1.6em; }
.countdown b { color: var(--paint); font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .sign { animation: hang .9s cubic-bezier(.2, .9, .3, 1.15) .15s both; transform-origin: 50% 100%; }
  @keyframes hang {
    from { opacity: 0; transform: translateY(-26px) rotate(-1.5deg); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- разделы ---------- */

.block { padding: 72px 0; border-top: 1px solid var(--lane); }
.intro { color: #C4CBDA; margin: -12px 0 28px; max-width: 64ch; }
.intro:empty { display: none; }

.empty {
  border: 1px dashed var(--edge); border-radius: var(--radius);
  padding: 26px 28px; color: var(--muted); max-width: 64ch;
}
.empty strong { display: block; color: var(--paint); font-size: 18px; margin-bottom: 4px; }
.empty p { margin: 0; }

/* как начать: настоящая последовательность — шаги пронумерованы */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps li {
  counter-increment: step;
  background: var(--asphalt); border: 1px solid var(--lane); border-radius: var(--radius);
  padding: 26px 26px 24px;
}
.steps li::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 8px; margin-bottom: 18px;
  background: var(--sign); color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 4px #fff;
}
.steps p { color: #C4CBDA; margin: 8px 0 0; }

/* новости */
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  background: var(--asphalt); border: 1px solid var(--lane); border-radius: var(--radius);
  padding: 0; overflow: hidden;
}
.card:hover { border-color: var(--edge); }
.card:hover h3 { color: #7FAEFF; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--lane); }
.card-body { padding: 18px 22px 22px; }
.card-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.tag { background: rgba(76, 141, 255, .14); color: #9DBEFF; font-weight: 600; padding: 2px 9px 1px; border-radius: 99px; }
.card p { color: #C4CBDA; margin: 10px 0 0; }

/* правила и регламент */
.rules { display: grid; gap: 12px; }
.rule {
  background: var(--asphalt); border: 1px solid var(--lane); border-radius: var(--radius);
}
.rule > summary {
  cursor: pointer; list-style: none;
  display: flex; gap: 14px; align-items: baseline;
  padding: 18px 22px; font-weight: 700; font-size: 19px;
}
.rule > summary::-webkit-details-marker { display: none; }
.rule-no { color: var(--signal); font-variant-numeric: tabular-nums; min-width: 1.4em; }
.rule ol { margin: 0; padding: 0 22px 20px; list-style: none; }
.rule li { display: grid; grid-template-columns: 3.2em 1fr; gap: 6px; padding: 8px 0; border-top: 1px solid var(--lane); color: #D2D8E4; }
.rule li span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* вопросы */
.faq { display: grid; gap: 10px; }
.faq details { border-bottom: 1px solid var(--lane); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 14px 40px 14px 0; font-weight: 700; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 18px; color: #C4CBDA; max-width: 64ch; }

/* команда */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.team li { display: flex; gap: 14px; align-items: center; background: var(--asphalt); border: 1px solid var(--lane); border-radius: var(--radius); padding: 16px; }
.avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center; background: var(--sign); color: #fff; font-weight: 800; font-size: 22px;
}
.team b { display: block; font-size: 17px; }
.team span { color: var(--muted); font-size: 15px; }

/* вакансии */
.jobs { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.jobs li { background: var(--asphalt); border: 1px solid var(--lane); border-radius: var(--radius); padding: 18px 22px; }
.job-head { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.job-state { flex: none; font-size: 14px; font-weight: 700; color: #7EE2A8; }
.job-state.closed { color: var(--muted); }
.jobs p { margin: 6px 0 0; color: #C4CBDA; }

/* отдельная страница */
.page { padding: 64px 0 80px; min-height: 60vh; }
.page h1 { max-width: none; font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 28px; }

/* подвал */
.foot { border-top: 1px solid var(--lane); background: var(--asphalt); padding: 34px 0; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--paint); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--signal); }
.fine { margin: 0 0 0 auto; color: var(--muted); font-size: 14px; }

/* новость целиком */
.reader {
  width: min(760px, 100% - 24px); max-height: calc(100% - 48px);
  padding: 0; border: 1px solid var(--edge); border-radius: 14px;
  background: var(--asphalt); color: var(--paint);
}
.reader::backdrop { background: rgba(4, 6, 10, .78); }
.reader-close { position: sticky; top: 0; z-index: 1; height: 0; display: flex; justify-content: flex-end; align-items: flex-start; }
.reader-close button { margin: 12px;
  font: inherit; font-weight: 700; font-size: 14px; color: #fff; cursor: pointer;
  background: rgba(8, 11, 18, .8); border: 1px solid var(--edge); border-radius: 6px; padding: 7px 12px 5px;
}
.reader article:focus { outline: none; }
.reader article > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.reader .reader-text { padding: 26px 34px 34px; }
.reader h2 { margin: 6px 0 18px; }
.reader p { color: #D2D8E4; margin: 0 0 14px; }
.reader ul { margin: 0 0 14px; padding-left: 22px; color: #D2D8E4; }
.reader li { margin-bottom: 6px; }
.reader .gallery { display: grid; gap: 10px; margin: 18px 0; }
.reader .gallery img { border-radius: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--paint); color: var(--night); font-weight: 700;
  padding: 11px 18px 9px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- узкие экраны ---------- */

@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; gap: 0; padding: 8px 20px 16px;
    background: var(--night); border-bottom: 1px solid var(--lane);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 17px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .block { padding: 56px 0; }
  .sign-face { padding: 22px 22px 20px; }
  .sign-tab { right: 18px; font-size: 14px; }
  .lead { font-size: 18px; }
  .fine { margin-left: 0; }
  .reader .reader-text { padding: 22px 20px 26px; }
}

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