/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #faf7f4;
  --card: #ffffff;
  --line: #e7e5e2;
  --text: #1b1f2a;
  --text-muted: #5b6070;
  --accent: #e8743b;
  --accent-hover: #d6652e;
  --accent-soft: #fbe9dc;
  --dark: #0f1117;
  --dark-2: #171a22;
  --line-dark: #2a2e3a;
  --text-light: #ffffff;
  --text-light-muted: #aeb3c0;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1200px;
  --serif-head: "Playfair Display", "Times New Roman", Georgia, serif;
  --serif-body: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--serif-head); line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; }
b, strong { font-weight: 600; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 900px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 14px;
  font-family: var(--serif-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 20px 36px; font-size: 18px; }
.btn--block { width: 100%; padding: 18px 24px; font-size: 18px; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hover); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn--outline:hover { border-color: var(--text); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; color: var(--text); }
.logo__mark { width: 44px; height: 44px; color: var(--text); }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-family: var(--sans); font-weight: 600; font-size: 22px; letter-spacing: .06em; }
.logo__sub { font-family: var(--sans); font-weight: 500; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px;
  white-space: nowrap;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent-hover); }

.header__actions { display: flex; align-items: center; gap: 10px; }
.iconbtn {
  width: 46px; height: 46px; border-radius: 50%;
  background: #f1f0ee; color: var(--accent);
  display: grid; place-items: center;
  transition: background .15s ease, transform .15s ease;
}
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn:hover { background: var(--accent-soft); transform: translateY(-1px); }
.header__cta { padding: 12px 20px; font-size: 15px; }

