@font-face {
  font-family: "Mont";
  src: url("/fonts/montserrat.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8a8a8a;
  --line: #262626;
  --card: #0d0d0d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Mont", "Montserrat", "Arial", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- ЭКРАН ВХОДА ---------- */

.gate {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gate::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.07), transparent 55%);
  pointer-events: none;
}

.brand-small {
  font-size: 11px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.gate h1 {
  font-weight: 900;
  font-size: clamp(34px, 7.5vw, 92px);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  margin-bottom: 56px;
}

.gate h1 span { display: block; color: #4a4a4a; }

.gate form { width: 100%; max-width: 420px; position: relative; z-index: 1; }

.gate label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.pass-row { display: flex; gap: 10px; }

.gate input {
  flex: 1;
  min-width: 0;
  height: 56px;
  border: 0;
  border-radius: 0;
  background: var(--fg);
  color: #000;
  font: 600 18px "Mont", "Montserrat", Arial, sans-serif;
  padding: 0 18px;
  letter-spacing: .12em;
  outline: none;
}

.gate input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.25); }

.gate button {
  height: 56px;
  width: 64px;
  border: 1.5px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font-size: 22px;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.gate button:hover { background: var(--fg); color: #000; }

.gate .msg { min-height: 22px; margin-top: 16px; font-size: 13px; color: var(--muted); }

.shake { animation: shake .4s; }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.gate footer {
  position: absolute;
  bottom: 22px;
  left: 0; right: 0;
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #4d4d4d;
}

/* ---------- ГАЛЕРЕЯ ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px clamp(16px, 4vw, 48px);
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.topbar button {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.topbar button:hover { color: var(--fg); }

.hero {
  padding: clamp(56px, 10vw, 130px) clamp(16px, 4vw, 48px) clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}

.hero .kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.hero h1 {
  font-weight: 900;
  font-size: clamp(44px, 10.5vw, 170px);
  line-height: .88;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.hero h1 .outline { color: #4a4a4a; }

.hero-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: 40px;
}

.hero p { max-width: 460px; font-size: 15px; line-height: 1.55; color: #bdbdbd; }

.stat { text-align: right; }
.stat b { display: block; font-size: 44px; font-weight: 900; line-height: 1; }
.stat span { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 40px clamp(16px, 4vw, 48px) 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.section-head span { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg);
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .25em;
  margin-bottom: 16px;
  height: 22px;
  color: var(--muted);
}

.badge {
  display: none;
  background: var(--fg);
  color: #000;
  padding: 4px 8px;
  letter-spacing: .2em;
}
.card.leader .badge { display: inline-block; }

.photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--card);
  border: 0;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: filter .4s, transform .4s;
}

@media (hover: hover) {
  .card:hover .photo img { transform: scale(1.02); }
}

.card h3 {
  margin-top: 20px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: -.005em;
}

.card p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #a6a6a6;
  flex: 1;
}

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

.vote {
  flex: 1;
  height: 48px;
  border: 1.5px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font: 800 12px "Mont", "Montserrat", Arial, sans-serif;
  letter-spacing: .25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.vote:hover { background: rgba(255,255,255,.1); }
.vote.mine { background: var(--fg); color: #000; }
.vote:disabled { opacity: .35; cursor: default; }

.count { min-width: 56px; text-align: right; }
.count b { display: block; font-size: 24px; font-weight: 900; line-height: 1; }
.count span { font-size: 9px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }

.page-foot {
  padding: 40px clamp(16px, 4vw, 48px) 56px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #555;
}

/* ---------- ПРОСМОТР ФОТО ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 16px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .close {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 11px;
  letter-spacing: .3em;
  font-weight: 700;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--fg);
  color: #000;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
