/* «Сёма» - page layouts: home hero, inner page hero, section renderers, article typography, contacts. */

/* ---------- Home hero ---------- */
.hero { padding-block: clamp(32px, 6vw, 80px) clamp(8px, 4vw, 56px); }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { font-size: var(--text-h1); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.hero-facts li { font-size: .95rem; color: var(--ink-soft); }
.hero-facts b { display: block; font-family: var(--font-hand); font-weight: 400; font-size: 1.9rem; line-height: 1; color: var(--green-deep); }

.hero-page {
  position: relative; margin: 0;
  background: var(--paper-2);
  border: 2px solid var(--ink); border-radius: var(--radius-hand-2);
  box-shadow: 10px 10px 0 var(--sage), 10px 10px 0 2px var(--ink);
  padding: 0;
  transform: rotate(1.2deg);
  --ko: var(--paper-2);
}
.hero-page::before {
  content: ""; position: absolute; top: -14px; left: 50%; width: 96px; height: 28px; z-index: 1;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(242, 166, 90, .55); border-radius: 3px;
}
/* Edge to edge, clipped to the card shape like the map card */
.hero-scene { display: block; width: 100%; height: auto; overflow: hidden; border-radius: var(--radius-hand-2); }

/* ---------- Inner page hero ---------- */
.page-hero { padding-block: clamp(24px, 4vw, 56px) clamp(24px, 5vw, 72px); }
.page-hero-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) { .page-hero-grid { grid-template-columns: 1.1fr .9fr; } }
.page-hero h1 { font-size: var(--text-h1-page); }
.page-hero .lead { margin-bottom: 0; }
.page-hero .hero-actions { margin-bottom: 0; }
.page-hero-pic { max-width: 520px; width: 100%; justify-self: center; transform: rotate(-1.2deg); }
.page-hero-pic::before { left: 30%; transform: translateX(-50%) rotate(4deg); background: rgba(183, 207, 148, .7); }
.page-hero-pic::after {
  content: ""; position: absolute; right: -10px; bottom: 18px; width: 22px; height: 64px;
  background: var(--terracotta); border: 2px solid var(--ink); border-radius: 3px 3px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
}
@media (max-width: 899px) { .page-hero-pic { max-width: 440px; } }
.page-hero-doc { padding-bottom: 24px; }
.page-hero-doc .page-hero-grid { grid-template-columns: 1fr auto; align-items: end; }
.page-hero-doc h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); max-width: 20em; }
.doc-frog { width: clamp(80px, 14vw, 140px); height: auto; overflow: visible; }

/* ---------- Inner page sections ---------- */
.page-section { padding-block: clamp(48px, 4rem + 2vw, 96px); }
.page-body > .page-section:first-child:not(.chapter-tint) { padding-top: 8px; }
.page-body-doc .page-section { padding-block: 24px; }
.section-head { display: flex; flex-direction: column; gap: 6px; max-width: 760px; margin-bottom: clamp(20px, 3vw, 36px); }
.section-head h2 { margin: 0; }
.section-intro { max-width: 46em; margin-bottom: 28px; }

.text-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .text-layout.has-aside { grid-template-columns: 1.6fr .8fr; } }
.text-main .ticks { margin-top: 20px; max-width: 46em; }
.text-mascot { width: 100%; max-width: 230px; height: auto; justify-self: center; overflow: visible; }
.text-img, .split-img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 2px solid var(--ink); border-radius: var(--radius-hand-2); box-shadow: var(--shadow-riso);
}

.split { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.1fr .9fr; }
  .split-rev .split-pic { order: -1; }
}
.split-text .ticks { margin-top: 18px; }
.split-art {
  display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 24px;
  background: var(--paper-2); --ko: var(--paper-2);
  border: 2px solid var(--ink); border-radius: var(--radius-hand);
  box-shadow: 10px 10px 0 var(--sage), 10px 10px 0 2px var(--ink);
  transform: rotate(1deg);
}
.split-mascot { width: 62%; height: auto; overflow: visible; }

.note-card {
  position: relative; max-width: 880px; margin: 60px auto 0;
  padding: 28px clamp(20px, 4vw, 40px);
  background: var(--paper-2); --ko: var(--paper-2);
  border: 2px solid var(--ink); border-radius: var(--radius-hand);
  box-shadow: 8px 8px 0 var(--pumpkin);
  transform: rotate(-.6deg);
}
.note-pic { width: 112px; height: 124px; margin: -88px auto 4px; overflow: visible; }
.note-card .note-title { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); }
.note-card .ticks { margin-top: 12px; }

