/* =========================================================
   Промокод Афиша — design system
   Palette: white ground, black type/actions, yellow accent.
   Tokens: 4px spacing scale, fixed radii, 3 elevations.
   ========================================================= */

:root {
  color-scheme: light;

  /* --- Ground & ink --- */
  --bg:          #ffffff;
  --bg-soft:     #f6f6f6;
  --bg-soft-2:   #efefef;
  --ink:         #0f0f0f;
  --ink-2:       #5c5c5c;
  --ink-3:       #8c8c8c;
  --line:        #e9e9e9;
  --line-strong: #d6d6d6;

  /* --- Accent --- */
  --yellow:      #ffcc00;
  --yellow-deep: #f0b400;
  --yellow-soft: #fff4cc;

  /* --- Black actions --- */
  --black:       #101010;
  --black-hover: #2b2b2b;
  --black-press: #000000;
  --on-black:    #ffffff;

  --ok:          #12a05f;

  /* --- Spacing scale (4px base) --- */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 20px;  --s6: 24px;  --s7: 32px;  --s8: 40px;
  --s9: 48px;  --s10: 64px; --s11: 80px;

  /* One rhythm for every section break */
  --section: clamp(64px, 8vw, 112px);

  /* --- Radii --- */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* --- Elevation --- */
  --sh-1: 0 1px 2px rgb(0 0 0 / 0.04);
  --sh-2: 0 6px 18px rgb(0 0 0 / 0.07), 0 2px 5px rgb(0 0 0 / 0.04);
  --sh-3: 0 20px 48px rgb(0 0 0 / 0.12), 0 4px 12px rgb(0 0 0 / 0.05);

  --max: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =========================================================
   Base
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.shell { width: min(100% - (var(--gutter) * 2), var(--max)); margin-inline: auto; }

.skip-link {
  position: fixed;
  left: var(--s4);
  top: var(--s3);
  z-index: 60;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  background: var(--black);
  color: var(--on-black);
  font-weight: 600;
  box-shadow: var(--sh-3);
  transform: translateY(-200%);
  transition: transform 180ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
/* Hairline appears only once the page has scrolled (toggled in app.js) */
.site-header.is-stuck { border-bottom-color: var(--line); }

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
  display: block;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }

.site-nav { display: flex; align-items: center; gap: var(--s1); }
.site-nav a {
  padding: var(--s2) var(--s4);
  border-radius: var(--r-pill);
  white-space: nowrap;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.site-nav a:hover { background: var(--bg-soft); color: var(--ink); }

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 52px;
  padding: 0 var(--s7);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease),
              border-color 160ms var(--ease),
              box-shadow 160ms var(--ease),
              transform 120ms var(--ease);
}

.btn-primary { background: var(--black); color: var(--on-black); }
.btn-primary:hover { background: var(--black-hover); transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn-primary:active { background: var(--black-press); transform: translateY(0); box-shadow: none; }

.btn-secondary {
  background: var(--bg);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--ink-3); }
