:root {
  --color-primary: #0d9488;
  --color-primary-dark: #0f766e;
  --color-primary-light: #14b8a6;
  --color-accent: #f59e0b;
  --color-accent-soft: #fef3c7;
  --color-bg: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --header-h: 72px;
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
}

.logo__icon {
  color: var(--color-primary);
  display: flex;
}

.logo__accent {
  color: var(--color-primary);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--color-primary);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hero */
.hero {
  position: relative;
  padding: 48px 0 64px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(13, 148, 136, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #fff 0%, var(--color-bg) 100%);
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--color-success-bg);
  color: var(--color-primary-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 480px;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.calculator {
  padding: 28px;
}

.calculator__row {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 20px;
}

.calculator__field {
  flex: 1;
}

.calculator__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.calculator__label strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.calculator__range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 100px;
  background: var(--color-bg-alt);
  outline: none;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.4);
  transition: transform var(--transition);
}

.range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.4);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  user-select: none;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox__box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}

.checkbox input:checked + .checkbox__box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox input:checked + .checkbox__box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.calculator__disclaimer {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Stats */
.stats {
  padding: 0 0 48px;
  margin-top: -24px;
  position: relative;
  z-index: 2;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat__value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat__label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Offers */
.offers {
  padding: 48px 0 64px;
}

.offers__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title--center {
  text-align: center;
  margin-bottom: 32px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--color-bg-alt);
  padding: 4px;
  border-radius: var(--radius-md);
}

.filter-btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--color-text);
}

.filter-btn--active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.offers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.offers__empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.noscript-offers {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.noscript-offers li {
  padding: 12px 16px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.noscript-offers strong {
  color: var(--color-text);
}

/* MFO Card */
.mfo-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: fadeIn 0.4s ease backwards;
}

.mfo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mfo-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mfo-card__logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  color: #fff;
  flex-shrink: 0;
}

.mfo-card__info {
  flex: 1;
  min-width: 0;
}

.mfo-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mfo-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.mfo-card__rating-value {
  font-weight: 700;
  color: var(--color-text);
}

.mfo-card__stars {
  color: var(--color-accent);
  letter-spacing: -1px;
}

.mfo-card__params {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.mfo-card__param-label {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.mfo-card__param-value {
  font-size: 0.9375rem;
  font-weight: 600;
}

.mfo-card__param-value--highlight {
  color: var(--color-success);
}

.mfo-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.tag--accent {
  background: var(--color-accent-soft);
  color: #b45309;
}

.tag--green {
  background: var(--color-success-bg);
  color: var(--color-primary-dark);
}

.mfo-card__btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-align: center;
  transition: opacity var(--transition), transform var(--transition);
  margin-top: auto;
}

.mfo-card__btn:hover {
  opacity: 0.92;
  transform: scale(1.01);
}

/* How */
.how {
  padding: 64px 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.how__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.how__text p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.how__text p:last-child {
  margin-bottom: 0;
}

.how__steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.step__num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.9375rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.step p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* FAQ */
.faq {
  padding: 64px 0;
}

.faq__list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq__item summary {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform var(--transition);
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item summary:hover {
  background: var(--color-bg);
}

.faq__item p {
  padding: 0 24px 20px;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* Footer */
.footer {
  padding: 48px 0 32px;
  background: var(--color-text);
  color: #94a3b8;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.logo--footer {
  color: #fff;
  margin-bottom: 12px;
}

.logo--footer .logo__accent {
  color: var(--color-primary-light);
}

.footer__desc {
  font-size: 0.875rem;
  max-width: 320px;
  line-height: 1.5;
}

.footer__legal {
  font-size: 0.8125rem;
  text-align: right;
}

.footer__warning {
  margin-top: 8px;
  color: #64748b;
}

/* Mobile nav */
.nav--open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--color-surface);
  padding: 20px;
  gap: 16px;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .how__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .stats__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .offers__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .offers__grid {
    grid-template-columns: 1fr;
  }

  .mfo-card__params {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer__legal {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 32px 0 48px;
  }

  .calculator {
    padding: 20px;
  }

  .stat__value {
    font-size: 1.5rem;
  }
}
