/* =========================================================================
   RStudio — сайт приложения
   Дизайн-система. Перенесена один в один с прежней сборки на Tailwind v4.
   Брейкпоинты сохранены: sm 640px, md 768px, lg 1024px.
   ========================================================================= */

/* ------------------------------- Шрифты -------------------------------- */
/* Inter и Sora лежат локально (OFL). Google Fonts намеренно не подключаются:
   иначе IP каждого посетителя уходил бы на серверы Google. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+460-52F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-cyrillic.woff2) format("woff2");
  unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-greek-ext.woff2) format("woff2");
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-greek.woff2) format("woff2");
  unicode-range: U+370-377, U+37A-37F, U+384-38A, U+38C, U+38E-3A1, U+3A3-3FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-vietnamese.woff2) format("woff2");
  unicode-range: U+102-103, U+110-111, U+128-129, U+168-169, U+1A0-1A1, U+1AF-1B0,
    U+300-301, U+303-304, U+308-309, U+323, U+329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308,
    U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304,
    U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

/* Sora — только латиница. Кириллические заголовки падают на Inter,
   ровно как было в прежней сборке. */
@font-face {
  font-family: Sora;
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../fonts/sora-latin-ext.woff2) format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308,
    U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Sora;
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../fonts/sora-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304,
    U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

/* ------------------------------ Переменные ----------------------------- */

:root {
  --color-bg: #09070f;
  --color-bg-soft: #0f0b18;
  --color-surface: #15101f;
  --color-surface-2: #1c1629;
  --color-border: #2a2339;
  --color-fg: #f5f3fb;
  --color-muted: #a49dba;
  --color-faint: #6f6885;
  --color-brand: #6948dd;
  --color-brand-bright: #8f74f4;
  --color-brand-deep: #4c34ac;
  --color-brand-soft: #c7b8ff;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: Sora, Inter, ui-sans-serif, system-ui, sans-serif;

  --header-height: 68px;
}

/* -------------------------------- База --------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--color-border);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(143, 116, 244, 0.35);
  color: #fff;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-brand-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ------------------------------ Примитивы ------------------------------ */

.container-page {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  position: relative;
  padding-block: clamp(72px, 10vw, 130px);
}

.section-tight {
  padding-top: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-brand-bright);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(105, 72, 221, 0.12);
  border: 1px solid rgba(143, 116, 244, 0.25);
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-brand-bright);
}

.grad-text {
  background: linear-gradient(120deg, #b7a4ff 0%, #8f74f4 45%, #6948dd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 14px;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease,
    border-color 0.2s ease;
  will-change: transform;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #7c5cf0 0%, #6948dd 55%, #4c34ac 100%);
  box-shadow: 0 10px 30px -10px rgba(105, 72, 221, 0.7);
  border: 0;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px rgba(124, 92, 240, 0.8);
}

.btn-ghost {
  color: var(--color-fg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(143, 116, 244, 0.4);
  transform: translateY(-2px);
}

.card {
  position: relative;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(28, 22, 41, 0.75) 0%, rgba(21, 16, 31, 0.75) 100%);
  border: 1px solid var(--color-border);
  padding: 28px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 116, 244, 0.35);
  box-shadow: 0 24px 50px -30px rgba(105, 72, 221, 0.6);
}

.card-full {
  height: 100%;
}

.hairline {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-border) 20%,
    var(--color-border) 80%,
    transparent
  );
  border: 0;
  margin: 40px 0;
}

.glow {
  pointer-events: none;
  position: absolute;
  border-radius: 999px;
}

/* -------------------------------- Логотип ------------------------------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 19px;
  color: var(--color-fg);
}

/* ---------------------------- Бейдж App Store --------------------------- */

.appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 10px 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.appstore:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 116, 244, 0.5);
}

.appstore svg {
  color: var(--color-fg);
  width: 24px;
  height: 24px;
}

.appstore-compact svg {
  width: 20px;
  height: 20px;
}

.appstore-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.appstore-small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.025em;
  color: var(--color-muted);
}

.appstore-big {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-fg);
}

/* --------------------------------- Шапка -------------------------------- */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.site-header.is-scrolled {
  background: rgba(9, 7, 15, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--color-border);
}

.site-header nav {
  display: flex;
  height: var(--header-height);
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  color: var(--color-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-fg);
}

