/* Перекупский. Палитра: кузов «баклажан», бумага объявления, жёлтый ценник,
   красный маркер, синяя ручка. Шрифты: плакатный узкий гротеск + обычный + рукописный. */

:root {
  --paint: #3a1d3f;
  --paint-deep: #2b1430;
  --paper: #f6f6f1;
  --ink: #17131a;
  --ink-dim: #5c5560;
  --sticker: #ffd319;
  --sticker-edge: #b8940a;
  --marker: #e5281d;
  --pen: #2340b8;
  --chalk: #f3ecf5;
  --chalk-dim: #cdbfd1;
  --rule: rgba(243, 236, 245, 0.18);
  --cut: #b9b6ad;

  --display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --text: "Sofia Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;

  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --split: minmax(0, 5fr) minmax(0, 7fr);
  --split-gap: clamp(2rem, 6vw, 6rem);
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(90rem 46rem at 88% -8rem, #5d3567 0%, rgba(93, 53, 103, 0) 62%),
    linear-gradient(180deg, var(--paint) 0%, var(--paint-deep) 100%) var(--paint);
  color: var(--chalk);
  font: 400 1.0625rem/1.55 var(--text);
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  text-transform: uppercase;
  text-wrap: balance;
}

h2 {
  font-weight: 800;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 0.95;
}

:focus-visible {
  outline: 3px solid var(--sticker);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--sticker);
  color: var(--ink);
  font-weight: 800;
}

.skip:focus {
  top: 1rem;
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 0.3rem;
  font: 800 1.0625rem/1.1 var(--text);
  text-align: center;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.btn--sticker {
  background: var(--sticker);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--sticker-edge);
}

.btn--sticker:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--sticker-edge);
}

.btn--sticker:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--sticker-edge);
}

.btn--line {
  border-color: rgba(243, 236, 245, 0.45);
  color: var(--chalk);
}

.btn--line:hover {
  border-color: var(--chalk);
}

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

.btn--ink:hover {
  background: #2c2531;
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.9375rem;
}

/* Шапка и номер */

.top {
  padding: 1.1rem 0;
}

.top__row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand__name {
  font: 800 1.9rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.plate {
  display: inline-flex;
  flex: none;
  align-items: stretch;
  height: 2.25rem;
  overflow: hidden;
  border: 2px solid #111;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow: 0 0 0 1.5px #fff;
  color: #111;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1;
}

.plate__num {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.plate__reg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0 0.35rem;
  border-left: 2px solid #111;
}

.plate__reg b {
  font-size: 1.05rem;
}

.plate__reg i {
  font: 800 0.5rem/1 var(--text);
  letter-spacing: 0.05em;
}

.top__nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}

.top__nav a {
  color: var(--chalk-dim);
  text-decoration: none;
}

.top__nav a:hover {
  color: var(--chalk);
  text-decoration: underline;
}

/* Первый экран */

.hero {
  padding: clamp(1.5rem, 5vw, 4rem) 0 var(--section);
  overflow-x: clip;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero h1 {
  margin-bottom: 1.75rem;
  font-weight: 900;
  font-size: clamp(4.25rem, 11.5vw, 10rem);
  line-height: 0.84;
}

.lead {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
}

.hero__go {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
}

.hero__fine {
  max-width: 30rem;
  margin: 0;
  color: var(--chalk-dim);
  font-size: 0.9375rem;
}

/* Объявление с отрывными листочками */

.ad {
  position: relative;
  width: min(100%, 27rem);
  margin-inline: auto;
  color: var(--ink);
  transform: rotate(-2.2deg);
  filter: drop-shadow(0 22px 28px rgba(15, 4, 18, 0.55));
}

.ad__sheet {
  position: relative;
  padding: 2rem 1.75rem 1.5rem;
  border-bottom: 2px dashed var(--cut);
  background: var(--paper);
}

/* скотч */
.ad__sheet::before,
.ad__sheet::after {
  content: "";
  position: absolute;
  top: -0.8rem;
  width: 5.5rem;
  height: 1.9rem;
  background: rgba(245, 232, 190, 0.8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.ad__sheet::before {
  left: -1.7rem;
  transform: rotate(-38deg);
}

.ad__sheet::after {
  right: -1.7rem;
  transform: rotate(36deg);
}

.ad__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.2rem 0.8rem;
}

.ad__title {
  padding-bottom: 0.4rem;
  background: linear-gradient(var(--marker), var(--marker)) left bottom / 100% 0.26rem no-repeat;
  font-weight: 900;
  font-size: clamp(2.75rem, 5vw, 3.5rem);
  line-height: 0.9;
}

.ad__urgent {
  margin: 0 0 0.5rem;
  color: var(--marker);
  font: 700 2rem/1 var(--hand);
  transform: rotate(-7deg);
}

.ad__facts {
  margin: 1.25rem 0 0;
}

.ad__facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--cut);
}

