/* promo-rars.ru — публичная витрина */

@font-face {
  font-family: "Road Radio";
  src: url("../fonts/RoadRadio-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Road Radio";
  src: url("../fonts/RoadRadio-Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

:root {
  --page-bg: #0d0812;
  --page-img: none;
  --violet: #4a1663;
  --red: #e3141b;
  --red-hot: #ff2b24;
  --red-deep: #a90d12;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-hover: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5eff7;
  --muted: #a99fb3;
  --glow1: rgba(110, 32, 150, 0.55);
  --glow2: rgba(190, 20, 24, 0.45);
  --label: #ff2b24;
  --text-2: #d9d0de;
  --on-accent: #ffffff;
  --ph-bg: linear-gradient(160deg, #3b1a4b, #24112e);
  --sheet1: #2b1236;
  --sheet2: #170a1d;
  --field: rgba(0, 0, 0, 0.2);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ghost: rgba(255, 255, 255, 0.1);
  --badge-text: #ff6a62;
  --badge-bg: rgba(227, 20, 27, 0.12);
  --sub-bg1: rgba(74, 22, 99, 0.55);
  --sub-bg2: rgba(28, 12, 36, 0.85);
  --cookie-bg: rgba(30, 16, 38, 0.94);
  --img-over1: rgba(13, 8, 18, 0.55);
  --img-over2: rgba(13, 8, 18, 0.8);
  --display: "Road Radio", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-card: 16px;
  --radius-sheet: 22px;
  color-scheme: var(--scheme, dark);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background-color: var(--page-bg);
  background-image:
    radial-gradient(120% 60% at 50% -10%, var(--glow1), transparent 60%),
    radial-gradient(90% 55% at 50% 115%, var(--glow2), transparent 65%);
  background-attachment: fixed;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.has-img {
  background-image:
    linear-gradient(var(--img-over1), var(--img-over2)),
    var(--page-img);
  background-size: cover;
  background-position: center;
}

a { color: inherit; }
img { max-width: 100%; }

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Шапка */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }
.brand-word {
  font-family: var(--display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.top-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
  text-align: right;
}

/* Контент */
.main { padding-bottom: 40px; }

.hero {
  margin: 18px 0 22px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 2.6vw, 34px);
  line-height: 1.32;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 30ch;
}

.text { color: var(--muted); max-width: 70ch; margin: 0 0 20px; }

.prizes { margin: 0 0 18px; }
.prizes-title { margin: 0 0 10px; font-size: 17px; color: var(--muted); }
.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chips li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--red-hot), var(--red) 55%, var(--red-deep));
  box-shadow: 0 6px 18px var(--accent-glow, rgba(227, 20, 27, 0.35)), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-family: var(--display);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: var(--on-accent);
}

/* Карточки акций */
.offers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.offers > li { display: flex; }
.offer {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 12px 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.offer:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.offer:active { background: var(--surface-hover); }

.offer-logo {
  flex: 0 0 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.offer-logo img { max-width: 34px; max-height: 34px; object-fit: contain; border-radius: 6px; }
.logo-ph, .m-logo-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--ph-bg);
  border: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
}
.logo-ph { width: 34px; height: 34px; font-size: 14px; }

.offer-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offer-line { font-size: 14.5px; }
.offer-line b { font-weight: 700; }
.offer-ad { font-size: 10.5px; color: var(--muted); opacity: .8; }
.chev { flex: 0 0 8px; width: 8px; height: 14px; color: var(--muted); }

.empty { color: var(--muted); }
.empty a { color: var(--text); }

.foot { padding-bottom: 32px; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--text); }

