@font-face {
    font-family: Prata;
    src: url("prata-latin.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: Prata;
    src: url("prata-cyrillic.woff2") format("woff2");
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Golos Text";
    src: url("golos-text-latin.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
}

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

:root {
    color-scheme: light;
    --paper: #f8f4ec;
    --card: #fffaf3;
    --ink: #29211f;
    --quiet: #655650;
    --accent: #87412c;
    --accent-hover: #6d3221;
    --wine: #432720;
    --rose: #edccba;
    --line: #ded0c2;
    --focus: #ab593b;
    --display: Prata, Georgia, serif;
    --body: "Golos Text", Arial, sans-serif;
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem/1.6 var(--body);
}

::selection { background: var(--rose); color: var(--wine); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }

h1, h2 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -.033em;
    text-wrap: balance;
}

h2 { font-size: clamp(2.15rem, 3.8vw, 3.6rem); }

.wrap {
    width: min(1240px, calc(100% - 104px));
    margin-inline: auto;
}

.skip {
    position: fixed;
    z-index: 20;
    top: 12px;
    left: 12px;
    padding: 10px 20px;
    background: var(--card);
    transform: translateY(calc(-100% - 20px));
}

.skip:focus { transform: none; }

.site-header {
    position: sticky;
    z-index: 10;
    top: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.header-inner, .footer-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    color: var(--wine);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.04em;
    white-space: nowrap;
}

.brand-mark {
    position: relative;
    width: 23px;
    height: 17px;
    border: 1.5px solid var(--accent);
    border-radius: 3px;
    transform: rotate(-12deg);
}

.brand-mark::after {
    position: absolute;
    top: 2px;
    right: 6px;
    bottom: 2px;
    border-left: 1px dashed var(--accent);
    content: "";
}

.site-header nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 42px); }
.site-header nav a, .footer-credit, .clear-filters {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: .3em;
    transition: text-decoration-color 160ms ease;
}

.site-header nav a:hover, .footer-credit:hover, .clear-filters:hover { text-decoration-color: currentColor; }

.hero {
    display: grid;
    align-items: center;
    min-height: calc(100svh - 75px);
    padding-block: 74px 85px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 6vw, 102px);
}

.hero h1 {
    font-size: clamp(3.35rem, 6vw, 5.75rem);
    text-wrap: initial;
}

.hero h1 em {
    display: block;
    color: var(--accent);
    font-style: normal;
}

.hero-copy p {
    max-width: 37ch;
    margin-block: 28px 32px;
    color: var(--quiet);
    font-size: clamp(1.02rem, 1.44vw, 1.18rem);
}

.hero-photo, .tickets-photo { overflow: hidden; background: var(--wine); }

.hero-photo {
    border-radius: clamp(80px, 11vw, 175px) 8px 8px 8px;
}

.hero-photo img {
    width: 100%;
    height: clamp(390px, 44vw, 582px);
    object-fit: cover;
    object-position: 54% 50%;
}

.hero-photo img, .tickets-photo img { transition: transform 650ms cubic-bezier(.2, .75, .3, 1); }
.hero-photo:hover img, .tickets-photo:hover img { transform: scale(1.025); }

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    min-height: 54px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: .9rem;
    font-weight: 650;
    white-space: nowrap;
    transition: background-color 160ms ease, transform 180ms ease;
}

.button:hover { background: var(--accent-hover); transform: translateY(-2px); }
.button:active { transform: translateY(1px); }

.arrow {
    position: relative;
    width: 14px;
    height: 1px;
    background: currentColor;
}

.arrow::after {
    position: absolute;
    top: -3px;
    right: 0;
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.arrow-down { transform: rotate(90deg); }

.catalog {
    display: grid;
    align-items: center;
    min-height: 71svh;
    padding-block: clamp(70px, 8vw, 112px);
    background: var(--wine);
    color: var(--paper);
}

.catalog :focus-visible { outline-color: var(--rose); }
.catalog h2 { margin-bottom: 36px; text-wrap: initial; }

.filters {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 14px;
}

.filter {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--rose);
    font-size: .88rem;
    font-weight: 600;
}

.filter input, .filter select {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--card);
    color: var(--ink);
    font-size: 1rem;
    font-weight: 400;
}

