/*
Theme Name: Character AI Ru
Description: Брендовый малостраничник о Character.AI. Дизайн-язык — «раскадровка»: белая бумага, чернильные рамки, жёсткие тени, синий акцент с офсайта.
Author: Character AI Ru
Version: 1.0.0
*/

:root {
  --paper:      #ffffff;
  --paper-2:    #f5f5f3;
  --paper-3:    #eceae5;
  --ink:        #15171a;
  --ink-2:      #333333;
  --muted:      #6f7379;
  --line:       #15171a;
  --line-soft:  #d8d6d1;
  --blue:       #195eff;
  --blue-deep:  #0b3fc4;
  --blue-tint:  #e8efff;
  --amber:      #ffb020;
  --amber-tint: #fff2d6;
  --red:        #d92d20;
  --green:      #17805a;
  --radius:     4px;
  --shadow:     4px 4px 0 var(--ink);
  --shadow-sm:  2px 2px 0 var(--ink);
  --font-display: 'Wix Madefor Display', 'Segoe UI', sans-serif;
  --font-text:    'Wix Madefor Text', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --header-h:   66px;
  --wrap:       1140px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 17px/1.65 var(--font-text);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-deep); text-decoration: none; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); letter-spacing: -.02em; margin: 0 0 .5em; line-height: 1.14; }
h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; }
h3 { font-size: clamp(19px, 2.2vw, 22px); font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: .45em; }
mark, .ch-mark { background: linear-gradient(transparent 58%, var(--amber) 58%); color: inherit; padding: 0 .1em; }
strong { color: var(--ink); font-weight: 700; }
::selection { background: var(--blue); color: #fff; }

.ch-wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.ch-section { padding: 54px 0; }
.ch-section--tight { padding: 34px 0; }
.ch-section--paper { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ── Панель раскадровки ──────────────────────────────────── */
.ch-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 20px;
  transition: transform .13s ease, box-shadow .13s ease;
}
a.ch-panel:hover, .ch-panel--hover:hover { transform: translate(2px, 2px); box-shadow: var(--shadow-sm); }
.ch-panel--flat { box-shadow: none; }
.ch-panel--tint { background: var(--blue-tint); }
.ch-panel--amber { background: var(--amber-tint); }
.ch-panel__num { font: 700 12px/1 var(--font-mono); color: var(--blue); display: block; margin-bottom: 10px; }
.ch-panel h3 { margin-bottom: .35em; }
.ch-panel p:last-child { margin-bottom: 0; }

/* ── Заголовок-кадр ──────────────────────────────────────── */
.ch-frame { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.ch-frame__num { font: 700 11px/1 var(--font-mono); letter-spacing: .1em; color: var(--paper); background: var(--ink); padding: 6px 8px; border-radius: 2px; white-space: nowrap; }
.ch-frame__label { font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ch-frame__line { flex: 1; height: 1px; background: var(--line-soft); }

/* ── Реплика (спичбабл) ──────────────────────────────────── */
.ch-bubble {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--blue-tint);
  padding: 18px 20px;
  margin: 0 0 26px;
  box-shadow: var(--shadow);
}
.ch-bubble::after {
  content: ''; position: absolute; left: 30px; bottom: -11px;
  width: 18px; height: 11px; background: var(--blue-tint);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 22% 100%);
}
.ch-bubble__label { display: inline-block; font: 700 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 8px; }
.ch-bubble p { margin: 0; color: var(--ink); font-size: 17px; }

/* ── Кнопки ──────────────────────────────────────────────── */
.ch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 700 16px/1 var(--font-display);
  padding: 14px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer; text-align: center;
  transition: transform .13s ease, box-shadow .13s ease, background .13s ease;
}
.ch-btn:hover { transform: translate(2px, 2px); box-shadow: none; color: var(--ink); }
.ch-btn--primary { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.ch-btn--primary:hover { background: var(--blue-deep); color: #fff; box-shadow: var(--shadow-sm); }
.ch-btn--sm { font-size: 14px; padding: 10px 15px; }
.ch-btn i, .ch-btn svg { width: 18px; height: 18px; }

/* ── Шапка ───────────────────────────────────────────────── */
.ch-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.ch-header__inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); min-width: 0; }
.ch-logo { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--font-display); color: var(--ink); letter-spacing: -.03em; min-width: 0; white-space: nowrap; }
.ch-logo:hover { color: var(--ink); }
.ch-logo__mark { width: 34px; height: 34px; flex: 0 0 34px; }
.ch-logo__ru { font: 700 10px/1 var(--font-mono); color: var(--blue); border: 1px solid var(--blue); border-radius: 2px; padding: 3px 4px; }
.ch-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.ch-nav a { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.ch-nav a:hover { color: var(--blue); }
.ch-header .ch-btn { flex: 0 0 auto; }
.ch-burger { display: none; width: 42px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; align-items: center; justify-content: center; }
.ch-burger i { width: 20px; height: 20px; }
.ch-mobile { display: none; border-bottom: 1px solid var(--line); background: var(--paper); }
.ch-mobile.is-open { display: block; }
.ch-mobile__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.ch-mobile__grid a { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); font-size: 15px; color: var(--ink-2); }

