/* AI Toolbox: страница «Архитектор чека».
   Цвета, шрифты, кегли, отступы и скругления - только из rules/design/brand.md. */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Unbounded";
  src: url("fonts/Unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #f8fafc;
  --bg2: #f0f4f8;
  --white: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --navy: #1e3a5f;
  --navy-dark: #152d4a;
  --orange: #f97316;
  --orange-light: #fb923c;

  --r-card: 16px;
  --r-btn: 12px;
  --r-sm: 8px;
  --shadow: 0 8px 24px rgba(21, 45, 74, 0.10);
  --shadow-pop: 0 16px 40px rgba(21, 45, 74, 0.28);
  --col: 720px;
  --wide: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--navy) var(--bg2); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  caret-color: var(--orange);
}
::selection { background: var(--navy); color: var(--white); }
.stage-field ::selection, .final ::selection { background: var(--orange); color: var(--navy-dark); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: "Unbounded", sans-serif;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 16px;
  text-wrap: balance;
  word-spacing: 0.12em;
}
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); font-size: 14px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.intro { max-width: 640px; margin-bottom: 40px; }
.sheet { padding: 96px 0; }
.sheet.alt { background: var(--bg2); }

/* ---------- кнопки: основная (акцент) и вторичная (контур) ---------- */
.btn {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  border-radius: var(--r-btn);
  padding: 16px 28px;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: var(--navy-dark); }
.btn-primary:hover { background: var(--orange-light); }
.btn-outline { box-shadow: inset 0 0 0 2px var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-ghost { font-size: 14px; padding: 12px 20px; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.32); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--white); }
.btn:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
/* на тёмно-синем поле кольцо фокуса оранжевое: тёмно-синее там не видно */
.stage-field :focus-visible, .final :focus-visible { outline-color: var(--orange); }

/* ---------- первый экран: поле сравнения ---------- */
.stage-field { background: var(--navy); color: var(--white); padding-bottom: 72px; overflow: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; padding-bottom: 24px; }
.logo { white-space: nowrap; font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 14px; color: var(--white); text-decoration: none; letter-spacing: 0.08em; }
.hero { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; padding-top: 32px; }
.hero h1 { color: var(--white); }
.hero .lead { font-size: 20px; line-height: 1.5; color: var(--white); max-width: 480px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 32px 0 24px; }
.facts { font-size: 14px; color: rgba(255, 255, 255, 0.82); margin: 0; }

.compare-stage { margin: 0; }
.switch { display: inline-flex; background: var(--navy-dark); border-radius: var(--r-btn); padding: 4px; margin-bottom: 16px; }
.switch button {
  font: 700 14px/1 "Montserrat", sans-serif;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.switch button:hover { color: var(--white); }
.switch button[aria-pressed="true"] { background: var(--white); color: var(--navy); }

.table-top {
  --k: 1;
  position: relative;
  height: 440px;
  border-radius: var(--r-card);
  background: var(--navy-dark);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.10);
  overflow: hidden;
}
.slip {
  position: absolute;
  left: 50%; top: 50%;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow);
  transform: translate(calc(-50% - 130px * var(--k) + var(--sx) * 2.4 * var(--k)), calc(-50% + (var(--sy) - 13px) * 2.6 * var(--k))) rotate(var(--sr));
  opacity: .62;
  filter: blur(1px);
  transition: transform .9s var(--ease), opacity .6s var(--ease), filter .6s var(--ease);
}
.three {
  position: absolute;
  right: 32px; top: 50%;
  width: min(340px, 58%);
  transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px;
  transition: transform .9s var(--ease), opacity .6s var(--ease), filter .6s var(--ease);
}
.three li {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 16px;
  align-items: center;
  background: var(--white);
  color: var(--text);
  border-radius: var(--r-btn);
  padding: 16px;
  box-shadow: var(--shadow-pop);
}
.three b { grid-column: 2; font-size: 16px; color: var(--navy); line-height: 1.3; }
.three li > span:last-child { grid-column: 2; font-size: 14px; color: var(--muted); }
.num {
  grid-row: span 2;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--orange); color: var(--navy-dark);
  font: 700 20px/1 "Unbounded", sans-serif;
  display: flex; align-items: center; justify-content: center;
}
/* вид «сборник для всех»: ворох разлетается веером, три отступают */
[data-view="pile"] .slip {
  transform: translate(calc(-50% + var(--fx) * var(--k)), calc(-50% + var(--fy) * var(--k))) rotate(var(--fr));
  opacity: 1;
  filter: none;
}
[data-view="pile"] .three { transform: translateY(-50%) translateX(24px) scale(.9); opacity: .16; filter: blur(3px); }
.compare-stage figcaption { font-size: 14px; color: rgba(255, 255, 255, 0.82); margin-top: 12px; min-height: 24px; }