.list-layout { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .list-layout.has-mascot { grid-template-columns: 1.7fr .6fr; } }
.list-card {
  padding: 24px clamp(18px, 3vw, 32px);
  background: var(--paper-2); border: 2px solid var(--ink); border-radius: var(--radius-hand-2);
  box-shadow: var(--shadow-riso);
}
.list-mascot { width: 100%; max-width: 200px; height: auto; justify-self: center; overflow: visible; }

.cards-grid { display: grid; gap: 40px 28px; margin-top: 56px; }
@media (min-width: 720px) { .cards-grid.cards-2, .cards-grid.cards-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .cards-grid.cards-3 { grid-template-columns: repeat(3, 1fr); } }
.cards-grid .paper-card:not(:has(.card-pic)) { padding-top: 24px; }

/* ---------- Prose: articles and long texts ---------- */
.prose { max-width: 70ch; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose figure { margin: 0 0 1.1em; }
.prose h2 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); margin: 1.6em 0 .5em; scroll-margin-top: 90px; }
.prose h3 { font-size: clamp(1.4rem, 1.2rem + .7vw, 1.7rem); margin: 1.4em 0 .4em; }
.prose h4 { font-size: 1.1rem; margin: 1.2em 0 .4em; }
.prose ul > li { position: relative; padding-left: 28px; margin-bottom: .45em; }
.prose ul > li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16'%3E%3Cpath d='M2 9 C5 11 7 13 8 14 C11 8 14 4 18 2' fill='none' stroke='%235E7D2A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.prose ol { counter-reset: li; }
.prose ol > li { position: relative; padding-left: 40px; margin-bottom: .55em; counter-increment: li; }
.prose ol > li::before {
  content: counter(li); position: absolute; left: 0; top: -.05em;
  display: grid; place-items: center; width: 28px; height: 28px;
  font-family: var(--font-hand); font-size: 1.15rem; line-height: 1;
  background: var(--peach); border: 1.5px solid var(--ink); border-radius: 50% 46% 54% 48% / 52% 48% 50% 46%;
}
.prose li > ul, .prose li > ol { margin: .4em 0 0; }
.prose a { font-weight: 700; }
.prose strong, .prose b { font-weight: 800; color: var(--green-deep); }
.prose blockquote {
  position: relative; padding: 18px 22px 18px 26px;
  background: var(--tint); border-left: 5px solid var(--green); border-radius: 0 18px 18px 0;
  font-weight: 600;
}
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { height: 14px; margin: 2em 0; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14'%3E%3Cpath d='M4 7 C24 1 40 13 60 7 S96 1 116 7' fill='none' stroke='%23B7CF94' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 120px 14px; }
.prose img { border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow-photo); }
.prose figcaption { margin-top: 8px; font-family: var(--font-hand); font-size: 1.1rem; color: var(--ink-soft); text-align: center; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1.5px solid var(--line-soft); vertical-align: top; }
.prose th { background: var(--tint); font-weight: 800; }
.prose tr:last-child td { border-bottom: 0; }
.prose code { padding: 1px 6px; font-size: .9em; background: var(--tint); border-radius: 6px; }