.btn-secondary:active { background: var(--bg-soft-2); }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  padding-top: clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-content { display: flex; flex-direction: column; align-items: flex-start; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s6);
  padding: var(--s2) var(--s4);
  border-radius: var(--r-pill);
  background: var(--yellow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

h1 {
  margin-bottom: var(--s5);
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero-lead {
  max-width: 46ch;
  margin-bottom: var(--s8);
  color: var(--ink-2);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

.hero-media { position: relative; }
.hero-media::before {
  content: "";
  position: absolute;
  inset: auto -14px -16px 28px;
  height: 62%;
  border-radius: var(--r-xl);
  background: var(--yellow);
  transform: rotate(-3deg);
  z-index: 0;
}
.hero-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
}

/* =========================================================
   Stats
   ========================================================= */

.stats {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3);
}
.stat {
  padding: var(--s5) var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
}
.stat strong {
  display: block;
  margin-bottom: var(--s1);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.stat span { color: var(--ink-3); font-size: 13px; }

/* =========================================================
   Section scaffolding
   ========================================================= */

.section { margin-top: var(--section); }

.section-head { max-width: 680px; margin-bottom: var(--s9); }
.eyebrow {
  display: inline-block;
  margin-bottom: var(--s3);
  padding: 3px var(--s3);
  border-radius: var(--r-pill);
  background: var(--yellow);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h2 {
  margin-bottom: var(--s4);
  font-size: clamp(27px, 3.2vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.section-head p { color: var(--ink-2); font-size: 17px; }

/* =========================================================
   Coupon cards
   ========================================================= */

.coupon-list { display: grid; gap: var(--s4); }

.coupon {
  position: relative;
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr) 236px;
  align-items: center;
  gap: var(--s7);
  padding: var(--s6) var(--s7);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
  transition: border-color 200ms var(--ease),
              box-shadow 200ms var(--ease),
              transform 200ms var(--ease);
}
.coupon:hover {
  border-color: var(--line-strong);
  box-shadow: var(--sh-2);
  transform: translateY(-2px);
}
.coupon-featured { border-color: var(--ink); }

.coupon-flag {
  position: absolute;
  top: -11px;
  left: var(--s7);
  z-index: 2;
  padding: 4px var(--s3);
  border-radius: var(--r-pill);
  background: var(--black);
  color: var(--on-black);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Yellow ticket with punched notches */
.coupon-value {
  position: relative;
  min-height: 104px;
  display: grid;
  place-content: center;
  gap: 2px;
  padding: var(--s4) var(--s6);
  text-align: center;
  border-radius: var(--r-md);
  background: var(--yellow);
  transform: rotate(-3deg);
  transition: transform 220ms var(--ease);
}
.coupon:nth-child(even) .coupon-value { transform: rotate(2.5deg); }
.coupon:hover .coupon-value { transform: rotate(0deg); }

.coupon-value::before,
.coupon-value::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--bg);
}
.coupon-value::before { left: -11px; }
.coupon-value::after  { right: -11px; }

.coupon-value b {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.coupon-value span { color: #5c4f08; font-size: 12.5px; font-weight: 650; line-height: 1.3; }

.coupon-main { min-width: 0; }
.coupon-audience {
  display: inline-block;
  margin-bottom: var(--s3);
  padding: 3px var(--s2);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.coupon-main h3 {
  margin-bottom: var(--s2);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: -0.018em;
}
.coupon-main > p {
  margin-bottom: var(--s4);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}
.coupon-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 550;
}
.coupon-meta span { display: inline-flex; align-items: center; gap: var(--s2); }
.coupon-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* Action column: grey code chip + black CTA */
.coupon-action { display: grid; gap: var(--s2); }

.code-chip {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s4);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  cursor: pointer;
  text-align: left;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.code-chip:hover { background: var(--bg-soft-2); }
.code-chip:active { border-color: var(--line-strong); }
.chip-text { min-width: 0; display: grid; gap: 1px; }
.chip-meta { color: var(--ink-3); font-size: 11.5px; font-weight: 550; line-height: 1.2; }
.chip-code {
  font-family: "SF Mono", ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip-icon { width: 18px; height: 18px; color: var(--ink-3); transition: color 160ms var(--ease); }
.code-chip:hover .chip-icon { color: var(--ink); }
.code-chip.is-copied { background: var(--yellow); }
.code-chip.is-copied .chip-meta { color: #5c4f08; }
.code-chip.is-copied .chip-icon { color: var(--ink); }

.coupon-cta { width: 100%; min-height: 52px; padding: 0 var(--s5); font-size: 14.5px; }
.coupon-cta.is-locked,
.coupon-cta:disabled {
  border-color: var(--line);
  background: var(--bg-soft-2);
  color: var(--ink-3);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}
.coupon-cta.is-locked:hover,
.coupon-cta:disabled:hover {
  border-color: var(--line);
  background: var(--bg-soft-2);
  color: var(--ink-3);
  transform: none;
}
.coupon-cta-hint {
  display: block;
  margin-top: calc(var(--s1) * -1);
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.3;
  text-align: center;
}
.coupon-cta-hint[hidden] { display: none; }

/* =========================================================
   Current coupon comparison table
   ========================================================= */

.promo-table-section { margin-top: var(--s10); }
.promo-table-copy { max-width: 760px; margin-bottom: var(--s7); }
.promo-table-copy h2 { font-size: clamp(25px, 2.8vw, 34px); }
.promo-table-copy p { color: var(--ink-2); font-size: 16px; }

.promo-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}
.promo-table-scroll:focus-visible { outline-offset: 4px; }

.promo-table-scroll table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
  line-height: 1.45;
}
.promo-col-code { width: 14%; }
.promo-col-discount { width: 20%; }
.promo-col-terms { width: 42%; }
.promo-col-date { width: 24%; }

.promo-table-scroll th,
.promo-table-scroll td {
  padding: var(--s3) var(--s4);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  vertical-align: top;
  text-align: left;
}
.promo-table-scroll th:last-child,
.promo-table-scroll td:last-child { border-right: 0; }
.promo-table-scroll tbody tr:last-child td { border-bottom: 0; }
.promo-table-scroll th {
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
}
.promo-table-scroll tbody tr:nth-child(even) { background: var(--bg-soft); }
.promo-table-scroll code {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bg-soft-2);
  color: var(--ink);
  font-family: "SF Mono", ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .promo-table-section { margin-top: var(--s9); }
  .promo-table-copy { margin-bottom: var(--s6); }
  .promo-table-scroll table { min-width: 700px; font-size: 14px; }
  .promo-table-scroll th,
  .promo-table-scroll td { padding: var(--s3); }
}

/* =========================================================
   Black panel — event types
   ========================================================= */

.panel {
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  border-radius: var(--r-xl);
  background: var(--black);
  color: var(--on-black);
}
.panel h2 { color: var(--on-black); }
.panel-copy p { color: #b0b0b0; font-size: 16px; }
.panel-copy p + p { margin-top: var(--s4); }

.event-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.event-types span {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 58px;
  padding: var(--s3) var(--s5);
  border: 1px solid #2c2c2c;
  border-radius: var(--r-md);
  background: #1a1a1a;
  font-size: 14.5px;
  font-weight: 550;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}
.event-types span::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--yellow);
}
.event-types span:hover { background: #232323; border-color: #3d3d3d; }

/* =========================================================
   Video
   ========================================================= */

.video { max-width: 880px; margin: 0 auto var(--s9); }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-soft);
  box-shadow: var(--sh-2);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption {
  margin-top: var(--s3);
  color: var(--ink-3);
  font-size: 13.5px;
  text-align: center;
}

/* =========================================================
   Steps
   ========================================================= */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}
.steps li {
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
}
.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: var(--s5);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}
.steps h3 { margin-bottom: var(--s2); font-size: 18px; font-weight: 650; letter-spacing: -0.018em; }
.steps p { color: var(--ink-2); font-size: 14.5px; }

/* =========================================================
   Prose blocks
   ========================================================= */

.prose-stack { display: grid; gap: var(--s10); }
.prose-block h2 { font-size: clamp(22px, 2.3vw, 28px); margin-bottom: var(--s5); }
.prose-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s8);
  max-width: 960px;
}
.prose-columns p { color: var(--ink-2); font-size: 16px; }

