/* Real Mind Corp — ai.realmindcorp.com
   Светлая editorial-сетка: тёплая бумага, чернильный текст, бронза акцентом. */

:root {
  --paper:      #faf8f5;
  --paper-2:    #f3efe8;
  --card:       #ffffff;
  --line:       rgba(24, 22, 18, .12);
  --line-soft:  rgba(24, 22, 18, .07);
  --ink:        #16150f;
  --muted:      #6c675e;
  --faint:      #918b80;
  --bronze:     #8a6413;
  --gold:       #d8b26a;
  --gold-soft:  rgba(216, 178, 106, .22);
  --green:      #2f7d51;
  --red:        #b3392f;
  --shadow: 0 1px 2px rgba(22, 21, 15, .04), 0 10px 30px rgba(22, 21, 15, .06);
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

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

/* ── типографика ─────────────────────────────────────────────────── */

.h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7.2vw, 84px);
  line-height: 1.03;
  letter-spacing: -.02em;
  margin: 0 0 24px;
}
.h1 em { font-style: italic; color: var(--bronze); }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 18px;
}

h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 18px;
}

.lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 60ch; margin: 0 0 34px; }
.sec-lede { color: var(--muted); max-width: 66ch; margin: 0 0 16px; }

/* ── кнопки ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 15px; font-weight: 500;
  text-decoration: none; color: var(--ink);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(24,22,18,.24); box-shadow: var(--shadow); }
.btn--gold { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.btn--gold:hover { background: #2a2820; border-color: #2a2820; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--wide { width: 100%; padding: 16px 26px; }

/* ── шапка ───────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 245, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__in { display: flex; align-items: center; gap: 28px; height: 68px; }
.nav__links { display: flex; gap: 26px; margin-inline-start: auto; }
.nav__links a {
  color: var(--muted); text-decoration: none; font-size: 14.5px;
  transition: color .16s ease;
}
.nav__links a:hover { color: var(--ink); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.brand__name { font-family: var(--serif); font-size: 21px; letter-spacing: .01em; }
.brand__corp { color: var(--bronze); margin-inline-start: 6px; }

/* ── герой ───────────────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; padding: clamp(72px, 12vw, 132px) 0 clamp(56px, 8vw, 96px); }
.hero__glow {
  position: absolute; inset: -40% -10% auto -10%; height: 680px;
  background: radial-gradient(56% 55% at 50% 0%, rgba(216, 178, 106, .30) 0%, rgba(216, 178, 106, 0) 68%);
  pointer-events: none;
}
.hero__in { position: relative; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { color: var(--faint); font-size: 14px; margin: 16px 0 0; }

.facts {
  list-style: none; padding: 0;
  margin: clamp(48px, 7vw, 78px) 0 0;
  display: grid; gap: 26px;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); padding-top: 30px;
}
.facts li { color: var(--muted); font-size: 15.5px; }
.facts strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }

/* ── секции ──────────────────────────────────────────────────────── */

.band { padding: clamp(64px, 9vw, 108px) 0; border-top: 1px solid var(--line-soft); }
.band--alt { background: var(--paper-2); }
.sec-head { max-width: 72ch; margin-bottom: clamp(34px, 5vw, 54px); }

/* ── демо ────────────────────────────────────────────────────────── */

.demo {
  padding: clamp(64px, 9vw, 108px) 0;
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(66% 60% at 18% 0%, rgba(216, 178, 106, .18) 0%, rgba(216, 178, 106, 0) 62%),
    var(--paper-2);
}

