/* =========================================================
   Красная Шляпка — рисованный стиль «бумага и тушь»
   ========================================================= */

:root {
  --paper: #f5ecd7;
  --paper-light: #fff8ea;
  --kraft: #e6cf9f;
  --cream: #fff6e4;
  --ink: #2b1b12;
  --ink-soft: #5d4838;
  --red: #cf3a24;
  --red-deep: #a02614;
  --moss: #7d9a4f;
  --forest: #2e4424;
  --forest-2: #3c5a2e;
  --ochre: #e0a93b;

  --font-draw: "Amatic SC", "Comic Sans MS", cursive;
  --font-hand: "Caveat", "Comic Sans MS", cursive;
  --font-body: "Nunito", system-ui, sans-serif;

  /* неровные «нарисованные» скругления */
  --wobble-1: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobble-2: 18px 225px 18px 255px / 255px 18px 225px 18px;
  --wobble-3: 30px 12px 26px 14px / 14px 28px 12px 30px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .12 .55 0 0 0 -.22'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 14'%3E%3Cpath d='M3 8 C20 2 34 12 52 7 S86 3 104 8 S140 12 157 5' fill='none' stroke='%232b1b12' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--grain);
}
body.locked { overflow: hidden; }

main { overflow-x: clip; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

h1, h2, h3 {
  font-family: var(--font-draw);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 .4em;
  letter-spacing: .01em;
}
p { margin: 0 0 1em; }

.hand { font-family: var(--font-hand); font-weight: 700; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}
.wrap--narrow { max-width: 840px; }

:focus-visible {
  outline: 3px dashed var(--red);
  outline-offset: 3px;
}

/* ---------- Нарисованные примитивы ---------- */

.sketch-box {
  background: var(--paper-light);
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-1);
  box-shadow: 5px 6px 0 var(--ink);
}
.sketch-box--alt { border-radius: var(--wobble-2); }

.btn {
  --bg: var(--red);
  --fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .55em 1.3em .6em;
  font-family: var(--font-draw);
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--fg);
  background: var(--bg);
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-1);
  box-shadow: 3px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s, background-color .2s;
}
.btn:hover { transform: translate(-1px, -2px) rotate(-1deg); box-shadow: 5px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 1em; height: 1em; flex: none; }
.btn--ghost { --bg: var(--paper-light); --fg: var(--ink); border-radius: var(--wobble-2); }
.btn--light { --bg: var(--cream); --fg: var(--ink); }
.btn--sm { font-size: 1.35rem; padding: .45em 1em .5em; }
.btn--block { width: 100%; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 1.2rem;
  text-decoration: none;
  background: var(--paper-light);
  border: 2.5px solid var(--ink);
  border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  box-shadow: 2px 3px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.icon-btn:hover { transform: translate(-1px, -2px) rotate(-4deg); box-shadow: 3px 5px 0 var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--paper);
  background-image: var(--grain);
}
.header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 10px;
  background: var(--wave) repeat-x center / 160px 10px;
  opacity: 0;
  transition: opacity .25s;
}
.header.is-scrolled::after { opacity: .9; }

.header__row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 78px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.logo__icon { width: 46px; height: 52px; filter: url(#rough-a); transition: transform .3s; }
.logo:hover .logo__icon { transform: rotate(-10deg) scale(1.05); }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__text b { font-family: var(--font-draw); font-size: 2.1rem; }
.logo__text small { font-family: var(--font-hand); font-size: 1.05rem; color: var(--red); margin-top: 2px; }

.nav { display: flex; gap: 22px; }
.nav a {
  position: relative;
  font-family: var(--font-draw);
  font-weight: 700;
  font-size: 1.6rem;
  text-decoration: none;
  padding: 4px 2px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 8px;
  background: var(--wave) no-repeat center / 100% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.nav a:hover::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 10px; }

.cart-count {
  position: absolute;
  top: -8px; right: -9px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .8rem;
  color: var(--cream);
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: bump .45s ease; }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.45) rotate(-12deg); }
  100% { transform: scale(1); }
}

