:root {
  --c-bg: #f2d4ef;
  --c-purple: #735ca3;
  --c-purple-light: #866cad;
  --c-accent: #cb693d;
  --c-gray: #d8d8d8;
  --f-title: "Montserrat", Arial, sans-serif;
  --f-text: "Roboto Slab", Georgia, serif;
  --f-btn: Tahoma, Verdana, Arial, sans-serif;
  --header-h: 113px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.3;
  color: #000;
  padding-top: var(--header-h);
  background: var(--c-bg);
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.container { width: 100%; max-width: 1210px; margin: 0 auto; padding: 0 20px; }
.container--wide { max-width: 1223px; }

.title {
  font-family: var(--f-title);
  font-weight: 900;
  font-size: 48px;
  line-height: 1.1;
  text-align: center;
}

/* ---------- Кнопки в стиле Windows 95 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 157px;
  height: 54px;
  padding: 0 24px;
  border: 0;
  font-family: var(--f-btn);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--c-purple);
  box-shadow: inset 2px 2px #d5d0df, inset -2px -2px #4a3770, 0 3px 6px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: filter .2s, transform .1s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); box-shadow: inset 2px 2px #4a3770, inset -2px -2px #d5d0df; }
.btn--gray { color: #000; background: var(--c-gray); box-shadow: inset 2px 2px #f4f4f4, inset -2px -2px #9a9a9a, 0 3px 6px rgba(0, 0, 0, .25); }
.btn--gray:active { box-shadow: inset 2px 2px #9a9a9a, inset -2px -2px #f4f4f4; }
.btn--wide { min-width: 210px; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: #000;
  transition: transform .25s steps(5);
}
/* На телефоне шапка уезжает при прокрутке вниз и возвращается при прокрутке вверх */
.header.is-hidden { transform: translateY(calc(-100% - 12px)); }
.header__inner { display: flex; align-items: center; height: 100%; }
.header__logo { flex-shrink: 0; }
.nav { display: flex; gap: 22px; margin-left: 87px; }
.nav__link {
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  transition: color .2s;
}
.nav__link:hover,
.nav__link.is-active { color: var(--c-accent); }

.social { display: flex; gap: 12px; margin-left: auto; margin-right: 22px; }
.social__link {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: #333;
  transition: background .2s;
}
.social__link:hover { background: var(--c-accent); }
.social__link svg { width: 15px; height: 15px; }
.social--big { gap: 31px; margin-right: 0; }
.social--big .social__link { width: 38px; height: 38px; }
.social--big .social__link svg { width: 20px; height: 20px; }

.burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: max(560px, 47.8vw);
  padding: 40px 20px;
  background: #685ba2 url("../img/banner-bg.jpg") center / cover no-repeat;
  overflow: hidden;
}
.hero__content { width: min(745px, 100%); margin-top: 1.5%; }
.hero__window { position: relative; container-type: inline-size; }
.hero__window-frame { width: 100%; }
.hero__title {
  position: absolute;
  inset: 13.7% 2% 5% 1.7%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-title);
  font-weight: 900;
  font-size: 11cqw;
  line-height: .98;
  text-transform: uppercase;
  text-align: center;
  color: var(--c-purple);
}
.hero__sprite { position: absolute; max-width: none; pointer-events: none; }
.hero__sprite--hourglass { left: 5.77%; top: 91.4%; width: 7.65%; }
.hero__sprite--files { left: 97.58%; top: 28.52%; width: 15.7%; }
.hero__sprite--cursor { left: 91.28%; top: 93.13%; width: 4.3%; }
.hero__buttons { display: flex; justify-content: center; gap: 44px; margin-top: 37px; }

/* ---------- Розыгрыш в цифрах ---------- */
.stats { padding: 104px 0 0; }
.stats__list {
  display: flex;
  justify-content: center;
  gap: 40px 116px;
  margin-top: 58px;
}
.stats__item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stats__num { display: block; min-height: 61px; font-size: 60px; line-height: 1; font-variant-numeric: tabular-nums; }
.stats__label { margin-top: 14px; font-weight: 700; font-size: 21px; line-height: 1.05; }

/* ---------- Окно / форма ---------- */
.participate { padding: 88px 20px 97px; }
.participate__stage { position: relative; width: 1218px; max-width: 100%; margin: 0 auto; }
.participate__decor { width: 1218px; max-width: none; }
.participate__win { position: absolute; left: 234px; top: 3px; width: 741px; }
.participate__submit { position: absolute; left: 502px; top: 405px; }

