:root {
  --sand: #f7f1e8;
  --sand-2: #efe4d3;
  --ink: #1f2a2e;
  --muted: #5d6b70;
  --sea: #1d6f78;
  --sea-dark: #14525a;
  --sun: #e8744a;
  --sun-soft: #f6c9a8;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(31, 42, 46, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 17px/1.6 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--sea); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; }
h1 { font-size: clamp(34px, 6vw, 58px); letter-spacing: -.01em; }
h1 em { font-style: italic; font-weight: 600; color: var(--sun); }
h2 { font-size: clamp(28px, 4.2vw, 42px); }
h3 { font-size: 19px; font-weight: 800; }

/* ---------- hero ---------- */
.hero {
  padding: 48px 0 64px;
  background:
    radial-gradient(circle at 85% 10%, var(--sun-soft) 0, transparent 40%),
    linear-gradient(180deg, var(--sand) 0%, var(--sand-2) 100%);
}
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) {
  .hero { padding: 88px 0 96px; }
  .hero__grid { grid-template-columns: 1.25fr 1fr; gap: 56px; }
}
.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--sand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }

/* ---------- price & button ---------- */
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.buy--center { justify-content: center; }
.price { display: flex; align-items: baseline; gap: 10px; }
.price__now { font-size: 40px; font-weight: 800; line-height: 1; }
.price__old { font-size: 22px; color: var(--muted); text-decoration: line-through; }
.price__tag {
  align-self: center;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--sun);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.btn {
  display: inline-block;
  padding: 18px 30px;
  border-radius: 14px;
  background: var(--sea);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(29, 111, 120, .3);
  transition: transform .15s, background .15s;
}
.btn:hover { background: var(--sea-dark); transform: translateY(-2px); }
@media (max-width: 480px) { .btn { width: 100%; text-align: center; } }

/* ---------- countdown ---------- */
.countdown { margin-top: 28px; }
.countdown__label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.countdown__cells { display: flex; gap: 8px; }
.countdown__cells div {
  min-width: 64px;
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}
.countdown__cells b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.countdown__cells span { font-size: 12px; color: var(--muted); }

