/* Meowla: главная (index.php), оффер (workWithOffer.php) и legal pages. Макет: Figma 101, секции «Web (browser)» и «Legal». */

@font-face {
  font-family: "Momo Trust Sans";
  src: url("/fonts/momo-trust-sans/momo-trust-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --surface: #171311;
  --border: rgba(255, 255, 255, 0.1);
  --text: #fff;
  --text-muted: #b0b0b0;
  --text-subtle: #87827f;
  --accent: #ff563a;
  --badge: #fda92f;
  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 8px 24px -4px rgba(255, 86, 58, 0.35);
  --gradient-button: linear-gradient(99.5deg, #ff6e36 0%, #ff362f 71%);
  --gradient-hero: linear-gradient(90deg, #fea462 0%, #ff6e36 50%, #e1130d 100%);
  /* Размытый эллипс #C44C28 из макета, подобран по замерам цвета */
  --glow: radial-gradient(ellipse 480px 600px at calc(100% + 20px) -40px, rgba(196, 76, 40, 0.5) 0%, rgba(196, 76, 40, 0.2) 30%, rgba(196, 76, 40, 0) 60%);
  --font: "Momo Trust Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--glow) no-repeat;
  color: var(--text);
  font: 400 13px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p,
dl,
dd,
ul {
  margin: 0;
}

h1:focus {
  outline: none;
}

button {
  font: inherit;
}

svg {
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page {
  width: 100%;
  max-width: 488px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 58px;
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--gradient-button);
  box-shadow: var(--shadow-accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 22.4px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.btn svg {
  flex: none;
  width: 24px;
  height: 24px;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.btn:focus-visible,
.back:focus-visible,
.faq-item summary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.btn--ghost {
  min-height: 54px;
  border-color: transparent;
  background: none;
  box-shadow: none;
  color: var(--accent);
}

/* ---------- Оффер ---------- */

.offer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.screen {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

.title {
  font-weight: 800;
  font-size: 28px;
  line-height: 33.6px;
}

.title--xl {
  font-size: 36px;
  line-height: 43.2px;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18.2px;
}

.lead {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 19.6px;
}

.disclaimer {
  color: var(--text-subtle);
  font-weight: 500;
  font-size: 12px;
  line-height: 16.8px;
  text-align: center;
}

.error {
  color: #ff8a73;
  font-weight: 500;
  font-size: 13px;
  line-height: 18.2px;
  text-align: center;
}

/* Экран 1: выбор плана */

.plans {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.plan-input:checked + .plan {
  padding: 15px;
  border: 2px solid var(--accent);
}

.plan-input:focus-visible + .plan {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.plan__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}

.plan__radio {
  display: grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.plan__radio svg {
  width: 10px;
  height: 10px;
  opacity: 0;
}

.plan-input:checked + .plan .plan__radio {
  border-color: var(--border);
  background: var(--accent);
}

.plan-input:checked + .plan .plan__radio svg {
  opacity: 1;
}

.plan__term-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.plan__term {
  font-weight: 700;
  font-size: 14px;
  line-height: 19.6px;
  white-space: nowrap;
}

.tag {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--badge);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  line-height: 16.8px;
  white-space: nowrap;
}

.plan__monthly {
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}

.plan__payment {
  font-weight: 700;
  font-size: 16px;
  line-height: 22.4px;
}

.plan__per {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  line-height: 16.8px;
}

.plan__divider {
  height: 1px;
  background: var(--border);
}

.plan__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fact__label {
  color: var(--text-subtle);
  font-weight: 500;
  font-size: 12px;
  line-height: 16.8px;
}

.fact__value {
  font-weight: 700;
  font-size: 12px;
  line-height: 16.8px;
}

.screen-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.screen-actions--loose {
  gap: 8px;
  margin-top: 0;
}

/* Экран 2: проверка и отправка */

.screen--review {
  gap: 20px;
  padding-top: 4px;
}

.mascot {
  display: block;
  margin: 0 auto;
}

.mascot img {
  display: block;
  width: 100%;
  height: auto;
}

.mascot--review {
  width: 120px;
  margin-top: 41px;
}

.texts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--gradient-hero);
  box-shadow: var(--shadow-accent);
}

.hero-card__label {
  font-weight: 700;
  font-size: 12px;
  line-height: 16.8px;
  text-transform: uppercase;
}

.hero-card__value {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0 6px;
}

.hero-card__amount {
  font-weight: 800;
  font-size: 52px;
  line-height: 52px;
}

.hero-card__unit {
  font-weight: 700;
  font-size: 16px;
  line-height: 22.4px;
}

.hero-card__note {
  font-weight: 500;
  font-size: 14px;
  line-height: 19.6px;
}

.summary {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-size: 14px;
  line-height: 19.6px;
}

.summary__row dt {
  color: var(--text-muted);
  font-weight: 500;
}

.summary__row dd {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

/* Экран 3: заявка отправлена */

.screen--sent {
  padding-top: 4px;
}

.sent__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  flex: 1 0 auto;
  padding-bottom: 16px;
}

.sent__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--badge);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  line-height: 18.2px;
}

.badge svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.mascot--sent {
  width: 170px;
  margin-top: 93px;
}

.note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  line-height: 16.8px;
}

.note svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.sent__footer {
  padding-top: 8px;
}

/* ---------- Legal pages ---------- */

.legal {
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 4px 0;
}

.back {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.back svg {
  width: 24px;
  height: 24px;
}

.topbar__title {
  font-weight: 800;
  font-size: 18px;
  line-height: 23.4px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}

.legal-card,
.faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.legal-card {
  padding: 20px 16px;
}

.legal-card__title {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 16px;
  line-height: 22.4px;
}

.legal-text {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18.2px;
  overflow-wrap: anywhere;
}

.legal-text > * + * {
  margin-top: 18.2px;
}

.legal-text ul {
  padding: 0;
  list-style: none;
}

.legal-text li::before {
  content: "\2022\00a0";
}

/* В макете выделения нет: оставляем <strong> для смысла, визуально — едва заметный Medium */
.legal-text strong {
  font-weight: 500;
}

.nobr {
  white-space: nowrap;
}

.legal-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  font-weight: 700;
  font-size: 16px;
  line-height: 22.4px;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary {
  padding-bottom: 8px;
}

.faq-item[open] summary svg {
  color: #fff;
  transform: rotate(180deg);
}

.faq-item .legal-text {
  padding: 0 16px 20px;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary svg {
    transition: none;
  }
}

/* ---------- Главная (index.php) ---------- */

.home {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.home__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.mascot--home {
  width: 120px;
  margin: 16px auto 12px;
}

.home__operator {
  color: var(--text-subtle);
  font-weight: 500;
  font-size: 12px;
  line-height: 16.8px;
}

.section-title {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 16px;
  line-height: 22.4px;
}

.docs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.doc:active {
  transform: translateY(1px);
}

.doc:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (hover: hover) {
  .doc:hover {
    border-color: rgba(255, 255, 255, 0.2);
  }
}

.doc__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 86, 58, 0.12);
  color: var(--accent);
}

.doc__icon svg {
  width: 20px;
  height: 20px;
}

.doc__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.doc__title {
  font-weight: 700;
  font-size: 16px;
  line-height: 22.4px;
}

.doc__desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18.2px;
}

.doc__chevron {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--text-subtle);
}

.home__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  color: var(--text-subtle);
  font-size: 12px;
  line-height: 16.8px;
  text-align: center;
}

.home__footer address {
  font-style: normal;
}

.home__footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
