@font-face {
  font-family: Onest;
  src: url("assets/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: Onest;
  src: url("assets/onest-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

:root {
  color-scheme: light;
  --paper: #f6f3ed;
  --surface: #fffdf8;
  --ink: #1d1b18;
  --muted: #57534c;
  --line: #d9d2c6;
  --dark: #211f1b;
  --panel: #2d2a25;
  --accent: #ba2823;
  --accent-hover: #9d211d;
  --light-accent: #ff7969;
  --gold: #f0ba65;
  --white: #fffdf8;
  --dark-line: #514b40;
  --dark-muted: #d4cabd;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --display: Onest, system-ui, sans-serif;
  --radius: 16px;
  --gutter: clamp(18px, 4.45vw, 72px);
  --section-space: clamp(56px, 7.2vw, 104px);
  --gap: clamp(16px, 2vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding: 16px 0 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--display); }
a { color: inherit; }
a, button, summary { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
:is(.dark-section, .booking, .gallery-dialog, .formats) :focus-visible { outline-color: var(--gold); }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(1280px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: 12px; left: var(--gutter); z-index: 20; transform: translateY(-150%); padding: 10px 16px; background: var(--surface); color: var(--ink); border-radius: 8px; }
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.bar { min-height: 80px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gap); }
.brand { display: inline-flex; min-height: 48px; align-items: center; justify-self: start; gap: 11px; text-decoration: none; font-size: 22px; line-height: 1; font-weight: 900; letter-spacing: -.015em; }
.brand img { object-fit: contain; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font: 700 9px/1.2 var(--mono); letter-spacing: .065em; }
.bar nav { display: flex; gap: clamp(14px, 2.8vw, 38px); }
.bar nav a, .bar-phone { display: inline-flex; min-height: 44px; align-items: center; font-size: 14px; font-weight: 720; text-decoration: none; }
.bar nav a:hover { color: var(--accent); }
.bar-phone { justify-self: end; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-phone .icon { color: var(--accent); }
.bar-phone:hover { border-color: var(--accent); }

.opening { padding-top: clamp(24px, 4.2vw, 60px); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: center; gap: clamp(20px, 3.4vw, 50px); }
.hero-text { padding-block: 16px; min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); margin-bottom: 14px; font: 700 12px/1.4 var(--mono); letter-spacing: .10em; text-transform: uppercase; }
.hero-kicker { width: fit-content; margin-bottom: clamp(18px, 2vw, 28px); padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.hero-kicker .icon { width: 16px; height: 16px; }
h1 { font-size: clamp(46px, 6.4vw, 96px); line-height: .94; font-weight: 900; letter-spacing: -.07em; }
h1 span { display: inline-block; margin-top: .09em; color: var(--accent); font-size: .71em; letter-spacing: -.065em; }
.intro { margin-top: clamp(16px, 2vw, 28px); max-width: 36ch; color: var(--muted); font-size: clamp(17px, 1.45vw, 21px); line-height: 1.45; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: clamp(16px, 2vw, 28px); }
.button, .text-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; font-size: 14px; font-weight: 760; text-decoration: none; }
.button { padding: 12px 17px; border: 1px solid transparent; border-radius: 9px; color: var(--white); background: var(--accent); transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.button:hover { background: var(--accent-hover); }
.button:active { background: var(--dark); }
.text-link { padding: 6px 0; }
.text-link .icon { color: var(--accent); }
.text-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }

.hero-visual { position: relative; align-self: stretch; min-height: clamp(380px, 39vw, 555px); margin-block: 0; overflow: hidden; isolation: isolate; border-radius: calc(var(--radius) + 4px); background: var(--panel); }
.hero-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 52%; }
.hero-visual::after { content: ''; position: absolute; inset: 12px; border: 1px solid #ffffff64; border-radius: 12px; pointer-events: none; }
.hero-visual figcaption { position: absolute; z-index: 1; bottom: clamp(22px, 2.3vw, 34px); left: clamp(22px, 2.3vw, 34px); display: flex; align-items: center; gap: 12px; min-width: 170px; padding: 12px 16px; border-radius: 9px; background: var(--dark); color: var(--white); font-size: 19px; font-weight: 800; line-height: 1.2; }
.hero-visual figcaption .icon { width: 24px; height: 24px; color: var(--gold); }
.hero-visual small { display: block; margin-bottom: 3px; color: var(--dark-muted); font: 650 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(16px, 2.2vw, 32px); border-radius: var(--radius); background: var(--dark); color: var(--white); }
.formats a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 67px; padding: 12px clamp(12px, 2.2vw, 30px); font-weight: 750; text-decoration: none; transition: background-color 160ms ease; }
.formats a:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.formats a:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.formats a + a { border-left: 1px solid var(--dark-line); }
.formats a:hover, .formats a:active { background: var(--panel); }
.formats a:focus-visible { position: relative; z-index: 1; outline-offset: -4px; }
.formats span { color: var(--gold); font: 700 12px/1 var(--mono); }
.formats .icon { color: var(--gold); }

.section { padding-block: var(--section-space); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--gap); margin-bottom: clamp(24px, 3.2vw, 44px); }
.section-note { max-width: 31ch; padding-left: 16px; border-left: 2px solid var(--accent); color: var(--muted); }
h2 { font-size: clamp(36px, 5vw, 72px); font-weight: 850; line-height: 1; letter-spacing: -.055em; text-wrap: balance; }
h3 { font-size: clamp(23px, 2.5vw, 34px); font-weight: 800; line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; }

#games { border-bottom: 1px solid var(--line); }
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); counter-reset: format; }
.games article { display: flex; flex-direction: column; min-width: 0; padding: 0 20px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); counter-increment: format; }
.games article:target { outline: 2px solid var(--accent); outline-offset: 4px; }
.game-photo { position: relative; margin: 0 -20px 20px; overflow: hidden; background: var(--panel); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.game-photo::before { content: counter(format, decimal-leading-zero) / ''; position: absolute; z-index: 1; top: 12px; left: 12px; padding: 8px 10px; border-radius: 6px; background: var(--surface); color: var(--accent); font: 750 12px/1 var(--mono); }
.game-photo img { width: 100%; aspect-ratio: 1.64; object-fit: cover; transition: transform 320ms ease; }
.game-photo figcaption { position: absolute; inset: auto 12px 12px auto; padding: 5px 8px; border-radius: 6px; background: var(--dark); color: var(--white); font: 650 11px/1.35 var(--mono); }
.games article > span { color: var(--accent); font: 700 11px/1.4 var(--mono); letter-spacing: .05em; }
.games h3 { margin-top: 7px; }
.games p { margin-block: 10px 16px; color: var(--muted); }
.games article > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; margin-top: auto; border-top: 1px solid var(--line); color: var(--accent); font-size: 14px; font-weight: 760; text-decoration: none; }
.games article > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.extra { margin-top: 20px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--muted); }
.extra strong { color: var(--ink); }