.burger {
  display: none;
  width: 46px; height: 46px;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper-light);
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-3);
  box-shadow: 2px 3px 0 var(--ink);
}
.burger span { display: block; height: 3px; background: var(--ink); border-radius: 3px; transition: transform .25s, opacity .2s; }
.burger span:nth-child(2) { width: 80%; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Первый экран ---------- */

.hero { padding: 36px 0 70px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero__kicker {
  display: inline-block;
  font-size: 1.7rem;
  color: var(--red);
  transform: rotate(-2deg);
  margin-bottom: .3em;
}
.hero h1 { font-size: clamp(3.3rem, 6.6vw, 6rem); line-height: .95; margin-bottom: .35em; }

.scribble {
  position: relative;
  color: var(--red);
  white-space: nowrap;
}
.scribble::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -.12em;
  height: .28em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M4 12 C60 4 120 17 180 9 S262 6 296 11 M22 19 C90 12 178 21 282 15' fill='none' stroke='%232b1b12' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.hero__lead { font-size: 1.15rem; max-width: 36ch; color: var(--ink-soft); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 30px; }

.stamps { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }
.stamp {
  --c: var(--red);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1;
  padding: 6px 14px 8px;
  color: var(--c);
  border: 2.5px solid var(--c);
  border-radius: var(--wobble-3);
  transform: rotate(-3deg);
}
.stamp--green { --c: var(--forest-2); transform: rotate(2deg); }
.stamp--ochre { --c: #a86d10; transform: rotate(-1deg); }

.hero__art { position: relative; }
.scene { width: 100%; height: auto; overflow: visible; }

/* «кипящий» контур — линии чуть шевелятся, как в рисованной анимации */
.boil { animation: boil .6s steps(1) infinite; }
@keyframes boil {
  0% { filter: url(#rough-a); }
  33% { filter: url(#rough-b); }
  66% { filter: url(#rough-c); }
}

.sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite alternate; }
.sway--slow { animation-duration: 7s; }
.sway--fast { animation-duration: 3.6s; animation-delay: -1s; }
@keyframes sway {
  from { transform: rotate(-2.2deg); }
  to { transform: rotate(2.2deg); }
}

.spores circle { transform-box: fill-box; animation: spore 6s ease-in-out infinite; }
.spores circle:nth-child(2) { animation-delay: -1.5s; animation-duration: 7s; }
.spores circle:nth-child(3) { animation-delay: -3s; }
.spores circle:nth-child(4) { animation-delay: -4.2s; animation-duration: 8s; }
.spores circle:nth-child(5) { animation-delay: -2.4s; animation-duration: 5.5s; }
@keyframes spore {
  0%, 100% { transform: translate(0, 0); opacity: .9; }
  50% { transform: translate(8px, -26px); opacity: .45; }
}

.note {
  position: absolute;
  font-size: 1.75rem;
  line-height: 1;
  margin: 0;
  pointer-events: none;
}
.note--hero { top: 6%; left: -1%; transform: rotate(-9deg); }
.note svg { width: 72px; position: absolute; left: 84%; top: 40%; }

/* ---------- Лента ---------- */

.ribbon {
  position: relative;
  z-index: 3;
  width: 104%;
  margin: 0 -2% -14px;
  padding: 10px 0 12px;
  overflow: hidden;
  color: var(--cream);
  background: var(--red);
  border-block: 3px solid var(--ink);
  transform: rotate(-1.6deg);
}
.ribbon__track {
  display: flex;
  width: max-content;
  font-family: var(--font-draw);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Секции ---------- */

.section-head { text-align: center; margin-bottom: 44px; }
.section-head .hand {
  display: inline-block;
  font-size: 1.7rem;
  color: var(--red);
  transform: rotate(-2deg);
  margin-bottom: .1em;
}
.section-head h2 { font-size: clamp(3rem, 6vw, 4.6rem); margin-bottom: .15em; }
.section-head h2::after {
  content: "";
  display: block;
  width: 150px;
  height: 12px;
  margin: 8px auto 0;
  background: var(--wave) no-repeat center / 100% 100%;
}
.section-head__sub { color: var(--ink-soft); max-width: 44ch; margin: 10px auto 0; }

.paper-kraft {
  position: relative;
  background-color: var(--kraft);
  background-image: var(--grain);
}
.torn { position: absolute; left: 0; width: 100%; height: 28px; fill: var(--kraft); }
.torn--top { top: -27px; }
.torn--bottom { bottom: -27px; transform: scaleY(-1); }

/* ---------- Ассортимент ---------- */

.catalog { margin-top: 26px; padding: 84px 0 80px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 46px; }
.chip {
  font-family: var(--font-draw);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  padding: 8px 20px 10px;
  background: var(--paper-light);
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-3);
  box-shadow: 2px 3px 0 var(--ink);
  transition: transform .15s, background-color .2s, color .2s;
}
.chip:hover { transform: rotate(-2deg); }
.chip.is-active { background: var(--ink); color: var(--cream); }

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 32px;
}

.card {
  --tilt: 0deg;
  position: relative;
  flex: 1 1 280px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  background: var(--paper-light);
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-3);
  box-shadow: 6px 7px 0 var(--ink);
  transform: rotate(var(--tilt));
  transition: transform .25s, box-shadow .25s;
}
.card:nth-child(even) { border-radius: 14px 30px 12px 28px / 28px 12px 30px 14px; }
.card:hover { transform: rotate(0deg) translateY(-5px); box-shadow: 9px 12px 0 var(--ink); }
.card[hidden] { display: none; }

.card__badge {
  position: absolute;
  top: -16px;
  right: 18px;
  z-index: 2;
  padding: 2px 14px 5px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--cream);
  background: var(--red);
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-3);
  transform: rotate(6deg);
}

.card__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 16px 16px 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  cursor: zoom-in;
}
.card__more {
  position: absolute;
  left: 26px;
  bottom: -12px; /* на нижней рамке, чтобы не закрывать товар */
  padding: 1px 10px 3px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-3);
  transform: rotate(-3deg);
  transition: transform .2s;
}
.card__media:hover .card__more { transform: rotate(0) scale(1.06); }
.card__title[data-open] { cursor: pointer; }
.card__media img {
  width: 100%;
  aspect-ratio: 240 / 210;
  /* товар виден целиком: фото вписывается в рамку, свободное место — белый фон, как на самих фото */
  object-fit: contain;
  padding: 6px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--wobble-3);
}
.art { width: 100%; height: auto; filter: url(#rough-a); overflow: visible; }
.art-num { font-family: var(--font-draw); font-weight: 700; font-size: 42px; text-anchor: middle; fill: var(--ink); }
.art-word { font-family: var(--font-draw); font-weight: 700; font-size: 30px; text-anchor: middle; fill: var(--ink); }
.art-small { font-family: var(--font-hand); font-weight: 700; font-size: 17px; text-anchor: middle; fill: var(--red-deep); }

.card__body { flex: 1; display: flex; flex-direction: column; padding: 22px 22px 22px; }
.card__title { font-size: 2.3rem; margin-bottom: .25em; }
.card__title span { font-family: var(--font-hand); font-size: 1.5rem; color: var(--red); white-space: nowrap; }
.card__desc { font-size: .98rem; color: var(--ink-soft); margin-bottom: 0; }
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  min-height: 70px;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 0) repeat-x top / 12px 2px;
  background-position: 0 6px;
}
.price { font-family: var(--font-draw); font-weight: 700; font-size: 2.4rem; line-height: 1; white-space: nowrap; }

.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-3);
  box-shadow: 3px 4px 0 var(--ink);
}
.stepper button {
  width: 40px;
  height: 42px;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.3rem;
  background: none;
  border: 0;
}
.stepper button:hover { color: var(--red); }
.stepper span { min-width: 26px; text-align: center; font-weight: 800; font-size: 1.1rem; line-height: 1; }
.stepper--sm { box-shadow: none; }
.stepper--sm button { width: 32px; height: 34px; font-size: 1.1rem; }
.stepper--sm span { font-size: 1rem; }