/* ---------- Article page ---------- */
.article-head { padding-block: clamp(24px, 4vw, 56px) clamp(20px, 3vw, 36px); }
.article-head-inner { max-width: 960px; }
.article-head h1 { font-size: clamp(2.2rem, 1.4rem + 2.8vw, 3.6rem); }
.article-meta { font-weight: 700; color: var(--rust); font-size: .95rem; }
.article-meta > * + *::before { content: " · "; color: var(--ink-soft); }
.article-cover { max-width: 1000px; margin: 0 auto clamp(28px, 4vw, 48px); }
.article-cover img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #F6EFDF;
  border: 2px solid var(--ink); border-radius: var(--radius-hand-2);
  box-shadow: 10px 10px 0 var(--sage), 10px 10px 0 2px var(--ink);
}
.article-layout { display: grid; gap: 32px; max-width: 1100px; }
@media (min-width: 1040px) { .article-layout.has-toc { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; } }
.article-body { font-size: clamp(1.05rem, 1rem + .25vw, 1.15rem); line-height: 1.7; }
.article-body > p:first-of-type::first-letter {
  float: left; margin: .1em .14em 0 0; padding: .02em .1em .06em;
  font-family: var(--font-hand); font-size: 3.4em; line-height: .82; color: var(--paper-2);
  background: var(--green-deep); border-radius: 12px 16px 10px 18px / 16px 10px 18px 12px;
  box-shadow: 3px 3px 0 var(--pumpkin);
}
.toc {
  align-self: start; padding: 18px 20px;
  background: var(--paper-2); border: 2px solid var(--ink); border-radius: var(--radius-hand-2);
  box-shadow: var(--shadow-riso);
}
@media (min-width: 1040px) { .toc { position: sticky; top: 96px; } }
.toc-title { font-family: var(--font-hand); font-size: 1.5rem; color: var(--green-deep); margin-bottom: 8px; }
.toc ol { counter-reset: toc; display: grid; gap: 6px; }
.toc li { counter-increment: toc; display: flex; gap: 8px; font-size: .95rem; line-height: 1.35; }
.toc li::before { content: counter(toc) "."; font-family: var(--font-hand); font-size: 1.1rem; color: var(--rust); flex: none; min-width: 1.4em; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--rust); text-decoration: underline; }
.article-cta { padding-bottom: clamp(48px, 6vw, 80px); }

/* ---------- Contacts page ---------- */
.contacts-page { padding-top: 8px; }
.contacts-layout { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .contacts-layout { grid-template-columns: 1fr 1.05fr; } }
.contact-cards { display: grid; gap: 20px; }
@media (min-width: 640px) and (max-width: 959px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
.contact-card {
  padding: 20px 22px; background: var(--paper-2);
  border: 2px solid var(--ink); border-radius: var(--radius-hand-2); box-shadow: var(--shadow-riso);
}
.contact-card:nth-child(2n) { border-radius: var(--radius-hand); }
.contact-card-accent { box-shadow: 6px 6px 0 var(--pumpkin); }
.contact-card h2 { font-size: 1.6rem; color: var(--rust); margin-bottom: 6px; }
.contact-card p { margin-bottom: 4px; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-big { font-size: 1.2rem; font-weight: 800; color: var(--green-deep); font-variant-numeric: tabular-nums; }
.contact-hours { font-size: 1.05rem; font-weight: 800; color: var(--green-deep); }
.contact-muted, .contact-extra { color: var(--ink-soft); font-size: .95rem; }
.contact-extra { margin-top: 8px !important; }
.map-card { position: sticky; top: 90px; }
.map-frame {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--paper-2); --ko: var(--paper-2);
  border: 2px solid var(--ink); border-radius: var(--radius-hand-2);
  box-shadow: 10px 10px 0 var(--sage), 10px 10px 0 2px var(--ink);
}
.map-art { width: 100%; height: 100%; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-btn { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; }
.map-card .map-links { margin-top: 22px; }
@media (max-width: 959px) { .map-card { position: static; } .map-frame { aspect-ratio: 4 / 3; } }

/* ---------- Prices page ---------- */
.plans-section { padding-top: 24px; }
.plans { display: grid; gap: 40px; justify-items: center; }
@media (min-width: 900px) { .plans.plans-2 { grid-template-columns: 1fr 1fr; } .plans.plans-3 { grid-template-columns: repeat(3, 1fr); } }
.plans .price-tag:nth-child(2n) { transform: rotate(-1.4deg); }
.price-tag.is-highlight { box-shadow: 10px 10px 0 var(--pumpkin), 10px 10px 0 2px var(--ink); }
.price-tag h3.price-label { font-family: var(--font-hand); font-size: 1.7rem; color: var(--green-deep); margin-bottom: 4px; }
.plans-note { max-width: 46em; margin: 40px auto 0; text-align: center; font-weight: 600; color: var(--ink-soft); }

/* ---------- Reviews page ---------- */
.reviews-top { display: grid; gap: 32px; align-items: center; }
@media (min-width: 820px) { .reviews-top { grid-template-columns: auto 1fr; gap: 56px; } }
.reviews-intro h2 { font-size: var(--text-h2); }
.reviews-grid { display: grid; gap: 36px 28px; margin-top: 56px; align-items: start; }
@media (min-width: 720px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }
.leave-review { max-width: 760px; text-align: center; margin-inline: auto; }
.leave-review h2 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); }
.leave-review .reviews-links { justify-content: center; }