/* =========================================================
   FAQ
   ========================================================= */

.faq-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: var(--s10);
  align-items: start;
}
.faq-aside p { margin-top: var(--s4); color: var(--ink-2); font-size: 15px; }

.faq-list {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
details + details { border-top: 1px solid var(--line); }
summary {
  position: relative;
  padding: var(--s5) var(--s10) var(--s5) var(--s6);
  list-style: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.012em;
  transition: background-color 160ms var(--ease);
}
summary:hover { background: var(--bg-soft); }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  position: absolute;
  right: var(--s6);
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -6px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform 200ms var(--ease), border-color 200ms var(--ease);
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--ink); }
details p { padding: 0 var(--s10) var(--s5) var(--s6); color: var(--ink-2); font-size: 15px; }

/* =========================================================
   Footer
   ========================================================= */

.site-footer { margin-top: var(--section); padding: var(--s9) 0 var(--s8); border-top: 1px solid var(--line); }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s8);
  align-items: start;
}
.footer-inner .brand { margin-bottom: var(--s3); }
.site-footer p { color: var(--ink-3); font-size: 13.5px; max-width: 46ch; }

/* =========================================================
   Toast
   ========================================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--s6);
  z-index: 50;
  width: min(360px, calc(100% - var(--s8)));
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-radius: var(--r-md);
  background: var(--black);
  color: var(--on-black);
  box-shadow: var(--sh-3);
  transform: translate(-50%, 0);
  animation: toast-in 260ms var(--ease);
}
.toast[hidden] { display: none; }
.toast-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
}
.toast-check svg { width: 15px; height: 15px; }
.toast-text { display: grid; gap: 1px; min-width: 0; }
.toast strong { font-size: 14px; font-weight: 600; }
.toast-text span { color: #b0b0b0; font-size: 12.5px; }

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1024px) {
  .coupon { grid-template-columns: 168px minmax(0, 1fr) 210px; gap: var(--s5); padding: var(--s5) var(--s6); }
  .coupon-value { padding: var(--s4); }
  .faq-layout { grid-template-columns: 260px minmax(0, 1fr); gap: var(--s8); }
  .prose-columns { gap: var(--s6); }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 76px; }

  .header-inner { height: 60px; gap: var(--s4); }
  .site-nav {
    gap: 0;
    margin-right: calc(var(--gutter) * -1);
    padding-right: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: var(--s2) var(--s3); font-size: 13.5px; }

  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s8); padding-top: var(--s7); }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-media::before { inset: auto -8px -10px 20px; }
  .hero-image { aspect-ratio: 16 / 10; }

  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); }
  .stat strong { margin-bottom: 0; }
  .stat span { text-align: right; }

  .section-head { margin-bottom: var(--s7); }

  .coupon { grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding: var(--s5); }
  .coupon-flag { left: var(--s5); }
  .coupon-value {
    min-height: 0;
    justify-self: start;
    display: flex;
    align-items: baseline;
    gap: var(--s2);
    padding: var(--s3) var(--s6);
    transform: rotate(-2deg);
  }
  .coupon:nth-child(even) .coupon-value { transform: rotate(1.5deg); }
  .coupon-value b { font-size: 24px; }
  .coupon-main > p { margin-bottom: var(--s3); }
  .coupon-action { grid-template-columns: minmax(0, 1fr); }

  .panel { grid-template-columns: minmax(0, 1fr); border-radius: var(--r-lg); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step-num { margin-bottom: var(--s4); }
  .video { margin-bottom: var(--s7); }
  .video-frame { border-radius: var(--r-lg); }

  .prose-stack { gap: var(--s8); }
  .prose-columns { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .faq-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }

  summary { padding: var(--s4) var(--s9) var(--s4) var(--s5); font-size: 15px; }
  summary::after { right: var(--s5); }
  details p { padding: 0 var(--s9) var(--s4) var(--s5); }
}

@media (max-width: 600px) {
  /* Give the three nav links room instead of letting them clip at the edge */
  .brand-name { display: none; }
  .header-inner { gap: var(--s3); }
  .site-nav { margin-right: 0; padding-right: 0; overflow-x: visible; }
  .site-nav a { padding: var(--s2); font-size: 13px; }
}