.catalog__note {
  text-align: center;
  font-size: 1.4rem;
  color: var(--ink-soft);
  transform: rotate(-1deg);
  margin: 46px 0 0;
}

/* ---------- Как собираю ---------- */

.process { padding: 110px 0 90px; }
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 10%; right: 10%; top: 58px;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 40' preserveAspectRatio='none'%3E%3Cpath d='M2 20 C100 -4 160 44 266 20 S430 -4 534 20 S700 44 798 18' fill='none' stroke='%23cf3a24' stroke-width='3' stroke-dasharray='2 12' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.step { text-align: center; }
.step__art {
  width: 100%;
  max-width: 190px;
  height: auto;
  margin: 0 auto;
  filter: url(#rough-b);
  transition: transform .3s;
}
.step:hover .step__art { transform: rotate(-4deg) scale(1.04); }
.step__num {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin: 8px auto 10px;
  font-family: var(--font-draw);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--cream);
  background: var(--red);
  border: 2.5px solid var(--ink);
  border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  transform: rotate(-6deg);
}
.step h3 { font-size: 2.3rem; margin-bottom: .2em; }
.step p { color: var(--ink-soft); max-width: 28ch; margin-inline: auto; font-size: 1rem; }

/* ---------- О проекте ---------- */

.about {
  --band: var(--forest-2);
  position: relative;
  margin: 40px 0;
  padding: 90px 0;
  color: var(--ink);
  background-color: var(--band);
  background-image: var(--grain);
}
.about::before, .about::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26 L0 14 C60 4 110 20 180 12 S300 2 380 13 S520 22 600 10 S760 2 840 14 S980 22 1060 11 S1160 6 1200 12 L1200 26 Z' fill='%233c5a2e'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.about::before { top: -25px; }
.about::after { bottom: -25px; transform: scaleY(-1); }

