/* Стили лендинга fitsignal.ru — только токены из site/tokens.css */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-sans);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: var(--type-body-weight);
  color: var(--ink);
  background: var(--surface-100);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--brand-ink);
  color: var(--lime);
}

.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface-100) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding-block: var(--space-2);
}

.staging-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--warn, #c45c26);
  background: var(--warn-bg, #fff4e8);
  color: var(--ink, #1a1a1a);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.logo img {
  height: 28px;
  width: auto;
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .logo-light {
    display: none;
  }
  html:not([data-theme]) .logo-dark {
    display: block;
  }
}

html[data-theme="dark"] .logo-light {
  display: none;
}

html[data-theme="dark"] .logo-dark {
  display: block;
}

.nav {
  display: none;
  gap: var(--space-6);
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 700;
  font-size: var(--type-small-size);
}

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

.header-cta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--type-body-size);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--lime);
  color: var(--brand-ink);
}

.btn-primary:hover {
  filter: brightness(0.97);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-300);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.btn-sm {
  min-height: 36px;
  padding-inline: var(--space-3);
  font-size: var(--type-small-size);
}

/* ---- Секции ---- */

.section {
  padding-block: var(--space-12);
}

.section-head {
  max-width: 40rem;
  margin-bottom: var(--space-8);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-tracking);
  text-transform: uppercase;
  color: var(--ink-muted);
}

h1,
.h1 {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: clamp(28px, 5vw, var(--type-display-size));
  line-height: 1.1;
  font-weight: var(--type-display-weight);
  letter-spacing: var(--type-display-tracking);
}

h2,
.h2 {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: clamp(22px, 3.5vw, var(--type-h1-size));
  line-height: 1.15;
  font-weight: var(--type-h1-weight);
}

h3,
.h3 {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-line);
  font-weight: var(--type-h2-weight);
}

.lead {
  margin: var(--space-4) 0 0;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.45;
  max-width: 36rem;
}

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

.hero {
  padding-block: var(--space-8) var(--space-12);
}

.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1.05fr;
    gap: var(--space-12);
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero-note {
  margin: var(--space-4) 0 0;
  color: var(--ink-muted);
  font-size: var(--type-small-size);
}

.hero-shot {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  background: var(--surface-200);
}

.hero-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

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

.steps {
  display: grid;
  gap: var(--space-4);
}

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

.step {
  padding: var(--space-6);
  background: var(--surface-200);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--brand-ink);
  color: var(--lime);
  font-family: var(--font-family-display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.step p {
  margin: var(--space-2) 0 0;
  color: var(--ink-muted);
}

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

.features {
  display: grid;
  gap: var(--space-4);
}

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

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

.feature {
  display: block;
  background: var(--surface-200);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
}

.feature:hover {
  text-decoration: none;
  border-color: var(--line-strong);
}

.feature-shot {
  aspect-ratio: 16 / 10;
  background: var(--surface-300);
  overflow: hidden;
}

.feature-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* На телефоне — мобильный скриншот: карточка выше, верхние панели демо срезаны */
@media (max-width: 600px) {
  .feature-shot {
    aspect-ratio: 4 / 5;
  }
  .feature-shot img {
    object-position: 50% 12%;
  }
}

.feature-body {
  padding: var(--space-4);
}

.feature-body h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.feature-body p {
  margin: var(--space-2) 0 0;
  color: var(--ink-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Lightbox без JS-библиотек */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--brand-ink) 72%, transparent);
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float, 0 16px 48px rgba(0, 0, 0, 0.35));
}

.lightbox-close {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
}

.lightbox-close span {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--surface-200);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-weight: 700;
  font-size: var(--type-small-size);
}

/* ---- Очередь действий ---- */

.actions-block {
  background: var(--brand-ink);
  color: #eef2ec;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
}

.actions-block .eyebrow {
  color: var(--coral);
}

.actions-block h2 {
  color: #eef2ec;
}

.actions-block p {
  margin: var(--space-4) 0 0;
  color: color-mix(in srgb, #eef2ec 82%, transparent);
  max-width: 40rem;
  font-size: 17px;
  line-height: 1.45;
}

.actions-block strong {
  color: var(--coral);
  font-weight: 700;
}

.actions-list {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-6);
  max-width: 52rem;
}

.actions-list li {
  padding-top: var(--space-3);
  border-top: 1px solid color-mix(in srgb, #eef2ec 18%, transparent);
  color: color-mix(in srgb, #eef2ec 82%, transparent);
  font-size: 16px;
  line-height: 1.45;
}

.actions-list strong {
  display: block;
  margin-bottom: 2px;
}

@media (max-width: 600px) {
  .actions-list {
    grid-template-columns: 1fr;
  }
}

/* ---- Безопасность ---- */

.security {
  display: grid;
  gap: var(--space-4);
}

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

.security-item {
  padding: var(--space-6);
  border-top: 3px solid var(--brand-ink);
}

.security-item h3 {
  margin-bottom: var(--space-2);
}

.security-item p {
  margin: 0;
  color: var(--ink-muted);
}

/* ---- Тарифы ---- */

.pilot-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--lime);
  color: var(--brand-ink);
  border-radius: var(--radius-lg);
  font-weight: 700;
}