.ad__facts dt {
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

.ad__facts dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.ad__note {
  max-width: 13.5rem;
  margin: 1.2rem 0 0.3rem;
  color: var(--pen);
  font: 700 1.5rem/1.1 var(--hand);
  transform: rotate(-1.5deg);
}

.ad__sticker {
  position: absolute;
  right: -2.3rem;
  bottom: 0.9rem;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.1rem;
  width: 7.6rem;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  background: var(--sticker);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  line-height: 1;
  transform: rotate(9deg);
}

.ad__sticker span {
  font-size: 0.8125rem;
  font-weight: 800;
}

.ad__sticker b {
  font: 900 2.7rem/0.95 var(--display);
  white-space: nowrap;
}

.strips {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.strips li {
  position: relative;
  min-height: 9.25rem;
}

.strips a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-left: 1px dashed var(--cut);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transform-origin: 50% 0;
  transition: transform 0.18s ease;
}

.strips li:first-child a {
  border-left: 0;
}

.strips a:hover,
.strips a:focus-visible {
  transform: translateY(5px) rotate(2.5deg);
}

.strips li:nth-child(odd) a:hover,
.strips li:nth-child(odd) a:focus-visible {
  transform: translateY(5px) rotate(-2.5deg);
}

.strips a:focus-visible {
  outline-color: var(--pen);
  outline-offset: -3px;
}

.strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}

.strip span {
  font: 600 0.875rem/1 var(--text);
}

.strip b {
  font: 900 1.5rem/1 var(--display);
}

/* оторванный листочек: остался рваный край */
.strips .is-torn::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.9rem;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 86% 80%, 70% 40%, 52% 100%, 36% 45%, 18% 85%, 0 30%);
}

@media (prefers-reduced-motion: no-preference) {
  .ad {
    animation: tape-up 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.15) 0.15s both;
  }

  .ad__sticker {
    animation: slap 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 0.85s both;
  }

  @keyframes tape-up {
    from {
      opacity: 0;
      transform: translateY(-28px) rotate(-7deg);
    }
    to {
      opacity: 1;
      transform: rotate(-2.2deg);
    }
  }

  @keyframes slap {
    from {
      opacity: 0;
      transform: scale(1.9) rotate(24deg);
    }
    to {
      opacity: 1;
      transform: rotate(9deg);
    }
  }
}

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

  .btn,
  .strips a {
    transition: none;
  }
}

/* Что под капотом */

.spec {
  padding: var(--section) 0;
}

.spec__grid {
  display: grid;
  grid-template-columns: var(--split);
  gap: var(--split-gap);
  align-items: start;
}

.spec__grid h2 {
  position: sticky;
  top: 2rem;
}

.spec__list {
  margin: 0;
}

.spec__list > div {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.5rem 2rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}

.spec__list > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.spec__list dt {
  font: 800 2rem/1 var(--display);
  text-transform: uppercase;
}

.spec__list dd {
  max-width: 34rem;
  margin: 0;
  color: var(--chalk-dim);
}

/* Как завести */

.start {
  padding: 0 0 var(--section);
}

.start__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.start__steps > li {
  position: relative;
  padding-top: 5.4rem;
  counter-increment: step;
}

.start__steps > li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  color: transparent;
  font: 900 5.5rem/0.8 var(--display);
  -webkit-text-stroke: 2px var(--sticker);
}

.start__steps h3 {
  margin-bottom: 0.6rem;
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
}

.start__steps p {
  margin: 0;
  color: var(--chalk-dim);
}

.apps {
  display: grid;
  gap: 0.45rem;
  margin: 1.1rem 0 0;
  font-size: 0.9688rem;
}

.apps > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.75rem;
}

.apps dd {
  margin: 0;
}

.apps a {
  color: var(--sticker);
}

.start__alt {
  margin: 2.75rem 0 0;
  color: var(--chalk-dim);
}

/* Цены: бумажная полоса */

.price {
  padding: var(--section) 0;
  background: var(--paper);
  color: var(--ink);
}

.price :focus-visible {
  outline-color: var(--pen);
}

.price__head {
  display: grid;
  grid-template-columns: var(--split);
  gap: var(--split-gap);
  align-items: end;
  margin-bottom: 2.5rem;
}

.price__head p {
  max-width: 30rem;
  margin: 0;
  color: var(--ink-dim);
  font-size: 1.1875rem;
}

