/* Витрина «Нашли выгоднее». Токены — из концепции, шрифты самохостятся. */

@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-SemiBold-cyrillic.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-SemiBold-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-SemiBold-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/FiraSansExtraCondensed-Bold-cyrillic.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/FiraSansExtraCondensed-Bold-latin-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/FiraSansExtraCondensed-Bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/FiraSansExtraCondensed-ExtraBold-cyrillic.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/FiraSansExtraCondensed-ExtraBold-latin-ext.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/FiraSansExtraCondensed-ExtraBold-latin.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/FiraSansExtraCondensed-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #161410;
  --surface: #f0f1ee;
  --card: #ffffff;
  --gold: #ffc42e;
  --gold-hover: #e3b01a;
  --muted: #4a4640;
  --border: #8f8a82;
  --footer: #2a2723;
  --display: "Fira Sans Extra Condensed", "Arial Narrow", sans-serif;
  --text: "Fira Sans", system-ui, sans-serif;
  --wrap: 1120px;
  --radius: 8px;
  --gap: 24px;
  --pad: 40px;
  --focus: 2px solid var(--ink);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-width: 0;
  overflow-x: clip;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
a {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 1.15rem + 3vw, 3.5rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  line-height: 1.12;
}

h3 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

.skip {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
  outline: var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2 * var(--pad)));
  margin-inline: auto;
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wp-site-blocks,
.wp-block-template-part,
.showcase.wp-block-group {
  margin: 0;
  padding: 0;
  max-width: none;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding-block: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
}

.logo__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
}

.logo__text {
  min-width: 0;
}

.logo__name {
  display: block;
  overflow: hidden;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo__domain {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.2;
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  background: var(--surface);
}

.header__tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.header__channels {
  display: flex;
  gap: 8px;
}

.icon-btn,
.menu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}

.icon-btn:hover,
.menu-toggle:hover {
  background: var(--surface);
}

.icon-btn--gold {
  border-color: var(--ink);
  background: var(--gold);
}

.icon-btn--gold:hover {
  background: var(--gold-hover);
}

.vk-mark {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.channel-card .vk-mark {
  font-size: 20px;
}

.menu-toggle {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.btn--gold {
  border-color: var(--ink);
  background: var(--gold);
  color: var(--ink);
}

.btn--gold:hover {
  background: var(--gold-hover);
}

.btn--ghost {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.hero .btn--ghost:hover,
.channel-card:hover .btn--ghost {
  background: var(--card);
}

.offer .btn--ghost:hover {
  background: var(--surface);
}

.btn--full {
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: not-allowed;
  opacity: 1;
}

.hero {
  padding: 48px 0 24px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: start;
}

.hero__lead {
  max-width: 38rem;
  margin-top: 16px;
  font-size: 1.125rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.search {
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: 36rem;
  margin-top: 32px;
}

.search__field {
  flex: 1;
  min-width: 0;
}

.search input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search .btn {
  flex: none;
}

.ticket {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.ticket__label {
  margin: 0;
  padding: 12px 20px 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.ticket .offer {
  border: 0;
  border-radius: 0;
}

.collections {
  padding: 16px 0 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
}

.chip:hover {
  border-color: var(--ink);
}

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--card);
}

.offers {
  padding: 40px 0 24px;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 24px;
}

.section-head p,
.offers__empty {
  margin-top: 12px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.offer {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.offer__badge {
  align-self: start;
  max-width: 100%;
  margin: 0;
  padding: 12px 16px 10px;
  border-radius: 0 0 8px 0;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2rem, 1.6rem + 1vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.offer__badge small {
  display: block;
  margin-top: 4px;
  font-family: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.offer__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 12px;
}

.offer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.offer__store {
  margin: 0;
  font-family: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.offer__cond {
  color: var(--ink);
}

.offer__meta,
.offer__hint {
  color: var(--muted);
  font-size: 0.875rem;
}

.offer__hint {
  font-size: 0.8125rem;
  line-height: 1.4;
}

.code-row {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.offer__action {
  margin-top: 12px;
}

.offer:not(:has(.code-row)) .offer__action {
  margin-top: auto;
}

.code {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  overflow-wrap: anywhere;
}

.code.is-placeholder {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
}

.offer__ad {
  margin: 12px 16px 16px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.how {
  padding: 48px 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.step {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.step__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
}

.step p,
.how__note {
  margin-top: 8px;
  color: var(--muted);
}

.how__note {
  max-width: 42rem;
  margin-top: 24px;
}

.channels {
  padding: 16px 0 56px;
}

.channels__box {
  padding: 40px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--card);
}

.channels__box h2 {
  color: var(--card);
}

.channels__lead {
  max-width: 38rem;
  margin-top: 12px;
  color: #eceae6;
}

.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.channel-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px;
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}

.channel-card:hover {
  background: var(--surface);
}

.channel-card strong {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.channel-card span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.channel-card .btn {
  margin-top: 12px;
  color: var(--ink);
}

.rules {
  padding: 0 0 64px;
}

.rules__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.rule {
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.rule p {
  margin-top: 8px;
  color: var(--muted);
}

.page-main {
  padding: 48px 0 64px;
}

.prose {
  width: min(42rem, 100%);
}

.prose h1,
.page-main h1,
.wp-block-post-title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(2rem, 1.15rem + 3vw, 3.5rem);
  font-weight: 900;
  line-height: 1.08;
}

.prose p,
.wp-block-post-content p,
.page-main p {
  margin: 0 0 12px;
}

.prose a,
.page-main a {
  color: var(--ink);
}

.footer {
  padding: 48px 0 32px;
  background: var(--footer);
  color: #f4f3f0;
}

.footer a {
  color: #f4f3f0;
}

.footer a:hover {
  color: var(--gold);
}

.footer :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
}

.footer .logo__name {
  color: #f4f3f0;
}

.footer .logo__domain {
  color: #c9c4ba;
}

.footer .logo__mark {
  border: 1px solid var(--ink);
}

.footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 4px;
}

.footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__legal {
  display: grid;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #5a564e;
  color: #c9c4ba;
  font-size: 0.875rem;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 16px;
  bottom: 24px;
  left: 16px;
  display: none;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--card);
  font-weight: 600;
  text-align: center;
}

.toast.is-on {
  display: block;
}

@media (max-width: 1023px) {
  :root {
    --pad: 32px;
  }

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

  .hero__grid {
    gap: 32px;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    margin: 0;
    padding: 8px 32px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
  }

  .nav.is-open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
  }

  .nav a {
    width: 100%;
  }

  .header__tools {
    margin-left: auto;
  }

  .menu-toggle {
    display: grid;
  }
}

@media (max-width: 767px) {
  :root {
    --pad: 24px;
  }

  .header__inner {
    min-height: 64px;
  }

  .nav {
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero {
    padding-top: 32px;
  }

  .hero__grid,
  .grid,
  .steps,
  .channel-grid,
  .rules__list,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none;
  }

  .channels__box {
    padding: 24px 16px;
  }

  .search {
    flex-direction: column;
  }

  .search .btn {
    width: 100%;
  }

  .logo__name {
    font-size: 1.125rem;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

@media (max-width: 359px) {
  :root {
    --pad: 16px;
  }

  .header__inner {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .logo {
    flex: 1 1 100%;
  }

  .header__tools {
    justify-content: flex-end;
    width: 100%;
    margin-left: 0;
  }

  .logo__mark {
    width: 36px;
    height: 36px;
  }

  .nav {
    padding-right: 16px;
    padding-left: 16px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