.about__grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.polaroid {
  position: relative;
  justify-self: center;
  max-width: 420px;
  margin: 0;
  padding: 14px 14px 64px;
  background: #fffdf6;
  border: 2px solid var(--ink);
  box-shadow: 8px 10px 0 rgba(20, 12, 6, .45);
  transform: rotate(-4deg);
}
.polaroid__img { border: 2px solid var(--ink); overflow: hidden; }
.polaroid__img img, .polaroid__img svg { width: 100%; height: auto; }
.polaroid__img svg { filter: url(#rough-a); }
.polaroid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  font-size: 1.7rem;
  line-height: 1;
}

.tape {
  position: absolute;
  width: 118px;
  height: 32px;
  background: rgba(238, 214, 150, .82);
  clip-path: polygon(0 8%, 6% 0, 12% 10%, 18% 0, 100% 0, 94% 12%, 100% 26%, 95% 40%, 100% 55%, 94% 70%, 100% 86%, 96% 100%, 0 100%, 5% 84%, 0 68%, 6% 52%, 0 36%, 5% 20%);
}
.tape--tl { top: -14px; left: -26px; transform: rotate(-32deg); }
.tape--tr { top: -16px; right: 40px; transform: rotate(6deg); }

.letter {
  position: relative;
  padding: 40px 44px 34px 78px;
  background-color: #fbf3df;
  background-image:
    linear-gradient(90deg, transparent 54px, rgba(207, 58, 36, .45) 54px 56px, transparent 56px),
    repeating-linear-gradient(transparent 0 33px, rgba(60, 100, 150, .2) 33px 34px);
  background-position: 0 0, 0 18px;
  border: 2px solid var(--ink);
  border-radius: 6px 14px 8px 12px;
  box-shadow: 8px 10px 0 rgba(20, 12, 6, .45);
  transform: rotate(1.2deg);
}
.letter p { line-height: 34px; margin: 0; text-indent: 1.4em; }
.letter h2 { font-size: 3.6rem; line-height: 68px; margin: 0; }
.letter .letter__hello { font-size: 2rem; color: var(--red); text-indent: 0; }
.letter .letter__sign { font-size: 1.7rem; text-align: right; text-indent: 0; margin-top: 8px; }

/* ---------- Доставка ---------- */

.delivery { padding: 100px 0 40px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.info { position: relative; padding: 38px 30px 28px; }
.info:nth-child(1) { transform: rotate(-1deg); }
.info:nth-child(2) { transform: rotate(.8deg); background: #eef0d8; }
.info:nth-child(3) { transform: rotate(-.5deg); }
.info__icon {
  position: absolute;
  top: -26px; left: 26px;
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--ochre);
  border: 2.5px solid var(--ink);
  border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  transform: rotate(-8deg);
}
.info h3 { font-size: 2.3rem; margin-top: 6px; }
.info ol { padding-left: 1.2em; margin: 0; }
.info li { margin: 6px 0; }
.info p, .info li { color: var(--ink-soft); }

/* ---------- Вопросы ---------- */

.faq { padding: 70px 0 90px; }
.qa {
  margin: 18px 0;
  background: var(--paper-light);
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-3);
  box-shadow: 4px 5px 0 var(--ink);
}
.qa:nth-of-type(even) { border-radius: 14px 30px 12px 28px / 28px 12px 30px 14px; }
.qa summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 18px 66px 18px 24px;
  font-weight: 800;
  font-size: 1.08rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute;
  right: 18px; top: 50%;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-top: -17px;
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  border: 2.5px solid var(--ink);
  border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  transition: transform .25s, background-color .2s;
}
.qa[open] summary::after { transform: rotate(135deg); background: var(--red); color: var(--cream); }
.qa summary:hover { color: var(--red-deep); }
.qa p { padding: 0 24px 20px; margin: 0; color: var(--ink-soft); }

