/* style.css — safikanov.ru. Одна таблица стилей на все страницы.
   Направление «Математика как драма»: графитовая доска, меловой текст,
   один янтарный акцент и холодный циан для построений. */

:root {
  --ink: #0B0F1A;
  --ink-2: #0E1321;
  --ink-3: #151C2E;
  --ink-4: #1E2740;
  --chalk: #ECE8DC;
  --chalk-2: rgba(236, 232, 220, .74);
  --chalk-3: rgba(236, 232, 220, .5);
  --chalk-4: rgba(236, 232, 220, .16);
  --line: rgba(236, 232, 220, .09);
  --amber: #F4B63F;
  --amber-2: #FFD27A;
  --amber-lo: rgba(244, 182, 63, .14);
  --cyan: #7FD4E6;
  --cyan-lo: rgba(127, 212, 230, .16);
  --paper: #F2EEE3;
  --paper-ink: #1C2842;
  --pencil: #A8601A;
  --serif: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1320px;
  --r: 22px;
}

/* ---------- основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--chalk);
  font-family: var(--sans); font-size: clamp(16px, .95rem + .2vw, 18px); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--amber); color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* плёночное зерно поверх всего */
body::after {
  content: ""; position: fixed; inset: -100%; z-index: 150; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.wrap { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- типографика ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 0 26px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--amber);
}
.eyebrow::before { content: ""; width: 38px; height: 1px; background: currentColor; }
.h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2.3rem, 6.2vw, 5.4rem);
  line-height: 1; letter-spacing: -.025em; margin: 0 0 .45em; text-wrap: balance;
}
.h2 em, .h1 em, .hero__title em, .cta__title em { font-style: italic; font-weight: 500; color: var(--amber); }
.h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .5em; }
.lead { font-size: clamp(1.08rem, 1rem + .5vw, 1.32rem); line-height: 1.55; color: var(--chalk-2); max-width: 42ch; font-weight: 300; }
.muted { color: var(--chalk-3); }
.m { font-family: var(--serif); font-variant-numeric: lining-nums; white-space: nowrap; letter-spacing: .01em; }
.m i { font-style: italic; }
.m--hi { color: var(--amber); }
.mono { font-family: var(--mono); font-size: .86em; }

/* ---------- кнопки ---------- */
.btn {
  --b: var(--chalk-4);
  position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1px solid var(--b); background: transparent; color: var(--chalk);
  font: 500 .98rem/1 var(--sans); text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--amber);
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover { color: var(--ink); border-color: var(--amber); }
.btn:hover::before { transform: none; }
.btn:active { transform: scale(.98); }
.btn--amber { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn--amber::before { background: var(--chalk); }
.btn .arr { transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.is-done { border-color: var(--cyan); color: var(--cyan); }

/* ---------- шапка сайта ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; transition: background .5s, border-color .5s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled {
  background: rgba(11, 15, 26, .62); border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
}
body.menu-open .site-header { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent; }
.site-header__in { max-width: var(--maxw); margin: 0 auto; padding: 16px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { position: relative; z-index: 120; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; flex: none; color: var(--chalk); transition: transform .6s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg); }
.brand__name { font-family: var(--serif); font-size: 1.06rem; line-height: 1.15; }
.brand__name small { display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--chalk-3); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { text-decoration: none; font-size: .92rem; padding: 10px 15px; border-radius: 999px; color: var(--chalk-2); transition: color .3s, background .3s; }
.nav a:hover { color: var(--chalk); background: rgba(236, 232, 220, .07); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--amber); }
.nav__mail { display: none; }
.nav-toggle {
  display: none; position: relative; z-index: 120; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--chalk-4); background: rgba(11, 15, 26, .4); color: var(--chalk); cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
body.menu-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
body.menu-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 880px) {
  .brand__name small { display: none; }
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    position: fixed; inset: 0; z-index: 110; flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 4px; padding: 96px var(--pad) 48px; background: rgba(11, 15, 26, .97);
    opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s;
  }
  .js .nav a { font-family: var(--serif); font-size: clamp(2.3rem, 11vw, 3.6rem); line-height: 1.12; padding: 2px 0; background: none; color: var(--chalk); border-radius: 0; }
  .js .nav a[aria-current="page"] { color: var(--amber); background: none; }
  .js .nav a:not(.nav__mail) { transform: translateY(24px); opacity: 0; transition: transform .7s var(--ease), opacity .7s var(--ease); }
  .js .nav a:nth-child(2) { transition-delay: .05s; } .js .nav a:nth-child(3) { transition-delay: .1s; } .js .nav a:nth-child(4) { transition-delay: .15s; }
  .js .nav .nav__mail { display: block; margin-top: 36px; font-family: var(--mono); font-size: .9rem; color: var(--amber); }
  body.menu-open .nav { opacity: 1; visibility: visible; }
  body.menu-open .nav a, .js body.menu-open .nav a:not(.nav__mail) { transform: none; opacity: 1; }
  body.menu-open { overflow: hidden; }
  .nav { flex-wrap: wrap; }
}

/* ---------- фоновая сцена: видео + запасной canvas ---------- */
.scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 90% at 70% 15%, #151D33 0%, var(--ink) 62%); transform-origin: 50% 0; will-change: transform; }
.scene__canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 1.2s var(--ease); }
.scene__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 28s ease-in-out infinite alternate;
}
.scene.has-video .scene__canvas { opacity: 0; }
@keyframes kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.2%, -1%, 0); } }
.scene__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 15, 26, .78) 0%, rgba(11, 15, 26, .35) 45%, rgba(11, 15, 26, .1) 70%, rgba(11, 15, 26, .35) 100%),
    linear-gradient(180deg, rgba(11, 15, 26, .55) 0%, rgba(11, 15, 26, 0) 22%, rgba(11, 15, 26, 0) 55%, var(--ink) 100%);
}
@media (max-width: 768px) {
  .scene__veil { background: linear-gradient(180deg, rgba(11, 15, 26, .6) 0%, rgba(11, 15, 26, .25) 30%, rgba(11, 15, 26, .65) 70%, var(--ink) 100%); }
}