/* ── Hero ────────────────────────────────────────────────── */
.ch-hero { padding: 46px 0 40px; border-bottom: 1px solid var(--line); background:
  linear-gradient(90deg, #eeece8 1px, transparent 1px) 0 0 / 48px 100%,
  var(--paper); }
.ch-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: start; }
.ch-hero__kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.ch-hero__kicker b { color: var(--blue); font-weight: 700; }
.ch-hero h1 { margin-bottom: .4em; }
.ch-hero__lead { font-size: 19px; color: var(--ink-2); margin-bottom: 22px; }
.ch-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.ch-hero__note { font-size: 14px; color: var(--muted); margin: 0; }
.ch-hero__stack { display: grid; gap: 14px; }
.ch-stat { display: flex; align-items: baseline; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--paper); box-shadow: var(--shadow-sm); }
.ch-stat__v { font: 800 24px/1 var(--font-display); color: var(--ink); }
.ch-stat__l { font-size: 14px; color: var(--muted); }

/* ── Сетки ───────────────────────────────────────────────── */
.ch-grid { display: grid; gap: 18px; }
.ch-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ch-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ch-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ch-lead { font-size: 19px; max-width: 62ch; }

/* ── Таблицы ─────────────────────────────────────────────── */
.ch-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.ch-table { width: 100%; border-collapse: collapse; min-width: 620px; background: var(--paper); }
.ch-table th, .ch-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); font-size: 15px; vertical-align: top; }
.ch-table th { font: 700 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--paper-2); }
.ch-table tr:last-child td { border-bottom: none; }
.ch-table th:last-child, .ch-table td:last-child { border-right: none; }
.ch-table td b { color: var(--ink); }
.ch-yes { color: var(--green); font-weight: 700; }
.ch-no { color: var(--red); font-weight: 700; }

/* ── Шаги / чек-лист ─────────────────────────────────────── */
.ch-steps { display: grid; gap: 14px; counter-reset: step; }
.ch-step { display: grid; grid-template-columns: 46px 1fr; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--paper); box-shadow: var(--shadow-sm); }
.ch-step__n { font: 800 20px/1 var(--font-display); color: var(--blue); border-right: 1px solid var(--line-soft); padding-right: 12px; }
.ch-step h3 { font-size: 18px; margin-bottom: .3em; }
.ch-step p { margin: 0; font-size: 16px; }
.ch-check { display: grid; gap: 12px; }
.ch-check__item { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; background: var(--paper); box-shadow: var(--shadow-sm); cursor: pointer; }
.ch-check__item.is-done { background: var(--paper-2); }
.ch-check__item.is-done .ch-check__t { text-decoration: line-through; color: var(--muted); }
.ch-check__box { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 2px; display: grid; place-items: center; background: var(--paper); margin-top: 2px; }
.ch-check__item.is-done .ch-check__box { background: var(--blue); border-color: var(--blue); }
.ch-check__box svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.ch-check__item.is-done .ch-check__box svg { opacity: 1; }
.ch-check__t { font-family: var(--font-display); font-weight: 700; color: var(--ink); display: block; margin-bottom: 3px; }
.ch-check__d { font-size: 15px; margin: 0; }
.ch-check__progress { font: 500 13px/1 var(--font-mono); color: var(--muted); margin-bottom: 14px; }