/* ---------- Telegram ---------- */

.tg-cta { padding: 10px 0 130px; }
.tg-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  padding: 42px 50px;
  color: var(--cream);
  background-color: var(--red);
  /* пятнышки, как на шляпке */
  background-image:
    radial-gradient(ellipse 22px 17px at 8% 22%, rgba(255, 246, 228, .22) 98%, transparent),
    radial-gradient(ellipse 14px 11px at 22% 82%, rgba(255, 246, 228, .2) 98%, transparent),
    radial-gradient(ellipse 30px 22px at 62% 10%, rgba(255, 246, 228, .16) 98%, transparent),
    radial-gradient(ellipse 12px 10px at 78% 88%, rgba(255, 246, 228, .2) 98%, transparent),
    radial-gradient(ellipse 18px 14px at 94% 30%, rgba(255, 246, 228, .2) 98%, transparent),
    radial-gradient(ellipse 10px 8px at 46% 92%, rgba(255, 246, 228, .2) 98%, transparent);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-1);
  box-shadow: 8px 10px 0 var(--ink);
  transform: rotate(-.8deg);
}
.tg-card h2 { font-size: clamp(2.6rem, 4.6vw, 3.6rem); margin-bottom: .2em; }
.tg-card p { margin: 0; max-width: 46ch; opacity: .95; }
.tg-card__plane { width: 120px; overflow: visible; animation: fly 3.4s ease-in-out infinite; }
@keyframes fly {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(6px, -10px) rotate(-5deg); }
}

/* ---------- Подвал ---------- */