.nav-cta {
  display: none;
  align-items: center;
  gap: 12px;
}

/* Переключатель языка: русская версия лежит в корне, английская — в /en/. */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 2px;
  list-style: none;
}

.lang-switch a {
  display: block;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-muted);
  transition: background 0.2s, color 0.2s;
}

.lang-switch a:hover {
  color: var(--color-fg);
}

.lang-switch a[aria-current="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-fg);
}

.mobile-menu-lang {
  padding: 12px 12px 0;
}

.mobile-menu-lang .lang-switch {
  width: fit-content;
}

.burger {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.05);
}

.burger-box {
  position: relative;
  display: block;
  width: 18px;
  height: 14px;
}

.burger-box span {
  position: absolute;
  left: 0;
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--color-fg);
  transition: transform 0.3s, opacity 0.2s, top 0.3s;
}

.burger-box span:nth-child(1) { top: 0; }
.burger-box span:nth-child(2) { top: 6px; }
.burger-box span:nth-child(3) { top: 12px; }

.burger[aria-expanded="true"] .burger-box span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}
.burger[aria-expanded="true"] .burger-box span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger-box span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 16px;
  list-style: none;
}

.mobile-menu-inner a:not(.appstore) {
  border-radius: 12px;
  padding: 12px;
  font-size: 17px;
  color: rgba(245, 243, 251, 0.9);
  transition: background 0.2s;
}

.mobile-menu-inner a:not(.appstore):hover {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-cta {
  padding: 12px 12px 0;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: flex; }
  .burger { display: none; }
  .mobile-menu,
  .mobile-menu.is-open { display: none; }
}

/* --------------------------------- Hero --------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 110px;
}

.hero-glow {
  left: 50%;
  top: -140px;
  height: 520px;
  width: 900px;
  transform: translateX(-50%);
  opacity: 0.7;
  filter: blur(120px);
  background: radial-gradient(closest-side, rgba(105, 72, 221, 0.5), transparent);
}

.hero-grid {
  position: relative;
  display: grid;
  align-items: center;
  gap: 56px;
  padding-bottom: 96px;
}

.hero h1 {
  margin-top: 24px;
  text-wrap: balance;
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
}

.hero-lead {
  margin-top: 24px;
  max-width: 576px;
  font-size: 17px;
  line-height: 1.625;
  color: var(--color-muted);
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.hero-highlights {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  list-style: none;
}

.hero-highlights li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-faint);
}

.hero-highlights svg {
  width: 16px;
  height: 16px;
  color: var(--color-brand-bright);
}

.hero-shot {
  display: flex;
  justify-content: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
  .hero-shot {
    justify-content: flex-end;
  }
}

/* ------------------------------ Скриншот ------------------------------- */

.phone {
  position: relative;
  width: 300px;
  max-width: 78vw;
}

.phone-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateY(32px) scale(0.9);
  border-radius: 999px;
  opacity: 0.7;
  filter: blur(85px);
  background: radial-gradient(closest-side, rgba(124, 92, 240, 0.55), transparent);
  pointer-events: none;
}

.phone img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 26px 50px rgba(105, 72, 221, 0.45));
}

/* ----------------------- Секции: заголовочные блоки --------------------- */

.section-title {
  margin-top: 20px;
  max-width: 672px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
}

.section-lead {
  margin-top: 16px;
  max-width: 576px;
  font-size: 16px;
  color: var(--color-muted);
}

/* ------------------------------ Возможности ----------------------------- */

.grid-cards {
  margin-top: 48px;
  display: grid;
  gap: 20px;
}

.feature-icon {
  margin-bottom: 20px;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--color-brand-soft);
  background: rgba(105, 72, 221, 0.14);
  border: 1px solid rgba(143, 116, 244, 0.28);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--color-fg);
}

.card p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.625;
  color: var(--color-muted);
}

@media (min-width: 640px) {
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* -------------------------------- Шаги ---------------------------------- */

.grid-steps {
  margin-top: 48px;
  display: grid;
  gap: 20px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
}

.grid-steps .card h3 {
  margin-top: 12px;
  font-size: 20px;
}

@media (min-width: 768px) {
  .grid-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------ Скриншоты ------------------------------- */

.grid-screens {
  margin-top: 56px;
  display: grid;
  gap: 48px 24px;
}

.screen-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.screen-item .phone {
  width: 272px;
}

.screen-item h3 {
  margin-top: 24px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-fg);
}

.screen-item p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--color-muted);
}

