/* Krok — вариант B «Редакционный».
   Цвета и шрифты — в блоке :root. */

@view-transition { navigation: auto; }

:root {
  --paper: #f7f3ec;
  --tint: #efe8dc;
  --ink: #17171a;
  --soft: #55524d;
  --red: #d4213d;
  --red-deep: #b01a32;
  --navy: #16233f;
  --navy-2: #1f2f52;
  --line: #ddd3c3;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Onest", system-ui, sans-serif;

  --wrap: 1200px;
  --pad: clamp(16px, 4vw, 40px);
  --sec: clamp(80px, 10vw, 140px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-ink: var(--ink);
  --header-bg: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.wrap--narrow { max-width: 860px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.5rem); line-height: 1.04; }
h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem); line-height: 1.08; }
h3 { font-size: 1.375rem; line-height: 1.25; }
.lead { font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.55; color: var(--soft); }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red-deep); margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: #ff8d9f; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .18s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn--lg { min-height: 58px; padding: 0 30px; }
.btn--block { width: 100%; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--tg { background: #1a78a8; color: #fff; }
.btn--wa { background: #15803d; color: #fff; }
.link { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 22px; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 26px/1 var(--serif); text-decoration: none; color: var(--navy); }
.logo--light { color: #fff; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .25s var(--ease); }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.lang { position: relative; display: flex; padding: 4px; background: var(--tint); border-radius: 999px; }
.lang a { position: relative; z-index: 1; padding: 6px 11px; font-size: 13px; font-weight: 600; text-decoration: none; border-radius: 999px; transition: color .35s; }
.lang__pill { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--red); transition: transform .42s var(--ease), width .42s var(--ease); }
.lang a[aria-current="true"], .lang a.is-target { color: #fff; }
.lang:has(.is-target) a[aria-current="true"] { color: var(--ink); }
.lang-toast { position: fixed; left: 50%; top: 88px; z-index: 60; max-width: min(92vw, 420px); padding: 12px 18px; background: var(--navy); color: #fff; border-radius: 12px; font-size: 14px; transform: translate(-50%, -8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
.lang-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Первый экран ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 48px; }
.hero__in { display: grid; grid-template-columns: 1.35fr .65fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { max-width: 36ch; margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__note { display: flex; align-items: center; gap: 12px; margin-top: 48px; font-size: 15px; color: var(--soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.route { margin: 0; }
.route svg { width: 100%; height: auto; overflow: visible; }
.route__path { fill: none; stroke: var(--navy); stroke-width: 3; stroke-dasharray: 9 10; }
.route__stops circle { fill: var(--paper); stroke: var(--navy); stroke-width: 3; }
.route__stops .route__end { fill: var(--red); stroke: var(--red); }
.route__labels text { font: 600 17px var(--sans); fill: var(--ink); }
.route__labels .route__city { font: 700 40px var(--serif); fill: var(--red); }
.js .route__path { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.2s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; stroke-dasharray: 9 10; } }
.js .route__stops circle, .js .route__labels text { opacity: 0; animation: pop .5s var(--ease) forwards; }
.route__stops circle:nth-child(1), .route__labels text:nth-child(1) { animation-delay: .3s; }
.route__stops circle:nth-child(2), .route__labels text:nth-child(2) { animation-delay: .7s; }
.route__stops circle:nth-child(3), .route__labels text:nth-child(3) { animation-delay: 1.05s; }
.route__stops circle:nth-child(4), .route__labels text:nth-child(4) { animation-delay: 1.4s; }
.route__stops circle:nth-child(5), .route__labels text:nth-child(5) { animation-delay: 1.75s; }
.route__stops circle:nth-child(6), .route__labels text:nth-child(6) { animation-delay: 2.15s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Секции ---------- */
.section { padding: var(--sec) 0; }
.section--tint { background: var(--tint); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy .lead, .section--navy p { color: #d8deeb; }
.head { margin-bottom: 56px; max-width: 760px; }
.head--split { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.head--split > p { max-width: 34ch; color: var(--soft); }

/* Почему Польша */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.why__photo img { border-radius: 20px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.why__photo figcaption { margin-top: 10px; font-size: 14px; color: var(--soft); }
.why__list { display: grid; gap: 34px; counter-reset: why; }
.why__list li { padding-top: 22px; border-top: 1px solid var(--line); counter-increment: why; position: relative; padding-left: 64px; }
.why__list li::before { content: "0" counter(why); position: absolute; left: 0; top: 18px; font: 600 28px/1 var(--serif); color: var(--red); }
.why__list h3 { margin-bottom: 6px; }
.why__list p { color: var(--soft); }

/* Тест */
.quiz-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.quiz-wrap__intro h2 { margin-bottom: 20px; }
.quiz { background: var(--navy-2); border-radius: 24px; padding: clamp(24px, 3.5vw, 44px); min-height: 420px; display: flex; flex-direction: column; gap: 16px; }
.quiz__bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.14); overflow: hidden; }
.quiz__bar span { display: block; height: 100%; background: var(--red); transform: scaleX(.2); transform-origin: left; transition: transform .5s var(--ease); }
.quiz.is-live .quiz__static { display: none; }
.quiz__step { display: grid; gap: 10px; }
.quiz__q { font: 600 clamp(1.375rem, 1.1rem + 1vw, 1.875rem)/1.2 var(--serif); color: #fff !important; margin-bottom: 14px; }
.quiz__step button { text-align: left; padding: 16px 20px; min-height: 56px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; cursor: pointer; transition: background-color .2s, border-color .2s, transform .18s var(--ease); }
.quiz__step button:hover { background: #fff; color: var(--navy); border-color: #fff; }
.quiz__step button:active { transform: scale(.985); }
.quiz__step.is-in, .quiz__result.is-in { animation: pop .45s var(--ease) both; }
.quiz__result { display: grid; gap: 16px; justify-items: start; }
.quiz__verdict { font: 700 clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem)/1.1 var(--serif); color: #fff !important; }
.quiz__back { margin-top: auto; align-self: flex-start; color: #fff; }
.quiz .link { color: #fff; }

/* Услуги */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.services article { padding: 32px 28px 36px 0; border-bottom: 1px solid var(--line); }
.services article:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.services h3 { margin-bottom: 10px; }
.services p { color: var(--soft); }

/* Пакеты */
.offer { display: inline-block; margin: -24px 0 40px; padding: 12px 18px; background: #fff; border-radius: 12px; border-left: 4px solid var(--red); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; background: #fff; border-radius: 24px; padding: 34px 30px; display: flex; flex-direction: column; border: 1px solid var(--line); transition: transform .25s var(--ease); }
.plan:hover { transform: translateY(-4px); }
.plan--featured { border: 2px solid var(--red); }
.plan__badge { position: absolute; top: -14px; left: 30px; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.plan__desc { color: var(--soft); margin: 8px 0 22px; font-size: 16px; }
.plan__price { font: 700 44px/1 var(--serif); margin-bottom: 24px; color: var(--navy); }
.plan__price s { font-size: .55em; color: var(--soft); font-weight: 500; margin-right: 4px; }
.plan__price span { font-size: .5em; }
.plan ul { display: grid; gap: 10px; margin-bottom: 30px; flex: 1; }
.plan li { padding-left: 26px; position: relative; font-size: 16px; }
.plan li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.fineprint { margin-top: 32px; font-size: 15px; color: var(--soft); max-width: 80ch; }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.steps li { border-top: 2px solid rgba(255,255,255,.2); padding-top: 22px; }
.steps__n { display: block; font: 700 clamp(3rem, 2rem + 3vw, 4.5rem)/1 var(--serif); color: var(--red); margin-bottom: 16px; }
.steps h3 { color: #fff; margin-bottom: 8px; }
.steps p { font-size: 16px; }

/* О нас */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.about__photo img { border-radius: 24px; aspect-ratio: 2 / 3; object-fit: cover; object-position: 88% 50%; width: 100%; }
.about__text h2 { margin-bottom: 18px; }
.about__text .lead { margin-bottom: 18px; color: var(--ink); }
.about__text > p { margin-bottom: 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 32px; }
.facts li { padding: 8px 16px; border-radius: 999px; background: var(--tint); font-size: 15px; font-weight: 500; }
.honest { background: var(--navy); color: #fff; border-radius: 20px; padding: 28px 30px; }
.honest h3 { margin-bottom: 10px; }
.honest p { color: #d8deeb; }

/* Вузы — бегущая строка */
.unis-b { background: var(--red); color: #fff; padding: 22px 0; overflow: hidden; }
.marquee__track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee__track span { font: 600 26px/1 var(--serif); white-space: nowrap; }
.marquee__track span::after { content: "✦"; margin-left: 48px; font-size: 16px; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: 16px; padding: 4px 24px; border: 1px solid var(--line); transition: border-color .2s; }
.faq details[open] { border-color: var(--red); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px 0; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 28px/1 var(--sans); color: var(--red); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--soft); }

/* Контакты */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact__intro h2 { margin-bottom: 16px; }
.messengers { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
.contact__phone { color: var(--soft); }
.form { background: #fff; border-radius: 24px; padding: clamp(24px, 3.5vw, 40px); border: 1px solid var(--line); display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.field label span { color: var(--soft); font-weight: 400; }
.field input, .field select { height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.field input:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(212,33,61,.15); }
.consent { display: flex; gap: 10px; font-size: 14px; color: var(--soft); }
.consent input { width: 20px; height: 20px; accent-color: var(--red); flex: none; margin-top: 2px; }
.form__status { min-height: 1.5em; font-size: 15px; }
.form__status[data-state="ok"] { color: #1a7a43; }
.form__status[data-state="warn"] { color: var(--red-deep); }
.hp { position: absolute; left: -9999px; }

/* Подвал */
.footer { background: var(--navy); color: #c9d1e3; padding: 64px 0 32px; }
.footer__in { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__in p { margin-top: 14px; max-width: 40ch; }
.footer__links { display: grid; gap: 10px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: #fff; }
.footer__bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.sticky-cta { display: none; }

/* Появление */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .services [data-reveal]:nth-child(3n+2), .js .plans [data-reveal]:nth-child(2), .js .steps [data-reveal]:nth-child(2) { transition-delay: .07s; }
.js .services [data-reveal]:nth-child(3n), .js .plans [data-reveal]:nth-child(3), .js .steps [data-reveal]:nth-child(3) { transition-delay: .14s; }
.js .steps [data-reveal]:nth-child(4) { transition-delay: .21s; }
.js .steps [data-reveal]:nth-child(5) { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js .route__stops circle, .js .route__labels text { opacity: 1; transform: none; transition: none; animation: none; }
  .js .route__path { animation: none; stroke-dashoffset: 0; stroke-dasharray: 9 10; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
}

/* Планшет */
@media (max-width: 1100px) {
  .nav { gap: 16px; }
  .nav a:nth-child(4) { display: none; }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* Телефон */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .header__in { height: 64px; gap: 10px; }
  .burger { display: block; }
  .header__cta { display: none; }
  .lang { margin-left: auto; }
  .lang a { padding: 6px 8px; }
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--pad) 22px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: 18px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .25s var(--ease), visibility .2s; }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 12px 0; }
  .nav a:nth-child(4) { display: block; }

  .hero__in, .why, .quiz-wrap, .about, .contact { grid-template-columns: 1fr; gap: 40px; }
  .route { max-width: 420px; }
  .head--split { display: block; }
  .head--split > p { margin-top: 16px; }
  .services { grid-template-columns: 1fr; }
  .services article, .services article:not(:nth-child(3n+1)) { padding: 26px 0; border-left: 0; }
  .plans { grid-template-columns: 1fr; gap: 28px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps li { display: grid; grid-template-columns: 76px 1fr; column-gap: 12px; }
  .steps__n { grid-row: span 2; font-size: 3rem; }
  .why__photo img { aspect-ratio: 16 / 11; }
  .about__photo img { aspect-ratio: 3 / 4; object-position: 80% 50%; }

  .sticky-cta { display: flex; justify-content: center; align-items: center; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; min-height: 54px; border-radius: 999px; background: #1a78a8; color: #fff; font-weight: 600; text-decoration: none; }
  .sticky-cta--wa { background: #15803d; }
  .footer { padding-bottom: 96px; }
}