.footer {
  position: relative;
  padding: 64px 0 28px;
  color: var(--cream);
  background-color: var(--forest);
  background-image: var(--grain);
}
.footer__grass { position: absolute; z-index: 2; left: 0; top: -69px; width: 100%; height: 70px; }
.footer__shrooms {
  position: absolute;
  z-index: 1;
  right: 9%;
  top: -120px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  filter: url(#rough-a);
}
.footer__shrooms svg:first-child { width: 84px; transform: rotate(-6deg); }
.footer__shrooms svg:last-child { width: 46px; transform: rotate(8deg); }

.footer__grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer__brand { display: flex; align-items: center; gap: 20px; }
.footer__brand p { margin: 0; max-width: 24ch; opacity: .9; }
.badge { width: 170px; flex: none; transform: rotate(-8deg); }
.badge__ring { font-family: var(--font-draw); font-weight: 700; font-size: 23px; fill: var(--ink); }

.footer__nav { display: flex; flex-direction: column; gap: 4px; }
.footer__nav a { font-family: var(--font-draw); font-weight: 700; font-size: 1.6rem; text-decoration: none; width: fit-content; }
.footer__nav a:hover { color: var(--ochre); }

.footer__contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.footer__legal {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 44px;
  padding-top: 22px;
  font-size: .85rem;
  opacity: .72;
  background: linear-gradient(90deg, var(--cream) 50%, transparent 0) repeat-x top / 12px 1.5px;
}
.footer__legal p { margin: 0; }
.footer__legal p:first-child { max-width: 80ch; }
.footer__legal p:last-child { white-space: nowrap; }

/* ---------- Корзина ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(43, 27, 18, .45);
  backdrop-filter: blur(2px);
}
.cart {
  position: fixed;
  z-index: 60;
  top: 0; right: 0; bottom: 0;
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: var(--grain);
  border-left: 3px solid var(--ink);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .4s cubic-bezier(.2, .9, .3, 1.1), visibility 0s .4s;
}
.cart.is-open { transform: none; visibility: visible; transition: transform .4s cubic-bezier(.2, .9, .3, 1.1); }
.cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 0) repeat-x bottom / 12px 2px;
}
.cart__head h2 { font-size: 2.8rem; margin: 0; }
.cart__body { flex: 1; overflow-y: auto; padding: 6px 22px; }
.line {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 2px dashed rgba(43, 27, 18, .25);
}
.line__art svg, .line__art img { width: 100%; height: auto; }
.line__art img { aspect-ratio: 1; object-fit: contain; padding: 2px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; }
.line__info { display: flex; flex-direction: column; line-height: 1.3; }
.line__info b { font-weight: 800; font-size: .98rem; }
.line__info span { color: var(--ink-soft); font-size: .9rem; }
.cart__empty { text-align: center; padding: 50px 0; }
.cart__empty svg { width: 90px; margin: 0 auto 12px; filter: url(#rough-a); }
.cart__empty p { font-size: 1.6rem; line-height: 1.15; color: var(--ink-soft); }
.cart__foot {
  padding: 18px 22px 24px;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 0) repeat-x top / 12px 2px;
}
.cart__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-family: var(--font-draw); font-weight: 700; font-size: 2rem; }
.cart__total b { font-size: 2.6rem; }
.cart__hint { text-align: center; font-size: .85rem; color: var(--ink-soft); margin: 12px 0 0; }

/* ---------- Оформление заказа (онлайн-оплата) ---------- */

.cart [hidden] { display: none !important; }
.order { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.order__fields { flex: 1; overflow-y: auto; padding: 8px 22px 16px; }
.order__back {
  margin: 0 0 10px;
  padding: 0;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--red-deep);
  background: none;
  border: 0;
}
.field { display: block; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend, .field > label > span {
  display: block;
  margin-bottom: 5px;
  padding: 0;
  font-weight: 800;
  font-size: .95rem;
}
.field i { font-style: normal; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 10px 14px 10px 12px / 12px 10px 14px 10px;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--ochre); outline-offset: 1px; }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red); background: #fff1ea; }
.order__delivery { display: grid; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; line-height: 1.35; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); }
.check--radio {
  padding: 10px 12px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: var(--wobble-3);
}
.check--radio:has(input:checked) { background: var(--cream); box-shadow: 3px 3px 0 var(--ink); }
.check--radio b { display: block; font-size: .98rem; }
.check--radio small { display: block; color: var(--ink-soft); font-size: .85rem; }
.order__error {
  margin: 0 0 12px;
  padding: 8px 12px;
  font-size: .9rem;
  color: var(--red-deep);
  background: #fde3d6;
  border: 2px solid var(--red);
  border-radius: 10px;
}