/* ---------- Gallery and FAQ pages ---------- */
.gallery-section { padding-top: 16px; }
.gallery-group-title { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); margin: 40px 0 24px; }
.gallery-section .gallery-group-title:first-child { margin-top: 0; }
.faq-page { padding-top: 16px; }
.faq-page-wrap { max-width: 980px; }
.faq-group + .faq-group { margin-top: 48px; }
.faq-group-title { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); }

/* ---------- Info page ---------- */
.info-basics { padding-top: 8px; }
.doc-card {
  max-width: 900px; padding: 28px clamp(20px, 4vw, 40px);
  background: var(--paper-2); border: 2px solid var(--ink); border-radius: var(--radius-hand-2); box-shadow: var(--shadow-riso);
}
.doc-card h2 { font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem); }
.info-list { display: grid; gap: 0; margin: 0; }
.info-list > div { display: grid; gap: 2px 24px; padding: 12px 0; border-bottom: 1.5px dashed var(--line-soft); }
.info-list > div:last-child { border-bottom: 0; }
@media (min-width: 720px) { .info-list > div { grid-template-columns: 220px 1fr; } }
.info-list dt { font-weight: 800; color: var(--rust); }
.info-list dd { margin: 0; }
.doc-list { display: grid; gap: 10px; }
.doc-list a { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.doc-list a::before { content: ""; width: 20px; height: 24px; flex: none; border: 2px solid var(--ink); border-radius: 3px 8px 3px 3px; background: var(--peach); }
.doc-group { margin: 28px 0 12px; font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); }
.doc-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.doc-list .doc-file { font-weight: 600; font-size: .92em; }
.doc-list .doc-file::before { display: none; }
.doc-title { font-weight: 700; }
.doc-all { margin-top: 24px; font-weight: 700; }
.doc-text .prose { max-width: 72ch; }
.doc-approval { margin: 0 0 24px auto; max-width: 340px; text-align: right; font-weight: 700; line-height: 1.5; }
.doc-signer { margin-top: 32px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.doc-signature { width: 125px; height: auto; }
.doc-esign { margin-top: 28px; padding: 16px 20px; max-width: 520px; border: 2px solid var(--ink); border-radius: 12px; font-size: .92rem; }
.doc-esign-title { margin: 0 0 8px; font-weight: 800; }
.doc-esign dl { display: grid; gap: 4px; margin: 0 0 8px; }
.doc-esign dl > div { display: grid; grid-template-columns: minmax(0, 190px) 1fr; gap: 12px; }
.doc-esign dt { font-weight: 700; }
.doc-esign dd { margin: 0; overflow-wrap: anywhere; }
.doc-esign p:last-child { margin: 0; }
@media print {
  .page-document .site-header, .page-document .site-footer, .page-document .crumbs,
  .page-document .related, .page-document .doc-frog, .page-document .doc-file-line,
  .page-document dialog, .page-document .cookie, .page-document .mobile-dock { display: none !important; }
  .page-document .doc-card { box-shadow: none; border: 0; padding: 0; max-width: none; background: #fff; }
  .page-document .page-hero { padding: 0 0 12px; background: none; }
  body.page-document { background: #fff; }
  .page-document *:not(.prose li)::before, .page-document *:not(.prose li)::after { display: none; }
  /* Official look of the printed copy: one plain font, black text, modest headings */
  .page-document main, .page-document main * { color: #111 !important; }
  .page-document h1, .page-document h2, .page-document h3 { font-family: var(--font-body); font-weight: 800; }
  .page-document h1 { font-size: 1.45rem; line-height: 1.3; margin-bottom: 4px; }
  .page-document .prose h2 { font-size: 1.12rem; margin: 1.2em 0 .4em; }
  .page-document .prose h3 { font-size: 1rem; }
  .page-document .prose { max-width: none; font-size: 11.5pt; line-height: 1.45; }
  .page-document .prose ol > li::before { background: none; border: 0; font-family: var(--font-body); font-size: 1em; }
  .page-document .doc-esign { break-inside: avoid; }
  .page-document .doc-signer { break-inside: avoid; }
}
.doc-file-line { margin-top: 12px; }

/* ---------- Error page ---------- */
.error-page { padding-block: clamp(32px, 6vw, 88px); }
.error-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .error-grid { grid-template-columns: 1.1fr .9fr; } }
.error-page h1 { font-size: var(--text-h1-page); }
.error-links { margin-top: 32px; }
.error-links .note-title { text-align: left; font-size: 1.4rem; }
