/* Главная страница «Движение точек»: научно-популярная статья о методе с живыми чертежами.
   Оформление — в стиле сайта школы geometry.dabromat.com: тёмный первый экран, заголовки Unbounded,
   текст Onest на тёплом «бумажном» фоне, малиновые акценты. Подключается только на главной, после site.css. */

body.home-page{background:#fbf8f3}
.home{
  --ink:#172036; --ink-2:#3b4357; --muted:#6a7183; --paper:#fbf8f3; --card:#ffffff; --line:#e7e1d6;
  --crimson:#a3172d; --crimson-soft:#f6e3e5;
  --display:'Unbounded',system-ui,sans-serif; --body:'Onest',system-ui,-apple-system,'Segoe UI',sans-serif; --serif:'PT Serif',Georgia,serif;
  color:var(--ink);font-family:var(--body);font-size:18px;line-height:1.62;-webkit-font-smoothing:antialiased;padding-bottom:40px
}
.home a{color:var(--crimson);text-decoration-thickness:1px;text-underline-offset:3px}
.home a:hover{color:#7d0f20}
.home section{scroll-margin-top:var(--hdr,73px)}
/* поля — как на сайте геометрической школы: колонка 1120px, отступы по краям clamp(16px, 4vw, 40px); текст на всю колонку */
.home .wrap{max-width:1120px;padding-left:clamp(16px,4vw,40px);padding-right:clamp(16px,4vw,40px)}

/* текст статьи */
.hm-text{color:var(--ink-2)}
.hm-text p{margin:0 0 1em}
/* «О книге» — по ширине, с переносами (язык — из lang страницы); на телефоне строка узкая и по ширине получаются дыры — там по левому краю */
@media (min-width:601px){#about-book .hm-text p:not(.hm-note){text-align:justify;hyphens:auto;-webkit-hyphens:auto}}
.hm-text p:last-child{margin-bottom:0}
.hm-h2{margin:0 0 28px;font-family:var(--display);font-weight:600;font-size:clamp(28px,4.4vw,48px);line-height:1.15;letter-spacing:-.01em;color:var(--ink);max-width:16em;text-wrap:balance}
.hm-sec{padding:clamp(64px,9vw,110px) 0 0}

/* ---------- 1. первый экран: тёмная полоса ---------- */
.hm-band{position:relative;background:var(--ink);color:#fff;overflow:hidden}
.hm-band .hm-hero{position:relative;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center}
/* высота тёмной полосы: ниже, чем у сайта школы (там под текстом ещё ряд цифр), но звезда почти целиком в полосе */
.hm-band .hm-hero{min-height:600px}
@media (max-width:1100px){.hm-band .hm-hero{min-height:560px}}
@media (max-width:760px){.hm-band .hm-hero{min-height:0}}
/* фирменная звезда справа — как на сайте геометрической школы */
.hm-geo{position:absolute;right:-90px;top:50%;transform:translateY(-50%);width:min(640px,90vw);opacity:.5;pointer-events:none}
@media (max-width:760px){.hm-geo{top:-40px;transform:none}}
.hm-geo path,.hm-geo circle,.hm-geo line{fill:none;stroke-linejoin:round;stroke-linecap:round}
.hm-geo .k{stroke:#e7ebf3;stroke-width:1.8}
.hm-geo .r{stroke:#ef6b7b;stroke-width:1.8}
.hm-geo .b{stroke:#6fa0e8;stroke-width:1.4;stroke-dasharray:12 8}
.hm-geo .pt{fill:#fff;stroke:none}
.hm-geo .y{fill:#f5c84c;stroke:none}
.hm-geo .draw{stroke-dasharray:var(--len);stroke-dashoffset:var(--len);animation:hmdraw 2.6s ease forwards}
.hm-geo .fade{opacity:0;animation:hmfade .9s ease forwards}
.hm-geo .pop{opacity:0;transform-box:fill-box;transform-origin:center;animation:hmpop .5s cubic-bezier(.3,1.5,.6,1) forwards}
@keyframes hmdraw{to{stroke-dashoffset:0}}
@keyframes hmfade{to{opacity:1}}
@keyframes hmpop{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}
.hm-hero{padding-top:clamp(48px,7vw,96px);padding-bottom:clamp(48px,7vw,88px)}
.hm-band .hm-hero h1{margin:0;font-family:var(--display);font-weight:700;font-size:clamp(38px,6vw,72px);line-height:1.05;letter-spacing:-.01em;color:#fff}
.hm-author{margin:14px 0 0;font-family:var(--display);font-weight:500;font-size:clamp(17px,1.8vw,21px);color:#f2b8bf}
.hm-lead{margin:22px 0 0;font-size:clamp(18px,2vw,21px);line-height:1.55;color:#cfd5e3;max-width:34em}
.hm-feats{list-style:none;margin:22px 0 0;padding:0;display:flex;flex-direction:column;gap:8px;max-width:34em}
.hm-feats li{position:relative;padding-left:22px;font-size:16px;color:#aab3c7}
.hm-feats li::before{content:"";position:absolute;left:2px;top:.62em;width:8px;height:8px;border-radius:50%;background:#ef6b7b}
.hm-feats b{color:#fff;font-weight:600}
.hm-cta{display:flex;flex-wrap:wrap;gap:12px 14px;margin-top:30px}
.home .hm-cta a{display:inline-flex;align-items:center;padding:14px 24px;border-radius:999px;font-weight:600;font-size:17px;text-decoration:none;transition:transform .15s,background .15s}
.home .hm-cta a:hover{transform:translateY(-2px)}
.home .hm-cta .go{background:#fff;color:var(--crimson);box-shadow:0 10px 30px -12px rgba(0,0,0,.5)}
.home .hm-cta .go:hover{background:#fdeef0}
.home .hm-cta .alt{background:transparent;color:#fff;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.7)}

/* ---------- 2–6. статья о методе ---------- */
.hm-article .hm-text h3{margin:2.1em 0 .6em;font-family:var(--display);font-weight:600;font-size:clamp(21px,2.3vw,26px);line-height:1.25;letter-spacing:-.01em;color:var(--ink);text-wrap:balance}
.hm-article .hm-text .m{font-family:var(--serif);font-style:italic;color:var(--ink)}
.hm-first{font-size:1.08em;color:var(--ink)}
/* живой чертёж прямо в тексте: без кнопок и подписей, в ширину колонки */
.hm-fig{max-width:820px;margin:40px auto 42px}
.hm-fig-top{margin-top:0;margin-bottom:36px}   /* чертёж сразу под заголовком «О книге» */
.hm-frame{position:relative;background:var(--card);border-radius:18px;overflow:hidden;box-shadow:0 0 0 1px var(--line),0 12px 34px -22px rgba(23,32,54,.35)}
.hm-frame iframe{position:absolute;inset:0;display:block;width:100%;height:100%;border:0;background:transparent;opacity:0;transition:opacity .5s ease}
.hm-frame.ready iframe{opacity:1}
.hm-fig figcaption{border:0;min-height:0;padding:0;margin-top:10px;font-size:14px;color:var(--muted);text-align:center}
.hm-fig figcaption a{color:var(--muted);text-decoration:none;border-bottom:1px solid var(--line)}
.hm-fig figcaption a:hover{color:var(--crimson);border-color:currentColor}

/* ---------- 7–8. алгебраическая геометрия и что читать ---------- */
.hm-reading{list-style:none;counter-reset:rd;margin:28px 0 0;padding:0;display:flex;flex-direction:column;gap:14px}
.hm-reading li{counter-increment:rd;position:relative;padding:18px 22px 18px 68px;background:var(--card);border:1px solid var(--line);border-radius:18px;font-size:17px;line-height:1.55;color:var(--ink-2)}
.hm-reading li::before{content:counter(rd,decimal-leading-zero);position:absolute;left:22px;top:19px;font-family:var(--display);font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--crimson)}
.hm-reading .bk{display:block;margin-bottom:4px;font-family:var(--display);font-weight:600;font-size:16px;color:var(--ink)}
.hm-reading .who{font-family:var(--body);font-weight:400;color:var(--muted)}

/* книги для чтения: описание — абзацами внутри карточки */
.hm-reading li p{margin:0 0 .7em}
.hm-reading li p:last-child{margin-bottom:0}
.hm-after{margin-top:22px}
.hm-note{font-size:16px;color:var(--muted)}

/* ---------- о книге, об авторе ---------- */
.hm-name{margin:0 0 6px;font-family:var(--display);font-weight:600;font-size:clamp(22px,2.4vw,28px);line-height:1.2;color:var(--ink)}
.hm-takes{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:12px}
.hm-takes li{position:relative;padding-left:22px;font-size:18px;line-height:1.5;color:var(--ink-2)}
.hm-takes li::before{content:"";position:absolute;left:2px;top:.6em;width:8px;height:8px;border-radius:50%;background:var(--crimson)}
.hm-takes b{color:var(--ink);font-weight:600}
.hm-takes a{text-decoration:none}
.hm-takes a b{color:var(--crimson)}
.hm-contact{margin:22px 0 0;padding-top:18px;border-top:1px solid var(--line);font-size:17px;color:var(--ink-2)}
.hm-contact p{margin:0}
.hm-contact-links{display:flex;flex-wrap:wrap;gap:8px 26px}
.home .hm-contact-links a{display:inline-flex;align-items:center;gap:8px;color:#1D5FD6;text-decoration:none;font-weight:500}
.home .hm-contact-links a:hover{color:#174fb4;text-decoration:underline;text-underline-offset:3px}
.hm-contact-links svg{flex:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hm-facts{display:grid;grid-template-columns:220px minmax(0,1fr);gap:0 28px;max-width:900px;margin:0}
.hm-facts dt,.hm-facts dd{padding:16px 0;border-top:1px solid var(--line)}
.hm-facts dt{font-family:var(--display);font-size:13px;font-weight:600;letter-spacing:.04em;color:var(--ink)}
.hm-facts dd{margin:0;font-size:17px;line-height:1.55;color:var(--ink-2)}
.hm-author-box{display:grid;grid-template-columns:340px minmax(0,1fr);gap:48px;align-items:start;max-width:1000px}
.hm-author-box .hm-name{line-height:1;margin:-.08em 0 16px}   /* верх букв имени — вровень с верхом фото */
/* правая колонка на всю высоту фото: контакты прижаты к низу — вровень с нижним краем фото */
.hm-author-box > div{align-self:stretch;display:flex;flex-direction:column}
.hm-author-box .hm-contact{margin-top:auto;line-height:1.25}
.hm-author-box .hm-takes{margin-bottom:22px}
.hm-author-box img{width:340px;height:auto;border-radius:0;display:block;box-shadow:0 14px 36px -18px rgba(23,32,54,.5)}
.hm-role{margin:0 0 20px;font-size:16px;color:var(--muted)}

@media (max-width:600px){
  .home{font-size:17px}
  .hm-fig{margin-left:-16px;margin-right:-16px}
  .hm-frame{border-radius:0;box-shadow:0 1px 0 var(--line),0 -1px 0 var(--line)}
  .hm-facts,.hm-author-box{grid-template-columns:1fr}
  .hm-facts dt{padding-bottom:4px}
  .hm-facts dd{border-top:0;padding-top:0}
  .hm-author-box{gap:20px}
  .hm-author-box img{width:100%;max-width:340px}
  .hm-reading li{padding:16px 18px 16px 56px}
  .hm-reading li::before{left:18px;top:17px}
  .home .hm-cta a{flex:1 1 auto;justify-content:center}
}