.win {
  padding: 0 10px 12px 13px;
  background: var(--c-gray);
  box-shadow: inset -2px -2px #565656, inset -4px -4px #8e8e8e, inset 2px 2px #fff;
}
.win__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 62px;
  margin: 0 -10px 9px -13px;
  padding: 0 14px;
  background: linear-gradient(90deg, #643f8a 0%, #8a5d9e 35%, #b179ae 60%, #e6a8d2 100%);
}
.win__title {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--f-title);
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}
.win__age {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid #000;
  border-radius: 50%;
  font-family: var(--f-title);
  font-size: 13px;
  color: #000;
}
.win__controls { display: flex; gap: 5px; }
.win__ctl {
  position: relative;
  width: 28px;
  height: 26px;
  background: var(--c-gray);
  box-shadow: inset 2px 2px #fff, inset -2px -2px #565656;
}
.win__ctl::before,
.win__ctl::after { content: ""; position: absolute; background: #000; }
.win__ctl--min::before { left: 8px; right: 8px; bottom: 7px; height: 3px; }
.win__ctl--max::before { left: 7px; right: 7px; top: 6px; bottom: 6px; background: none; border: 2px solid #000; border-top-width: 4px; }
.win__ctl--close::before,
.win__ctl--close::after { left: 50%; top: 5px; width: 3px; height: 16px; margin-left: -1.5px; transform: rotate(45deg); }
.win__ctl--close::after { transform: rotate(-45deg); }
.win__body {
  background: #fff4f6;
  box-shadow: inset 2px 2px #8e8e8e;
}

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 28px;
  min-height: 281px;
  padding: 25px 59px 22px 72px;
  align-content: start;
}
.form__wide { grid-column: 1 / -1; }
.form__wide ~ .field:not(.form__wide):not(.field--promo) { margin-top: 5px; }
.field {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  font-size: 16px;
  background: #fff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .1), 0 0 4px rgba(255, 255, 255, .8);
  cursor: text;
}
.field span { flex-shrink: 0; }
.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  font: inherit;
  background: transparent;
}
.field input::placeholder { color: #aaa; }
.field:focus-within { box-shadow: 0 0 0 2px var(--c-purple-light), 0 3px 6px rgba(0, 0, 0, .1); }
.field.is-error { box-shadow: 0 0 0 2px #e0475a, 0 3px 6px rgba(0, 0, 0, .1); }
.field--promo {
  grid-column: 1 / -1;
  justify-self: center;
  width: 276px;
  height: 47px;
  margin-top: -1px;
  padding: 0 20px;
  border: 1px solid #000;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
}
.field--promo span { font-weight: 700; }
.field--promo:focus-within { box-shadow: 0 0 0 2px var(--c-purple-light); }
.field--promo.is-error { box-shadow: 0 0 0 2px #e0475a; }
.form__message { font-size: 14px; text-align: center; }
.form__message:empty { display: none; }
.form__message.is-error { color: #d03246; }

/* ---------- Условия ---------- */
.conditions {
  position: relative;
  min-height: 842px;
  padding: 79px 0 90px;
  color: #fff;
  background: linear-gradient(180deg, #695ca3 0%, #9875b3 36%, #be86c0 60%, #e597cd 84%, #f6a3d6 100%);
  overflow: hidden;
}
.conditions__inner { position: relative; z-index: 1; padding-left: 90px; }
.conditions__logo { width: 249px; filter: brightness(0) invert(1); }
.conditions__title {
  margin-top: 77px;
  font-family: var(--f-title);
  font-weight: 900;
  font-size: 43px;
  line-height: 1;
}
.conditions__list { max-width: 700px; margin-top: 28px; padding: 0; list-style: none; font-size: 23px; line-height: 1.25; counter-reset: step; }
.conditions__list li { position: relative; padding-left: 46px; counter-increment: step; }
/* номер шага — пиксельная «клавиша» в стиле Win98 */
.conditions__list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  color: var(--c-purple);
  background: var(--c-gray);
  box-shadow: inset 2px 2px #fff, inset -2px -2px #565656, 3px 3px 0 rgba(40, 20, 70, .3);
}
.conditions__list li + li { margin-top: 14px; }
.conditions__note {
  max-width: 700px;
  margin-top: 22px;
  font-weight: 700;
  font-size: 23px;
  line-height: 1.25;
}
.conditions__list b { font-weight: 700; }
.conditions__rules {
  display: inline-block;
  margin: 18px 0 0;
  font-weight: 300;
  font-size: 23px;
}
.conditions__rules:hover,
.conditions__list a:hover { color: var(--c-bg); }
.conditions__pic {
  position: absolute;
  left: calc(50% + 181px);
  top: 81px;
  width: 779px;
  max-width: none;
}
.dino {
  position: absolute;
  left: 45px;
  bottom: 2px;
  width: 420px;
  height: 129px;
  overflow: hidden;
  cursor: pointer;
}
.dino__rex { position: absolute; left: 0; bottom: 0; width: 119px; z-index: 1; }
.dino__cactus { position: absolute; left: 171px; bottom: 0; width: 138px; }

/* ---------- Призы ---------- */
.prizes { padding: 77px 0 0; }
.prize-main {
  position: relative;
  margin-top: 60px;
  aspect-ratio: 1183 / 322;
  background: var(--c-purple-light);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .3);
}
.prize-main__img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
}
.prize-main__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 73px 0 33px 70px;
  color: #fff;
}
.prize-main__name { font-family: var(--f-title); font-weight: 900; font-size: 53px; line-height: 1.05; }
.prize-main__name span { display: block; margin-top: 4px; font-weight: 400; font-size: 30px; }
.prize-main__note { font-weight: 700; font-size: 16px; line-height: 1.25; }

.prizes__row { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 48px; }
.prize { background: #000; box-shadow: 0 5px 10px rgba(0, 0, 0, .3); }
.prize img { width: 100%; }
.prize__name {
  display: flex;
  align-items: center;
  min-height: 65px;
  padding: 8px 20px 8px 69px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  color: #fff;
}
.prizes__action { display: flex; justify-content: center; margin-top: 82px; }

/* ---------- Победители ---------- */
.winners {
  position: relative;
  padding: 97px 0 55px;
  background: url("../img/winners-bg.png") center top / 1920px auto no-repeat;
}
.winners__grid {
  display: grid;
  grid-template-columns: repeat(3, 373px);
  justify-content: center;
  gap: 60px 27px;
  margin-top: 40px;
}
.winner__title { font-weight: 700; font-size: 20px; line-height: 1.2; }
.winner__photo {
  margin-top: 6px;
  aspect-ratio: 373 / 283;
  width: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.winner:hover .winner__photo { transform: scale(1.02); }
.winner__info { margin-top: 8px; font-size: 14px; line-height: 1.45; }
.winner__info b { font-weight: 700; }
.winner:last-child:nth-child(3n + 1) { grid-column: 2; }

/* ---------- Footer ---------- */
.footer { padding: 31px 0 26px; color: #fff; background: #000; }
.footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.footer__site { font-family: var(--f-btn); font-weight: 700; font-size: 16px; text-decoration: none; }
.footer__site:hover { color: var(--c-accent); }
.footer__logo { width: 207px; }
.footer .social { justify-self: end; margin-right: 0; }
.footer__copy { margin-top: 23px; padding: 0 20px; font-size: 10px; text-align: center; color: var(--c-accent); }

/* ---------- Адаптив ---------- */
@media (max-width: 1240px) {
  .participate__stage { width: 741px; }
  .participate__decor { display: none; }
  .participate__win { position: static; width: auto; }
  .participate__submit { position: relative; left: auto; top: auto; display: flex; margin: 37px auto 0; }

  .conditions__inner { padding-left: 20px; }
  .conditions__pic { left: auto; right: -260px; opacity: .55; }
}

@media (max-width: 1100px) {
  .nav { margin-left: 40px; }
  .social { margin-right: 0; }
  .winners__grid { grid-template-columns: repeat(2, minmax(0, 373px)); }
  .winner:last-child:nth-child(3n + 1) { grid-column: auto; }
  .winner:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 14px); }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .header__logo img { width: 124px; }
  .burger {
    position: relative;
    display: block;
    width: 36px;
    height: 36px;
    margin-left: 20px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .burger span,
  .burger span::before,
  .burger span::after {
    position: absolute;
    left: 6px;
    right: 6px;
    height: 2px;
    background: #fff;
    transition: transform .25s, background .25s;
  }
  .burger span { top: 17px; }
  .burger span::before,
  .burger span::after { content: ""; left: 0; right: 0; }
  .burger span::before { top: -8px; }
  .burger span::after { top: 8px; }
  .header.is-open .burger span { background: transparent; }
  .header.is-open .burger span::before { transform: translateY(8px) rotate(45deg); }
  .header.is-open .burger span::after { transform: translateY(-8px) rotate(-45deg); }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 10px 20px 20px;
    background: #000;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .header.is-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 12px 0; font-size: 18px; }

  .title { font-size: 36px; }
  .stats { padding-top: 64px; }
  .stats__list { flex-wrap: wrap; gap: 32px 48px; margin-top: 40px; }
  .stats__label { font-size: 18px; }

  .win__title { font-size: 30px; gap: 10px; }
  .win__bar { height: 50px; }

  .conditions { min-height: 0; padding: 56px 0 170px; }
  .conditions__title { margin-top: 48px; font-size: 32px; }
  .conditions__list,
  .conditions__note { font-size: 19px; }
  .conditions__rules { font-size: 17px; }
  .conditions__pic { right: -200px; top: auto; bottom: -40px; width: 480px; opacity: .35; }
  .dino { transform: scale(.65); transform-origin: left bottom; }

  .prizes { padding-top: 64px; }
  .prize-main { aspect-ratio: auto; min-height: 260px; overflow: hidden; }
  .prize-main__img { left: auto; right: -30%; width: 130%; }
  .prize-main__text { padding: 40px 30px; gap: 24px; }
  .prize-main__name { font-size: 36px; }
  .prize-main__name span { font-size: 22px; }
  .prizes__row { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
  .prize__name { padding-left: 30px; }
  .prizes__action { margin-top: 48px; }

  .winners { padding-top: 72px; background-size: 1400px auto; }
}

@media (max-width: 640px) {
  .header .social { display: none; }
  .burger { margin-left: auto; }

  .hero { min-height: 480px; }
  .hero__buttons { gap: 16px; margin-top: 28px; }
  .hero__buttons .btn { min-width: 0; flex: 1; max-width: 157px; }

  .title { font-size: 28px; }
  .stats__list { flex-direction: column; align-items: center; }

  .participate { padding: 56px 12px 64px; }
  .win { padding: 0 6px 8px 8px; }
  .win__bar { margin: 0 -6px 6px -8px; padding: 0 8px; height: 42px; }
  .win__title { font-size: 20px; gap: 8px; }
  .win__age { width: 24px; height: 24px; font-size: 10px; border-width: 1.5px; }
  .win__ctl { width: 20px; height: 18px; }
  .win__controls { gap: 3px; }
  .win__ctl--min::before { left: 5px; right: 5px; bottom: 4px; height: 2px; }
  .win__ctl--max::before { left: 5px; right: 5px; top: 4px; bottom: 4px; border-width: 1.5px; border-top-width: 3px; }
  .win__ctl--close::before,
  .win__ctl--close::after { top: 3px; height: 12px; width: 2px; margin-left: -1px; }
  .form { grid-template-columns: minmax(0, 1fr); gap: 12px; min-height: 0; padding: 20px 14px; }
  .form__wide ~ .field:not(.form__wide):not(.field--promo) { margin-top: 0; }
  .field--promo { width: 100%; max-width: 276px; margin-top: 6px; }

  .conditions__logo { width: 180px; }
  .conditions__title { font-size: 26px; }
  .conditions__list,
  .conditions__note { font-size: 16px; }
  .conditions__list li { padding-left: 38px; }
  .conditions__list li::before { width: 26px; height: 26px; font-size: 10px; top: -2px; }
  .conditions__rules { font-size: 15px; }
  .dino { left: 12px; transform: scale(.5); }

  /* на телефоне — текст сверху, телефон целиком под ним */
  .prize-main { display: flex; flex-direction: column; min-height: 0; }
  .prize-main picture { display: contents; }
  .prize-main__img { position: static; order: 2; width: 100%; margin-top: 4px; }
  .prize-main__text { height: auto; gap: 16px; padding: 28px 20px 0; }
  .prize-main__name { font-size: 28px; }
  .prize-main__name span { font-size: 18px; }
  .prize__name { padding: 10px 20px; font-size: 16px; }

  .winners__grid { grid-template-columns: minmax(0, 373px); gap: 40px; }
  .winner:last-child:nth-child(odd) { grid-column: auto; width: auto; }

  .footer__inner { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .footer__logo { order: -1; }
  .footer .social { justify-self: center; }
}

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