/* ================================================================
   Базові стилі та інтерактивні компоненти — спільні для 3 варіантів.
   Кожен варіант задає змінні в :root свого style.css
   ================================================================ */
:root {
  /* Палітра Анни (з референсу) */
  --cream: #F8F1E7;
  --roast: #42251D;
  --red: #E6392F;          /* «Ñ», акценти, великі елементи */
  --red-btn: #CC2D24;      /* кнопки з білим текстом — контраст AA 5:1 */
  --butter: #F0E89F;
  --blue: #B7D7D7;
  --mint: #BFE3D7;
  --grass: #8FBF6A;
  --grass-ink: #4E7A2E;    /* зелений для тексту/іконок на світлому */

  /* Значення за замовчуванням — варіанти перевизначають */
  --bg: var(--cream);
  --surface: #fffaf3;
  --ink: var(--roast);
  --muted: #7a5d52;
  --line: rgba(66, 37, 29, .12);
  --accent: var(--red);
  --btn: var(--red-btn);
  --btn-ink: #fff;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px -12px rgba(66, 37, 29, .25);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', cursive;
  --wrap: 1200px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 700; font-variant-numeric: lining-nums; }
.calc__sum, .clock b, .abc b, .price-card__p b, .trust-card__num, .step__num, .stat__n { font-variant-numeric: lining-nums; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand { font-family: var(--font-hand); font-weight: 600; }
.todo { display: inline-block; font: 600 12px/1.3 var(--font-body); background: #fff3a8; color: #6b4d00; border: 1px dashed #c9a400; border-radius: 6px; padding: 2px 6px; letter-spacing: 0; text-transform: none; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; font-weight: 700; font-size: 16px; line-height: 1.25; text-align: center; text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s; padding-top: 12px; padding-bottom: 12px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--btn); color: var(--btn-ink); box-shadow: 0 10px 24px -10px rgba(204, 45, 36, .7); }
.btn--primary:hover { transform: translateY(-2px); background: #b8241c; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--ghost:hover { background: rgba(66, 37, 29, .06); }
.btn--light { background: #fff; color: var(--roast); }
.btn--light:hover { transform: translateY(-2px); }
.btn--dark { background: var(--roast); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- перемикач мов ---------- */
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(66, 37, 29, .07); gap: 2px; }
.lang-switch button { border: 0; background: transparent; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; opacity: .65; min-width: 34px; }
.lang-switch button.is-active { background: var(--surface); opacity: 1; box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .3); }
.lang-switch button:hover { opacity: 1; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- флип-картки ---------- */
.flip { position: relative; perspective: 1000px; min-height: 190px; cursor: pointer; outline: none; }
.flip__inner { position: relative; height: 100%; min-height: inherit; transition: transform .6s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face { position: absolute; inset: 0; border-radius: var(--radius); padding: 20px 20px 56px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; gap: 10px; }
.flip__front { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.flip__back { background: var(--butter); transform: rotateY(180deg); }
.flip:nth-child(3n+2) .flip__back { background: var(--mint); }
.flip:nth-child(3n) .flip__back { background: var(--blue); }
.flip__ctx { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.flip__es { font-family: var(--font-head); font-size: 22px; line-height: 1.25; font-weight: 600; }
.flip__tr { font-size: 17px; line-height: 1.45; font-weight: 600; color: var(--roast); }
.flip__hint { position: absolute; left: 20px; bottom: 16px; font-size: 18px; opacity: .45; }
.flip:focus-visible .flip__front { box-shadow: inset 0 0 0 3px var(--accent); }
.flip__say { position: absolute; right: 14px; bottom: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--roast); color: #fff; display: grid; place-items: center; transition: transform .2s; }
.flip__say svg { width: 20px; height: 20px; }
.flip__say:hover, .flip__say.is-speaking { transform: scale(1.1); background: var(--red-btn); }
.no-speech .flip__say, .no-speech .greet__ico { display: none; }

/* ---------- алфавіт і привітання ---------- */
.abc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.abc { aspect-ratio: 1; border: 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; transition: transform .15s, background .2s; }
.abc b { font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.abc small { font-size: 10px; margin-top: 4px; color: var(--muted); }
.abc:hover { transform: translateY(-2px); background: var(--butter); }
.abc.is-on, .abc.is-speaking { background: var(--butter); box-shadow: inset 0 0 0 2px var(--roast); }
.abc--star b { color: var(--red); }
.abc-out { display: flex; align-items: baseline; gap: 12px; min-height: 56px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--mint); }
.abc-out b { font-family: var(--font-head); font-size: 34px; line-height: 1; color: var(--red); }
.abc-out span { font-weight: 700; }
.abc-out em { font-family: var(--font-head); font-size: 22px; margin-left: auto; }
.greet-list { display: grid; gap: 8px; }
.greet { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 12px; padding: 12px 14px; background: var(--butter); transition: transform .15s; }
.greet:nth-child(4n+2) { background: var(--mint); }
.greet:nth-child(4n+3) { background: var(--blue); }
.greet:nth-child(4n) { background: #f3dccb; }
.greet__es { font-weight: 800; min-width: 7.5em; }
.greet__tr { font-size: 14px; color: var(--muted); }
.greet__ico { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .7); display: grid; place-items: center; }
.greet__ico svg { width: 16px; height: 16px; }
.greet:hover { transform: translateX(3px); }
.greet.is-speaking .greet__ico { background: var(--roast); color: #fff; }

/* ---------- квіз ---------- */
.quiz { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.quiz__top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.quiz__step { font-size: 13px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; color: var(--muted); }
.quiz__bar { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.quiz__bar i { display: block; height: 100%; background: var(--grass); border-radius: inherit; transition: width .4s; }
.quiz__q { font-family: var(--font-head); font-size: 24px; margin-bottom: 16px; }
.quiz__opts { display: grid; gap: 10px; }
.quiz__opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: transparent; font-weight: 600; transition: border-color .2s, background .2s, transform .15s; }
.quiz__opt:hover { border-color: var(--roast); transform: translateX(3px); }
.quiz__opt.is-on { border-color: var(--roast); background: var(--butter); }
.quiz__dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; flex: none; opacity: .5; }
.quiz__opt.is-on .quiz__dot { background: var(--roast); opacity: 1; box-shadow: inset 0 0 0 3px var(--butter); }
.quiz__back { margin-top: 14px; border: 0; background: none; font-weight: 700; color: var(--muted); padding: 6px 0; }
.quiz__result { display: grid; gap: 8px; }
.quiz__prog { font-family: var(--font-head); font-size: 28px; line-height: 1.15; }
.quiz__focus { font-weight: 600; color: var(--muted); }
.quiz__form { display: inline-block; justify-self: start; padding: 6px 12px; border-radius: 999px; background: var(--mint); font-weight: 700; font-size: 14px; }
.quiz__note { margin-top: 4px; }
.quiz__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.quiz__copied { font-size: 14px; font-weight: 600; color: var(--grass-ink); }

/* ---------- калькулятор ---------- */
.calc { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.calc__t { font-family: var(--font-head); font-size: 22px; }
.calc__row { display: grid; gap: 8px; }
.calc__lbl { font-size: 14px; font-weight: 700; color: var(--muted); }
.calc__lbl b { color: var(--ink); font-size: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: rgba(66, 37, 29, .07); border-radius: 14px; }
.seg button { border: 0; background: transparent; padding: 9px 8px; border-radius: 10px; font-weight: 700; font-size: 14px; line-height: 1.2; display: grid; gap: 2px; }
.seg button small { font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button.is-on { background: var(--surface); box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .35); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; background: linear-gradient(to right, var(--red) var(--p, 25%), rgba(66, 37, 29, .12) var(--p, 25%)); outline-offset: 6px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--roast); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--roast); cursor: grab; }
.calc__out { display: flex; align-items: baseline; gap: 10px; }
.calc__sum { font-family: var(--font-head); font-size: 48px; font-weight: 700; line-height: 1; }
.calc__per { font-weight: 700; color: var(--muted); }
.calc__save { font-weight: 700; color: var(--grass-ink); }
.calc__note { font-size: 13px; color: var(--muted); }

/* ---------- мови (шкала) ---------- */
.lang-row { display: grid; grid-template-columns: 7.2em 1fr 9.5em; align-items: center; gap: 12px; padding: 8px 0; font-size: 15px; }
.lang-row__name { font-weight: 700; }
.lang-row__bar { height: 8px; border-radius: 8px; background: rgba(66, 37, 29, .1); overflow: hidden; }
.lang-row__bar i { display: block; height: 100%; width: var(--w); background: var(--grass); border-radius: inherit; }
.lang-row:nth-child(4) .lang-row__bar i { background: var(--red); }
.lang-row__lvl { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; text-align: right; overflow: hidden; text-overflow: ellipsis; }

/* ---------- таймлайн ---------- */
.timeline { position: relative; display: grid; gap: 4px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: repeating-linear-gradient(to bottom, var(--roast) 0 6px, transparent 6px 12px); opacity: .3; }
.tl-item { position: relative; padding: 0 0 18px 34px; }
.tl-item::before { content: ''; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--grass); }
.tl-item:nth-child(5)::before { border-color: var(--red); background: var(--red); }
.tl-item__y { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .04em; padding: 2px 10px; border-radius: 999px; background: var(--butter); margin-bottom: 6px; }
.tl-item__t { font-size: 18px; margin-bottom: 4px; }
.tl-item__d { color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 700; font-size: 17px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item__pm { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--butter); flex: none; }
.faq-item__pm::before, .faq-item__pm::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--roast); transform: translate(-50%, -50%); transition: transform .25s; }
.faq-item__pm::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-item__pm::after { transform: translate(-50%, -50%) rotate(0); }
.faq-item p { padding: 0 20px 18px; color: var(--muted); }

/* ---------- відгуки-заготовки ---------- */
.review { border-radius: var(--radius); padding: 22px; background: var(--surface); border: 2px dashed rgba(66, 37, 29, .18); display: grid; gap: 14px; }
.review__head { display: flex; gap: 12px; align-items: center; }
.review__head > div { flex: 1; display: grid; gap: 6px; }
.review__avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; font-weight: 800; font-size: 20px; color: var(--roast); }
.review__line { display: block; height: 9px; border-radius: 9px; background: rgba(66, 37, 29, .09); }
.review__line--w60 { width: 60%; } .review__line--w40 { width: 40%; }
.review__slot { font-family: var(--font-hand); font-size: 26px; line-height: 1.1; color: var(--muted); }
.review__ba { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 10px; }
.review__lbl { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px; background: #f3dccb; }
.review__lbl--after { background: var(--mint); }
.review__stars { letter-spacing: 4px; color: rgba(66, 37, 29, .35); font-size: 18px; }

/* ---------- таблиця порівняння ---------- */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.cmp th, .cmp td { padding: 14px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cmp thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cmp thead th:last-child { color: var(--ink); }
.cmp tbody th { font-weight: 800; }
.cmp td:nth-child(2) { color: var(--muted); }
.cmp-yes { font-weight: 700; }
.cmp-yes svg { width: 18px; height: 18px; color: var(--grass-ink); vertical-align: -3px; margin-right: 6px; }

/* ---------- годинник ---------- */
.clocks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clock { border-radius: var(--radius-sm); padding: 14px 16px; background: rgba(255, 255, 255, .6); }
.clock small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.clock b { font-family: var(--font-head); font-size: 30px; line-height: 1.1; }
.clock span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soon { display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; background: var(--butter); color: var(--roast); }

/* ---------- фільтр ---------- */
.filter { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.filter button { border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; }
.filter button.is-on { background: var(--roast); color: #fff; border-color: var(--roast); }

/* ---------- липка кнопка (мобільні) ---------- */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: flex; gap: 8px; transform: translateY(140%); transition: transform .35s ease; }
.sticky-cta .btn { flex: 1; min-height: 54px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45); }
.sticky-cta .btn--tg { flex: 0 0 54px; padding: 0; background: #fff; color: var(--roast); }
body.show-sticky .sticky-cta { transform: none; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

.ico-tg, .ico-ig, .ico-mail { width: 22px; height: 22px; flex: none; }

@media (max-width: 520px) {
  .lang-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .lang-row__bar { grid-column: 1 / -1; grid-row: 2; }
  .flip { min-height: 160px; }
  .abc-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .abc b { font-size: 19px; }
  .abc small { font-size: 9px; }
}
@media (max-width: 600px) {
  .cmp thead { display: none; }
  .cmp tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cmp th, .cmp td { padding: 0; border: 0; }
  .cmp tbody th { grid-column: 1 / -1; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .cmp td::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
  .cmp-yes svg { display: none; }
}