.gallery-dialog { width: min(1000px, calc(100% - 28px)); max-width: none; max-height: calc(100% - 28px); padding: 0; border: 1px solid var(--dark-line); border-radius: var(--radius); background: var(--dark); color: var(--white); }
.gallery-dialog::backdrop { background: #0e0c0ad9; }
.gallery-dialog__body { position: relative; }
.gallery-dialog__image { width: 100%; height: min(72dvh, 760px); object-fit: contain; background: var(--ink); }
.gallery-dialog__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.gallery-dialog__caption { font-size: 14px; }
.gallery-dialog__controls { display: flex; gap: 8px; }
.gallery-dialog button { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--dark-line); border-radius: 8px; background: var(--dark); color: var(--white); cursor: pointer; }
.gallery-dialog button:hover, .gallery-dialog button:active { border-color: var(--gold); color: var(--gold); }
.gallery-dialog__close { position: absolute; inset: 12px 12px auto auto; }
.mobile-booking { display: none; }

@media (hover: hover) {
  .games article:hover .game-photo img { transform: scale(1.045); }
}

@media (max-width: 1023px) {
  .bar { gap: 14px; }
  .bar nav { gap: 16px; }
  .bar-phone { padding-inline: 9px; font-size: 13px; }
  .actions { gap: 4px 14px; }
  .games article { padding-inline: 16px; }
  .game-photo { margin-inline: -16px; }
}