/* Форма e-mail для розыгрыша */
.offers > li.sub-li { grid-column: 1 / -1; display: block; }
.sub {
  padding: 20px;
  border-radius: var(--radius-card);
  border: 1.5px solid var(--red);
  background: linear-gradient(160deg, var(--sub-bg1), var(--sub-bg2));
  box-shadow: 0 0 40px rgba(227, 20, 27, 0.12);
}
.sub-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sub-text { margin: 0 0 14px; color: var(--text-2); font-size: 14px; }
.sub-row { display: flex; flex-direction: column; gap: 8px; }
.sub-input {
  min-height: 48px;
  width: 100%;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.sub-input::placeholder { color: var(--muted); }
.sub-input:focus { outline: none; border-color: var(--red-hot); box-shadow: 0 0 0 3px rgba(227, 20, 27, 0.25); }
.sub-btn {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--red-hot), var(--red) 55%, var(--red-deep));
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.sub-btn:disabled { opacity: .6; cursor: default; }
.sub-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.sub-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.sub-consent a { color: var(--text); }
.sub-msg { margin: 8px 0 0; font-size: 13px; min-height: 0; }
.sub-msg:empty { display: none; }
.sub-msg.is-error { color: #ff7b73; }
.sub.is-done { border-color: rgba(255, 255, 255, 0.14); }

.preview-flag {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffcf3d;
  color: #1a0d20;
  font-size: 12.5px;
  font-weight: 600;
}

.doc { color: var(--text-2); max-width: 75ch; }

/* Cookie-баннер */
.cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--cookie-bg);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: cookie-in .3s ease-out .6s both;
}
.cookie-text { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.cookie-text a { color: var(--text); }
.cookie-btn {
  align-self: stretch;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #1a0d20;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.cookie-btn:hover { background: #f1e9f4; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Окно акции */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 4, 12, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius-sheet);
  border: 1.5px solid var(--red);
  background: linear-gradient(170deg, var(--sheet1) 0%, var(--sheet2) 100%);
  box-shadow: 0 0 0 4px var(--badge-bg), 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 60px var(--accent-glow, rgba(227, 20, 27, 0.18));
  padding: 22px 20px 20px;
  animation: sheet-in .2s ease-out;
}
.sheet:focus { outline: none; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--ghost);
  color: var(--text);
  cursor: pointer;
}
.close svg { width: 12px; height: 12px; }
.close:hover { background: var(--line-strong); }

.m-logo { height: 54px; margin: 0 52px 16px 0; display: flex; align-items: center; }
.m-logo img { max-height: 54px; max-width: 180px; object-fit: contain; }
.m-logo-ph { width: 54px; height: 54px; font-size: 22px; border-radius: 12px; }

.badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 10px;
  border: 1px solid var(--red);
  border-radius: 7px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.m-title {
  margin: 0 0 12px;
  padding-right: 44px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.m-badge + .m-title, .m-logo + .m-title { padding-right: 0; }
.m-desc { margin: 0 0 16px; color: var(--text-2); font-size: 14px; }

.code-label { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 8px 8px 16px;
  border: 1.5px dashed var(--red);
  border-radius: 14px;
  background: var(--field);
}
.code-value {
  flex: 1;
  min-width: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
  user-select: all;
}
.code-value.is-loading { color: var(--muted); font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: 0; }
.copy-btn {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--ghost);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.copy-btn:hover { background: var(--line-strong); }
.copy-btn:disabled { opacity: .5; cursor: default; }
.code-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--red-hot), var(--red) 55%, var(--red-deep));
  box-shadow: 0 10px 28px var(--accent-glow, rgba(227, 20, 27, 0.4)), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: var(--on-accent);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.cta:hover { filter: brightness(1.08); }
.cta[aria-disabled="true"] { pointer-events: none; opacity: .45; box-shadow: none; }

.notice {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
}

.more { margin-top: 16px; border-top: 1px solid var(--line); }
.more details { border-bottom: 1px solid var(--line); }
.more summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; color: var(--muted); font-size: 18px; line-height: 1; }
.more details[open] summary::after { content: "−"; }
.more .more-body { padding: 0 0 12px; color: var(--text-2); font-size: 13px; }

.ad-line { margin: 14px 0 0; font-size: 11px; color: var(--muted); line-height: 1.4; }