@media (max-width: 480px) {
  .event-types { grid-template-columns: minmax(0, 1fr); }
  .coupon-meta { gap: var(--s1) var(--s3); font-size: 12px; }
  .toast { width: calc(100% - var(--s6)); bottom: var(--s3); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .coupon:hover { transform: none; }
  .btn-primary:hover { transform: none; }
}

/* =========================================================
   Category navigation (chips under the header)
   ========================================================= */

.cat-nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.cat-nav-inner {
  display: flex;
  gap: var(--s2);
  padding: var(--s3) 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: none;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.cat-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.cat-nav a[aria-current="page"] {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  font-weight: 650;
}

/* =========================================================
   Breadcrumbs
   ========================================================= */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  padding-top: var(--s6);
  color: var(--ink-3);
  font-size: 13px;
}
.breadcrumbs a { color: var(--ink-3); transition: color 160ms var(--ease); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs span[aria-current] { color: var(--ink-2); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--s2); }
.breadcrumbs ol { display: contents; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); }

/* =========================================================
   Compact hero (category pages)
   ========================================================= */

.hero-compact {
  display: block;
  max-width: 780px;
  padding: clamp(28px, 4vw, 48px) 0 0;
}
.hero-compact h1 { margin-bottom: var(--s5); }
.hero-compact .hero-lead { margin-bottom: var(--s7); }

