:root {
  color: #2d3028;
  background: #f4f0e6;
  font-family: "Avenir Next", "Trebuchet MS", Arial, sans-serif;
  font-synthesis: none;
  --paper: #f4f0e6;
  --ink: #2d3028;
  --ink-soft: #65675f;
  --green: #849d4a;
  --green-dark: #607633;
  --line: rgba(63, 66, 55, 0.22);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100dvh; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #3156aa; outline-offset: 4px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 30; padding: 10px 14px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-shell { overflow: clip; }

.site-header { width: min(100% - 48px, 1320px); min-height: 92px; margin-inline: auto; display: grid; grid-template-columns: 180px 1fr auto auto; align-items: center; gap: 32px; border-bottom: 1px solid var(--line); }
.brand img, .site-footer img { width: 152px; height: auto; }
.main-nav { display: flex; justify-content: center; gap: clamp(24px, 4vw, 58px); }
.main-nav a, .header-link { font-size: 13px; text-decoration: none; letter-spacing: 0.02em; }
.main-nav a:hover, .header-link:hover, .text-link:hover { text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-line: underline; }
.menu-button { display: none; }

.button { min-height: 50px; border: 0; border-radius: 2px 12px 3px 9px; padding: 13px 22px; color: var(--ink); background: transparent; cursor: pointer; font-weight: 650; transition: transform 220ms ease, background-color 220ms ease, color 220ms ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px) scale(0.985); }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: var(--green-dark); }
.header-cta { border: 1px solid var(--ink); min-height: 42px; padding: 9px 16px; font-size: 13px; }
.header-cta:hover { background: var(--ink); color: var(--paper); }