.phone {
  display: grid; grid-template-columns: 340px 1fr; gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.phone__left { padding: 38px 32px; border-inline-end: 1px solid var(--line-soft); }
.phone__right { padding: 26px; min-height: 340px; display: flex; background: #fcfbf9; }

.call {
  position: relative;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 30px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf9, #fbf7ef);
  color: var(--ink);
  font-family: var(--sans); font-size: 16px; font-weight: 500;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.call:hover { border-color: rgba(138, 100, 19, .5); box-shadow: var(--shadow); }
.call__icon { width: 34px; height: 34px; fill: var(--bronze); position: relative; z-index: 2; }
.call__ring {
  position: absolute; top: 22px; left: 50%; width: 62px; height: 62px;
  margin-left: -31px; border-radius: 50%;
  border: 1px solid rgba(138, 100, 19, .45);
  opacity: 0;
}
[data-state="live"] .call__ring { animation: pulse 2.4s ease-out infinite; opacity: 1; }
[data-state="live"] .call__ring--2 { animation-delay: 1.2s; }
@keyframes pulse {
  0%   { transform: scale(.7); opacity: .8; }
  100% { transform: scale(2.1); opacity: 0; }
}
[data-state="live"] .call { border-color: rgba(138, 100, 19, .55); background: #fdf6e8; }
[data-state="connecting"] .call { opacity: .7; cursor: progress; }

.phone__status { color: var(--muted); font-size: 14px; margin: 18px 0 0; min-height: 42px; }
[data-state="live"] .phone__status { color: var(--green); }
[data-state="error"] .phone__status { color: var(--red); }
.phone__timer {
  font-family: var(--serif); font-size: 30px; color: var(--bronze);
  margin: 4px 0 0; letter-spacing: .04em;
}
.phone__fine { color: var(--faint); font-size: 12.5px; margin: 20px 0 0; line-height: 1.5; }

.tr {
  flex: 1; overflow-y: auto; max-height: 420px;
  display: flex; flex-direction: column; gap: 12px;
  padding-inline-end: 6px;
}
.tr__empty { color: var(--faint); font-size: 14px; margin: auto; text-align: center; }
.tr__line { margin: 0; font-size: 15px; line-height: 1.55; }
.tr__line b {
  display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; margin-bottom: 3px;
}
.tr__line--agent b { color: var(--bronze); }
.tr__line--you b { color: var(--faint); }
.tr__line--you { color: var(--muted); }

/* ── шаги ────────────────────────────────────────────────────────── */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; grid-template-columns: repeat(4, 1fr);
  background: var(--line-soft); border: 1px solid var(--line-soft);
  border-radius: 16px; overflow: hidden;
}
.steps li { background: var(--card); padding: 30px 26px; }
.steps__n { font-family: var(--serif); font-size: 15px; color: var(--bronze); display: block; margin-bottom: 16px; letter-spacing: .1em; }
.steps p { color: var(--muted); font-size: 15px; margin: 0; }

/* ── сетка возможностей ──────────────────────────────────────────── */

.grid { display: grid; gap: 28px 34px; grid-template-columns: repeat(3, 1fr); }
.grid article { border-top: 1px solid var(--line); padding-top: 20px; }
.grid p { color: var(--muted); font-size: 15px; margin: 0; }

/* ── ниша ────────────────────────────────────────────────────────── */

.niche { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li {
  position: relative; padding-inline-start: 26px; color: var(--muted); font-size: 15.5px;
  border-bottom: 1px solid var(--line-soft); padding-bottom: 14px;
}
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 10px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}

/* ── цены ────────────────────────────────────────────────────────── */

.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price {
  border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px;
  background: var(--card);
  display: flex; flex-direction: column;
}
.price--mid { border-color: rgba(138, 100, 19, .34); background: linear-gradient(180deg, #fffdf7, var(--card)); box-shadow: var(--shadow); }
.price__tag {
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bronze); font-weight: 600; margin: 0 0 14px;
}
.price p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.price__free { color: var(--ink) !important; font-size: 14.5px !important; margin: auto 0 0 !important; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.prices__note { color: var(--faint); font-size: 14px; max-width: 70ch; margin: 26px 0 0; }

/* ── FAQ ─────────────────────────────────────────────────────────── */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 0;
  font-size: 18px; font-weight: 500; position: relative; padding-inline-end: 40px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; inset-inline-end: 6px; top: 20px;
  color: var(--bronze); font-size: 22px; font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 0 0 24px; max-width: 74ch; font-size: 15.5px; }

/* ── форма ───────────────────────────────────────────────────────── */

.cta { padding: clamp(64px, 9vw, 110px) 0; border-top: 1px solid var(--line-soft); background: var(--paper-2); }
.cta__in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

.form { border: 1px solid var(--line); border-radius: 18px; padding: 30px; background: var(--card); box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 7px; }
.field label span { color: var(--bronze); margin-inline-start: 2px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px;
  background: #fcfbf9; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--sans); font-size: 15px;
  transition: border-color .16s ease, background .16s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(138, 100, 19, .55); background: var(--card); }
.field textarea { resize: vertical; min-height: 84px; }
.form__fine { color: var(--faint); font-size: 12.5px; margin: 14px 0 0; text-align: center; }
.form__msg { font-size: 14.5px; margin: 14px 0 0; text-align: center; min-height: 20px; }
.form__msg.ok { color: var(--green); }
.form__msg.err { color: var(--red); }

/* ── подвал ──────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line-soft); padding: 40px 0; }
.foot__in { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.foot p { color: var(--muted); font-size: 14px; margin: 0; }
.foot__year { margin-inline-start: auto !important; color: var(--faint) !important; }

/* ── адаптив ─────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .nav__links { display: none; }
  .facts, .grid, .steps, .prices { grid-template-columns: repeat(2, 1fr); }
  .phone { grid-template-columns: 1fr; }
  .phone__left { border-inline-end: 0; border-bottom: 1px solid var(--line-soft); }
  .niche, .cta__in { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .facts, .grid, .steps, .prices { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  /* в шапке на телефоне кнопка ломается на три строки — призыв и так в первом экране */
  .nav .btn--sm { display: none; }
  .lang { margin-inline-start: auto; }
  .hero__cta { flex-direction: column; }
  .foot__year { margin-inline-start: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ── переключатель языка ─────────────────────────────────────────── */

.lang { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; direction: ltr; }
.lang a { color: var(--faint); text-decoration: none; transition: color .16s ease; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.lang i { color: var(--line); font-style: normal; }

/* ── арабская версия: RTL и арабская типографика ─────────────────── */

[dir="rtl"] {
  --serif: "Almarai", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --sans: "IBM Plex Sans Arabic", "Almarai", system-ui, sans-serif;
}
[dir="rtl"] body { line-height: 1.85; }

/* вязь рвётся межбуквенным интервалом, а заглавных букв в арабском нет */
[dir="rtl"] .h1, [dir="rtl"] .h2, [dir="rtl"] h3, [dir="rtl"] .eyebrow,
[dir="rtl"] .steps__n, [dir="rtl"] .price__tag, [dir="rtl"] .tr__line b,
[dir="rtl"] .facts strong, [dir="rtl"] .faq summary {
  letter-spacing: normal;
}
[dir="rtl"] .eyebrow, [dir="rtl"] .price__tag, [dir="rtl"] .tr__line b {
  text-transform: none;
}

[dir="rtl"] .h1 { font-weight: 800; line-height: 1.24; font-size: clamp(34px, 5.4vw, 60px); }
[dir="rtl"] .h2 { font-weight: 700; line-height: 1.34; font-size: clamp(25px, 3.4vw, 37px); }
[dir="rtl"] .h1 em { font-style: normal; font-weight: 800; }
[dir="rtl"] .lede { line-height: 1.8; }

/* латиница и цифры внутри арабской страницы читаются слева направо */
[dir="rtl"] .brand, [dir="rtl"] .phone__timer, [dir="rtl"] .steps__n { direction: ltr; }
[dir="rtl"] .brand__name { font-family: var(--sans); font-weight: 700; font-size: 19px; }
[dir="rtl"] .steps__n { text-align: start; }