/* ── Персонажи ───────────────────────────────────────────── */
.ch-chars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ch-char { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); transition: transform .13s ease, box-shadow .13s ease; }
.ch-char:hover { transform: translate(2px, 2px); box-shadow: var(--shadow-sm); }
.ch-char__media { position: relative; aspect-ratio: 3 / 4; background: var(--paper-3); border-bottom: 1px solid var(--line); }
.ch-char__media img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.ch-char__media img.is-missing { display: none; }
.ch-char__ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.ch-char__ph i, .ch-char__ph svg { width: 42px; height: 42px; }
.ch-char__tag { position: absolute; z-index: 2; left: 10px; top: 10px; font: 700 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 5px 7px; color: var(--ink); }
.ch-char__body { padding: 13px 15px 15px; }
.ch-char__name { font: 700 18px/1.2 var(--font-display); color: var(--ink); margin-bottom: 4px; }
.ch-char__role { font-size: 14px; color: var(--muted); margin: 0; }

/* ── FAQ ─────────────────────────────────────────────────── */
.ch-faq { display: grid; gap: 12px; }
.ch-faq__item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.ch-faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; background: none; border: 0; cursor: pointer; text-align: left; font: 700 17px/1.35 var(--font-display); color: var(--ink); }
.ch-faq__q i, .ch-faq__q svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--blue); transition: transform .15s ease; }
.ch-faq__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.ch-faq__a { display: none; padding: 0 18px 16px; border-top: 1px solid var(--line-soft); }
.ch-faq__a p { margin: 14px 0 0; font-size: 16px; }
.ch-faq__item.is-open .ch-faq__a { display: block; }

/* ── Отзывы ──────────────────────────────────────────────── */
.ch-review { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--paper); box-shadow: var(--shadow-sm); }
.ch-review__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ch-review__name { font: 700 16px/1 var(--font-display); color: var(--ink); }
.ch-review__date { font: 500 12px/1 var(--font-mono); color: var(--muted); }
.ch-review p { margin: 0; font-size: 16px; }
.ch-stars { display: inline-block; position: relative; white-space: nowrap; line-height: 0; }
.ch-stars__row { display: inline-flex; gap: 2px; }
.ch-stars svg { width: 15px; height: 15px; fill: currentColor; }
.ch-stars__bg { color: var(--line-soft); }
.ch-stars__fill { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--amber); }

/* ── Хлебные крошки, шапка страницы ──────────────────────── */
.ch-breadcrumb { font: 500 13px/1 var(--font-mono); color: var(--muted); padding: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.ch-breadcrumb a { color: var(--muted); }
.ch-breadcrumb a:hover { color: var(--blue); }
.ch-pagehead { padding: 6px 0 22px; border-bottom: 1px solid var(--line); }
.ch-pagehead h1 { margin: 10px 0 0; }
.ch-pagehead + .ch-section--tight { padding-top: 28px; }

/* ── Читайте дальше ──────────────────────────────────────── */
.ch-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ch-related__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); transition: transform .13s ease, box-shadow .13s ease; }
.ch-related__item:hover { transform: translate(2px, 2px); box-shadow: none; color: var(--blue-deep); }
.ch-related__item i, .ch-related__item svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--blue); }