.hero { width: min(100% - 48px, 1320px); min-height: 760px; margin-inline: auto; padding: 56px 0 88px; display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(28px, 4vw, 72px); }
.eyebrow { margin: 0 0 14px; color: var(--green-dark); font-size: 12px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -0.04em; }
h1 { font-size: clamp(64px, 7.5vw, 116px); line-height: 0.82; }
h1 em, h2 em { font-weight: 400; }
h1 em { position: relative; z-index: 0; }
h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 0.08em; background: var(--green); border-radius: 99px; z-index: -1; }
.hero-intro { max-width: 44ch; margin: 34px 0 24px; color: var(--ink-soft); font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 28px; }
.text-link { font-size: 15px; text-underline-offset: 5px; }
.tuition { width: min(100%, 370px); margin: 30px 0 0 12%; padding: 17px 20px 15px; position: relative; background: rgba(255,255,255,0.58); border: 1px solid rgba(96, 118, 51, 0.42); box-shadow: 10px 12px 0 rgba(132, 157, 74, 0.12); transform: rotate(-1.2deg); }
.tuition::before { content: ""; width: 40px; height: 3px; position: absolute; top: -2px; left: 22px; background: var(--green); }
.tuition > span { display: block; color: var(--green-dark); font-size: 11px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.tuition p { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.tuition strong { font-family: var(--display); font-size: clamp(34px, 3.1vw, 48px); font-weight: 500; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tuition small { color: var(--ink-soft); font-size: 13px; font-weight: 650; white-space: nowrap; }
.tuition em { color: var(--ink-soft); font-size: 12px; font-style: normal; white-space: nowrap; }
.hero-art { margin: 0; position: relative; }
.hero-art img { width: 100%; min-height: 500px; object-fit: cover; border-radius: 44% 5% 36% 8% / 12% 9% 15% 11%; }
.hero-art figcaption { max-width: 310px; margin: -28px 16px 0 auto; position: relative; padding: 14px 18px; background: #fbf8f0; border: 1px solid var(--line); transform: rotate(-2deg); font-family: var(--display); font-style: italic; line-height: 1.35; }

.section { width: min(100% - 48px, 1320px); margin-inline: auto; padding: 118px 0; }
.section h2 { font-size: clamp(44px, 5vw, 76px); line-height: 0.98; }
.approach { display: grid; grid-template-columns: 0.85fr 1.5fr; gap: clamp(56px, 8vw, 128px); align-items: start; border-top: 1px solid var(--line); }
.paper-note { padding: 42px; background: rgba(255,255,255,0.42); border: 1px solid var(--line); transform: rotate(-1.1deg); }
.paper-note h2 { font-size: clamp(42px, 4.4vw, 64px); }
.paper-note > p:last-child { max-width: 47ch; margin: 26px 0 0; color: var(--ink-soft); line-height: 1.65; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding-top: 70px; }
.principles article { min-height: 250px; padding: 4px 28px 28px; border-left: 1px solid var(--line); }
.principles span { color: var(--green-dark); font-family: var(--display); font-size: 17px; }
.principles h3 { margin: 62px 0 12px; font-family: var(--display); font-size: 28px; font-weight: 500; }
.principles p { margin: 0; color: var(--ink-soft); line-height: 1.6; }

/* Фон нужен явно: data-reveal оставляет на секции transform, а он создаёт контекст наложения,
   внутри которого mix-blend-mode иконок иначе не с чем смешивать. */
.school-day { background: var(--paper); border-top: 1px solid var(--line); }
.section-heading { max-width: 740px; }
.timeline { --k: 0.45; --z: 1; margin: 58px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); list-style: none; }
/* Каждый пункт показывает свой фрагмент общей иллюстрации: --ix и --iw — позиция и ширина
   иконки в исходнике (1920×420), поэтому подпись всегда стоит ровно под своей картинкой. */
.timeline li { min-height: 160px; padding: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.timeline li::before { content: ""; display: block; width: calc(var(--iw) * var(--k) * var(--z)); height: calc(420px * var(--k)); margin-bottom: 22px; background-image: url("assets/day-timeline-watercolor.webp"); background-repeat: no-repeat; background-size: calc(1920px * var(--k) * var(--z)) auto; background-position: calc(var(--ix) * var(--k) * var(--z) * -1) center; mix-blend-mode: darken; }
/* --z поднимает мелкие предметы до общего визуального веса, не трогая высоту блока,
   иначе зелёная линия разъедется по вертикали. */
.timeline li:nth-child(1) { --ix: 84px; --iw: 142px; --z: 1.45; }
.timeline li:nth-child(2) { --ix: 301px; --iw: 330px; }
.timeline li:nth-child(3) { --ix: 672px; --iw: 275px; }
.timeline li:nth-child(4) { --ix: 985px; --iw: 267px; }
/* Ложка заканчивается на 1586, верёвка змея идёт с 1572 — режем по 1572/1588,
   иначе обрывок верёвки остаётся в блоке с миской. */
.timeline li:nth-child(5) { --ix: 1325px; --iw: 243px; }
.timeline li:nth-child(6) { --ix: 1588px; --iw: 232px; --z: 1.1; }
.timeline time { width: 100%; padding-top: 18px; border-top: 2px solid var(--green); color: var(--green-dark); font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.timeline strong { padding-right: 24px; font-size: 14px; }
.timeline span { max-width: 18ch; padding-right: 24px; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }

.trust { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(56px, 7vw, 118px); align-items: center; border-top: 1px solid var(--line); }
.trust-copy > p:not(.eyebrow) { max-width: 50ch; margin: 26px 0; color: var(--ink-soft); font-size: 17px; line-height: 1.65; }
.trust-copy ul { margin: 28px 0 0; padding-left: 20px; }
.trust-copy li { margin: 14px 0; padding-left: 8px; line-height: 1.5; }
.trust-copy li::marker { color: var(--green); }
.trust-art { margin: 0; position: relative; }
.trust-art img { width: 100%; height: auto; object-fit: contain; object-position: left center; border-radius: 0; }
.trust-art blockquote { width: min(88%, 440px); margin: -56px -24px 0 auto; position: relative; padding: 28px 32px; background: #fbf8f0; border: 1px solid var(--line); transform: rotate(1.5deg); font-family: var(--display); font-size: 24px; font-style: italic; line-height: 1.35; }

.questions { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(64px, 9vw, 150px); border-top: 1px solid var(--line); }
.questions h2 { font-size: clamp(48px, 5vw, 72px); }
.question { border-top: 1px solid var(--line); }
.question:last-child { border-bottom: 1px solid var(--line); }
.question h3 { margin: 0; }
.question button { width: 100%; padding: 22px 0; border: 0; background: transparent; display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--ink); text-align: left; cursor: pointer; }
.question button span { font-family: var(--display); font-size: 22px; font-weight: 500; }
.question button small { color: var(--green-dark); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.question p { max-width: 60ch; margin: 0 0 24px; color: var(--ink-soft); line-height: 1.65; }

.final-cta { width: min(100% - 48px, 1320px); margin: 0 auto 42px; padding: 70px clamp(28px, 6vw, 86px); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 60px; background: var(--green); color: white; border-radius: 5px 26px 7px 20px; }
.final-cta .eyebrow { color: white; opacity: 0.82; }
.final-cta h2 { font-size: clamp(46px, 5vw, 76px); }
.final-cta p:last-child { max-width: 54ch; margin: 14px 0 0; line-height: 1.55; }
.cta-paper { min-width: 260px; background: #fbf8f0; }
.cta-paper:hover { background: var(--ink); color: white; }
.site-footer { width: min(100% - 48px, 1320px); margin-inline: auto; padding: 56px 0 30px; display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr) minmax(240px, 0.8fr); align-items: start; gap: clamp(40px, 6vw, 92px); border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; }
.footer-brand p { max-width: 27ch; margin: 22px 0 0; color: var(--ink-soft); }
.footer-group { display: grid; align-content: start; gap: 8px; }
.footer-group p, .footer-group dl { margin: 0; }
.footer-label { margin-bottom: 8px !important; color: var(--green-dark); font-size: 11px; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase; }
.footer-legal strong { max-width: 36ch; font-family: var(--display); font-size: 18px; font-weight: 500; line-height: 1.3; }
.footer-legal > p:not(.footer-label) { color: var(--ink-soft); }
.footer-legal dl { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal dl div { display: flex; gap: 7px; }
.footer-legal dt { color: var(--ink-soft); }
.footer-legal dd { margin: 0; font-variant-numeric: tabular-nums; }
.footer-contacts address { margin-bottom: 4px; font-style: normal; }
.footer-contacts a { width: fit-content; }
.site-footer a { text-underline-offset: 4px; }
.footer-bottom { grid-column: 1 / -1; margin-top: 12px; padding-top: 22px; display: flex; gap: 28px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }

.tour-dialog { width: min(92vw, 560px); border: 0; border-radius: 4px 22px 5px 18px; padding: 0; background: #fbf8f0; color: var(--ink); }
.tour-dialog::backdrop { background: rgba(39, 42, 35, 0.72); }
.dialog-close { position: absolute; top: 18px; right: 20px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.tour-form, .form-success { padding: 58px clamp(28px, 6vw, 64px) 48px; }
.tour-form h2, .form-success h2 { font-size: clamp(42px, 8vw, 60px); }
.tour-form > p:not(.eyebrow), .form-success > p:not(.eyebrow) { max-width: 42ch; margin: 16px 0 28px; color: var(--ink-soft); line-height: 1.55; }
.tour-form label:not(.consent) { display: grid; gap: 8px; margin-top: 18px; font-size: 13px; font-weight: 700; }
.tour-form input:not([type="checkbox"]) { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; background: var(--paper); color: var(--ink); font-size: 16px; }
.consent { margin: 20px 0; display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 10px; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.consent input { width: 18px; height: 18px; accent-color: var(--green-dark); }
.submit { width: 100%; }
.submit:disabled { cursor: wait; opacity: 0.68; }
.form-note { margin: 14px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.form-note.is-ready { color: var(--green-dark); font-weight: 700; }
.form-note.is-error { color: #a8342b; font-weight: 700; }

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 680ms ease, transform 680ms ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Вынос цитаты за колонку возможен только когда контейнер упёрся в максимум
   и по бокам появились свободные поля, иначе она встаёт вплотную к краю экрана. */
@media (max-width: 1368px) {
  .trust-art blockquote { margin-right: 0; }
}

/* Три колонки «принципов» с полями по 28px не влезают в свой трек рядом
   с карточкой подхода, пока .approach ещё двухколоночный. */
@media (max-width: 1100px) {
  .principles article { padding-inline: 16px; }
}

@media (max-width: 1000px) {
  .site-header { grid-template-columns: 150px 1fr auto; }
  .header-link { display: none; }
  .hero { grid-template-columns: 0.9fr 1.1fr; min-height: 680px; }
  .approach, .trust, .questions { grid-template-columns: 1fr; }
  .principles { padding-top: 10px; }
  .trust-art { max-width: 760px; }
  .questions { gap: 50px; }
  .site-footer { grid-template-columns: 0.8fr 1.2fr 0.9fr; padding: 42px 0 30px; gap: 34px; }
  .footer-contacts { grid-column: auto; }
}

@media (max-width: 760px) {
  .site-header { width: min(100% - 32px, 1320px); min-height: 76px; grid-template-columns: 1fr auto auto; gap: 12px; position: relative; }
  .brand img { width: 124px; }
  .menu-button { display: inline-flex; min-height: 42px; align-items: center; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 8px 12px; cursor: pointer; }
  .main-nav { display: none; position: absolute; z-index: 20; top: 68px; left: 0; right: 0; padding: 20px; background: #fbf8f0; border: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 18px; }
  .main-nav.is-open { display: flex; }
  .header-cta { min-height: 42px; padding: 8px 11px; }
  .hero, .section, .final-cta, .site-footer { width: min(100% - 32px, 1320px); }
  .hero { min-height: 0; padding: 56px 0 72px; grid-template-columns: 1fr; gap: 52px; }
  h1 { font-size: clamp(60px, 19vw, 88px); }
  .hero-intro { font-size: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .tuition { margin-left: 0; }
  .hero-art img { min-height: 0; aspect-ratio: 3 / 2; }
  .section { padding: 82px 0; }
  .paper-note { padding: 30px 24px; }
  .principles { grid-template-columns: 1fr; }
  .principles article { min-height: 0; padding: 26px 4px; border-left: 0; border-top: 1px solid var(--line); }
  .principles h3 { margin: 20px 0 10px; }
  .school-day { overflow: hidden; }
  .timeline-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x; scroll-snap-type: x proximity; scroll-padding-left: 4px; scrollbar-width: none; -ms-overflow-style: none; }
  .timeline-scroll::-webkit-scrollbar { display: none; }
  .timeline { --k: 0.4; grid-template-columns: repeat(6, 148px); width: 888px; min-width: 888px; margin-top: 38px; padding-bottom: 12px; }
  .timeline li { min-height: 0; scroll-snap-align: start; }
  .trust-art blockquote { width: 90%; margin: -32px auto 0; font-size: 20px; }
  .questions { gap: 42px; }
  .question button span { font-size: 19px; }
  .final-cta { margin-bottom: 28px; padding: 48px 26px; grid-template-columns: 1fr; gap: 34px; }
  .cta-paper { min-width: 0; width: 100%; }
  .site-footer { padding: 36px 0 44px; grid-template-columns: 1fr 1fr; gap: 34px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { margin-top: 16px; }
  .footer-contacts { grid-column: auto; }
  .footer-bottom { margin-top: 0; }
}

@media (max-width: 460px) {
  .header-cta { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  h1 { font-size: clamp(43px, 14.8vw, 61px); 
    line-height: 1em;}
  .hero-art figcaption { margin-right: 0; font-size: 14px; }
  .section h2, .questions h2 { font-size: clamp(42px, 13vw, 58px); }
  .tuition { width: 100%; padding-inline: 16px; }
  .tuition p { gap: 6px 10px; }
  .tuition strong { font-size: 38px; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-brand, .footer-contacts, .footer-bottom { grid-column: 1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