/* ---------- главный экран ---------- */
.hero { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero__in { padding-top: 140px; padding-bottom: clamp(56px, 9vh, 112px); opacity: calc(1 - var(--hp, 0) * 1.4); transform: translate3d(0, calc(var(--hp, 0) * -60px), 0); }
.hero__name { font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 1rem + 1.6vw, 2.2rem); color: var(--chalk-2); margin: 0; }
.hero__title {
  font-family: var(--serif); font-weight: 700; font-size: clamp(3.6rem, 13.5vw, 12.5rem);
  line-height: .88; letter-spacing: -.04em; margin: .08em 0 .28em -.04em;
}
.hero__row { display: grid; gap: 28px; align-items: end; }
.hero__credo { max-width: 46ch; font-size: clamp(1.02rem, .95rem + .35vw, 1.22rem); font-weight: 300; color: var(--chalk-2); margin: 0; }
.hero__credo strong { color: var(--chalk); font-weight: 500; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: clamp(36px, 6vh, 64px) 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.hero__meta div { min-width: 0; }
.hero__meta dt { font-family: var(--mono); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--chalk-3); margin-bottom: 4px; }
.hero__meta dd { margin: 0; font-size: .95rem; }
@media (min-width: 960px) { .hero__row { grid-template-columns: 1.1fr .9fr; } .hero__cta { justify-content: flex-end; } }
.scroll-cue { position: absolute; right: var(--pad); bottom: clamp(56px, 9vh, 112px); z-index: 2; display: none; width: 1px; height: 84px; background: var(--chalk-4); overflow: hidden; }
.scroll-cue span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--amber); animation: cue 2.4s var(--ease-io) infinite; }
@keyframes cue { to { top: 110%; } }
@media (min-width: 1100px) { .scroll-cue { display: block; } }

/* ---------- шапка внутренних страниц ---------- */
.phead { position: relative; isolation: isolate; min-height: clamp(560px, 82svh, 880px); display: flex; align-items: flex-end; overflow: hidden; }
.phead__in { padding-top: 150px; padding-bottom: clamp(56px, 9vh, 104px); opacity: calc(1 - var(--hp, 0) * 1.4); transform: translate3d(0, calc(var(--hp, 0) * -50px), 0); }
.h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(3.2rem, 11vw, 9.5rem); line-height: .9; letter-spacing: -.04em; margin: 0 0 .32em -.03em; }
.phead .lead { max-width: 48ch; }
.crumbs { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--chalk-3); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--amber); }