.rules-text { color: var(--text-2); font-size: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff;
  color: #1a0d20;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.modal-open { overflow: hidden; }

/* Планшеты и десктоп */
@media (min-width: 720px) {
  body { font-size: 16px; }
  .top { padding-top: 32px; padding-bottom: 32px; }
  .brand-word { font-size: 28px; }
  .brand img { height: 36px; }
  .top-label { font-size: 12px; }
  .hero { margin: 24px 0 32px; }
  .prizes { margin-bottom: 28px; }
  .prizes-title { font-size: 18px; }
  .chips { display: flex; flex-wrap: wrap; gap: 10px; }
  .chips li { min-width: 150px; min-height: 40px; font-size: 11px; padding: 8px 22px; }
  .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .offer { min-height: 76px; padding: 16px 20px; }
  .offer-logo { flex-basis: 40px; height: 40px; }
  .offer-logo img { max-width: 40px; max-height: 40px; }
  .logo-ph { width: 40px; height: 40px; }
  .offer-line { font-size: 15.5px; }
  .sub { padding: 24px 28px; }
  .sub-row { flex-direction: row; }
  .sub-input { flex: 1; max-width: 420px; }
  .sub-title { font-size: 16px; }
  .sheet { padding: 28px 28px 24px; }
  .m-title { font-size: 17px; }
  .code-value { font-size: 19px; }
}
@media (min-width: 1080px) {
  .offers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
  .cookie { left: auto; right: 24px; bottom: 24px; max-width: 460px; flex-direction: row; align-items: center; padding: 16px 16px 16px 20px; }
  .cookie-btn { align-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie { animation: none; }
  .sheet { animation: none; }
  .offer { transition: none; }
}

/* ===== Главная-заглушка ===== */
body.home { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.home-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px 24px; max-width: 760px; margin: 0 auto; }
.home-logo { display: flex; align-items: baseline; gap: 10px; margin-bottom: 40px; }
.home-logo img { height: 56px; width: auto; max-width: 260px; }
.home-word { font-family: var(--display); font-weight: 900; font-size: clamp(48px, 10vw, 88px); letter-spacing: 0.02em; line-height: 1; }
.home-media { font-family: var(--display); font-weight: 700; font-size: clamp(14px, 2.4vw, 20px); letter-spacing: 0.3em; text-transform: uppercase; color: var(--red-hot); }
.home-title { margin: 0 0 16px; font-family: var(--display); font-weight: 700; font-size: clamp(18px, 3vw, 28px); line-height: 1.3; letter-spacing: 0.02em; text-transform: uppercase; max-width: 26ch; }
.home-text { margin: 0 0 32px; color: var(--text-2); font-size: 16px; line-height: 1.55; max-width: 52ch; }
.home-cta { width: auto; min-width: 240px; padding: 0 32px; margin-top: 0; border: 0; cursor: pointer; }
.home-foot { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 20px 24px calc(20px + env(safe-area-inset-bottom, 0px)); font-size: 12.5px; color: var(--muted); }
.home-foot a { color: var(--muted); }
.home-foot a:hover { color: var(--text); }
.home .sheet { max-width: 540px; }
.fb { display: grid; gap: 12px; }
.fb .m-title { margin-bottom: 4px; }
.fb-types { display: grid; gap: 6px; }
.fb-types label { cursor: pointer; }
.fb-types input { position: absolute; opacity: 0; pointer-events: none; }
.fb-types span { display: block; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--field); font-size: 14px; }
.fb-types input:checked + span { border-color: var(--red-hot); background: var(--badge-bg); box-shadow: inset 0 0 0 1px var(--red-hot); }
.fb-types input:focus-visible + span { outline: 2px solid var(--red-hot); outline-offset: 2px; }
.fb-row { display: grid; gap: 12px; }
.fb-field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.fb-field em { font-style: normal; color: var(--muted); }
.fb-field[hidden] { display: none; }
.fb .sub-input { min-height: 46px; font-size: 15px; }
.fb-msg { padding: 12px 14px; resize: vertical; line-height: 1.45; font: inherit; font-size: 15px; }
.fb .is-invalid { border-color: #ff7b73; box-shadow: 0 0 0 3px rgba(255, 123, 115, 0.2); }
.fb .sub-consent { margin-top: 0; }
.fb .cta { border: 0; cursor: pointer; margin-top: 4px; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (min-width: 600px) { .fb-row { grid-template-columns: 1fr 1fr; } .fb-types { grid-template-columns: repeat(3, 1fr); } .fb-types span { height: 100%; display: flex; align-items: center; font-size: 13px; } }
