
:root{
  --bg: #fffdf8;
  --ink: #2a2a2a;
  --muted:#6b6b6b;
  --brand:#4cbf9e;
  --brand-2:#f7b733;
  --accent:#6ac0ff;
  --card:#ffffff;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%; overflow-x: hidden;}
html {
  scroll-behavior: smooth;
}

/* чтобы секции не прятались под фикс-хедером */
section, .site-footer, .hero {
  scroll-margin-top: var(--header, 88px);
}
body{
  margin:0;
  font-family: Nunito, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #fff1cc 0%, transparent 60%),
    radial-gradient(1200px 600px at 110% 10%, #d7f7ec 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
h1,h2{font-family: Fredoka, Nunito, sans-serif; line-height:1.1}
h1{font-size:clamp(2rem, 2.6vw + 1.4rem, 3.1rem); margin:.2rem 0 1rem}
h2{font-size:clamp(1.6rem, 1.6vw + 1rem, 2.2rem); margin:0 0 .8rem}
p{color:#3d3d3d; font-size:1.075rem}
.container{max-width:1120px; margin:0 auto; padding:0 20px}
.section{padding:64px 0}
.grid-2{display:grid; grid-template-columns:1.1fr .9fr; gap:32px}
@media (max-width: 900px){ .grid-2{grid-template-columns:1fr}}

.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.72); backdrop-filter:saturate(160%) blur(8px);
  border-bottom:1px solid rgba(0,0,0,.06);
}
.header-inner{display:flex; align-items:center; justify-content:space-between; height:64px}
.brand{font-family:Fredoka, Nunito, sans-serif; text-decoration:none; font-size:1.3rem; color:#1a1a1a}
.brand span{color:var(--brand)}
.nav a{margin-left:22px; color:#333; text-decoration:none; font-weight:600}
.nav a:hover{color:var(--brand)}
.burger{display:none; background:none; border:0; cursor:pointer}
.burger span{display:block; width:24px; height:2px; background:#333; margin:6px 0; transition:.2s}
@media (max-width: 800px){
  .nav{position:fixed; inset:64px 0 auto auto; right:12px; background:white; border:1px solid #eee; padding:12px 16px; border-radius:12px; box-shadow:var(--shadow); display:none; }
  .nav a{display:block; margin:10px 0}
  .burger{display:block}
}

.hero-copy{
  margin-bottom:20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.hero{padding:56px 0 20px}
.hero-art img{width:100%; height:auto; border-radius:var(--radius); box-shadow:var(--shadow)}
.cta-row{display:flex; gap:12px; flex-wrap:wrap; margin:0}
.btn{
  display:inline-block; padding:12px 18px; border-radius:999px;
  text-decoration:none; font-weight:800; letter-spacing:.2px;
  transition:transform .06s ease, box-shadow .2s ease; will-change:transform;
  box-shadow:var(--shadow);
}
.btn:hover{transform:translateY(-2px)}
.btn-primary{background:linear-gradient(135deg, var(--brand), #18a381); color:#fff;border: 2px solid #eee;}
.btn-secondary{background:linear-gradient(135deg, var(--brand-2), #ff8c42); color:#432;border: 2px solid #eee;}
.btn-outline{background:#fff; color:#333; border:2px solid #eee}
.inline-cta{display:flex; gap:12px; flex-wrap:wrap; margin-top:14px}
.scroll-hint{text-align:center; color:var(--muted); margin-top:8px; font-size:.95rem}

.about-card, .play-card, .card{
  background:var(--card); border-radius:var(--radius); padding:22px 22px; box-shadow:var(--shadow);
}
.bullets{margin:14px 0; padding-left:18px}
.bullets li{margin:6px 0}

.gallery{background:linear-gradient(180deg, rgba(255,255,255,.0), rgba(255,255,255,.8))}
.masonry{display:grid; grid-template-columns:repeat(12, 1fr); gap:14px}
.masonry a{grid-column:span 4; display:block}
.masonry a.wide{grid-column:span 8}
@media (max-width: 900px){ .masonry a{grid-column:span 6} .masonry a.wide{grid-column:span 12} }
.masonry img{width:100%; height:auto; display:block; border-radius:16px; box-shadow:var(--shadow)}
.gallery-note{text-align:center; color:var(--muted)}

.play .grid-2{gap:20px}
.play-card h2{margin-bottom:6px}

.buy .buy-art img{width:100%; height:auto; border-radius:var(--radius); box-shadow:var(--shadow)}

.order .row{display:flex; gap:14px; flex-wrap:wrap}
.order label{display:flex; flex-direction:column; gap:6px; font-weight:700}
.order input, .order textarea{
  border:1px solid #e6e6e6; border-radius:12px; padding:12px 14px; font:inherit;
}
.order .end{justify-content:flex-end}
.form-msg{margin:.6rem 0 0; color:var(--muted)}

.site-footer{padding:26px 0; border-top:1px solid rgba(0,0,0,.06); background:#fff}
.footer-inner{display:flex; align-items:center; justify-content:space-between}
.footer-inner p{margin:0; color:#696969; font-size:.95rem}
.footer-inner a{text-decoration:none; font-weight:700; color:var(--brand)}
@media (max-width: 700px){ .footer-inner{flex-direction:column; gap:8px} }
html { scroll-behavior: smooth; }
.section { scroll-margin-top: 84px; }
.buy-copy h2{
  margin: 0px;
}
.buy-copy{
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 800px){
  .nav.is-open { display: block; }
  .burger.open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
  .burger.open span:nth-child(2){ opacity: 0; }
  .burger.open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }
}

/* Контейнер книги — растягиваем по ширине блока, сохраняем пропорции */
.turnbook-wrap{display:grid; gap:12px; justify-items:center}
.turnbook{
  width:100%;
  max-width:1120px;          /* можно поменять */
  margin:0 auto;
  /* turn.js сам задаёт внутренний canvas, но нам нужна «рамка» вокруг */
  border-radius:0px;
  box-shadow:0px;
  background:#fff;
}

/* Страница — это просто блок с картинкой */
.turnbook .page{
  width:100%;
  height:100%;
  background:none;
}
.turnbook .page img{
  width:100%; height:100%;
  object-fit:contain;        /* не обрезать иллюстрации */
  user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
}

/* Управление */
.turnbook-controls{display:flex; align-items:center; gap:12px}
.turnbook-counter{min-width:70px; text-align:center; font-weight:800}
.turnbook-hint{color:#6b7280; font-size:.95rem; margin:0}

.book-container {
  width: 100%;
  max-width: 1120px;      /* ограничение по ширине */
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.turnbook-controls .btn {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.turnbook-controls .btn.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}