/* =========================================================
   Related pages
   ========================================================= */

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}
.related-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); transform: translateY(-2px); }
.related-card strong { font-size: 17px; font-weight: 650; letter-spacing: -0.018em; }
.related-card span { color: var(--ink-2); font-size: 14px; }
.related-card em {
  margin-top: auto;
  padding-top: var(--s3);
  color: var(--ink);
  font-size: 13.5px;
  font-style: normal;
  font-weight: 600;
}
.related-card em::after { content: " →"; }

/* --- Footer link columns --- */
.footer-links { display: grid; gap: var(--s2); }
.footer-links a { color: var(--ink-2); font-size: 13.5px; transition: color 160ms var(--ease); }
.footer-links a:hover { color: var(--ink); }
.footer-heading {
  margin-bottom: var(--s2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-inner-3 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }

@media (max-width: 860px) {
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner-3 { grid-template-columns: minmax(0, 1fr); }
  .hero-compact { padding-top: var(--s6); }
}

/* =========================================================
   "Какой промокод пробовать первым" — pick list
   ========================================================= */

.pick {
  padding: clamp(24px, 3.5vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-soft);
}
.pick h2 { font-size: clamp(21px, 2.2vw, 26px); margin-bottom: var(--s6); }
.pick-list { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.pick-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-radius: var(--r-md);
  background: var(--bg);
}
.pick-when { flex: 1 1 200px; font-size: 15px; font-weight: 600; }
.pick-codes { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pick-codes b {
  padding: 4px var(--s3);
  border-radius: 7px;
  background: var(--yellow);
  font-family: "SF Mono", ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* =========================================================
   Note list ("почему не сработал")
   ========================================================= */

.note-list { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; max-width: 760px; }
.note-list li {
  display: flex;
  gap: var(--s3);
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.5;
}
.note-list li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 2px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--yellow-deep);
}

/* A short callout for "вводите код до оплаты" */
.callout {
  display: flex;
  gap: var(--s4);
  max-width: 760px;
  padding: var(--s5) var(--s6);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow-deep);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 15.5px;
}
.callout strong { color: var(--ink); }

/* =========================================================
   Long-form article body (owner-supplied SEO copy)
   ========================================================= */

.article { max-width: 760px; }
.article > * + * { margin-top: var(--s5); }

.article h2 {
  margin-top: var(--s10);
  margin-bottom: var(--s4);
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.028em;
}
.article > h2:first-child { margin-top: 0; }

.article h3 {
  margin-top: var(--s8);
  margin-bottom: var(--s3);
  font-size: clamp(18px, 1.9vw, 21px);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article p { color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.article strong { color: var(--ink); font-weight: 650; }

.article ul,
.article ol { margin: 0; padding-left: 0; display: grid; gap: var(--s3); list-style: none; counter-reset: art; }
.article li { display: flex; gap: var(--s3); color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.article ul > li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 11px;
  border-radius: 50%;
  background: var(--yellow-deep);
}
.article ol > li { counter-increment: art; }
.article ol > li::before {
  content: counter(art);
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
}

.article code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--ink);
  font-family: "SF Mono", ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.article a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--yellow-deep); text-decoration-thickness: 2px; }