@media (min-width: 640px) {
  .grid-screens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .grid-screens { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------- CTA ---------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid var(--color-border);
  padding: 40px;
  text-align: center;
}

.cta-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.9;
  border-radius: 0;
  background: radial-gradient(60% 120% at 50% 0%, rgba(105, 72, 221, 0.35), transparent 70%);
}

.cta h2 {
  margin-inline: auto;
  max-width: 672px;
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 700;
}

.cta p {
  margin: 16px auto 0;
  max-width: 576px;
  font-size: 17px;
  color: var(--color-muted);
}

.cta-actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}

@media (min-width: 640px) {
  .cta { padding: 64px; }
}

/* ---------------------------- Внутренние страницы ----------------------- */

.page-head {
  position: relative;
  overflow: hidden;
  padding-top: 130px;
}

.page-head-glow {
  left: 50%;
  top: -120px;
  height: 380px;
  width: 760px;
  transform: translateX(-50%);
  opacity: 0.5;
  filter: blur(120px);
  background: radial-gradient(closest-side, rgba(105, 72, 221, 0.4), transparent);
}

.page-head-inner {
  position: relative;
  padding-bottom: 96px;
}

.page-head h1 {
  margin-top: 20px;
  max-width: 768px;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
}

.page-head-lead {
  margin-top: 20px;
  max-width: 672px;
  font-size: 17px;
  line-height: 1.625;
  color: var(--color-muted);
}

.page-body {
  margin-top: 56px;
}

/* -------------------------------- Поддержка ----------------------------- */

.support-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.support-grid .card h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-fg);
}

.support-grid .card p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.625;
  color: var(--color-muted);
}

.support-mail {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand-soft);
  transition: color 0.2s;
}

.support-mail:hover {
  color: #fff;
}

.support-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-faint);
}

.req-list {
  margin-top: 20px;
  list-style: none;
  font-size: 15px;
  color: var(--color-muted);
}

.req-list li + li {
  margin-top: 8px;
}

.req-list b {
  color: var(--color-fg);
  font-weight: 600;
}

.support-section {
  margin-top: 56px;
}

.support-section > h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-fg);
}

/* ---------------------------------- FAQ --------------------------------- */

.faq {
  max-width: 768px;
  margin-top: 24px;
}

.faq-item {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
}

.faq-item + .faq-item {
  margin-top: 12px;
}

.faq-q {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  text-align: left;
}

.faq-q span:first-child {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-fg);
}

.faq-sign {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-brand-bright);
  transition: transform 0.3s;
}

.faq-q[aria-expanded="true"] .faq-sign {
  transform: rotate(45deg);
}

/* minmax(0, …) обязателен: в Safari на iOS строка `1fr` без него схлопывается
   до минимального размера содержимого, и раскрытый ответ остаётся пустым. */
.faq-a {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  transition: grid-template-rows 0.3s ease-out;
}

.faq-q[aria-expanded="true"] + .faq-a {
  grid-template-rows: minmax(0, 1fr);
}

.faq-a > div {
  overflow: hidden;
  contain: layout;
}

.faq-a p {
  padding: 0 20px 20px;
  font-size: 15px;
  line-height: 1.625;
  color: var(--color-muted);
}

/* --------------------------------- Форма -------------------------------- */

.form-card {
  max-width: 768px;
  margin-top: 24px;
}

.form-row {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .form-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-fg);
}

.field-req {
  color: var(--color-brand-bright);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--color-fg);
  background: rgba(9, 7, 15, 0.6);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 12px 14px;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  min-height: 148px;
  resize: vertical;
  line-height: 1.6;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%),
    linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.field select option {
  background: var(--color-surface-2);
  color: var(--color-fg);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(143, 116, 244, 0.55);
  background: rgba(9, 7, 15, 0.85);
}

.field-error {
  font-size: 13px;
  color: #f0a89b;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: rgba(240, 168, 155, 0.6);
}

.field-hint {
  font-size: 13px;
  color: var(--color-faint);
}

.consent {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-muted);
}

.consent .field-error {
  flex-basis: 100%;
}

.consent input {
  margin: 0;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--color-brand);
}

