/* Лендинг книги: стилі. Mobile-first, без фреймворків. */

/* ---------- Шрифти ---------- */

@font-face {
  font-family: "Manrope";
  src: url(../fonts/manrope-v1.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url(../fonts/lora-v1.woff2) format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
/* Системні шрифти з метриками Manrope і Lora: поки вантажиться шрифт, текст не стрибає. */
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Roboto");
  size-adjust: 101.1%;
  ascent-override: 105.5%;
  descent-override: 29.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Lora Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold"), local("Georgia");
  font-weight: 600 700;
  size-adjust: 94.1%;
  ascent-override: 106.9%;
  descent-override: 29.1%;
  line-gap-override: 0%;
}

/* ---------- Токени ---------- */

:root {
  color-scheme: light;
  --bg: #FBF7F1;
  --surface: #FFFFFF;
  --border: #EADFD3;
  --tint: #F4ECE2;
  --text: #2A2420;
  --muted: #6E625A;
  --accent: #C8553D;
  --accent-hover: #A9442F;
  --on-accent: #FFFFFF;
  --field-border: #9A887B;
  --error: #B3261E;

  /* Кольори продуктів — лише для ілюстрацій і декору, не для кнопок і тексту. */
  --food-butter: #F2C14E;
  --food-butter-l: #FBE7B0;
  --food-herb: #8DA35F;
  --food-herb-l: #D9E4BF;
  --food-tomato: #E27156;
  --food-tomato-l: #F7D3C7;
  --food-crust: #D0925A;
  --food-crust-l: #F1DAB9;
  --gingham: rgba(226, 113, 86, .2);

  --font-body: "Manrope", "Manrope Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Lora", "Lora Fallback", Georgia, "Times New Roman", serif;

  --radius-card: 16px;
  --radius-btn: 12px;
  --shadow: 0 1px 2px rgba(42, 36, 32, .04), 0 10px 30px rgba(42, 36, 32, .07);

  --container: 1120px;
  --gutter: 16px;
  --pad-l: max(var(--gutter), env(safe-area-inset-left));
  --pad-r: max(var(--gutter), env(safe-area-inset-right));
}
@media (min-width: 360px) {
  :root { --gutter: 20px; }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
}

/* ---------- База ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:hover { text-decoration-thickness: 2px; }

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--pad-l) + var(--pad-r));
  margin-inline: auto;
  padding-left: var(--pad-l);
  padding-right: var(--pad-r);
}
.container.narrow { max-width: calc(760px + var(--pad-l) + var(--pad-r)); }

.icon { flex: none; width: 1.25em; height: 1.25em; }

/* Видимі плейсхолдери: [ЗАМІНИТИ] у текстах і сірі блоки замість картинок. */
mark.ph {
  padding: 0 .2em;
  border-radius: 4px;
  background: #FFF1B8;
  color: #4D3900;
  outline: 1px dashed #C9A227;
  font: inherit;
}
.ph-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border: 1px dashed #D2C1B0;
  border-radius: 12px;
  background: #F8EFE4;
  color: var(--muted);
  font-weight: 700;
  font-size: .875rem;
  line-height: 1.3;
  text-align: center;
}
.ph-img .ph-art { width: 44%; max-width: 120px; height: auto; opacity: .9; }