/* выбор города и пункта СДЭК */
.cdek { margin: -2px 0 14px; padding: 12px; background: var(--cream); border: 2px dashed var(--ink-soft); border-radius: 12px; }
.cdek .field:last-of-type { margin-bottom: 0; }
.cdek__city { position: relative; }
.cdek__suggest {
  position: absolute;
  z-index: 5;
  left: 0; right: 0;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 4px 0 var(--ink);
}
.cdek__suggest button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: .95rem;
  text-align: left;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 6px;
}
.cdek__suggest button:hover, .cdek__suggest button:focus { background: var(--kraft); outline: none; }
.cdek__empty { padding: 8px 10px; color: var(--ink-soft); font-size: .92rem; }
.cdek__filter { margin-bottom: 6px; }
.cdek select {
  width: 100%;
  padding: 4px;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.cdek select option { padding: 6px 8px; border-radius: 6px; }
.cdek select option:checked { background: var(--red) linear-gradient(var(--red), var(--red)); color: var(--cream); }
.cdek__quote { margin: 10px 0 0; font-weight: 800; color: var(--forest); }
.cdek__quote.is-error { color: var(--red-deep); font-weight: 600; }
.notice__track { margin: -6px 0 1.2em; padding: 10px 14px; background: var(--cream); border: 2px dashed var(--ink-soft); border-radius: 12px; font-size: .95rem; }
.notice__track p { margin: 0; color: var(--ink-soft); }
.notice__track p + p { margin-top: 4px; }
.notice__track b, .notice__track a { color: var(--ink); font-weight: 800; }
.notice__track a { color: var(--red-deep); }

/* окно «заказ оплачен» */
.notice__box {
  width: min(460px, 100%);
  padding: 30px 26px 26px;
  text-align: center;
  animation: pm-in .3s cubic-bezier(.2, .9, .3, 1.1);
}
.notice__icon { width: 74px; margin: 0 auto 6px; filter: url(#rough-a); }
.notice__box h2 { font-size: 2.6rem; line-height: 1; margin: 0 0 .3em; }
.notice__box p { color: var(--ink-soft); margin: 0 0 1.2em; }
.pm.notice { place-items: center; }

/* ---------- Карточка товара с галереей ---------- */

.pm {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgba(43, 27, 18, .55);
  backdrop-filter: blur(2px);
}
.pm[hidden] { display: none; }
.pm__box {
  position: relative;
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background-color: var(--paper-light);
  background-image: var(--grain);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-3);
  box-shadow: 8px 10px 0 var(--ink);
  animation: pm-in .3s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes pm-in { from { opacity: 0; transform: translateY(18px) rotate(-1deg); } }
.pm__close { position: absolute; top: 12px; right: 12px; z-index: 3; }

.pm__gallery { position: relative; padding: 18px; min-width: 0; }
.pm__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border: 2.5px solid var(--ink);
  border-radius: var(--wobble-3);
  background: var(--cream);
}
.pm__track::-webkit-scrollbar { display: none; }
.pm__slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; display: grid; place-items: center; }
.pm__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4%; background: #fff; }
.pm__slide--art { padding: 8%; }

.pm__nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0 0 4px;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  color: var(--ink);
  background: var(--paper-light);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 2px 3px 0 var(--ink);
  transition: transform .15s;
}
.pm__nav:hover { transform: scale(1.08); }
.pm__nav--prev { left: 8px; }
.pm__nav--next { right: 8px; }
.pm--single .pm__nav { display: none; }

.pm__dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.pm__dots:empty { display: none; }
.pm__dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: background-color .2s, transform .2s;
}
.pm__dots button[aria-current="true"] { background: var(--red); transform: scale(1.2); }

.pm__body { position: relative; display: flex; flex-direction: column; padding: 30px 28px 24px 8px; min-width: 0; }
.pm__badge { position: static; align-self: flex-start; margin-bottom: 10px; transform: rotate(-4deg); }
.pm__title { font-size: 2.8rem; line-height: 1; margin: 0 48px .15em 0; }
.pm__amount { font-family: var(--font-hand); font-weight: 700; font-size: 1.7rem; color: var(--red); margin: 0 0 .5em; }
.pm__desc { color: var(--ink-soft); margin: 0 0 1em; }
.pm__details { margin: 0 0 1em; padding-left: 1.2em; color: var(--ink-soft); }
.pm__details:empty { display: none; }
.pm__details li { margin-bottom: .35em; }
.pm__details li::marker { color: var(--red); }
.pm__foot { margin-top: auto; }

@media (max-width: 760px) {
  .pm { place-items: start center; padding: 12px; }
  .pm__box { grid-template-columns: 1fr; }
  .pm__gallery { padding: 14px 14px 0; }
  .pm__slide { aspect-ratio: 4 / 3; }
  .pm__body { padding: 18px 20px 20px; }
  .pm__title { font-size: 2.3rem; }
  .pm__close { top: 22px; right: 22px; }
}