.filter input::placeholder { opacity: 1; color: var(--quiet); }
.filter select { cursor: pointer; }
.filters .button { background: var(--rose); color: var(--wine); }
.filters .button:hover { background: var(--paper); }

.empty {
    margin-top: 32px;
    padding-block: 30px;
    border-block: 1px solid #79584b;
}

.empty h3 { font-size: 1.16rem; font-weight: 650; }
.empty p { margin-top: 5px; color: var(--rose); }
.clear-filters { margin-top: 10px; color: var(--rose); text-decoration-color: currentColor; }

.events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: 18px;
    margin-top: 36px;
}

.event {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    background: var(--card);
    color: var(--ink);
}

.event img { width: 100%; aspect-ratio: 8 / 5; height: auto; object-fit: cover; }
.event-content { display: flex; height: 100%; flex-direction: column; padding: 20px; }
.event h3 { margin: 5px 0 7px; font-size: 1.28rem; line-height: 1.28; overflow-wrap: anywhere; }
.event-meta { color: var(--quiet); font-size: .92rem; }
.event-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 20px; }
.event-actions .button { min-height: 44px; }
.event-actions .button:focus-visible { outline-color: var(--focus); }

.tickets { padding-block: clamp(78px, 10vw, 145px); }

.tickets-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 7vw, 116px);
}

.tickets-photo { border-radius: 8px; }
.tickets-photo img {
    width: 100%;
    height: clamp(320px, 36vw, 530px);
    object-fit: cover;
    object-position: center;
}

.tickets h2 { margin-bottom: 27px; text-wrap: initial; }

.steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: steps;
}

.steps li {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    align-items: baseline;
    gap: 13px;
    padding-block: 18px;
    border-top: 1px solid var(--line);
    counter-increment: steps;
}

.steps li::before {
    color: var(--accent);
    font-family: var(--display);
    content: counter(steps, decimal-leading-zero);
}

.steps h3 { font-size: 1.08rem; font-weight: 700; }
.steps p { margin-top: 4px; color: var(--quiet); }

.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 90px; }
.footer-credit { color: var(--quiet); }

@media (prefers-reduced-motion: no-preference) {
    [data-enter] .hero-photo { animation: reveal-photo 780ms cubic-bezier(.19, 1, .22, 1) both; }
    [data-enter] .hero-copy { animation: reveal-copy 650ms cubic-bezier(.19, 1, .22, 1) 70ms both; }
}

@keyframes reveal-photo {
    from { opacity: .68; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-copy {
    from { opacity: .7; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
    .wrap { width: calc(100% - 60px); }
    .hero { padding-block: 78px 87px; }
    .hero-grid { gap: 32px; }
    .hero h1 { font-size: clamp(2.85rem, 6.7vw, 4.3rem); }
    .hero-photo img { height: clamp(330px, 53vw, 475px); }
    .catalog { min-height: 0; }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tickets-grid { gap: 32px; }
}

@media (max-width: 640px) {
    html { scroll-padding-top: 64px; }
    .wrap { width: calc(100% - 36px); }
    .header-inner { min-height: 61px; gap: 8px; }
    .brand { gap: 7px; font-size: 1.15rem; }
    .brand-mark { width: 18px; height: 14px; }
    .site-header nav { gap: 12px; }
    .site-header nav a { font-size: .8rem; }
    .hero { min-height: calc(100svh - 62px); padding-block: 43px; }
    .hero-grid, .tickets-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero h1 { font-size: clamp(2.8rem, 10.1vw, 4rem); }
    .hero-copy p { margin-block: 18px 22px; }
    .hero-photo { border-top-left-radius: 75px; }
    .hero-photo img { height: clamp(225px, 78vw, 374px); }
    .catalog { padding-block: 56px 62px; }
    .catalog h2 { margin-bottom: 26px; }
    .filters { gap: 12px; }
    .filter:first-child, .filters .button { grid-column: 1 / -1; }
    .empty { margin-top: 28px; padding-block: 22px; }
    .tickets { padding-block: 58px; }
    .tickets-photo { order: 2; }
    .tickets-photo img { height: clamp(210px, 70vw, 400px); }
    .footer-inner { min-height: 74px; }
    .footer-credit { font-size: .77rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .button:hover, .button:active, .hero-photo:hover img, .tickets-photo:hover img { transform: none; }
}
