/* SofiHabla — стиль «Мадрид вечером»
   Палитра из фото: вечерний синий, янтарный свет фонарей, бежевый тренч, кирпич. */

:root {
  --night: #14213d;
  --night-2: #1d2f55;
  --night-3: #27406f;
  --amber: #f0a93b;
  --amber-2: #f7c46c;
  --amber-ink: #3a2400;
  --beige: #d9c4a1;
  --sand: #f3ead9;
  --cream: #fbf7f0;
  --brick: #a5452e;
  --ink: #1d1a17;
  --muted: #5d564d;
  --line: #e4d9c6;
  --on-night: #f6efe3;
  --on-night-muted: #c9c1b3;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(20, 33, 61, .10);
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 760px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: var(--amber-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--amber-2); outline-offset: 3px; }
.btn--amber { background: var(--amber); color: var(--amber-ink); box-shadow: 0 6px 20px rgba(240, 169, 59, .35); }
.btn--amber:hover { background: var(--amber-2); }
.btn--line { border-color: rgba(246, 239, 227, .5); color: var(--on-night); }
.btn--line:hover { border-color: var(--on-night); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 18px; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 240, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { font: 600 22px/1 var(--serif); color: var(--night); text-decoration: none; letter-spacing: .01em; }
.logo span { color: var(--brick); font-style: italic; }
.logo--small { font-size: 17px; }
.nav { display: none; gap: 24px; margin-left: 24px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--brick); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: none; gap: 8px; font-size: 13px; color: var(--muted); }
.lang a { color: var(--night); font-weight: 700; text-decoration: none; }
.lang span { opacity: .45; cursor: default; }