.price__list {
  margin: 0;
  padding: 0;
  border-top: 3px solid var(--ink);
  list-style: none;
}

.price__row {
  display: grid;
  grid-template-columns: minmax(9rem, 1.4fr) minmax(7rem, 1fr) minmax(9rem, 1.4fr) auto;
  gap: 0.5rem 2rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid #cfccc2;
}

.price__term {
  font: 800 2.1rem/1 var(--display);
  text-transform: uppercase;
}

.price__sum {
  font: 900 2.6rem/1 var(--display);
  white-space: nowrap;
}

.price__per {
  color: var(--ink-dim);
}

.price__per em {
  display: block;
  margin-top: 0.15rem;
  color: var(--marker);
  font: 700 1.45rem/1.05 var(--hand);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.price__row .btn {
  min-width: 7rem;
}

.price__fine {
  max-width: 44rem;
  margin: 1.5rem 0 0;
  color: var(--ink-dim);
}

/* Вопросы */

.faq {
  padding: var(--section) 0;
}

.faq__grid {
  display: grid;
  grid-template-columns: var(--split);
  gap: var(--split-gap);
  align-items: start;
}

.faq details {
  border-top: 1px solid var(--rule);
}

.faq details:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 0;
  font: 800 1.7rem/1.05 var(--display);
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--sticker);
  font: 400 2rem/1 var(--text);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 38rem;
  margin: 0 0 1.4rem;
  color: var(--chalk-dim);
}

/* Подвал */

.foot {
  padding: 3rem 0 3.5rem;
  border-top: 1px solid var(--rule);
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.foot__say {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin: 0;
  font: 700 1.6rem/1.1 var(--hand);
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.foot__nav a,
.foot__copy {
  color: var(--chalk-dim);
}

.foot__nav a:hover {
  color: var(--chalk);
}

.foot__copy {
  width: 100%;
  margin: 0;
  font-size: 0.9375rem;
}

/* Страницы документов */

.doc {
  background: var(--paper);
  color: var(--ink);
}

.doc :focus-visible {
  outline-color: var(--pen);
}

.doc__top {
  padding: 1.1rem 0;
  border-bottom: 3px solid var(--ink);
}

.doc__top .brand {
  color: var(--ink);
}

.doc__body {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.doc__body h1 {
  margin-bottom: 0.75rem;
  font-weight: 900;
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  line-height: 0.92;
}

.doc__body h2 {
  margin: 2.25rem 0 0.6rem;
  font-size: 1.9rem;
  line-height: 1;
}

.doc__body p,
.doc__body li {
  max-width: 40rem;
}

.doc__body ul {
  padding-left: 1.2rem;
}

.doc__meta {
  color: var(--ink-dim);
}

.doc mark {
  padding: 0 0.2em;
  background: var(--sticker);
  color: var(--ink);
}

.doc__back {
  display: inline-block;
  margin-top: 2.5rem;
  font-weight: 800;
}

/* Узкие экраны */

.top__nav a {
  white-space: nowrap;
}

@media (max-width: 68rem) {
  .top__nav {
    display: none;
  }

  .top__row .btn {
    margin-left: auto;
  }
}

@media (max-width: 60rem) {

  .hero__grid,
  .spec__grid,
  .faq__grid,
  .price__head {
    grid-template-columns: minmax(0, 1fr);
  }

  .spec__grid,
  .faq__grid,
  .price__head {
    gap: 1.75rem;
  }

  .hero__ad {
    margin-top: 3rem;
  }

  .spec__grid h2 {
    position: static;
  }

  .start__steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.75rem;
  }
}

@media (max-width: 40rem) {
  .top__row {
    gap: 0.75rem;
  }

  .brand__name {
    font-size: 1.6rem;
  }

  .top .plate {
    display: none;
  }

  .top__row .btn {
    white-space: nowrap;
  }

  .plate {
    height: 1.9rem;
  }

  .plate__num {
    padding: 0 0.35rem;
    font-size: 1.3rem;
  }

  .hero__go .btn {
    flex: 1 1 100%;
  }

  .ad__sticker {
    right: -0.7rem;
    width: 6.6rem;
  }

  .ad__sticker b {
    font-size: 2.3rem;
  }

  .spec__list > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .price__row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.3rem 1rem;
  }

  .price__term,
  .price__sum,
  .price__per {
    grid-column: 1;
  }

  .price__row .btn {
    grid-column: 2;
    grid-row: 1 / span 3;
    min-width: 5.5rem;
  }

  .faq summary {
    font-size: 1.45rem;
  }
}
