@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url("../fonts/sofia-sans-extra-condensed-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  font-style: normal;
  font-weight: 1 1000;
  font-display: swap;
  src: url("../fonts/sofia-sans-extra-condensed-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/golos-text-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}

:root {
  --cloth: #161b26;
  --cloth-soft: #232a38;
  --red: #c8161d;
  --gold: #f4b81a;
  --paper: #f5f6f8;
  --white: #fff;
  --ink: #1a1d24;
  --muted: #5b6270;
  --line: #d9dce2;
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --text: "Golos Text", system-ui, sans-serif;
  --lampas: 18px;
  --gutter: clamp(20px, 5vw, 88px);
  --measure: 1320px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding-left: var(--lampas);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Лампас: полосы герба идут по левому краю через всю страницу */
body::before {
  content: "";
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  width: var(--lampas);
  background: linear-gradient(to right, var(--red) 0 33.4%, var(--gold) 33.4% 66.6%, var(--red) 66.6%);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.92;
}

h2 {
  font-size: clamp(3.25rem, 8vw, 6.5rem);
}

h4 {
  margin: 0;
}

h3 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
}

ul,
ol,
dl,
dd,
p {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  padding-block: clamp(64px, 9vw, 128px);
}

.band-head {
  margin-bottom: clamp(32px, 5vw, 64px);
}

/* Обложка */
.cover {
  position: relative;

  --photo: clamp(280px, 60svh, 660px);

  display: flex;
  flex-direction: column;
  background: var(--cloth);
  color: var(--white);
  isolation: isolate;
}

.cover-photo {
  position: absolute;
  z-index: -2;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--photo);
  object-fit: cover;
  object-position: 50% 72%;
}

.cover::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgb(22 27 38 / 78%) 0,
    rgb(22 27 38 / 0%) 130px,
    rgb(22 27 38 / 0%) calc(var(--photo) - 170px),
    var(--cloth) var(--photo)
  );
}

.topbar {
  display: flex;
  justify-content: flex-end;
  padding-block: 22px;
}

.topbar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
}

.topbar a {
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 6px;
}

.topbar a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}

.cover-body {
  display: grid;
  grid-template-columns: clamp(92px, 12vw, 168px) 1fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  margin-top: calc(var(--photo) - 150px);
  padding-bottom: clamp(36px, 6vw, 80px);
}

.cover-arms {
  width: 100%;
  filter: drop-shadow(0 6px 18px rgb(0 0 0 / 45%));
}

.cover-title {
  min-width: 0;
  container-type: inline-size;
}

.cover h1 {
  font-size: min(13.4cqi, 10.5rem);
  font-weight: 900;
  line-height: 0.9;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* Кружки */
.place + .place {
  margin-top: clamp(56px, 7vw, 96px);
}

.place-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--ink);
}

.place-map {
  font-weight: 500;
  text-underline-offset: 5px;
}

.week {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.day {
  padding: 22px 18px 28px 0;
}

.day + .day {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.day-name {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}

.day li {
  margin-top: 18px;
}

.slot-time {
  display: block;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.slot-name {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.meets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
}

.meets > div {
  padding-block: 22px 28px;
}

.meets-name {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}

.meets p {
  max-width: 34em;
  margin-top: 12px;
}

.halls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px clamp(24px, 4vw, 64px);
  padding-top: 22px;
}

.halls dt {
  font-weight: 600;
}

.halls dd {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Календарь */
.calendar {
  background: var(--cloth);
  color: var(--white);
}

.calendar .band-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  align-items: end;
  justify-content: space-between;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 0.9375rem;
}

.legend li,
.event {
  position: relative;
  padding-left: 22px;
}

.legend li::before,
.event::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--red);
}

.legend .is-other::before,
.event.is-other::before {
  background: var(--gold);
  border-radius: 50%;
}

.month {
  display: grid;
  grid-template-columns: minmax(150px, 0.3fr) 1fr;
  gap: 12px 32px;
  padding-block: 28px;
  border-top: 1px solid var(--cloth-soft);
}

.month-name {
  color: var(--gold);
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
}

.event {
  display: grid;
  grid-template-columns: 7.5ch 1fr;
  gap: 0 20px;
  max-width: 62em;
}

.event + .event {
  margin-top: 14px;
}

.event-day {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Фото */
.shots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shots::after {
  content: "";
  flex-grow: 100000;
}

.shot {
  flex-grow: calc(var(--ratio) * 100);
  flex-basis: calc(var(--ratio) * 118px);
  overflow: hidden;
  background: var(--line);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.shot:hover img {
  transform: scale(1.04);
}

.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(14 17 24 / 96%);
  color: var(--white);
}

.viewer::backdrop {
  background: rgb(14 17 24 / 96%);
}

.viewer[open] {
  display: grid;
  place-items: center;
}

.viewer img {
  max-width: min(100vw - 32px, 1600px);
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}

.viewer button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 12%);
  color: inherit;
  font: 500 2rem/1 var(--text);
  cursor: pointer;
}

.viewer button:hover {
  background: var(--red);
}

.viewer-close {
  top: 16px;
  right: 16px;
}

.viewer-prev {
  top: 50%;
  left: 16px;
  translate: 0 -50%;
}

.viewer-next {
  top: 50%;
  right: 16px;
  translate: 0 -50%;
}

.viewer-count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  translate: -50% 0;
  font-variant-numeric: tabular-nums;
}

/* Контакты */
.contacts {
  background: var(--cloth);
  color: var(--white);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 64px);
}

.contacts h3 {
  margin-bottom: 16px;
  color: var(--gold);
}

.contacts li + li {
  margin-top: 10px;
}

.contacts a {
  text-decoration-color: rgb(255 255 255 / 40%);
  text-underline-offset: 5px;
}

.contacts a:hover {
  text-decoration-color: var(--gold);
}

.mail {
  font-family: var(--display);
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
}

.foot {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 24px;
  border-top: 1px solid var(--cloth-soft);
  color: rgb(255 255 255 / 70%);
  font-size: 0.9375rem;
}

.foot img {
  width: 34px;
}

@media (width <= 1000px) {
  .week {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .day:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  .day:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .contacts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width <= 680px) {
  :root {
    --lampas: 9px;
  }

  .topbar {
    justify-content: flex-start;
  }

  .topbar ul {
    gap: 6px 20px;
  }

  .cover-body {
    grid-template-columns: 1fr;
  }

  .cover-arms {
    width: 92px;
  }

  .week {
    grid-template-columns: 1fr;
  }

  .day,
  .day + .day {
    display: grid;
    grid-template-columns: 3.2ch 1fr;
    gap: 0 18px;
    align-items: start;
    padding: 18px 0 22px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .day:first-child {
    border-top: 0;
  }

  .day li:first-child {
    margin-top: 0;
  }

  .meets,
  .halls,
  .month,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .event {
    grid-template-columns: 6.5ch 1fr;
    gap: 0 12px;
  }

  .event-day {
    white-space: normal;
  }

  .shot {
    flex-basis: calc(var(--ratio) * 70px);
  }

  .viewer button {
    width: 46px;
    height: 46px;
  }

  .viewer-prev,
  .viewer-next {
    top: auto;
    bottom: 12px;
    translate: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .shot img {
    transition: none;
  }
}
