:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --tint: #fbefe2;
  --ink: #2b2118;
  --muted: #6b5d52;
  --border: #ecdccb;
  --primary: #c4452f;
  --primary-hover: #a93a27;
  --accent: #5b4bb7;
  --tg: #229ed9;
  --ok: #2f7a4b;
  --danger: #b3261e;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(43, 33, 24, 0.08);
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: Nunito, var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.accent { color: var(--primary); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 999px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; padding: 14px 22px; transition: background .15s, transform .15s; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--tg { background: var(--tg); color: #fff; }
.btn--tg:hover { background: #1c88bb; }
.btn--ghost { background: var(--surface); border: 2px solid var(--border); }
.btn--ghost:hover { border-color: var(--tg); }
.btn--sm { padding: 10px 16px; font-size: .95rem; }
.btn--lg { padding: 16px 26px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 250, 243, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header__row { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 800 1.35rem var(--display); color: var(--ink); text-decoration: none; }
.logo__mark { font-size: 1.4rem; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--tint); }
@media (max-width: 720px) { .nav { display: none; } .header .btn { margin-left: auto; } }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.eyebrow { display: inline-block; background: var(--tint); color: var(--primary); font-weight: 600; font-size: .9rem; padding: 6px 12px; border-radius: 999px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.hero__cta--center { justify-content: center; }
.hero__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 0; color: var(--muted); }
.hero__facts strong { color: var(--ink); }
.hero__art { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.hero__book { position: absolute; width: 62%; border-radius: 18px; box-shadow: 0 20px 45px rgba(43, 33, 24, .22); }
.hero__book--a { left: 0; top: 8%; transform: rotate(-7deg); }
.hero__book--b { right: 0; top: 0; transform: rotate(6deg); }
.hero__book--c { left: 19%; bottom: 0; transform: rotate(-1deg); z-index: 2; }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 260px; order: -1; }
  .hero { padding-top: 24px; }
}

/* Sections */
.section { padding: 64px 0; }
.section--tint { background: var(--tint); }
.section__lead { color: var(--muted); margin-top: -.3em; }

.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps li { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps p { color: var(--muted); margin: 0; }
.steps__n { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary); color: #fff; font: 800 1.1rem var(--display); margin-bottom: 12px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.book { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.book img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.book__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.book__body p { color: var(--muted); font-size: .95rem; }
.book__age { font-size: .85rem !important; font-weight: 600; color: var(--accent) !important; margin-bottom: .5em; }
.book__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.book__price { font: 800 1.15rem var(--display); }
@media (max-width: 900px) { .books { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .books { grid-template-columns: 1fr; } }

/* Order */
.order { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .order { grid-template-columns: 1fr; } }
.tips { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.tips ul { list-style: none; padding: 0; margin: 0; }
.tips li { padding-left: 28px; position: relative; margin: 6px 0; }
.tips li::before { position: absolute; left: 0; font-weight: 700; }
.tips .ok::before { content: '✓'; color: var(--ok); }
.tips .no::before { content: '✕'; color: var(--danger); }

.form, .done { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.form legend { font: 700 1.1rem var(--display); margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin-top: 4px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; border: 2px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  font: inherit; padding: 12px 14px; min-height: 48px; transition: border-color .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
[aria-invalid=true] { border-color: var(--danger) !important; }
.radios { display: flex; gap: 12px; flex-wrap: wrap; }
.radios label { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--border); border-radius: 999px; padding: 10px 16px; cursor: pointer; font-weight: 600; }
.radios label:has(input:checked) { border-color: var(--primary); background: #fdf0ec; }
.radios.invalid label { border-color: var(--danger); }
input[type=radio], input[type=checkbox] { accent-color: var(--primary); width: 18px; height: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; margin-bottom: 16px; }
.check input { margin-top: 3px; flex: none; }
.check.invalid span { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.drop { position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.drop__label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--border); border-radius: var(--radius); text-align: center; background: var(--bg); transition: border-color .15s, background .15s; }
.drop:hover .drop__label, .drop.is-over .drop__label { border-color: var(--primary); background: #fdf0ec; }
.drop input:focus-visible + .drop__label { outline: 3px solid var(--accent); outline-offset: 2px; }
.drop.invalid .drop__label { border-color: var(--danger); }
.drop__icon { font-size: 2rem; }
.previews { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.previews li { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--tint); }
.previews img { width: 100%; height: 100%; object-fit: cover; }
.previews button { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); cursor: pointer; font-size: 1rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.previews .busy { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; }

.form__error { background: #fdecea; color: var(--danger); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; }
.progress { height: 8px; background: var(--tint); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress__bar { height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.done { text-align: center; }
.done__icon { font-size: 3rem; }
.done:focus { outline: none; }

/* Why, FAQ, final */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.why > div { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.why p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .why { grid-template-columns: 1fr; } }
details { background: var(--surface); border-radius: var(--radius-sm); margin: 10px 0; box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 600; padding: 16px 20px; list-style: none; position: relative; padding-right: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--primary); }
details[open] summary::after { content: '–'; }
details p { padding: 0 20px 16px; margin: 0; color: var(--muted); }
.final { padding: 64px 0 80px; }

.footer { border-top: 1px solid var(--border); padding: 24px 0 88px; color: var(--muted); font-size: .9rem; }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }

.fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 58px; height: 58px; border-radius: 50%; background: var(--tg); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(34, 158, 217, .45); }
.fab svg { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