/* ---------- секции ---------- */
.section { position: relative; padding: clamp(96px, 13vw, 184px) 0; overflow: hidden; }
.section--tight { padding: clamp(64px, 9vw, 120px) 0; }
.section--alt { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 14%, var(--ink-2) 86%, var(--ink) 100%); }
.section + .section--alt, .section--alt + .section { border-top: 0; }
.shead { display: grid; gap: 20px; margin-bottom: clamp(44px, 7vw, 92px); }
.shead .h2 { margin: 0; }
.shead .lead { margin: 0; }
@media (min-width: 960px) { .shead { grid-template-columns: 1.15fr .85fr; align-items: end; gap: 56px; } }

/* сияние, плывущее за секциями */
.aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after { content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; }
.aurora::before { left: -25vmax; top: -10vmax; background: radial-gradient(circle, rgba(244, 182, 63, .12), rgba(244, 182, 63, 0) 62%); animation: drift1 26s ease-in-out infinite alternate; }
.aurora::after { right: -30vmax; bottom: -30vmax; background: radial-gradient(circle, rgba(127, 212, 230, .09), rgba(127, 212, 230, 0) 60%); animation: drift2 34s ease-in-out infinite alternate; }
.aurora--b::before { left: auto; right: -25vmax; }
.aurora--b::after { right: auto; left: -30vmax; }
@keyframes drift1 { to { transform: translate3d(18vmax, 14vmax, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-16vmax, -12vmax, 0) scale(.9); } }

/* ---------- бегущая строка формул ---------- */
.marquee {
  position: relative; z-index: 2; overflow: hidden; padding: 20px 0; border-block: 1px solid var(--line); background: rgba(14, 19, 33, .7);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 48px; padding-right: 48px; flex: none; }
.marquee__group span { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 2.1rem); white-space: nowrap; color: var(--chalk-3); font-variant-numeric: lining-nums; }
.marquee__group span:nth-child(4n+1) { color: var(--chalk); }
.marquee__group b { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- кредо ---------- */
.manifest__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .manifest__grid { grid-template-columns: 1.4fr .6fr; } }
.quote { margin: 0; }
.quote p { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.9rem, 4.4vw, 3.9rem); line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .7em; text-wrap: balance; }
.quote mark { background: none; color: var(--amber); }
.quote footer { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-3); }
.construct { width: 100%; max-width: 420px; margin: 0 auto; overflow: visible; }