.burger {
  display: none;
  width: 40px; height: 40px;
  background: transparent; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px; align-items: center;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.hero__title {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.2;
  margin-bottom: 26px;
}
.hero__title-accent { color: var(--accent); }
.hero__lead { font-size: 19px; max-width: 600px; margin-bottom: 40px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 44px; }
.feature { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.feature__icon { flex: 0 0 26px; width: 26px; height: 26px; color: var(--accent); margin-top: 1px; }
.feature__icon svg { width: 26px; height: 26px; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero visual: overlapping "frames" like the reference screenshot */
.hero__visual {
  position: relative;
  min-height: 520px;
  background-image: radial-gradient(rgba(27,31,42,.12) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  background-position: center;
}
.frame {
  position: absolute;
  background: var(--card);
  border: 6px solid #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(27,31,42,.14), 0 2px 8px rgba(27,31,42,.06);
  padding: 22px 24px;
}
.frame--a { top: 0; left: 0; width: 72%; }
.frame--b { right: 0; bottom: 0; width: 70%; }
.frame__caption {
  display: block;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}

.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.match__side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.match__label { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.match__title { font-family: var(--serif-head); font-weight: 700; font-size: 19px; line-height: 1.2; }
.match__meta { font-size: 13px; color: var(--text-muted); }
.match__arrow {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 20px; font-weight: 700;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 12px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-family: var(--sans); font-size: 13px; font-weight: 500;
}
.chip:nth-child(2), .chip:nth-child(5) { background: var(--accent-soft); border-color: transparent; color: var(--accent-hover); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section__title {
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin-bottom: 56px;
}
.section__title::after {
  content: "";
  display: block;
  width: 82px; height: 7px;
  background: var(--accent);
  margin-top: 26px;
}
.section__title--sm { font-size: clamp(26px, 3vw, 34px); text-transform: none; margin-bottom: 32px; }
.section__title--sm::after { height: 5px; width: 64px; margin-top: 18px; }
.section__lead { font-size: 18px; color: var(--text-muted); max-width: 760px; margin: -28px 0 48px; }
.eyebrow {
  display: inline-block;
  font-family: var(--serif-head);
  font-size: 15px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 32px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Services (three columns like "Подойдет для позиций") ---------- */
.service { padding: 8px 0; }
.service__title {
  font-family: var(--serif-body);
  font-weight: 700; font-size: 20px;
  color: var(--accent);
  padding-bottom: 20px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.service p { font-size: 16.5px; line-height: 1.75; }

/* ---------- Direction tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile {
  display: flex; flex-direction: column; gap: 6px;
  padding: 26px 24px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(27,31,42,.08); border-color: var(--accent); }
.tile__glyph {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--dark); color: #fff;
  font-family: var(--serif-head); font-weight: 700; font-size: 22px;
  margin-bottom: 12px;
}
.tile__glyph--sm { font-size: 16px; }
.tile__label { font-family: var(--serif-head); font-weight: 700; font-size: 20px; }
.tile__hint { font-size: 14px; color: var(--text-muted); }

/* ---------- Timeline (like the "Программа" block) ---------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 56px; padding: 8px 0; }
.timeline::before {
  content: "";
  position: absolute; left: 190px; top: 0; bottom: 0;
  width: 2px; background: var(--line);
}
.tl { position: relative; display: grid; grid-template-columns: 190px 1fr; gap: 64px; align-items: start; }
.tl__tag {
  position: relative;
  justify-self: start;
  margin-top: 34px;
  padding: 10px 26px;
  background: var(--dark); color: #fff;
  font-family: var(--serif-body); font-weight: 600; font-size: 16px;
  white-space: nowrap;
}
.tl__tag::after {
  content: "";
  position: absolute; right: -28px; top: 50%;
  width: 28px; height: 2px; background: var(--line);
}
.tl::before {
  content: "";
  position: absolute; left: 190px; top: 50px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--line);
  transform: translateX(-6px);
  z-index: 1;
}
.tl__title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; text-transform: uppercase; margin-bottom: 16px; }
.tl__list { display: flex; flex-direction: column; gap: 8px; }
.tl__list li { position: relative; padding-left: 20px; font-size: 17px; line-height: 1.6; }
.tl__list li::before { content: ""; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.tl__list b { color: var(--accent); font-weight: 700; }

/* ---------- Offer (like "Комплект курса / Стоимость") ---------- */
.offer { display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px; align-items: start; }
.dashlist { display: flex; flex-direction: column; gap: 12px; }
.dashlist li { position: relative; padding-left: 26px; font-size: 17px; line-height: 1.65; }
.dashlist li::before { content: "—"; position: absolute; left: 0; top: 0; }
.dashlist b { font-weight: 700; }
.offer__note { margin-top: 28px; color: var(--accent); font-weight: 700; }

.offer__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 18px 50px rgba(27,31,42,.06);
}
.offer__card-title { font-size: 28px; font-weight: 700; margin-bottom: 22px; }
.offer__card-big { font-family: var(--sans); font-size: 44px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.offer__card-sub { color: var(--text-muted); margin-bottom: 18px; }
.offer__card-text { font-size: 15px; color: var(--text-muted); margin-bottom: 24px; }
.offer__card-link { display: block; margin-top: 14px; text-align: center; font-size: 14px; color: var(--text-muted); }
.offer__card-link:hover { color: var(--accent); }

.principle {
  margin: 72px auto 0;
  max-width: 1040px;
  padding: 44px 40px;
  border: 4px solid #f3b78f;
  text-align: center;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 6px;
}
.principle__title { font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.principle p { font-size: 19px; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 0 22px; }
.faq__item summary {
  list-style: none; cursor: pointer;
  padding: 20px 36px 20px 0; position: relative;
  font-weight: 600; font-size: 18px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__item p { padding: 0 0 22px; color: var(--text-muted); }

/* ---------- Contacts (big uppercase lines like the reference) ---------- */
.contacts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px 64px; max-width: 1040px; }
.contact { display: flex; flex-direction: column; gap: 10px; }
.contact__label {
  font-family: var(--serif-head); font-size: 14px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.contact__value {
  font-family: var(--serif-head);
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .01em;
  word-break: break-all;
  transition: color .15s ease;
}
.contact__value:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: var(--text-light); padding: 64px 0 0; }
.footer .logo { color: #fff; }
.footer .logo__mark { color: #fff; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; padding-bottom: 48px; }
.footer__tagline { color: var(--text-light-muted); margin-top: 18px; max-width: 360px; font-size: 15px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-light-muted); margin-bottom: 6px; }
.footer__col a { font-size: 15px; }
.footer__col a:hover { text-decoration: underline; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-top: 20px; padding-bottom: 28px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--sans); font-size: 13px; color: var(--text-light-muted);
}

/* ---------- To top ---------- */
.totop {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--text); cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 10px 24px rgba(27,31,42,.12);
}
.totop svg { width: 22px; height: 22px; }
.totop.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { gap: 40px; }
  .features { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 1024px) {
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 84px;
    flex-direction: column; gap: 4px;
    padding: 12px 24px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; font-size: 15px; }
  .burger { display: flex; }
  .header__cta { display: none; }
  .hero { padding: 48px 0 72px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { min-height: 440px; }
  .grid--3 { grid-template-columns: 1fr; }
  .offer { grid-template-columns: 1fr; gap: 48px; }
  .contacts { grid-template-columns: 1fr; gap: 32px; }
  .footer__inner { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 72px 0; }
  .timeline::before { left: 0; }
  .tl { grid-template-columns: 1fr; gap: 16px; padding-left: 28px; }
  .tl::before { left: 0; top: 10px; }
  .tl__tag { margin-top: 0; }
  .tl__tag::after { display: none; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .header__inner { height: 72px; }
  .nav { top: 72px; }
  .iconbtn { width: 40px; height: 40px; }
  .logo__name { font-size: 18px; }
  .logo__sub { font-size: 9px; }
  .hero__title { font-size: 26px; }
  .hero__lead { font-size: 17px; }
  .hero__visual { min-height: 0; }
  .frame { position: static; width: 100%; }
  .frame--b { margin-top: 16px; }
  .match { grid-template-columns: 1fr; }
  .match__arrow { transform: rotate(90deg); }
  .btn--lg { width: 100%; padding: 18px 24px; }
  .tiles { grid-template-columns: 1fr; gap: 14px; }
  .footer__cols { grid-template-columns: 1fr; }
  .principle { padding: 28px 20px; }
  .principle p { font-size: 17px; }
  .offer__card { padding: 28px 22px; }
  .section__title::after { margin-top: 18px; }
  .section__title { margin-bottom: 40px; }
  .section__lead { margin-top: -16px; }
}