.tariffs {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .tariffs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tariff {
  padding: var(--space-6);
  background: var(--surface-200);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tariff-featured {
  border-color: var(--brand-ink);
  box-shadow: var(--shadow-card), inset 0 0 0 1px var(--brand-ink);
}

.tariff .price {
  font-family: var(--font-family-display);
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-line);
  font-weight: 600;
}

.tariff .for-whom {
  color: var(--ink-muted);
  margin: 0;
  font-size: var(--type-small-size);
}

.tariff ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
  flex: 1;
}

.tariff li {
  position: relative;
  padding-left: var(--space-4);
  color: var(--ink-muted);
  font-size: var(--type-small-size);
}

.tariff li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-ink);
}

.tariff-offer-note {
  margin: var(--space-4) 0 0;
  font-size: var(--type-small-size);
  color: var(--ink-muted);
  text-align: center;
}

.payment-note {
  margin-top: var(--space-6);
  color: var(--ink-muted);
  font-size: var(--type-small-size);
  max-width: 40rem;
}

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

.faq {
  display: grid;
  gap: var(--space-2);
  max-width: 720px;
}

.faq details {
  background: var(--surface-200);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  float: right;
  color: var(--ink-muted);
  font-weight: 700;
}

.faq details[open] summary::after {
  content: "−";
}

.faq p {
  margin: var(--space-3) 0 0;
  color: var(--ink-muted);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-8);
  margin-top: var(--space-8);
}

.footer-inner {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--ink-muted);
}

.footer-rev {
  margin-left: 0.5rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.65;
}

.footer-meta {
  margin: var(--space-4) 0 0;
  color: var(--ink-muted);
  font-size: var(--type-small-size);
}

.seller {
  margin-top: var(--space-3);
  color: var(--ink-muted);
  font-size: var(--type-small-size);
  max-width: 36rem;
}

/* ---- Cookie ---- */

.cookie {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-4);
  background: var(--surface-200);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float, 0 8px 24px rgba(0, 0, 0, 0.12));
}

.cookie.is-visible {
  display: flex;
}

.cookie p {
  margin: 0;
  flex: 1 1 16rem;
  font-size: var(--type-small-size);
  color: var(--ink-muted);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

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

/* Два действия равного веса — без «бледной» вторичной кнопки */
.cookie-actions .btn {
  flex: 1 1 auto;
}

/* На телефоне плашка не должна закрывать полэкрана */
@media (max-width: 600px) {
  .cookie {
    left: var(--space-2);
    right: var(--space-2);
    bottom: var(--space-2);
    padding: var(--space-3);
    gap: var(--space-2);
  }
  .cookie-actions {
    width: 100%;
    flex-wrap: nowrap;
  }
  .cookie-actions .btn {
    flex: 1 1 0;
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }
}

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

.page-404 {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-12) var(--space-4);
}

.page-404 p {
  color: var(--ink-muted);
  margin: var(--space-4) 0 var(--space-6);
}


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

.legal-page {
  padding: var(--space-10) 0 var(--space-16);
}

.legal-inner {
  max-width: 44rem;
}

.legal-subtitle {
  margin: var(--space-3) 0 0;
  color: var(--ink-muted);
  font-size: var(--type-body-size);
}

.legal-revision {
  margin: var(--space-4) 0 var(--space-6);
  font-size: var(--type-small-size);
  color: var(--ink-muted);
}

.legal-archive {
  margin: 0 0 var(--space-6);
  font-size: var(--type-small-size);
}

.legal-archive ul {
  margin: var(--space-2) 0 0;
  padding-left: 1.25rem;
}

.legal-current-link {
  margin: 0 0 var(--space-6);
  font-size: var(--type-small-size);
}

.legal-article h2,
.legal-article h3 {
  font-family: var(--font-family-display);
  margin: var(--space-8) 0 var(--space-3);
  line-height: 1.25;
}

.legal-article p,
.legal-article li {
  margin: 0 0 var(--space-3);
}

.legal-article ul,
.legal-article ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25rem;
}

.legal-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: var(--space-4) 0 var(--space-6);
  -webkit-overflow-scrolling: touch;
}

.legal-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: var(--type-small-size);
}

.legal-table th,
.legal-table td {
  border: 1px solid var(--line);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--surface-200);
  font-weight: 600;
}

/* ---- /connect/ инструкция ---- */

.connect-page {
  padding: var(--space-10) 0 var(--space-16);
}

.connect-inner {
  max-width: 44rem;
}

.connect-lead {
  margin: var(--space-4) 0 var(--space-8);
}

.connect-article h1,
.connect-article h2,
.connect-article h3 {
  font-family: var(--font-family-display);
  margin: var(--space-8) 0 var(--space-3);
  line-height: 1.25;
}

.connect-article p,
.connect-article li {
  color: var(--ink);
  margin: 0 0 var(--space-3);
}

.connect-article ul,
.connect-article ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25rem;
}

.connect-article img {
  margin: var(--space-4) 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-200);
}

.connect-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0 var(--space-6);
  font-size: var(--type-small-size);
}

.connect-table th,
.connect-table td {
  border: 1px solid var(--line);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: top;
}

.connect-table th {
  background: var(--surface-200);
  font-weight: 600;
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .connect-lead {
    display: none !important;
  }
  .connect-article img {
    max-width: 100%;
    break-inside: avoid;
  }
}