.article a:hover { background: var(--yellow-soft); }

.article blockquote {
  margin: var(--s7) 0;
  padding: var(--s5) var(--s6);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow-deep);
  border-radius: var(--r-md);
  background: var(--bg-soft);
}
.article blockquote p { color: var(--ink); font-size: 16px; }
.article blockquote > * + * { margin-top: var(--s3); }

@media (max-width: 860px) {
  .article h2 { margin-top: var(--s9); }
  .article h3 { margin-top: var(--s7); }
  .article p { font-size: 16px; }
}

/* =========================================================
   "Промокод скопирован" modal
   ========================================================= */

.reveal-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s5);
  background: rgb(0 0 0 / 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.reveal-modal.is-open { display: flex; animation: modal-fade 180ms var(--ease); }
body.modal-open { overflow: hidden; }

.modal-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100dvh - var(--s8));
  overflow-y: auto;
  padding: var(--s8) var(--s7) var(--s7);
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: 0 32px 80px rgb(0 0 0 / 0.35);
  text-align: center;
  animation: modal-rise 220ms var(--ease);
}

.modal-close {
  position: absolute;
  top: var(--s4);
  right: var(--s4);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.modal-close:hover { background: var(--bg-soft-2); color: var(--ink); }

.modal-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--s5);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
}
.modal-check svg { width: 28px; height: 28px; }

.modal-card h2 { margin-bottom: var(--s2); font-size: 23px; letter-spacing: -0.025em; }
.modal-sub { margin-bottom: var(--s6); color: var(--ink-2); font-size: 15px; }

.modal-code-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s5);
  padding: var(--s3) var(--s3) var(--s3) var(--s5);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-soft);
}
.modal-code-row code {
  flex: 1;
  font-family: "SF Mono", ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
}
.modal-copy-action {
  flex: none;
  padding: var(--s2) var(--s4);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--on-black);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease);
}
.modal-copy-action:hover { background: var(--black-hover); }
.modal-copy-action.is-done { background: var(--ok); }

.modal-terms {
  margin-bottom: var(--s6);
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.5;
}
.modal-shop-button { width: 100%; }
.modal-hint { margin-top: var(--s4); color: var(--ink-3); font-size: 12.5px; }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .modal-card { padding: var(--s7) var(--s5) var(--s6); }
  .modal-code-row code { font-size: 17px; }
}

/* =========================================================
   404
   ========================================================= */

.error-main {
  min-height: calc(100dvh - 68px);
  display: grid;
  align-items: center;
}

.error-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(40px, 8vw, 104px);
  padding-block: clamp(64px, 10vw, 128px);
}

.error-copy { max-width: 620px; }
.error-copy .hero-lead { max-width: 52ch; }

.error-ticket {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s8);
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--yellow);
  color: var(--ink);
  transform: rotate(2deg);
}

.error-ticket::before,
.error-ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  transform: translateY(-50%);
}
.error-ticket::before { left: -19px; }
.error-ticket::after { right: -19px; }

.error-ticket-label,
.error-ticket-route {
  font-size: 14px;
  font-weight: 650;
}
.error-ticket-label { text-transform: uppercase; letter-spacing: 0.06em; }
.error-ticket-route { align-self: flex-end; }
.error-ticket strong {
  font-size: clamp(88px, 13vw, 156px);
  line-height: 0.8;
  letter-spacing: -0.04em;
}

@media (max-width: 760px) {
  .error-main { min-height: auto; }
  .error-page { grid-template-columns: 1fr; padding-block: var(--s10); }
  .error-ticket { min-height: 220px; order: -1; transform: rotate(1deg); }
  .error-ticket strong { font-size: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .error-ticket { transform: none; }
}