/* ---------- сравнение ---------- */
.versus { margin: 0; border-top: 2px solid var(--navy); }
.versus > div { display: grid; grid-template-columns: 1fr 1.2fr 1.6fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.versus-head span { font-size: 14px; font-weight: 800; color: var(--muted); }
.versus-head span:last-child { color: var(--navy); }
.versus dt { font-weight: 800; color: var(--navy); }
.versus dd { margin: 0; }
.versus dd:first-of-type { color: var(--muted); }
.versus dd:last-of-type { font-weight: 600; }

/* ---------- потолок и страхи ---------- */
.equation { word-spacing: 0.12em; font: 700 28px/1.25 "Unbounded", sans-serif; color: var(--navy); letter-spacing: -0.015em; margin: 32px 0 8px; font-variant-numeric: tabular-nums; }
.equation span { display: block; }
.equation span:last-child { color: var(--navy); background: linear-gradient(transparent 62%, rgba(249, 115, 22, 0.35) 62%); display: inline; }
.note { font-size: 14px; color: var(--text); }
.fears { list-style: none; margin: 0; padding: 0; }
.fears li { padding: 24px 0; border-bottom: 1px solid var(--border); }
.fears li:first-child { padding-top: 0; }
.fears b { display: block; word-spacing: 0.12em; font: 700 20px/1.3 "Unbounded", sans-serif; color: var(--navy); margin-bottom: 8px; }

/* ---------- три промпта строками ---------- */
.prompts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.prompts > li { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr; gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--border); }
.p-name { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; align-content: start; }
.p-name .num { grid-row: span 2; }
.p-name h3 { margin: 4px 0 8px; }
.p-name p { margin: 0; }
.p-asks { display: grid; gap: 8px; align-content: start; }
.who { font-size: 12px; font-weight: 700; color: var(--text); }
.p-asks q {
  quotes: none;
  justify-self: start;
  max-width: 100%;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--r-btn) var(--r-btn) var(--r-btn) 0;
  padding: 12px 16px;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.p-gives { font-size: 14px; }
.p-gives b { display: block; font-size: 14px; color: var(--navy); margin-bottom: 4px; }

/* ---------- ещё в PDF ---------- */
.extras { list-style: none; margin: 0; padding: 0; }
.extras li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.extras b { color: var(--navy); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.shots figure { margin: 0; }
.shots img { border-radius: var(--r-sm); border: 1px solid var(--border); box-shadow: var(--shadow); }
.shots figure:first-child { transform: rotate(-2deg); }
.shots figure:last-child { transform: rotate(2deg) translateY(32px); }
.shots figcaption { font-size: 14px; color: var(--text); margin-top: 12px; }

/* ---------- самопроверка ---------- */
.tip { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; margin-top: 32px; }
.tip b { display: block; color: var(--navy); margin-bottom: 8px; }
.tip p { margin: 0; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { border-bottom: 1px solid var(--border); }
.checklist label { display: grid; grid-template-columns: 28px 1fr; gap: 20px; align-items: start; padding: 24px 0; cursor: pointer; font-size: 20px; line-height: 1.4; color: var(--navy); font-weight: 600; }
.checklist li:first-child label { padding-top: 0; }
.checklist input {
  appearance: none; -webkit-appearance: none;
  width: 28px; height: 28px; margin: 2px 0 0;
  border: 2px solid var(--navy); border-radius: var(--r-sm);
  background: var(--white);
  display: grid; place-content: center;
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.checklist input::after {
  content: ""; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23152d4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0); transition: transform .3s var(--ease);
}
.checklist input:checked { background: var(--orange); border-color: var(--orange); }
.checklist input:checked::after { transform: scale(1); }
.checklist input:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.checklist label:hover input { border-color: var(--navy-dark); }

/* ---------- четыре недели ---------- */
.road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.road::before { content: ""; position: absolute; left: 8px; right: 8px; top: 7px; height: 2px; background: var(--border); }
.road li { position: relative; padding: 40px 24px 0 0; }
.road li::before { content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: var(--r-sm); background: var(--white); border: 2px solid var(--navy); }
.road li:first-child::before { background: var(--orange); border-color: var(--orange); }
.step { display: block; word-spacing: 0.12em; font: 700 16px/1.3 "Unbounded", sans-serif; color: var(--navy); margin-bottom: 8px; }
.road p { font-size: 14px; margin: 0; }

/* ---------- для кого ---------- */
.fit { margin: 0 0 24px; padding-left: 20px; }
.fit li { margin-bottom: 8px; }
.fit li::marker { color: var(--orange); }
.not-fit { color: var(--text); }
.limits { background: var(--navy); color: var(--white); border-radius: var(--r-card); padding: 32px; }
.limits h3 { color: var(--white); }
.limits p { font-size: 14px; }
.limits p:last-child { margin: 0; }

/* ---------- цена ---------- */
.price-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--r-card);
  padding: 48px;
  box-shadow: var(--shadow);
}
.price-card ul { padding-left: 20px; margin: 0; }
.price-card li { margin-bottom: 8px; }
.price-card li::marker { color: var(--orange); }
.price { font: 800 40px/1.1 "Unbounded", sans-serif; color: var(--navy); letter-spacing: -0.015em; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.price-buy .btn { display: block; }
.pay-note { font-size: 14px; color: var(--muted); margin: 16px 0 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: start; }
details { border-bottom: 1px solid var(--border); }
details:first-child { border-top: 2px solid var(--navy); }
summary { cursor: pointer; font-weight: 700; padding: 20px 48px 20px 0; list-style: none; position: relative; color: var(--navy); transition: color .2s var(--ease); }
summary:hover { color: var(--navy-dark); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 8px; top: 28px; width: 12px; height: 12px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg); transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(225deg); top: 32px; }
details > div { padding: 0 0 20px; }
details > div p { margin: 0; }