/* Ілюстрації їжі (scripts/lib/art.mjs) */
.art {
  display: block;
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.a-pan { fill: #4A403A; }
.a-pan2 { fill: #5E534C; }
.a-w { fill: #FFFCF6; }
.a-b { fill: var(--food-butter); }
.a-bl { fill: var(--food-butter-l); }
.a-g { fill: var(--food-herb); }
.a-gl { fill: var(--food-herb-l); }
.a-r { fill: var(--food-tomato); }
.a-rl { fill: var(--food-tomato-l); }
.a-c { fill: var(--food-crust); }
.a-cl { fill: var(--food-crust-l); }

/* Картата серветка */
.gingham {
  background-color: #FFF9F2;
  background-image:
    linear-gradient(90deg, var(--gingham) 50%, transparent 50%),
    linear-gradient(var(--gingham) 50%, transparent 50%);
  background-size: 14px 14px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: .7rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  /* 19px жирний = «великий текст» у WCAG: білий на #C8553D проходить AA (3:1). */
  font: 700 1.1875rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--on-accent); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  font-size: 1.0625rem;
}
.btn-ghost:hover { border-color: var(--text); }
.btn-lg { min-height: 56px; padding: .9rem 1.5rem; }
.btn-sm { padding: .55rem 1.1rem; }
.btn-block { width: 100%; }
.btn[disabled] { cursor: progress; }
.btn[disabled]:active { transform: none; }

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.is-busy .spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Шапка ---------- */

.site-header { border-bottom: 1px solid var(--border); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding-top: max(0px, env(safe-area-inset-top));
}
.brand {
  font: 700 1.1875rem/1.2 var(--font-head);
  color: var(--text);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 0 44px;
}
/* Ледь помітні кухонні начерки на тлі першого екрана */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Візерунок вбудовано, щоб не було окремого запиту: він найбільший елемент першого екрана. */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260' fill='none' stroke='%232A2420' stroke-opacity='.075' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(22 18) rotate(-28 20 30)'%3E%3Cellipse cx='20' cy='12' rx='8' ry='11'/%3E%3Cpath d='M20 23v30'/%3E%3C/g%3E%3Cg transform='translate(160 14) rotate(8 22 22)'%3E%3Cpath d='M4 42C4 19 19 4 42 4c0 23-15 38-38 38Z'/%3E%3Cpath d='M4 42 27 19'/%3E%3C/g%3E%3Cg transform='translate(96 66)'%3E%3Ccircle cx='9' cy='33' r='8'/%3E%3Ccircle cx='29' cy='35' r='8'/%3E%3Cpath d='M9 25c2-11 9-19 16-22M29 27c-1-11-2-17-4-24'/%3E%3C/g%3E%3Cg transform='translate(206 92) rotate(22 12 30)'%3E%3Cpath d='M12 40C3 29 3 11 12 2c9 9 9 27 0 38Z'/%3E%3Cpath d='M12 40c-3-9-3-29 0-38M12 40v20'/%3E%3C/g%3E%3Cg transform='translate(20 124)'%3E%3Cpath d='M17 2C8 2 2 17 2 28a15 15 0 0 0 30 0C32 17 26 2 17 2Z'/%3E%3C/g%3E%3Cg transform='translate(92 162) rotate(34 16 26)'%3E%3Cpath d='M8 6 16 48 24 6Z'/%3E%3Cpath d='M11 0l5 6 5-6M12 18h6M14 31h4'/%3E%3C/g%3E%3Cg transform='translate(176 176) rotate(-18 10 26)'%3E%3Cpath d='M3 0v13a7 7 0 0 0 14 0V0M10 0v13M10 20v32'/%3E%3C/g%3E%3Cg transform='translate(140 118)'%3E%3Ccircle cx='12' cy='12' r='11'/%3E%3Cpath d='M12 1v22M1 12h22M4 4l16 16M20 4 4 20'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 260px 260px repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34%;
  grid-template-areas:
    "head head"
    "sub cover"
    "body body";
  gap: 16px 16px;
  align-items: center;
}
.hero-head { grid-area: head; }
.hero-cover { grid-area: cover; }
.hero-sub { grid-area: sub; }
.hero-body { grid-area: body; }

.overline {
  margin-bottom: .5rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-title {
  font: 700 clamp(2rem, 9.2vw, 4.5rem)/1.05 var(--font-head);
  letter-spacing: -.01em;
}
.hero-title-sub {
  display: block;
  margin-top: .35em;
  font-size: .5em;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}
.hero-cover { position: relative; }
.hero-cover .cover-img,
.hero-cover .ph-img {
  position: relative;
  z-index: 1;
  border-radius: 8px;
  transform: rotate(-3deg);
  box-shadow: 0 2px 4px rgba(42, 36, 32, .06), 0 18px 40px rgba(42, 36, 32, .18);
}
.hero-cover .ph-img { border-style: solid; background: #FFFCF6; }
.napkin {
  position: absolute;
  inset: 8% -10% -6% -8%;
  border-radius: 8px;
  transform: rotate(7deg);
  background-color: #FFF9F2;
  background-image:
    linear-gradient(90deg, var(--gingham) 50%, transparent 50%),
    linear-gradient(var(--gingham) 50%, transparent 50%);
  background-size: 12px 12px;
  box-shadow: 0 6px 18px rgba(42, 36, 32, .08);
}
.deco { position: absolute; z-index: 2; pointer-events: none; }
.deco .art { width: 100%; height: auto; }
.deco-herb { width: 42%; top: -9%; left: -6%; transform: rotate(-24deg); }
.deco-lemon { width: 34%; right: -9%; bottom: -5%; }
.hero-sub { font-size: 1rem; line-height: 1.55; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
}
.hero-cta { width: 100%; }
.hero-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.4;
  text-align: center;
}
.hero-note .icon { width: 16px; height: 16px; }

@media (min-width: 900px) {
  .hero { padding: 64px 0 88px; }
  /* Текст по центру висоти обкладинки: порожні рядки зверху й знизу забирають зайве місце. */
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    grid-template-rows: 1fr auto auto auto 1fr;
    grid-template-areas:
      ". cover"
      "head cover"
      "sub cover"
      "body cover"
      ". cover";
    column-gap: 72px;
    row-gap: 0;
    align-items: start;
  }
  .hero-cover { align-self: center; justify-self: center; width: 100%; max-width: 360px; margin: 24px 0; }
  .napkin { inset: 6% -12% -7% -10%; background-size: 22px 22px; }
  .deco-herb { width: 38%; top: -10%; left: -18%; }
  .deco-lemon { width: 30%; right: -14%; bottom: -6%; }
  .overline { font-size: .875rem; }
  .hero-sub { margin: 20px 0 28px; font-size: 1.25rem; max-width: 34em; }
  .chips { margin: 0 0 28px; }
  .chip { font-size: .9375rem; padding: 6px 14px; }
  .hero-cta { width: auto; min-width: 280px; }
  .hero-note { justify-content: flex-start; text-align: left; }
}

/* ---------- Секції ---------- */

.section { padding: 56px 0; }
.section-alt { position: relative; background: var(--tint); }
.section-alt::before,
.section-alt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  pointer-events: none;
}
.section-alt::before {
  top: -10px;
  background: radial-gradient(circle at 10px 10px, var(--tint) 9.5px, transparent 10px) 0 0 / 20px 10px repeat-x;
}
.section-alt::after {
  bottom: -10px;
  background: radial-gradient(circle at 10px 0, var(--tint) 9.5px, transparent 10px) 0 0 / 20px 10px repeat-x;
}
.section-title {
  margin-bottom: 24px;
  font: 700 clamp(1.75rem, 3.2vw + 1rem, 2.625rem)/1.15 var(--font-head);
  letter-spacing: -.005em;
}
.section-cta { margin-top: 28px; }
.section-cta .btn { width: 100%; }

@media (min-width: 640px) {
  .section-cta .btn { width: auto; min-width: 280px; }
}
@media (min-width: 900px) {
  .section { padding: 88px 0; }
  .section-title { margin-bottom: 36px; max-width: 24ch; }
  .section-cta { margin-top: 40px; }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

/* Навіщо книга */
.benefits {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.benefit {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 2px 14px;
  align-content: start;
  padding: 18px;
}
.benefit-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tint);
}
.benefit:nth-child(4n+1) .benefit-icon { background: var(--food-butter-l); }
.benefit:nth-child(4n+2) .benefit-icon { background: var(--food-herb-l); }
.benefit:nth-child(4n+3) .benefit-icon { background: var(--food-tomato-l); }
.benefit:nth-child(4n+4) .benefit-icon { background: var(--food-crust-l); }
.benefit h3 { font: 600 1.1875rem/1.3 var(--font-head); }
.benefit p { color: var(--muted); }

@media (min-width: 640px) {
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 900px) {
  .benefit { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 28px; }
  .benefit-icon { grid-row: auto; width: 52px; height: 52px; margin-bottom: 8px; }
  .benefit h3 { font-size: 1.375rem; }
}

/* Що всередині */
.highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.highlights li {
  position: relative;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.highlight-value {
  display: block;
  color: var(--accent);
  font: 700 2.5rem/1 var(--font-head);
  letter-spacing: -.01em;
}
.highlight-label { display: block; margin-top: 8px; font-size: .9375rem; line-height: 1.35; }
.highlight-art { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; }
@media (min-width: 900px) {
  .highlights { gap: 16px; margin-bottom: 24px; }
  .highlights li { padding: 24px 28px; }
  .highlight-value { font-size: 3.5rem; }
  .highlight-label { font-size: 1.0625rem; }
  .highlight-art { top: 20px; right: 24px; width: 64px; height: 64px; }
}

.book-sections {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.book-section { padding: 18px; }
.book-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.section-art {
  flex: none;
  width: 60px;
  height: 60px;
  padding: 5px;
  border-radius: 50%;
  background: var(--tint);
}
.book-section h3 { font: 600 1.25rem/1.25 var(--font-head); }
.count {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 1.1875rem;
  font-weight: 700;
  white-space: nowrap;
}
.parts { margin-bottom: 10px; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.examples-label { color: var(--muted); font-size: .875rem; }
.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .3em;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.examples li:not(:last-child)::after { content: ","; }

@media (min-width: 640px) {
  .book-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1024px) {
  .book-sections { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .book-section { padding: 22px; }
}

.gallery-title {
  margin-top: 40px;
  font: 600 1.375rem/1.3 var(--font-head);
}
.gallery-hint { margin-top: 4px; color: var(--muted); font-size: .9375rem; }
.gallery {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 84%;
  gap: 12px;
  margin: 16px calc(-1 * var(--pad-r)) 0 calc(-1 * var(--pad-l));
  padding: 4px var(--pad-r) 16px var(--pad-l);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad-l);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery-item { scroll-snap-align: start; min-width: 0; }
.gallery-link {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.gallery-link img { width: 100%; }

@media (min-width: 900px) {
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 20px 0 0;
    padding: 0;
    overflow: visible;
  }
}

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: rgba(24, 19, 16, .94);
  overscroll-behavior: contain;
  touch-action: none;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:focus-visible { outline-color: #fff; }
html.lb-open { overflow: hidden; }

@media (min-width: 900px) {
  .lightbox { padding: 40px; }
}

/* Як це працює */
.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
}
.step p { padding-top: 10px; }
.step-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 1.25rem/1 var(--font-head);
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .step { grid-template-columns: minmax(0, 1fr); padding: 28px; }
  .step p { padding-top: 4px; }
}

/* Про авторку */
.author {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas:
    "photo head"
    "body body";
  gap: 20px 18px;
  align-items: center;
}
.author-photo { grid-area: photo; }
.author-head { grid-area: head; }
.author-body { grid-area: body; }
.author-head .section-title { margin: 0; }
.author-photo .author-img,
.author-photo .ph-img {
  width: 96px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  font-size: .75rem;
}
.author-bio { font-size: 1.0625rem; }
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.stats li { min-width: 120px; }
.stat-value {
  display: block;
  color: var(--accent);
  font: 700 1.75rem/1.15 var(--font-head);
}
.stat-label { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.author-body .btn { margin-top: 24px; }

@media (min-width: 900px) {
  .author {
    grid-template-columns: 340px minmax(0, 1fr);
    grid-template-areas:
      "photo head"
      "photo body";
    column-gap: 64px;
    row-gap: 16px;
  }
  .author-head { align-self: end; }
  .author-body { align-self: start; }
  .author-photo .author-img,
  .author-photo .ph-img {
    width: 100%;
    border-radius: var(--radius-card);
    font-size: .9375rem;
  }
  .author-bio { font-size: 1.125rem; max-width: 36em; }
}

/* Відгуки */
.reviews {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.review { padding: 18px; }
.review img { border-radius: 10px; }
.review-text { margin: 0; font-size: 1.0625rem; }
.review-text p::before { content: "«"; }
.review-text p::after { content: "»"; }
.review-name { margin-top: 10px; color: var(--muted); font-weight: 700; }
@media (min-width: 640px) {
  .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1024px) {
  .reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Покупка ---------- */

.buy-section { background: linear-gradient(var(--bg), var(--tint)); }
.buy {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-areas:
    "cover head"
    "body body";
  gap: 20px 16px;
  align-items: center;
  padding: 32px 18px 24px;
  box-shadow: var(--shadow);
}
.buy::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background-color: #FFF9F2;
  background-image:
    linear-gradient(90deg, var(--gingham) 50%, transparent 50%),
    linear-gradient(var(--gingham) 50%, transparent 50%);
  background-size: 12px 12px;
}
.buy-cover { position: relative; }
.deco-buy { display: none; }
.buy-cover { grid-area: cover; }
.buy-head { grid-area: head; }
.buy-body { grid-area: body; }
.buy-cover .cover-img,
.buy-cover .ph-img {
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(42, 36, 32, .16);
  font-size: .75rem;
}
.buy-title { font: 700 clamp(1.5rem, 3vw + 1rem, 2.25rem)/1.15 var(--font-head); }
.includes-title {
  margin-top: 0;
  color: var(--muted);
  font: 700 .8125rem/1.4 var(--font-body);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.includes {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.includes li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.includes .icon {
  width: 24px;
  height: 24px;
  padding: 3px;
  border-radius: 50%;
  background: var(--tint);
}

.price-block { margin-top: 24px; }
.price-old { color: var(--muted); font-size: 1.125rem; font-weight: 700; }
.price {
  color: var(--accent);
  font: 700 2.75rem/1.05 var(--font-head);
  letter-spacing: -.01em;
}
.price-note { margin-top: 2px; color: var(--muted); }

.checkout { margin-top: 20px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}
.field input {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-btn);
  background: #fff;
  color: var(--text);
  font: 500 1.0625rem/1.3 var(--font-body);
  appearance: none;
}
.field input::placeholder { color: #8C7D71; opacity: 1; }
.field input:focus { border-color: var(--text); }
.field input:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-hint { margin-top: 6px; color: var(--muted); font-size: .875rem; }
.field-error {
  margin-top: 6px;
  color: var(--error);
  font-size: .9375rem;
  font-weight: 700;
}
.field-error:empty { display: none; }
.checkout .btn { margin-top: 16px; }
.consent { margin-top: 12px; color: var(--muted); font-size: .875rem; line-height: 1.5; }

/* Приманка для ботів: людям не видно і не фокусується. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.secure {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pay-logos {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pay-logos img { display: block; }
.pay-logo-ph {
  display: inline-grid;
  place-items: center;
  height: 32px;
  padding: 0 10px;
  border: 1px dashed #D2C1B0;
  border-radius: 6px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
}
.secure-text {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .875rem;
}
.secure-text .icon { width: 16px; height: 16px; }

@media (min-width: 900px) {
  .buy {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-areas:
      "cover head"
      "cover body";
    gap: 20px 56px;
    padding: 64px 48px 48px;
    align-items: start;
  }
  .buy-cover .cover-img,
  .buy-cover .ph-img { border-radius: 8px; font-size: .875rem; }
  .buy::before { height: 16px; background-size: 16px 16px; }
  .deco-buy { display: block; width: 42%; right: -16%; bottom: -8%; transform: rotate(18deg); }
  .price { font-size: 3.25rem; }
  .checkout { max-width: 440px; }
}

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 18px 0;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: background-size .2s ease;
}
.faq-item[open] summary::after { background-size: 100% 2px, 2px 0; }
.faq-a { padding: 0 0 20px; color: var(--muted); }
.faq-a a { color: var(--text); }
@media (min-width: 900px) {
  .faq-item summary { font-size: 1.1875rem; padding: 22px 0; }
}

/* ---------- Футер ---------- */

.site-footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .9375rem;
}
.footer-doodles {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: -8px auto 32px;
}
.footer-doodles .art { width: 34px; height: 34px; }
.footer-grid { display: grid; gap: 28px; }
.footer-about p + p { margin-top: 6px; }
.footer-title {
  margin-bottom: 8px;
  color: var(--text);
  font: 700 1.25rem/1.3 var(--font-head);
}
.footer-h {
  margin-bottom: 10px;
  color: var(--muted);
  font: 700 .8125rem/1.4 var(--font-body);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.footer-list { margin: 0; padding: 0; list-style: none; }
.footer-list li + li { margin-top: 4px; }
.footer-list a {
  display: inline-block;
  padding: 6px 0;
  color: var(--text);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
}

/* ---------- Липка панель на мобільному ---------- */

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--pad-r) calc(10px + env(safe-area-inset-bottom)) var(--pad-l);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 24px rgba(42, 36, 32, .08);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.sticky-bar.is-visible {
  transform: none;
  visibility: visible;
  transition: transform .25s ease, visibility 0s;
}
.sticky-label { font-weight: 700; font-size: 1.0625rem; }
.sticky-bar .btn { min-width: 132px; }
.has-sticky .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

@media (min-width: 1024px) {
  .sticky-bar { display: none; }
  .has-sticky .site-footer { padding-bottom: 40px; }
}

/* ---------- Службові сторінки ---------- */

.status-page { padding: 32px 0 56px; }
.status {
  max-width: 560px;
  margin-inline: auto;
  padding: 32px 20px;
  text-align: center;
}
/* Усі стани в одній клітинці сітки: картка одразу має висоту найбільшого, тож при зміні стану нічого не стрибає. */
.status { display: grid; }
.status-state {
  grid-area: 1 / 1;
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.status-state[hidden] { display: grid; visibility: hidden; }
.status h1 { font: 700 clamp(1.75rem, 4vw + .75rem, 2.375rem)/1.15 var(--font-head); }
.status .btn-block { margin-top: 8px; }
.status-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--tint);
}
.status-icon .icon { width: 30px; height: 30px; }
.status-code {
  color: var(--accent);
  font: 700 3.5rem/1 var(--font-head);
}
.big-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.order { color: var(--muted); }
.order-ref { color: var(--text); letter-spacing: .02em; white-space: nowrap; }
.contacts {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.contacts a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contacts a:hover { border-color: var(--text); }
@media (min-width: 640px) {
  .status { padding: 48px 40px; }
  .status-page { padding: 56px 0 88px; }
}

/* ---------- Документи ---------- */

.doc { padding: 28px 0 64px; }
.doc-back { margin-bottom: 20px; font-size: .9375rem; }
.doc-back a { color: var(--muted); }
.doc h1 { font: 700 clamp(2rem, 3vw + 1.2rem, 2.75rem)/1.1 var(--font-head); }
.doc-sub { margin-top: 8px; color: var(--muted); font-size: 1.125rem; }
.doc-date { margin: 6px 0 28px; color: var(--muted); font-size: .9375rem; }
.doc h2 {
  margin: 2em 0 .6em;
  font: 600 1.375rem/1.3 var(--font-head);
  scroll-margin-top: 16px;
}
.doc h3 { margin: 1.4em 0 .4em; font: 600 1.125rem/1.35 var(--font-head); }
.doc p, .doc li { line-height: 1.7; }
.doc p + p { margin-top: .75em; }
.doc ol { margin: .5em 0 .75em; padding-left: 1.4em; }
.doc li + li { margin-top: .25em; }

/* ---------- Рух ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .reveal.is-pending {
    opacity: 0;
    transform: translateY(16px);
  }
  .reveal.is-shown {
    opacity: 1;
    transform: none;
    transition: opacity .6s ease, transform .6s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .spinner, .big-spinner { animation-duration: 1.6s; }
}

/* ---------- /preview/: повні рецепти з книги ---------- */
.preview-link { margin: 20px 0 0; text-align: center; font-weight: 600; }
.preview-link a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.preview-page { padding: 28px 0 0; }
.preview-title { font: 700 clamp(2rem, 3vw + 1.2rem, 2.75rem)/1.1 var(--font-head); }
.preview-intro { margin-top: 12px; color: var(--muted); font-size: 1.0625rem; max-width: 60ch; }
.recipe { padding: 40px 0 48px; border-bottom: 1px solid var(--border); }
.recipe:first-of-type { padding-top: 28px; }
.recipe-photo img, .recipe-photo .ph-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; }
.recipe-num { margin-top: 20px; color: var(--muted); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.recipe-num span { color: var(--accent); font: 700 1.75rem/1 var(--font-head); letter-spacing: 0; margin-right: 6px; vertical-align: -3px; }
.recipe-title { margin-top: 6px; font: 700 clamp(1.625rem, 2.4vw + 1rem, 2.25rem)/1.15 var(--font-head); }
.recipe-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.recipe-meta div { padding: 10px 10px 10px 0; }
.recipe-meta div + div { padding-left: 12px; border-left: 1px solid var(--border); }
.recipe-meta dt { color: var(--muted); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.recipe-meta dd { margin: 2px 0 0; font-weight: 600; font-size: .9375rem; }
.recipe-body { display: grid; gap: 28px; margin-top: 28px; }
.recipe-body h3 { font: 700 1.25rem/1.2 var(--font-head); margin-bottom: 10px; }
.ing-group { margin: 14px 0 4px; color: var(--accent); font-weight: 700; font-size: .875rem; }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dotted var(--border); font-size: .9375rem; }
.ing-list .qty { text-align: right; white-space: nowrap; font-weight: 600; }
.recipe-steps ol { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.recipe-steps li { counter-increment: step; position: relative; padding: 0 0 14px 40px; line-height: 1.55; }
.recipe-steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .8125rem; display: grid; place-items: center; }
.recipe-shop { margin: 8px 0 0; background: var(--tint); border-radius: 12px; padding: 4px 16px; }
.recipe-shop div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; font-size: .9375rem; }
.recipe-shop div + div { border-top: 1px solid var(--border); }
.recipe-shop dt { color: var(--accent); font-weight: 700; }
.recipe-shop dd { margin: 0; }
.recipe-tip { margin-top: 18px; padding-left: 14px; border-left: 3px solid var(--accent); }
.recipe-tip-label { color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.recipe-tip p + p { margin-top: 4px; }
.preview-cta { text-align: center; }
.preview-cta .section-title { margin-left: auto; margin-right: auto; }
.preview-cta p { color: var(--muted); margin: -8px auto 22px; max-width: 46ch; }
@media (min-width: 760px) {
  .recipe-body { grid-template-columns: 5fr 7fr; gap: 40px; }
}
@media (max-width: 380px) {
  .recipe-meta { grid-template-columns: 1fr 1fr; }
  .recipe-meta div:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--border); }
  .recipe-shop div { grid-template-columns: 1fr; gap: 2px; }
}