/* ---------- Уведомление ---------- */

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 24px;
  max-width: calc(100% - 32px);
  padding: 12px 22px;
  font-weight: 700;
  color: var(--cream);
  background: var(--ink);
  border-radius: var(--wobble-3);
  box-shadow: 4px 5px 0 var(--red);
  transform: translate(-50%, 180%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), opacity .2s, visibility 0s .35s;
  pointer-events: none;
}
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), opacity .2s; }

/* ---------- 18+ ---------- */

.age {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background-color: rgba(46, 68, 36, .94);
  background-image: var(--grain);
}
.age[hidden] { display: none; }
.age__card { max-width: 420px; padding: 34px 30px 30px; text-align: center; }
.age__shroom { width: 96px; margin: -80px auto 8px; filter: url(#rough-a); animation: sway 3s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.age h2 { font-size: 3.2rem; }
.age__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.age__no { margin: 18px 0 0; font-family: var(--font-hand); font-size: 1.4rem; line-height: 1.2; color: var(--red-deep); }

/* ---------- Появление при прокрутке ---------- */

.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .9, .3, 1.2); }
.js .reveal.is-in { opacity: 1; translate: 0 0; }
.grid .reveal:nth-child(2), .steps .reveal:nth-child(2), .cards3 .reveal:nth-child(2) { transition-delay: .08s; }
.grid .reveal:nth-child(3), .steps .reveal:nth-child(3), .cards3 .reveal:nth-child(3) { transition-delay: .16s; }
.steps .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- Адаптив ---------- */

@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__text { text-align: center; }
  .hero__lead, .hero h1 { margin-inline: auto; }
  .hero__cta, .stamps { justify-content: center; }
  .hero__art { max-width: 560px; width: 100%; margin: 0 auto; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 50px; }
  .steps::before { display: none; }
  .about__grid { grid-template-columns: 1fr; gap: 56px; }
  .polaroid { max-width: 360px; }
  .cards3 { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; row-gap: 50px; }
  .tg-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .tg-card p { margin-inline: auto; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  .burger { display: flex; }
  .nav {
    position: absolute;
    top: calc(100% + 6px);
    left: 16px; right: 16px;
    flex-direction: column;
    gap: 0;
    padding: 10px 22px;
    background: var(--paper-light);
    border: 2.5px solid var(--ink);
    border-radius: var(--wobble-3);
    box-shadow: 5px 6px 0 var(--ink);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) rotate(-.6deg);
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: rotate(-.6deg); transition: opacity .2s, transform .2s; }
  .nav a { padding: 10px 0; font-size: 1.9rem; }
  .nav a + a { border-top: 2px dashed rgba(43, 27, 18, .2); }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .header__row { gap: 12px; min-height: 68px; }
  .logo__icon { width: 38px; height: 43px; }
  .logo__text b { font-size: 1.75rem; }
  .logo__text small { font-size: .95rem; }
  .header__actions { gap: 8px; }
  .icon-btn, .burger { width: 42px; height: 42px; }
  .header__actions > .icon-btn[data-tg] { display: none; }

  .hero { padding-top: 20px; }
  .hero__kicker { font-size: 1.45rem; }
  .hero__cta .btn { flex: 1 1 100%; }
  .note { font-size: 1.35rem; }
  .note svg { width: 50px; }

  .ribbon__track { font-size: 1.6rem; }
  .catalog { padding: 70px 0 64px; }
  .card { flex-basis: 100%; }
  .price { font-size: 2.1rem; }

  .steps { grid-template-columns: 1fr; }
  .process { padding: 80px 0 60px; }

  .about { padding: 70px 0; }
  .letter { padding: 30px 20px 26px 50px; background-image:
    linear-gradient(90deg, transparent 34px, rgba(207, 58, 36, .45) 34px 36px, transparent 36px),
    repeating-linear-gradient(transparent 0 33px, rgba(60, 100, 150, .2) 33px 34px); }
  .letter p { font-size: 1rem; }
  .letter h2 { font-size: 3rem; }
  .tape--tl { left: -10px; }

  .tg-card { padding: 32px 22px; }
  .qa summary { padding: 16px 60px 16px 18px; font-size: 1rem; }

  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .footer__brand { flex-direction: column; align-items: flex-start; }
  .footer__shrooms { right: 4%; }
  .footer__legal { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; }
  .boil { filter: url(#rough-a); }
}