/* ---------- финал и подвал ---------- */
.final { background: var(--navy); color: var(--white); text-align: center; padding: 96px 0; }
.final h2 { color: var(--white); }
.final p { max-width: 560px; margin: 0 auto 32px; }
footer { padding: 40px 0; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--navy); }
.nowrap { white-space: nowrap; }

/* ---------- оферта ---------- */
.doc { max-width: var(--col); margin: 0 auto; padding: 40px 24px 72px; }
.doc h1 { font-size: 28px; }
.doc h2 { font-size: 16px; font-family: "Montserrat", sans-serif; font-weight: 800; margin: 32px 0 8px; }

/* ---------- планшет ---------- */
@media (max-width: 960px) {
  .hero, .split, .faq, .price-card { grid-template-columns: 1fr; }
  .split, .faq { gap: 40px; }
  .prompts > li { grid-template-columns: 1fr 1fr; }
  .p-name { grid-column: 1 / -1; }
  .road { grid-template-columns: 1fr; }
  .road::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
  .road li { padding: 0 0 32px 40px; }
  .shots figure:last-child { transform: rotate(2deg); }
}

/* ---------- телефон: отдельная компоновка ---------- */
@media (max-width: 560px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .sheet, .final { padding: 64px 0; }
  .topbar .btn { display: none; }
  .topbar { padding-top: 16px; padding-bottom: 8px; }
  .hero { padding-top: 16px; gap: 32px; }
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  .hero .lead { font-size: 16px; }
  .btn { display: block; width: 100%; }
  .switch { display: flex; }
  .switch button { flex: 1; padding: 12px 8px; }
  .table-top { --k: .56; height: 400px; }
  .slip { font-size: 12px; }
  .three { top: auto; bottom: 16px; right: 16px; width: calc(100% - 32px); transform: none; }
  .three li { padding: 12px; }
  [data-view="pile"] .three { transform: translateY(24px) scale(.9); }
  .slip { transform: translate(calc(-50% + var(--sx) * 5), calc(-50% - 130px + (var(--sy) - 13px) * .9)) rotate(var(--sr)); opacity: .74; filter: blur(.5px); }
  .versus > .versus-head { display: none; }
  .versus > div { grid-template-columns: 1fr; gap: 8px; }
  .versus dd::before { content: attr(data-label) ": "; font-size: 12px; font-weight: 700; color: var(--text); display: block; }
  .prompts > li { grid-template-columns: 1fr; gap: 16px; }
  .equation { font-size: 20px; }
  .checklist label { font-size: 16px; gap: 16px; }
  .shots { grid-template-columns: 1fr 1fr; gap: 16px; }
  .price-card { padding: 24px; gap: 24px; }
  .price { font-size: 28px; }
  .limits { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
