/* ============================================================
   landing.css — стили лендинга
   Дизайн-система описана в CLAUDE.md.
   Mobile-first, без зависимостей.
   ============================================================ */

/* === Tokens === */
:root {
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F7FA;
  --color-text: #1A1A2E;
  --color-text-secondary: #6B7280;
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-positive: #059669;
  --color-negative: #DC2626;
  --color-hero-overlay: rgba(0, 0, 0, 0.5);
  --color-hero-fallback: #1E293B;
  --color-border: #E5E7EB;

  --radius-card: 8px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);

  --container-max: 1120px;
  --gutter: 20px;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: var(--color-primary);
}

/* === Container === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* === Section spacing === */
.section {
  padding: 56px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__title {
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 28px;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 768px) {
  .section {
    padding: 80px 0;
  }
  .section__title {
    font-size: 34px;
    margin-bottom: 40px;
  }
}

/* === CTA button === */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  border-radius: var(--radius-card);
  border: 0;
  text-align: center;
  transition: background-color 150ms ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--color-primary-hover);
}

.cta:focus-visible {
  outline: 3px solid #93C5FD;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .cta {
    width: auto;
    min-width: 280px;
  }
}

/* === Block 1: Hero === */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background-color: var(--color-hero-fallback);
  background-image: linear-gradient(var(--color-hero-overlay), var(--color-hero-overlay));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 80px 0 64px;
}

/* Когда подключим фото — раскомментировать
.hero--with-photo {
  background-image:
    linear-gradient(var(--color-hero-overlay), var(--color-hero-overlay)),
    url("/images/hero.webp");
}
*/

.hero__inner {
  max-width: 720px;
}

.hero__title {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  font-size: 17px;
  line-height: 1.45;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.9);
}

.hero__cta {
  margin-bottom: 16px;
}

.hero__meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

@media (min-width: 768px) {
  .hero {
    min-height: 640px;
    padding: 120px 0;
  }
  .hero__title {
    font-size: 48px;
  }
  .hero__subtitle {
    font-size: 19px;
  }
}

/* === Block 2: How it works === */
.steps {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.step {
  text-align: center;
  padding: 28px 20px;
  background: var(--color-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.step__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.step__title {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 600;
}

.step__text {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 15px;
}

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

/* === Block 3: Why convenient === */
.compare {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.compare__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
}

.compare__cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.4;
}

.compare__mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin-top: 1px;
}

.compare__cell--neg .compare__mark {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-negative);
}

.compare__cell--pos .compare__mark {
  background: rgba(5, 150, 105, 0.1);
  color: var(--color-positive);
}

.compare__cell--neg {
  color: var(--color-text-secondary);
  text-decoration: line-through;
  text-decoration-color: var(--color-border);
}

@media (min-width: 768px) {
  .compare__row {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 18px 24px;
  }
}

/* === Block 4: Proposals === */
.proposals {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 80%;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px 24px;
  margin: 0 -20px;
  scrollbar-width: none;
}

.proposals::-webkit-scrollbar {
  display: none;
}

.proposal {
  scroll-snap-align: start;
  background: var(--color-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.proposal__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(
      45deg,
      #E5E7EB 0,
      #E5E7EB 12px,
      #EEF0F3 12px,
      #EEF0F3 24px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.proposal__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proposal__name {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0;
  font-weight: 500;
}

.proposal__price {
  font-size: 22px;
  margin: 0;
  font-weight: 700;
}

.proposal__meta {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--color-text-secondary);
  display: grid;
  gap: 4px;
}

.proposal__meta li::before {
  content: "·";
  margin-right: 6px;
  color: var(--color-border);
}

@media (min-width: 768px) {
  .proposals {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    padding: 0;
    margin: 0;
  }
}

/* === Block 5: FAQ === */
.faq {
  max-width: 720px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq__summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 36px 20px 0;
  position: relative;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  color: var(--color-text);
}

.faq__summary::-webkit-details-marker {
  display: none;
}

.faq__summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  transform: translateY(-75%) rotate(45deg);
  transition: transform 200ms ease;
}

.faq__item[open] .faq__summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.faq__answer {
  padding: 0 0 20px;
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}

.faq__answer p {
  margin: 0 0 8px;
}

.faq__answer p:last-child {
  margin-bottom: 0;
}

/* === Block 6: Final CTA === */
.final {
  text-align: center;
  background: var(--color-bg-alt);
}

.final__title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.25;
}

.final__subtitle {
  margin: 0 0 28px;
  color: var(--color-text-secondary);
  font-size: 16px;
}

.final__cta-wrap {
  display: flex;
  justify-content: center;
}

.final__meta {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .final__title {
    font-size: 34px;
  }
}

/* === Sticky CTA (mobile only) === */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
  transform: translateY(120%);
  transition: transform 220ms ease;
  z-index: 100;
}

.sticky-cta.is-visible {
  transform: translateY(0);
}

.sticky-cta .cta {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

@media (min-width: 1024px) {
  .sticky-cta {
    display: none;
  }
}

/* === Footer === */
.footer {
  padding: 32px 0 40px;
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  /* нижний паддинг под sticky-cta на мобильном */
  padding-bottom: calc(32px + 88px);
}

@media (min-width: 1024px) {
  .footer {
    padding-bottom: 40px;
  }
}

.footer__row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 768px) {
  .footer__row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