.consent a {
  color: var(--color-brand-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent a:hover {
  color: #fff;
}

/* Ловушка для ботов: поле не видно людям, но видно автозаполнению роботов. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.form-actions .btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.form-status {
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.form-status-ok {
  background: rgba(64, 160, 110, 0.12);
  border: 1px solid rgba(104, 214, 156, 0.35);
  color: #8fe0b6;
}

.form-status-error {
  background: rgba(138, 42, 28, 0.18);
  border: 1px solid rgba(240, 168, 155, 0.35);
  color: #f0a89b;
}

.form-status b {
  color: inherit;
}

/* -------------------------------- Подвал -------------------------------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

.footer-inner {
  padding-block: 64px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer-about {
  max-width: 384px;
}

.footer-about p {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.625;
  color: var(--color-muted);
}

.footer-navs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.footer-navs h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-faint);
}

.footer-navs ul {
  margin-top: 16px;
  list-style: none;
}

.footer-navs li + li {
  margin-top: 12px;
}

.footer-navs a {
  font-size: 15px;
  color: var(--color-muted);
  transition: color 0.2s;
}

.footer-navs a:hover {
  color: var(--color-fg);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--color-faint);
}

@media (min-width: 640px) {
  .footer-navs { gap: 64px; }
  .footer-bottom {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --------------------------------- 404 ---------------------------------- */

.notfound {
  display: flex;
  min-height: 70vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  text-align: center;
}

.notfound-code {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 800;
}

.notfound h1 {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
}

.notfound p {
  margin-top: 12px;
  max-width: 384px;
  font-size: 16px;
  color: var(--color-muted);
}

.notfound .btn {
  margin-top: 32px;
}

/* ---------------------------- Юридические тексты ------------------------ */

.legal-doc {
  max-width: 768px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--color-muted);
}

.legal-doc header.doc {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 24px;
  margin-bottom: 28px;
}

.legal-doc .meta {
  color: var(--color-faint);
  font-size: 0.95rem;
  margin: 0 0 6px;
}

.legal-doc .meta b {
  color: var(--color-fg);
  font-weight: 600;
}

.legal-doc h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 40px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-fg);
  font-weight: 600;
}

.legal-doc h3 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
  color: var(--color-fg);
  font-weight: 600;
}

.legal-doc p,
.legal-doc li {
  margin: 0 0 12px;
}

.legal-doc ul,
.legal-doc ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.legal-doc li > ul,
.legal-doc li > ol {
  margin-top: 8px;
}

.legal-doc a {
  color: var(--color-brand-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-doc a:hover {
  color: #fff;
}

.legal-doc .card {
  background: rgba(28, 22, 41, 0.75);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
}

.legal-doc .card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--color-border);
}

.legal-doc .card p:last-child,
.legal-doc .card ul:last-child,
.legal-doc .card li:last-child {
  margin-bottom: 0;
}

.legal-doc .card p {
  margin-top: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.legal-doc .warn {
  background: rgba(138, 42, 28, 0.18);
  border: 1px solid rgba(240, 168, 155, 0.35);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
  color: #f0a89b;
}

.legal-doc .warn strong {
  color: #f0a89b;
}

.legal-doc .warn p:last-child,
.legal-doc .warn ul:last-child {
  margin-bottom: 0;
}

.legal-doc nav.toc {
  background: rgba(28, 22, 41, 0.75);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 18px 20px 18px 8px;
  margin: 8px 0 28px;
}

.legal-doc nav.toc h2 {
  border: 0;
  margin: 0 0 10px 16px;
  padding: 0;
  font-size: 1.05rem;
}

.legal-doc nav.toc ol {
  margin: 0;
  padding-left: 34px;
}

.legal-doc nav.toc li {
  margin: 0 0 4px;
}

.legal-doc .tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 20px;
}

.legal-doc table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 0.94rem;
}

.legal-doc th,
.legal-doc td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.legal-doc th {
  background: rgba(28, 22, 41, 0.9);
  color: var(--color-fg);
  font-weight: 600;
}

.legal-doc code {
  background: rgba(28, 22, 41, 0.9);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.9em;
}

.legal-doc footer.doc {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-faint);
  font-size: 0.94rem;
}

/* ------------------------------- Анимации ------------------------------- */
/* Контент виден по умолчанию (без JS). Скрытие-до-появления включается
   только при активном JS. */

.reveal {
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .card:hover,
  .btn:hover,
  .appstore:hover {
    transform: none;
  }
}