/* ---------- css book cover ---------- */
.hero__cover { display: flex; justify-content: center; }
.cover, .cover-img {
  width: min(320px, 78vw);
  aspect-ratio: 3 / 4.2;
  border-radius: 6px 14px 14px 6px;
  box-shadow: -8px 0 0 rgba(0,0,0,.08) inset, 0 30px 60px rgba(31, 42, 46, .25);
  transform: rotate(-3deg);
}
.cover-img { object-fit: cover; }
.cover {
  position: relative;
  overflow: hidden;
  padding: 28px 24px;
  background: linear-gradient(180deg, #f9d9b8 0%, #f2a878 45%, var(--sun) 58%);
  color: #fff;
}
.cover__sun {
  position: absolute; left: 50%; top: 44%;
  width: 120px; height: 120px; margin-left: -60px;
  border-radius: 50%;
  background: #fff3de;
  opacity: .9;
}
.cover__sea {
  position: absolute; inset: 58% 0 0 0;
  background: linear-gradient(180deg, var(--sea) 0%, var(--sea-dark) 100%);
}
.cover__title {
  position: relative;
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 23px;
  line-height: 1.15;
  color: var(--ink);
}
.cover__author, .cover__ed { position: absolute; left: 24px; font-weight: 700; }
.cover__author { bottom: 44px; font-size: 16px; }
.cover__ed { bottom: 22px; font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section--tint { background: #fff; }
@media (min-width: 880px) { .section { padding: 96px 0; } }

.cards { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.card__icon { font-size: 30px; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.note {
  margin: 36px 0 0;
  padding-left: 18px;
  border-left: 4px solid var(--sun);
  font-size: 19px;
  max-width: 44em;
}

.toc { list-style: none; counter-reset: toc; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .toc { grid-template-columns: 1fr 1fr; gap: 18px 32px; } }
.toc li {
  counter-increment: toc;
  position: relative;
  padding: 18px 20px 18px 64px;
  border-radius: var(--radius);
  background: var(--sand);
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 20px; top: 18px;
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--sun);
  line-height: 1.2;
}
.meta { margin-top: 24px; color: var(--muted); }

.steps { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 28px 24px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.step__num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%;
  background: var(--sea); color: #fff; font-weight: 800;
}
.step p { margin: 0; color: var(--muted); font-size: 16px; }

.about { display: grid; gap: 28px; align-items: center; margin-bottom: 72px; }
@media (min-width: 760px) { .about { grid-template-columns: 220px 1fr; gap: 48px; } }
.about__photo img, .about__placeholder {
  width: 220px; height: 220px; border-radius: 50%; object-fit: cover;
}
.about__placeholder {
  display: grid; place-items: center;
  background: var(--sun-soft);
  font-family: 'Playfair Display', serif; font-size: 56px; font-weight: 800; color: var(--sun);
}

.faq { display: grid; gap: 10px; max-width: 760px; margin-top: 20px; }
.faq details { border-radius: 14px; background: var(--sand); padding: 0 20px; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 28px 18px 0;
  position: relative;
  font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 0; top: 14px;
  font-size: 24px; color: var(--sea); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

.final { background: var(--ink); color: var(--sand); text-align: center; }
.final__inner { max-width: 720px; }
.final p { color: #c9d3d6; font-size: 19px; }
.final .price__old { color: #8c9a9e; }
.final .buy { margin-top: 24px; }

.footer { padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.footer p { margin: 0 0 10px; }
.footer__small { font-size: 12px; opacity: .8; }

/* ---------- legal pages ---------- */
.legal { max-width: 760px; padding-top: 40px; padding-bottom: 64px; }
.legal h1 { font-size: clamp(28px, 5vw, 40px); }
.legal h2 { font-size: 22px; font-family: 'Manrope', sans-serif; margin-top: 32px; }
.legal .back { display: inline-block; margin-bottom: 24px; }

/* ---------- v2: new blocks ---------- */
.subtitle { font-size: clamp(19px, 2.4vw, 23px); font-weight: 700; line-height: 1.35; max-width: 30em; margin: 0 0 16px; }
.cover__title { font-size: 34px; }
.cover__sub { position: relative; margin-top: 10px; font-size: 12px; font-weight: 700; line-height: 1.35; color: var(--ink); max-width: 15em; }
.cover__sun { top: 46%; }
.card p { color: var(--ink); }
.text { margin: 32px 0 0; font-size: 19px; max-width: 44em; }
.note { margin-top: 20px; font-weight: 700; }

.side {
  margin-top: 48px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--sea);
  color: #eaf4f5;
}
@media (min-width: 720px) { .side { padding: 40px 48px; } }
.side h3 { font-family: 'Playfair Display', serif; font-size: 28px; color: #fff; }
.side p { margin: 0 0 12px; font-size: 18px; max-width: 46em; }
.side p:last-child { margin-bottom: 0; }

.prose { max-width: 46em; font-size: 18px; }
.subhead { font-size: 22px; margin: 40px 0 20px; }

.usp { display: grid; gap: 16px; }
@media (min-width: 820px) { .usp { grid-template-columns: repeat(3, 1fr); } }
.usp__item { padding: 28px 24px; border-radius: var(--radius); background: var(--sand); }
.usp__item p { margin: 0; color: var(--muted); font-size: 16px; }
.usp__num {
  display: inline-block; margin-bottom: 8px;
  font-family: 'Playfair Display', serif; font-size: 40px; font-weight: 800; line-height: 1; color: var(--sun);
}

.key {
  margin: 0 0 64px;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border-left: 6px solid var(--sun);
}
@media (min-width: 720px) { .key { padding: 40px 48px; } }
.key h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--sun); }
.key p { margin: 0; font-family: 'Playfair Display', serif; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.45; font-weight: 600; }

.twocol { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 760px) { .twocol { grid-template-columns: 1fr 1fr; } }
.col { padding: 28px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.col--her { background: var(--sun-soft); box-shadow: none; }
.col ul { margin: 0; padding-left: 20px; }
.col li { margin-bottom: 10px; }
.col li:last-child { margin-bottom: 0; }
.toc li { padding-top: 16px; padding-bottom: 16px; }

.about { align-items: start; margin-bottom: 0; }
.about__intro { font-size: 20px; font-weight: 700; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 24px; }
.stats div { flex: 1 1 120px; padding: 16px; border-radius: 14px; background: var(--sand); text-align: center; }
.stats b { display: block; font-family: 'Playfair Display', serif; font-size: 28px; color: var(--sea); line-height: 1.1; }
.stats span { font-size: 14px; color: var(--muted); }
.edition { margin-top: 24px; padding: 20px 24px; border-radius: 14px; background: var(--sand); border-left: 4px solid var(--sea); }

.faq__title { margin-top: 64px; }
.steps + .faq__title, [data-presale] + .faq__title { margin-top: 64px; }
.final h2 { max-width: 16em; margin-left: auto; margin-right: auto; }

/* ---------- v3: photo in «Я на вашей стороне» ---------- */
.side { display: grid; gap: 24px; align-items: center; }
@media (min-width: 720px) { .side { grid-template-columns: 240px 1fr; gap: 40px; } }
.side__photo { margin: 0; max-width: 240px; }
.side__photo img, .side__placeholder {
  display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px;
}
.side__placeholder {
  display: grid; place-items: center; text-align: center;
  background: rgba(255,255,255,.12); border: 2px dashed rgba(255,255,255,.4);
  color: #cfe3e5; font-weight: 700;
}
.side__photo figcaption { margin-top: 10px; font-size: 14px; color: #cfe3e5; font-style: italic; }

/* ---------- v4: до / после ---------- */
.section--examples { background: var(--sand-2); }
.examples__lead { margin: 0 0 28px; }
.examples { display: grid; gap: 20px; max-width: 1000px; }
.example { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.example img { display: block; width: 100%; height: auto; }

/* ---------- v5: cookie banner ---------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 560px; margin: 0 auto;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--ink); color: #e6ecee;
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
  font-size: 14px; line-height: 1.5;
}
.cookie p { margin: 0 0 12px; }
.cookie a { color: var(--sun-soft); }
.cookie__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie button {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 10px 18px; border-radius: 10px; border: 0;
}
.cookie__yes { background: var(--sun); color: #fff; }
.cookie__no { background: transparent; color: #e6ecee; border: 1px solid rgba(255,255,255,.3) !important; }