/* ---------- Первый экран ---------- */
.hero {
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(240, 169, 59, .22), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  color: var(--on-night);
  padding: 32px 0 56px;
  overflow: hidden;
}
.hero__grid { display: grid; gap: 28px; }
.eyebrow { font: italic 500 20px/1.3 var(--serif); color: var(--amber-2); margin-bottom: .6em; }
.hero h1 { font-size: clamp(38px, 9vw, 68px); letter-spacing: -.01em; }
.lead { font-size: 19px; color: var(--on-night-muted); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.trust li {
  font-size: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(246, 239, 227, .08); border: 1px solid rgba(246, 239, 227, .18);
}
.hero__photo { margin: 0; position: relative; order: -1; }
.hero__photo img {
  border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 55% 35%;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.hero__photo figcaption {
  position: absolute; left: 14px; bottom: 14px;
  font: italic 14px/1 var(--serif); color: var(--on-night);
  background: rgba(20, 33, 61, .55); padding: 8px 12px; border-radius: 999px;
}

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section--night { background: var(--night); color: var(--on-night); }
.section--night .section__title { color: var(--on-night); }
.section--sand { background: var(--sand); }
.section__title { font-size: clamp(30px, 6vw, 44px); margin-bottom: 28px; color: var(--night); }
.subtitle { font-size: 24px; margin: 40px 0 16px; color: var(--night); }
.note { color: var(--muted); font-size: 15px; }
.section--night .note { color: var(--on-night-muted); }

.cards { display: grid; gap: 16px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { font-size: 22px; color: var(--night); }
.card p { color: var(--muted); margin: 0; }
.card__icon { font-size: 28px; display: block; margin-bottom: 12px; }
.card--plain { box-shadow: none; background: var(--sand); border-color: transparent; }
.card--exam h3 { font: 700 26px/1 var(--sans); letter-spacing: .04em; color: var(--brick); }

/* ---------- Обо мне ---------- */
.about { display: grid; gap: 32px; align-items: center; }
.about__text p { color: var(--on-night-muted); }
.about__langs strong { color: var(--on-night); }
.principles { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.principles li {
  padding: 14px 16px; border-left: 3px solid var(--amber);
  background: rgba(246, 239, 227, .06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--on-night-muted);
}
.principles strong { color: var(--on-night); }

.video { margin: 0; }
.video video, .video__placeholder { width: 100%; border-radius: var(--radius); overflow: hidden; }
.video__placeholder { position: relative; }
.video__placeholder img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(.9); }
.video__badge {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  background: rgba(20, 33, 61, .78); color: var(--on-night);
  padding: 10px 16px 10px 10px; border-radius: 999px; font-size: 15px;
}
.video__play {
  width: 36px; height: 36px; border-radius: 50%; background: var(--amber); color: var(--amber-ink);
  display: inline-grid; place-items: center; font-size: 13px; padding-left: 2px;
}

/* ---------- Шаги ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li {
  counter-increment: step; position: relative;
  padding: 16px 16px 16px 64px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--night); color: var(--amber-2); font: 600 17px/1 var(--serif);
}
.steps strong { display: block; color: var(--night); }
.steps span { color: var(--muted); font-size: 15px; }

/* ---------- Цены ---------- */
.prices { display: grid; gap: 16px; margin-bottom: 24px; }
.price {
  background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); position: relative;
}
.price h3 { font-size: 22px; color: var(--night); }
.price__value { font: 600 40px/1 var(--serif); color: var(--night); margin: 8px 0 4px; }
.price__value small { font: 500 15px/1 var(--sans); color: var(--muted); }
.price__meta { font-size: 14px; color: var(--brick); font-weight: 600; }
.price p:last-child { color: var(--muted); margin: 0; }
.price--featured { background: var(--night); border-color: var(--night); color: var(--on-night); }
.price--featured h3, .price--featured .price__value { color: var(--on-night); }
.price--featured .price__value small, .price--featured p:last-child { color: var(--on-night-muted); }
.price--featured .price__meta { color: var(--amber-2); }
.price__tag {
  position: absolute; top: -12px; right: 20px; margin: 0;
  background: var(--amber); color: var(--amber-ink); font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.schedule { margin-bottom: .5em; }

/* ---------- Отзывы ---------- */
.draft-note {
  display: inline-block; background: var(--brick); color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 8px; margin-bottom: 20px; letter-spacing: .02em;
}
.reviews { display: grid; gap: 16px; }
.review {
  margin: 0; padding: 24px; border-radius: var(--radius);
  background: rgba(246, 239, 227, .06); border: 1px solid rgba(246, 239, 227, .14);
}
.review p { font: italic 18px/1.5 var(--serif); color: var(--on-night); }
.review footer { font-size: 14px; color: var(--on-night-muted); }
.review footer strong { color: var(--amber-2); }
.review footer span { display: block; font-size: 13px; opacity: .8; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font: 600 19px/1.35 var(--serif); color: var(--night);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 4px; top: 14px; font: 400 26px/1 var(--sans); color: var(--brick);
  transition: transform .2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding-bottom: 8px; }

/* ---------- Финальный блок ---------- */
.final {
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(240, 169, 59, .25), transparent 70%),
    var(--night);
  text-align: center;
}
.final__title { font: italic 600 clamp(44px, 11vw, 76px)/1 var(--serif); color: var(--amber-2); }
.final .lead { margin: 0 auto 28px; }
.final__alt { margin-top: 20px; color: var(--on-night-muted); font-size: 15px; }
.final__alt a { color: var(--amber-2); }

/* ---------- Подвал ---------- */
.footer { background: #0e1830; color: var(--on-night-muted); padding: 32px 0 96px; font-size: 14px; }
.footer a { color: var(--on-night); }
.footer .logo { color: var(--on-night); }
.footer .logo span { color: var(--amber-2); }
.footer__copy { opacity: .6; margin: 0; }

/* ---------- Липкая кнопка на телефоне ---------- */
.sticky-cta {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: 12px; z-index: 60;
  transform: translateY(140%); transition: transform .25s ease;
}
.sticky-cta.is-shown { transform: none; }
.sticky-cta:hover { transform: none; }

/* ---------- Планшет и компьютер ---------- */
@media (min-width: 640px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .lang { display: flex; }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .nav { display: flex; }
  .hero { padding: 72px 0 96px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 56px; }
  .hero__photo { order: 0; transform: rotate(1.5deg); }
  .hero__photo img { aspect-ratio: 4 / 4.6; }
  .section { padding: 96px 0; }
  .cards--4 { grid-template-columns: repeat(4, 1fr); }
  .about { grid-template-columns: .85fr 1.15fr; gap: 56px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .prices { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .sticky-cta { display: none; }
  .footer { padding-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .sticky-cta, summary::after { transition: none; }
}