@media (max-width: 767px) {
  .bar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding-top: 8px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand img { width: 28px; height: 36px; }
  .brand small { font-size: 8px; }
  .bar nav { grid-row: 2; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); justify-content: space-between; gap: 6px; border-top: 1px solid var(--line); }
  .bar nav a { justify-content: center; font-size: 13px; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-text { padding: 0; }
  .hero-kicker { font-size: 11px; padding: 6px 8px; }
  h1 { font-size: clamp(48px, 10.2vw, 75px); }
  .hero-visual { min-height: 0; aspect-ratio: 1.34; }
  .hero-visual img { object-position: 52% 58%; }
  .hero-visual figcaption { inset: auto auto 16px 16px; min-width: 0; gap: 7px; padding: 8px 10px; font-size: 15px; }
  .hero-visual small { font-size: 10px; }
  .hero-visual figcaption .icon { width: 18px; height: 18px; }
  .hero-visual::after { inset: 8px; }
  .formats a { grid-template-columns: 1fr; align-content: center; justify-items: center; gap: 6px; padding: 9px 4px; font-size: 13px; }
  .formats .icon { display: none; }
  .section-head { display: grid; gap: 16px; }
  .games { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  html { scroll-padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .mobile-booking:not([hidden]) { display: block; position: fixed; inset: auto 0 0; z-index: 5; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
  .mobile-booking .button { width: 100%; }
}

@media (max-width: 360px) {
  .brand { font-size: 17px; }
  .brand small { letter-spacing: 0; }
  .bar-phone { padding-inline: 7px; font-size: 12px; }
  .bar-phone .icon { display: none; }
  h1 { font-size: clamp(42px, 14vw, 48px); }
}

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

/* Occasions */
.occasion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.occasion {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 12px;
  overflow: hidden;
  padding: 0 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.occasion-photo {
  width: calc(100% + 48px);
  max-width: none;
  aspect-ratio: 2;
  margin: 0 -24px 8px;
  object-fit: cover;
  object-position: center 42%;
}

.occasion svg {
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
}

.occasion p, .steps p, .prep-grid p { color: var(--muted); }
#occasions > .button { margin-top: 24px; }

/* Venues and photographs */
.dark-section {
  background: var(--dark);
  color: var(--white);
}

.dark-section .eyebrow { color: var(--light-accent); }
.dark-section .section-note { color: var(--dark-muted); border-color: var(--gold); }
.dark-section #photos { border-top: 1px solid var(--dark-line); }

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.25vw, 30px);
  counter-reset: venue;
}

.venue {
  min-width: 0;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  background: var(--panel);
  counter-increment: venue;
}

.venue > a, .gallery > a {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: var(--panel);
}

.venue > a {
  aspect-ratio: 2.18;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.venue > a::before {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 16px;
  padding: 8px 11px;
  border-radius: 4px;
  background: var(--dark);
  color: var(--white);
  content: "ПОЛИГОН / " counter(venue, decimal-leading-zero) / "";
  font: 650 12px/1 var(--mono);
  letter-spacing: .07em;
  pointer-events: none;
}

.venue img, .gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue > div { padding: clamp(16px, 2.25vw, 28px); }
.venue h3 { margin-bottom: 6px; }
.venue p { color: var(--dark-muted); }

.venue p a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--dark-muted);
  font-size: .9rem;
  text-underline-offset: .23em;
}

.venue .venue-map { color: var(--gold); font-weight: 720; }
.venue p a:hover { color: var(--white); }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, clamp(124px, 16vw, 216px));
  grid-auto-rows: clamp(80px, 11vw, 148px);
  gap: clamp(8px, 1vw, 14px);
}

.gallery > a { min-height: 0; border-radius: 8px; }
.gallery > a:first-child { grid-column: span 2; grid-row: span 2; }
.gallery > a:nth-child(2) { grid-column: span 2; }

.gallery > a::after {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--dark-line);
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  content: "↗" / "";
  text-align: center;
  line-height: 32px;
  pointer-events: none;
}

.gallery > a:nth-child(n+5)::after { opacity: 0; }
.gallery > a:is(:hover, :focus-visible)::after {
  opacity: 1;
  background: var(--gold);
  color: var(--ink);
}

.dark-section a:focus-visible { outline-color: var(--gold); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .venue img, .gallery img { transition: transform 260ms ease-out; }
  .venue > a:hover img, .gallery > a:hover img { transform: scale(1.04); }
}

/* Preparing for the game */
.steps, .prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  margin: 0;
  padding: 0;
}

.steps { list-style: none; }
.steps li { padding: 20px 0 0; border-top: 2px solid var(--accent); }

.steps span {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font: 700 13px/1 var(--mono);
}

.steps p, .prep-grid p { margin-top: 8px; }

.prep-grid article {
  padding: clamp(16px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.faq {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.faq-list { display: grid; gap: 8px; }

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.faq-list summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  content: "+" / "";
  font: 650 16px/1 var(--mono);
}

.faq-list details[open] summary::after {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
  content: "−" / "";
}

.faq-list summary:hover, .faq-list summary:active { color: var(--accent); }
.faq-list details p { padding: 0 16px 18px; color: var(--muted); }

/* Booking and footer */
.section.booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  margin-bottom: clamp(24px, 5vw, 64px);
  padding: clamp(24px, 5vw, 68px);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--white);
}

.booking .eyebrow { color: inherit; }
.booking h2 { margin-bottom: 12px; }
.booking p:last-child { max-width: 50ch; }
.booking-actions { display: grid; justify-items: start; gap: 8px; }
.booking-actions .button { background: var(--white); color: var(--accent); white-space: nowrap; }
.booking-actions .button:hover { background: var(--gold); color: var(--ink); }

.booking-chat, .footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-underline-offset: .25em;
}

.booking :is(.button, .booking-chat):focus-visible { outline-color: var(--white); }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.footer a { color: var(--ink); white-space: nowrap; }

@media (max-width: 1023px) {
  .occasion { padding-inline: 18px; }
  .occasion-photo { width: calc(100% + 36px); margin-inline: -18px; }
}

@media (max-width: 767px) {
  .occasion-grid, .fields, .steps, .prep-grid, .faq, .section.booking { grid-template-columns: minmax(0, 1fr); }
  .occasion-photo { aspect-ratio: 2.25; }
  .venue > a { aspect-ratio: 1.9; }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .gallery > a { aspect-ratio: 1.55; }
  .gallery > a:first-child { grid-row: auto; aspect-ratio: 1.7; }
  .gallery > a:nth-child(2) { aspect-ratio: 2.05; }

  .steps li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 16px;
    padding-block: 16px 8px;
  }

  .steps span { grid-row: span 2; margin: 0; }
}