/* ── CTA-полоса ──────────────────────────────────────────── */
.ch-cta { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); color: #fff; padding: 28px 30px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; }
.ch-cta h2 { color: #fff; margin-bottom: .3em; }
.ch-cta p { margin: 0; color: #d3d5d8; }
.ch-cta .ch-btn { background: var(--blue); color: #fff; border-color: #fff; box-shadow: 3px 3px 0 #fff; }
.ch-cta .ch-btn:hover { background: #fff; color: var(--ink); box-shadow: none; }

/* ── Футер ───────────────────────────────────────────────── */
.ch-footer { border-top: 1px solid var(--line); background: var(--paper-2); padding: 38px 0 26px; margin-top: 10px; }
.ch-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 26px; }
.ch-footer h4 { font: 700 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.ch-footer ul { list-style: none; margin: 0; padding: 0; }
.ch-footer li { margin-bottom: 8px; }
.ch-footer a { color: var(--ink-2); font-size: 15px; }
.ch-footer a:hover { color: var(--blue); }
.ch-footer__about p { font-size: 15px; color: var(--muted); }
.ch-footer__bottom { border-top: 1px solid var(--line-soft); padding-top: 16px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── Мелочи ──────────────────────────────────────────────── */
.ch-note { border: 1px solid var(--line); background: var(--paper-2); padding: 15px 17px; border-radius: var(--radius); font-size: 16px; }
.ch-note__label { display: inline-block; font: 700 10px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); background: var(--ink); padding: 5px 7px; border-radius: 2px; margin-bottom: 9px; }
.ch-note--warn { background: var(--amber-tint); }
.ch-note--stop { background: #fdecea; }
.ch-note--stop .ch-note__label { background: var(--red); }
.ch-note p:last-child { margin-bottom: 0; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-tag { font: 500 12px/1 var(--font-mono); border: 1px solid var(--line-soft); border-radius: 2px; padding: 6px 9px; color: var(--ink-2); background: var(--paper); }
.ch-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 16px; }
.ch-kv dt { font: 500 12px/1.5 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ch-kv dd { margin: 0; color: var(--ink); }
.ch-hr { height: 1px; background: var(--line-soft); border: 0; margin: 30px 0; }
.ch-center { text-align: center; }
.ch-mt { margin-top: 22px; }

/* ── Интерактив: конструктор / подборщик ─────────────────── */
.ch-tool { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); padding: 22px; box-shadow: var(--shadow); }
.ch-tool label { display: block; font: 500 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.ch-tool input[type="text"], .ch-tool textarea, .ch-tool select {
  width: 100%; font: 400 16px/1.5 var(--font-text); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--paper); margin-bottom: 14px;
}
.ch-tool textarea { min-height: 84px; resize: vertical; }
.ch-tool__out { border: 1px dashed var(--line); border-radius: var(--radius); background: var(--paper); padding: 16px; font: 400 15px/1.6 var(--font-mono); white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.ch-tool__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ch-quiz__q { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.ch-quiz__opts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.ch-quiz__opt { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 9px 14px; cursor: pointer; font-size: 15px; box-shadow: var(--shadow-sm); }
.ch-quiz__opt.is-on { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: none; }
.ch-quiz__res { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 16px 18px; box-shadow: var(--shadow-sm); }

/* ── Адаптив ─────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .ch-hero__grid { grid-template-columns: 1fr; }
  .ch-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .ch-chars { grid-template-columns: repeat(3, 1fr); }
  .ch-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .ch-nav { display: none; }
  .ch-burger { display: flex; }
  .ch-grid--3 { grid-template-columns: 1fr 1fr; }
  .ch-related__grid { grid-template-columns: 1fr 1fr; }
  .ch-cta { grid-template-columns: 1fr; }
  .ch-tool__row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .ch-frame { flex-wrap: wrap; gap: 8px 10px; }
  .ch-frame__label { white-space: normal; }
  .ch-frame__line { flex-basis: 100%; }
  .ch-header__inner { gap: 9px; }
  .ch-logo { font-size: 18px; gap: 8px; }
  .ch-logo__ru { display: none; }
  .ch-header .ch-btn { padding: 10px 13px; font-size: 14px; }
  .ch-burger { width: 38px; }
  .ch-section { padding: 38px 0; }
  .ch-hero { padding: 30px 0 32px; }
  .ch-hero__lead { font-size: 17px; }
  .ch-grid--2, .ch-grid--3, .ch-grid--4 { grid-template-columns: 1fr; }
  .ch-chars { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ch-related__grid { grid-template-columns: 1fr; }
  .ch-footer__grid { grid-template-columns: 1fr; }
  .ch-hero__cta { flex-direction: column; align-items: stretch; }
  .ch-hero__cta .ch-btn { width: 100%; }
  .ch-panel { padding: 18px; }
  .ch-cta { padding: 22px; }
  .ch-step { grid-template-columns: 34px 1fr; gap: 12px; padding: 14px; }
  .ch-step__n { padding-right: 8px; font-size: 17px; }
  h1 { font-size: 27px; }
}
@media (max-width: 380px) {
  .ch-logo { font-size: 17px; }
  .ch-logo__mark { width: 28px; height: 28px; flex-basis: 28px; }
  .ch-header__inner { gap: 8px; }
  .ch-header .ch-btn { padding: 10px 12px; font-size: 14px; }
  .ch-chars { grid-template-columns: 1fr; }
}