/* ---------- карточки: стекло + подсветка под курсором ---------- */
.card {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 39, 64, .5), rgba(14, 19, 33, .55));
  border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(236, 232, 220, .06), 0 30px 60px -40px rgba(0, 0, 0, .8);
  transition: transform .7s var(--ease), border-color .5s;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), rgba(244, 182, 63, .12), transparent 45%);
}
.card:hover { border-color: rgba(244, 182, 63, .26); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card--pad { padding: clamp(24px, 3vw, 40px); }

/* ---------- опоры методики ---------- */
.pillars { display: grid; gap: 18px; }
@media (min-width: 680px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
/* translate отдельным свойством: transform занят анимацией появления */
.pillar { transition: translate .7s var(--ease), border-color .5s, opacity 1.1s var(--ease), transform 1.2s var(--ease); }
.pillar:hover { translate: 0 -6px; }
.pillar__body { padding: 24px 24px 30px; }
.pillar__num { font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; color: var(--amber); margin: 0 0 10px; }
.pillar h3 { font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1.02; letter-spacing: -.02em; margin: 0 0 12px; }
.pillar h3 em { font-style: italic; font-weight: 500; }
.pillar p { color: var(--chalk-2); font-size: .96rem; margin: 0; }

.art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; margin: 0; background: var(--ink-3); border-bottom: 1px solid var(--line); }
.art img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.card:hover .art img { transform: scale(1.05); }
.art::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(11, 15, 26, .6)); }
.art__fb {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(80% 70% at 50% 40%, rgba(244, 182, 63, .1), transparent 70%), repeating-linear-gradient(0deg, rgba(127, 212, 230, .05) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, rgba(127, 212, 230, .05) 0 1px, transparent 1px 22px), var(--ink-3);
}
.art__fb svg { width: 82%; height: 82%; overflow: visible; }
.art:not(.is-fallback) .art__fb * { animation-play-state: paused !important; }
.fb-s { fill: none; stroke: var(--chalk); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.fb-a { fill: none; stroke: var(--amber); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fb-c { fill: none; stroke: var(--cyan); stroke-width: 1.2; opacity: .6; stroke-dasharray: 4 6; }
.fb-t { font-family: var(--serif); font-style: italic; fill: var(--chalk); }
.fb-h { font-family: var(--hand); fill: var(--amber); }
.fb-draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: fbdraw 6s var(--ease-io) infinite; }
.fb-draw.d2 { animation-delay: .6s; } .fb-draw.d3 { animation-delay: 1.2s; } .fb-draw.d4 { animation-delay: 1.8s; }
@keyframes fbdraw { 0% { stroke-dashoffset: 1; } 40%, 78% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
.fb-float { animation: fbfloat 6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes fbfloat { from { transform: translateY(-4px) rotate(-2deg); } to { transform: translateY(5px) rotate(2deg); } }
.fb-pulse { animation: fbpulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes fbpulse { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
.fb-blink { animation: fbblink 6s steps(1) infinite; }
@keyframes fbblink { 0%, 45% { opacity: 0; } 46%, 100% { opacity: 1; } }

/* ---------- ловушка с пошаговым разбором ---------- */
.trap-split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .trap-split { grid-template-columns: .95fr 1.05fr; gap: 80px; } }
.trap { padding: clamp(26px, 3.4vw, 44px); }
.trap__label { font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--chalk-3); margin: 0 0 18px; }
.trap__bait { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 12px; font-variant-numeric: lining-nums; }
.trap__bait s { text-decoration: line-through; text-decoration-color: var(--amber); text-decoration-thickness: 3px; color: var(--chalk-3); }
.trap__q { display: inline-block; color: var(--amber); font-style: italic; animation: qpulse 2.2s ease-in-out infinite; }
.is-solved .trap__q { animation: none; }
@keyframes qpulse { 50% { transform: translateY(-4px) rotate(-6deg); } }
.trap__hint { font-family: var(--hand); font-size: 1.55rem; line-height: 1.15; color: var(--amber-2); margin: 0 0 22px; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 12px; margin: 0 0 24px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; border-radius: 14px; background: rgba(236, 232, 220, .04); border: 1px solid var(--line); color: var(--chalk-2); font-size: .98rem; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 500 .75rem/1 var(--mono); color: var(--ink); background: var(--amber); }
.steps li b { color: var(--chalk); font-weight: 600; }
.js .steps li:not(.is-shown) { display: none; }
.steps li.is-shown { animation: stepin .6s var(--ease) both; }
@keyframes stepin { from { opacity: 0; transform: translateY(10px); } }
.traps { display: grid; gap: 18px; }
@media (min-width: 1000px) { .traps { grid-template-columns: repeat(3, 1fr); } }
.traps .trap__bait { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }

/* ---------- лента 45 минут ---------- */
.ribbon { display: flex; gap: 3px; height: clamp(64px, 9vw, 96px); border-radius: 16px; overflow: hidden; }
.ribbon__seg {
  flex: var(--m) 1 0; min-width: 0; position: relative; display: flex; align-items: flex-end; padding: 10px;
  background: linear-gradient(180deg, rgba(236, 232, 220, .1), rgba(236, 232, 220, .04));
  font: 500 .74rem/1 var(--mono); color: var(--chalk-2);
}
.ribbon__seg--hot { background: linear-gradient(180deg, var(--amber), #C98A22); color: var(--ink); }
.ribbon__seg--cool { background: linear-gradient(180deg, rgba(127, 212, 230, .5), rgba(127, 212, 230, .18)); color: var(--ink); }
.ribbon__seg--rest { background: repeating-linear-gradient(135deg, rgba(236, 232, 220, .1) 0 4px, transparent 4px 8px); }
.js .ribbon__seg { transform: scaleY(0); transform-origin: bottom; transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 80ms); }
.js .ribbon.is-in .ribbon__seg { transform: none; }
.ribbon-scale { display: flex; justify-content: space-between; margin: 12px 0 0; font: .68rem/1 var(--mono); color: var(--chalk-3); }
.stages { list-style: none; display: grid; gap: 0; margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.stages li { display: grid; grid-template-columns: 64px 1fr; gap: 4px 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.stages__t { grid-row: span 2; font: 500 .8rem/1.6 var(--mono); color: var(--amber); }
.stages__n { font-family: var(--serif); font-size: 1.25rem; line-height: 1.25; }
.stages__d { color: var(--chalk-3); font-size: .94rem; }
@media (min-width: 900px) {
  .stages { grid-template-columns: repeat(2, 1fr); column-gap: 56px; }
  .stages li { grid-template-columns: 76px 1fr; }
}

/* ---------- SVG, который чертит себя при прокрутке ---------- */
.js [data-draw] .d { stroke-dasharray: 1 1.02; stroke-dashoffset: 1.01; opacity: 0; transition: stroke-dashoffset 1.8s var(--ease-io), opacity .2s; transition-delay: calc(var(--i, 0) * 140ms); }
.js [data-draw].is-in .d { stroke-dashoffset: 0; opacity: 1; }
.js [data-draw] .f { opacity: 0; transition: opacity 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 140ms); }
.js [data-draw].is-in .f { opacity: 1; }
.svg-s { fill: none; stroke: var(--chalk); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.svg-a { fill: none; stroke: var(--amber); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.svg-c { fill: none; stroke: var(--cyan); stroke-width: 1.2; stroke-opacity: .7; }
.svg-t { fill: var(--chalk-2); font-family: var(--mono); font-size: 13px; }
.svg-h { fill: var(--amber); font-family: var(--hand); font-size: 28px; }
.svg-n { fill: var(--ink); font-family: var(--mono); font-size: 15px; font-weight: 500; }

/* дуга драматургии */
.arc-wrap { position: relative; }
.arc { width: 100%; height: auto; overflow: visible; }
.arc-legend { list-style: none; display: grid; gap: 14px; margin-top: 28px; counter-reset: a; }
.arc-legend li { counter-increment: a; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: baseline; color: var(--chalk-2); font-size: .96rem; }
.arc-legend li::before { content: counter(a); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--amber); color: var(--ink); font: 500 .74rem/1 var(--mono); }
.arc-legend b { color: var(--chalk); font-weight: 600; }
@media (max-width: 700px) { .arc-lbl { display: none; } }
@media (min-width: 900px) { .arc-legend { grid-template-columns: repeat(5, 1fr); } .arc-legend li { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- два слоя: база и драматургия ---------- */
.layers { display: grid; gap: 18px; }
@media (min-width: 900px) { .layers { grid-template-columns: 1fr 1fr; } }
.layer { padding: clamp(28px, 3.5vw, 48px); }
.layer__tag { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 18px; margin-bottom: 24px; font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--ink); background: var(--chalk); }
.layer--d .layer__tag { background: var(--amber); font-style: italic; }
.ticks { list-style: none; display: grid; gap: 14px; margin-top: 22px; }
.ticks li { position: relative; padding-left: 30px; color: var(--chalk-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .72em; width: 16px; height: 1px; background: var(--amber); }
.ticks li b { color: var(--chalk); font-weight: 600; }

/* ---------- рубрики ---------- */
.rubrics { display: grid; gap: 18px; }
@media (min-width: 900px) { .rubrics { grid-template-columns: repeat(6, 1fr); } .rubrics > * { grid-column: span 3; } .rubrics > .span-2 { grid-column: span 2; } .rubrics > .span-6 { grid-column: span 6; } }
.rubric__k { font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); margin: 0 0 14px; }
.rubric p { color: var(--chalk-2); }
.vedi { display: grid; gap: 28px; }
@media (min-width: 1000px) { .vedi { grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; } }
.proof { list-style: none; counter-reset: p; display: grid; gap: 0; border-left: 1px solid var(--chalk-4); }
.proof li { counter-increment: p; position: relative; padding: 12px 0 12px 32px; color: var(--chalk-2); }
.proof li::before { content: counter(p) "."; position: absolute; left: 10px; top: 12px; font: .76rem/1.9 var(--mono); color: var(--amber); }
.proof .m { color: var(--chalk); font-size: 1.12em; white-space: normal; }
.answer { display: inline-flex; gap: 12px; align-items: baseline; margin-top: 18px; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(244, 182, 63, .4); font-family: var(--serif); font-size: 1.2rem; }
.answer span { font: .7rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.qlist { list-style: none; counter-reset: q; display: grid; gap: 10px; margin-top: 8px; }
.qlist li { counter-increment: q; display: grid; grid-template-columns: 38px 1fr; align-items: baseline; font-family: var(--serif); font-size: 1.15rem; line-height: 1.35; }
.qlist li::before { content: counter(q); font: .8rem var(--mono); color: var(--amber); }
.hw { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 560px) { .hw { grid-template-columns: 1fr 1fr; } }
.hw__col { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: rgba(236, 232, 220, .03); }
.hw__col--up { border-color: rgba(244, 182, 63, .35); background: var(--amber-lo); }
.hw__col h4 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 6px; }
.hw__col p { font-size: .94rem; margin: 0; }

/* ---------- анатомия урока: поминутный таймлайн ---------- */
.tl { position: relative; --p: 0; }
.tl::before, .tl::after { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 1px; }
.tl::before { background: var(--line); }
.tl::after { background: linear-gradient(180deg, var(--amber), var(--amber-2)); transform-origin: top; transform: scaleY(var(--p)); }
.tl__item { position: relative; display: grid; gap: 6px 40px; padding: 30px 0 30px 44px; border-bottom: 1px solid var(--line); }
.tl__item::before { content: ""; position: absolute; left: 0; top: 40px; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); border: 1px solid var(--chalk-4); transition: background .6s, border-color .6s, box-shadow .6s; z-index: 1; }
.tl__item.is-in::before { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px rgba(244, 182, 63, .14); }
.tl__time { font-family: var(--serif); font-size: clamp(2.2rem, 4.2vw, 3.4rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: lining-nums; white-space: nowrap; }
.tl__time small { font: .72rem var(--mono); letter-spacing: .14em; color: var(--chalk-3); margin-left: 6px; }
.tl__role { display: inline-block; font: .68rem var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.tl__name { font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.2; margin: 0 0 8px; }
.tl__text { color: var(--chalk-2); margin: 0; max-width: 62ch; }
.tl__item--hot .tl__time { color: var(--amber); }
.js .tl__item > * { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .tl__item.is-in > * { opacity: 1; transform: none; }
.js .tl__item.is-in > *:nth-child(2) { transition-delay: .1s; }
@media (min-width: 900px) { .tl__item { grid-template-columns: 220px 1fr; align-items: start; } }

/* ---------- лист тетради ---------- */
.sheet {
  --cell: 22px; --mcells: 4;
  position: relative; color: var(--paper-ink); border-radius: 4px 10px 10px 4px;
  padding: calc(var(--cell) * 2) calc(var(--cell) * (var(--mcells) + 1)) calc(var(--cell) * 2) calc(var(--cell) * 2);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(64, 104, 160, .2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 104, 160, .2) 1px, transparent 1px),
    url(../img/texture-paper.jpg);
  background-size: var(--cell) var(--cell), var(--cell) var(--cell), cover;
  background-blend-mode: multiply;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .2), inset 0 0 60px rgba(120, 90, 40, .12);
  font-family: var(--serif); font-size: 17px; line-height: var(--cell);
}
.sheet::after { content: ""; position: absolute; top: 0; bottom: 0; right: calc(var(--cell) * var(--mcells)); width: 1.5px; background: rgba(200, 70, 60, .55); }
.sheet + .sheet { margin-top: 36px; }
@media (min-width: 900px) { .sheet:nth-of-type(odd) { rotate: -.5deg; } .sheet:nth-of-type(even) { rotate: .45deg; } }
@media (max-width: 600px) { .sheet { --cell: 19px; --mcells: 2; font-size: 15px; padding-left: var(--cell); } }
.sheet__tag { position: absolute; top: calc(var(--cell) * -.6); left: calc(var(--cell) * 2); padding: 4px 12px; border-radius: 6px; background: var(--amber); color: var(--ink); font: 500 .66rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.sheet h3 { font-family: var(--serif); font-weight: 700; font-size: 1.15em; line-height: calc(var(--cell) * 2); margin: 0; }
.sheet h3 small { font: .62em var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(28, 40, 66, .6); margin-left: 10px; font-weight: 400; }
.sheet p { margin: 0 0 var(--cell); }
.sheet .center { text-align: center; }
.sheet .teacher { padding-left: calc(var(--cell) * 1); border-left: 3px solid rgba(28, 40, 66, .15); }
.sheet .m { font-size: 1.12em; }
.sheet .z { color: #1F6E9C; font-weight: 700; }
.sheet .u { color: var(--pencil); font-weight: 700; }
.note { display: block; font-family: var(--hand); font-weight: 600; font-size: 1.5rem; line-height: 1.05; color: var(--pencil); transform: rotate(-2.4deg); margin: 0 0 var(--cell); }
.note--r { text-align: right; margin-left: auto; max-width: 26ch; transform: rotate(2deg); }
.note::before { content: "↳ "; }
.eqs { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 calc(var(--cell) * 2); margin-bottom: var(--cell); }
@media (max-width: 600px) { .eqs { grid-template-columns: repeat(2, auto); gap: 0 var(--cell); } }
@media (max-width: 420px) { .eqs { grid-template-columns: 1fr; } }
.eqs span { font-family: var(--serif); font-variant-numeric: lining-nums; white-space: nowrap; }
.eqs .q { color: var(--pencil); font-weight: 700; position: relative; }
.eqs .q::after { content: "?"; position: absolute; right: -1.1em; top: -.25em; font-family: var(--hand); font-size: 2em; color: var(--pencil); }
.frame { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--cell); padding: var(--cell); margin: 0 0 var(--cell); border: 1.6px solid rgba(40, 48, 70, .72); border-radius: 2px; box-shadow: 1px 1px 0 rgba(40, 48, 70, .25); }
.frame > div { display: grid; align-content: start; }
.frame span { font-family: var(--serif); white-space: nowrap; font-size: 1.1em; }
.frame .wide { grid-column: 1 / -1; text-align: center; font-weight: 700; letter-spacing: .06em; margin-top: var(--cell); }
.frame .hd { font: 600 .6em/var(--cell) var(--mono); letter-spacing: .12em; color: rgba(28, 40, 66, .65); }
@media (max-width: 600px) { .frame { grid-template-columns: 1fr; } }
.colmul { display: grid; grid-template-columns: repeat(7, var(--cell)); grid-auto-rows: var(--cell); margin: 0 0 var(--cell) calc(var(--cell) * 2); font-family: var(--mono); font-size: .95em; }
.colmul span { text-align: center; }
.colmul .rule { grid-column: 2 / 8; border-bottom: 1.6px solid var(--paper-ink); height: 2px; align-self: center; }
.colmul .hl { color: var(--pencil); font-weight: 700; }
.sheet-cols { display: grid; gap: 0 calc(var(--cell) * 2); }
@media (min-width: 760px) { .sheet-cols { grid-template-columns: 1fr 1fr; } }
.passport { display: grid; gap: 0; margin: 0; }
.passport div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.passport dt { font: .68rem/1.9 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--chalk-3); }
.passport dd { margin: 0; }
@media (max-width: 560px) { .passport div { grid-template-columns: 1fr; gap: 2px; } }
.toc { list-style: none; counter-reset: t; display: grid; gap: 0; }
.toc li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.toc li > span:first-child { font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: var(--amber); line-height: 1.1; }
.toc b { display: block; font-weight: 600; }
.toc small { color: var(--chalk-3); font-size: .9rem; }

/* ---------- родителям ---------- */
.flow { list-style: none; display: grid; gap: 14px; counter-reset: f; }
@media (min-width: 760px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .flow { grid-template-columns: repeat(5, 1fr); } }
.flow li { padding: 26px 22px 28px; }
.flow__n { font-family: var(--serif); font-style: italic; font-size: 3rem; line-height: 1; color: var(--amber); margin-bottom: 18px; }
.flow h3 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; margin-bottom: 8px; }
.flow p { color: var(--chalk-2); font-size: .95rem; margin: 0; }
.rules { list-style: none; counter-reset: r; display: grid; gap: 0; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--chalk-2); }
.rules li::before { content: counter(r, decimal-leading-zero); font: .76rem/1.9 var(--mono); color: var(--amber); }
.rules b { color: var(--chalk); font-weight: 600; }
.split2 { display: grid; gap: 48px; align-items: start; }
@media (min-width: 1000px) { .split2 { grid-template-columns: 1fr 1fr; gap: 80px; } .sticky { position: sticky; top: 110px; } }
.help { list-style: none; display: grid; gap: 18px; }
@media (min-width: 760px) { .help { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .help { grid-template-columns: repeat(3, 1fr); } }
.help li { padding: 28px; }
.help__i { width: 44px; height: 44px; margin-bottom: 18px; color: var(--amber); }
.help h3 { font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; margin-bottom: 8px; }
.help p { color: var(--chalk-2); font-size: .96rem; margin: 0; }
.callout { font-family: var(--hand); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; color: var(--amber-2); transform: rotate(-1.5deg); margin: 28px 0 0; }

/* ---------- контакты ---------- */
.mega-mail {
  display: inline-block; max-width: 100%; font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 7.4vw, 6.4rem);
  line-height: 1.05; letter-spacing: -.03em; text-decoration: none; overflow-wrap: break-word;
  background: linear-gradient(var(--amber), var(--amber)) 0 100% / 0 3px no-repeat; padding-bottom: .08em; transition: background-size .8s var(--ease), color .4s;
}
.mega-mail:hover { background-size: 100% 3px; color: var(--amber-2); }
.contact-grid { display: grid; gap: 18px; margin-top: clamp(48px, 7vw, 88px); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-grid h3 { font: .7rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.contact-grid p { font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; margin: 0; }
.contact-grid a { text-decoration: none; }
.contact-grid a:hover { color: var(--amber); }
.mail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- призыв с фоновым видео секции ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; padding: clamp(120px, 16vw, 220px) 0; }
.cta .scene { background: radial-gradient(100% 80% at 50% 50%, #141B2E, var(--ink) 70%); }
.cta .scene__veil { background: linear-gradient(180deg, var(--ink) 0%, rgba(11, 15, 26, .55) 25%, rgba(11, 15, 26, .55) 75%, var(--ink) 100%), radial-gradient(70% 60% at 50% 50%, rgba(11, 15, 26, 0), rgba(11, 15, 26, .6)); }
.cta__title { font-family: var(--serif); font-weight: 700; font-size: clamp(2.6rem, 8vw, 7rem); line-height: .95; letter-spacing: -.035em; margin: 0 0 .4em; text-wrap: balance; }
.cta__sub { color: var(--chalk-2); max-width: 44ch; margin: 28px 0 0; }

/* ---------- подвал ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); padding: clamp(64px, 8vw, 104px) 0 32px; background: var(--ink); }
.site-footer__in { display: grid; gap: 40px; }
@media (min-width: 900px) { .site-footer__in { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer__line { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.02em; margin: 18px 0 0; }
.site-footer__line em { color: var(--amber); }
.site-footer h2 { font: .68rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--chalk-3); margin-bottom: 14px; }
.site-footer p, .site-footer li { font-size: .95rem; color: var(--chalk-2); margin: 0; }
.site-footer ul { list-style: none; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font: .7rem var(--mono); letter-spacing: .1em; color: var(--chalk-3); }
.site-footer .brand__mark { width: 52px; height: 52px; }

/* ---------- появление при прокрутке ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 30px, 0); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .07em .1em 0; margin: 0 -.07em -.1em 0; }
.split .w > span { display: inline-block; transform: translate3d(0, 108%, 0); transition: transform 1.2s var(--ease); transition-delay: calc(var(--d) * 60ms + 80ms); }
.split.is-in .w > span { transform: none; }
.js .pillar[data-reveal] {
  transition: opacity 1.1s var(--ease), transform 1.2s var(--ease), translate .7s var(--ease), border-color .5s;
  transition-delay: calc(var(--d, 0) * 90ms), calc(var(--d, 0) * 90ms), 0s, 0s;
}

/* ---------- меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .fb-draw { stroke-dashoffset: 0; }
  .fb-blink { opacity: 1; }
  .scene { transform: none !important; }
  .hero__in, .phead__in { opacity: 1; transform: none; }
}
