:root {
  --navy: #0b1220;
  --ink: #e8eef8;
  --muted: #9aa8bd;
  --blue: #3b82f6;
  --blue-deep: #1d4ed8;
  --gold: #f5c16c;
  --paper: #f4f7fb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #d7dee8;
  color: var(--ink);
  font-family: "Source Sans 3", Arial, sans-serif;
}

.toolbar {
  width: min(210mm, 100%);
  margin: 18px auto 0;
  padding: 0 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar a,
.toolbar button {
  appearance: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  cursor: pointer;
}

.toolbar a.is-current {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.flyer {
  width: min(210mm, 100%);
  min-height: 148mm;
  margin: 16px auto 32px;
  display: grid;
  grid-template-columns: 38% 1fr;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 22px 50px rgba(11, 18, 32, 0.28);
}

.flyer__photo {
  position: relative;
  min-height: 148mm;
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.08), rgba(11, 18, 32, 0.42)),
    #122033;
}

.flyer__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.flyer__photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(11, 18, 32, 0.72));
}

.flyer__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14mm 13mm 11mm;
}

.kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 8px;
  font-family: "Quantico", "Source Sans 3", Arial, sans-serif;
  font-size: 1.85rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

html[lang="ru"] h1,
html[lang="ru"] h2,
html[lang="ru"] .offer strong {
  font-family: "Source Sans 3", Arial, sans-serif;
}

.lead {
  margin: 0 0 16px;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.4;
}

.offers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
}

.offer {
  min-width: 0;
  padding: 10px 11px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.offer span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.offer strong {
  display: block;
  margin-bottom: 3px;
  font-family: "Quantico", "Source Sans 3", Arial, sans-serif;
  font-size: 0.92rem;
}

.offer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #d5deeb;
  font-size: 0.78rem;
}

.contact a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .toolbar {
    width: 100%;
    margin: 10px auto 0;
    padding: 0 12px;
    justify-content: flex-start;
  }

  .toolbar a,
  .toolbar button {
    font-size: 0.75rem;
    padding: 8px 11px;
  }

  .flyer {
    width: calc(100% - 16px);
    min-height: 0;
    margin: 12px auto 28px;
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .flyer__photo {
    min-height: 0;
    height: min(38vh, 260px);
  }

  .flyer__body {
    padding: 20px 18px 18px;
  }

  h1 {
    font-size: 1.42rem;
  }

  .lead {
    font-size: 0.95rem;
    margin-bottom: 14px;
  }

  .offers {
    gap: 8px;
    margin-bottom: 14px;
  }

  .offer {
    padding: 10px;
  }

  .offer strong {
    font-size: 0.86rem;
  }

  .offer p {
    font-size: 0.76rem;
  }

  .contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
  }

  .contact a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 420px) {
  .offers {
    grid-template-columns: 1fr;
  }
}

@media print {
  html,
  body {
    background: #ffffff;
  }

  .toolbar {
    display: none;
  }

  .flyer {
    width: 210mm;
    min-height: 148mm;
    height: 148mm;
    margin: 0;
    grid-template-columns: 38% 1fr;
    border-radius: 0;
    box-shadow: none;
    page-break-after: avoid;
  }

  .flyer__photo {
    min-height: 148mm;
    height: auto;
  }

  .flyer__body {
    padding: 14mm 13mm 11mm;
  }

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

  .contact {
    flex-direction: row;
    align-items: center;
  }

  @page {
    size: A5 landscape;
    margin: 0;
  }
}
