:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1a2332;
  --text-muted: #5c6778;
  --border: #e3e8ef;
  --accent: #1d6fd4;
  --accent-soft: #e8f1fc;
  --accent-dark: #1558a8;
  --warn: #f0b429;
  --shadow: 0 12px 40px rgba(26, 35, 50, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --container: min(1120px, calc(100% - 2rem));
  --font: "Onest", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 248, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.logo__dot {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
}

.header__phone {
  font-weight: 600;
  white-space: nowrap;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.burger[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.burger[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--telegram,
.btn--max,
.btn--call {
  gap: 0.45rem;
  background: transparent;
}

.btn--telegram {
  color: #2aabee;
  border-color: #2aabee;
}

.btn--telegram:hover {
  background: rgba(42, 171, 238, 0.1);
  border-color: #1e96d5;
  color: #1e96d5;
}

.btn--max {
  color: #7b5cff;
  border-color: #7b5cff;
}

.btn--max:hover {
  background: rgba(123, 92, 255, 0.1);
  border-color: #6848e8;
  color: #6848e8;
}

.btn--call {
  color: #4a5568;
  border-color: #4a5568;
}

.btn--call:hover {
  background: rgba(74, 85, 104, 0.1);
  border-color: #2d3748;
  color: #2d3748;
}

.btn__ico {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.btn__ico path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn__ico.ico-max path {
  stroke-width: 2;
}

.btn--block {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem 0.35rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.hero__lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 42ch;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.hero__stats li {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero__stats strong {
  display: block;
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.hero__photo-wrap {
  position: relative;
  width: min(100%, 420px);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 62% 12%;
}

.hero__card {
  position: absolute;
  max-width: 200px;
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  line-height: 1.45;
  z-index: 2;
  will-change: transform;
  animation: hero-float 5.5s ease-in-out infinite;
}

.hero__card p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.hero__card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.hero__card--license {
  left: -10px;
  bottom: 6%;
  animation-duration: 5.8s;
  animation-delay: 0s;
}

.hero__card--time {
  right: -36px;
  top: auto;
  bottom: 28%;
  animation-duration: 6.4s;
  animation-delay: -2.2s;
}

@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__card {
    animation: none;
  }
}

/* Trust strip */
.trust {
  padding: 0 0 1.25rem;
}

#services {
  padding-top: 2rem;
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.trust__item {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trust__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 1.125rem;
  color: var(--accent);
}

.trust__item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem;
}

.trust__item p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section__head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.section__head--left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.section__head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.section__head p {
  margin: 0;
  color: var(--text-muted);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.section:not(.section--alt) .service-card {
  background: var(--surface);
}

.service-card:hover {
  border-color: #c5d9f2;
  box-shadow: 0 8px 24px rgba(29, 111, 212, 0.06);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.service-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Pricing */
.pricing-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pricing-table-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.pricing-table th,
.pricing-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.pricing-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.pricing-table__price {
  font-weight: 700;
  white-space: nowrap;
  color: var(--text);
}

.pricing-note {
  margin: 0.75rem 0 0;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pricing-more {
  display: flex;
  justify-content: center;
  padding: 1.25rem 0.5rem 0.5rem;
}

.pricing-table-wrap--full {
  max-width: 800px;
  margin: 0 auto;
}

.section--price-page {
  padding-top: 2.5rem;
}

.price-page-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.price-page-head h1 {
  margin: 0.5rem 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.price-back {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-back:hover {
  color: var(--accent);
}

.price-page-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.price-page-cta p {
  margin: 0;
  margin-right: auto;
  font-weight: 600;
}

.pricing-cta {
  padding: 1.75rem;
  background: linear-gradient(145deg, #1d6fd4 0%, #1558a8 100%);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pricing-cta h3 {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
}

.pricing-cta ul {
  margin: 0 0 1.5rem;
  padding-left: 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.pricing-cta .btn--primary {
  background: #fff;
  color: var(--accent-dark);
}

.pricing-cta .btn--primary:hover {
  background: var(--accent-soft);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 35, 50, 0.45);
}

.modal__dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(26, 35, 50, 0.2);
  overflow: hidden;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal__header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.modal__close {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
}

.modal__close:hover {
  background: var(--bg);
  color: var(--text);
}

.modal__body {
  overflow: auto;
  padding: 0.5rem 0.75rem 1rem;
}

/* Portfolio */
.portfolio-carousel {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.portfolio-carousel__viewport {
  overflow: hidden;
  touch-action: pan-y;
  padding: 0.75rem 0;
}

.portfolio-carousel__track {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-carousel__slide {
  margin: 0;
  flex: 0 0 clamp(220px, 42vw, 340px);
  width: clamp(220px, 42vw, 340px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.06);
  transform: scale(0.82);
  opacity: 0.4;
  filter: saturate(0.85);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s, filter 0.45s, box-shadow 0.45s;
  cursor: pointer;
}

.portfolio-carousel__slide.is-active {
  transform: scale(1);
  opacity: 1;
  filter: none;
  box-shadow: var(--shadow);
  cursor: default;
  z-index: 1;
}

.portfolio-carousel__slide.is-side {
  opacity: 0.45;
}

.portfolio-carousel__slide img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.portfolio-carousel__slide figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  text-align: center;
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  overflow: hidden;
  transition: opacity 0.3s, max-height 0.3s, padding 0.3s;
}

.portfolio-carousel__slide.is-active figcaption {
  opacity: 1;
  max-height: 4rem;
  padding: 0.75rem 1rem;
  border-top-width: 1px;
}

.portfolio-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s, color 0.2s;
}

.portfolio-carousel__btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.portfolio-carousel__btn--prev {
  left: 0;
}

.portfolio-carousel__btn--next {
  right: 0;
}

.portfolio-carousel__dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.portfolio-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
}

.portfolio-carousel__dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Process */
.process-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.process-list li {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.process-list__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9375rem;
}

.process-list h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.process-list p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.review-card {
  margin: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.review-card p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.review-card footer {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Contact */
.section--contact {
  padding-bottom: 5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list li span {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form label span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 111, 212, 0.15);
}

.form-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.form-status {
  margin: 0;
  font-size: 0.875rem;
  text-align: center;
}

.form-status.is-ok {
  color: #1a7f37;
}

.form-status.is-error {
  color: #c62828;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-success {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.form-success h3 {
  margin: 0 0 0.5rem;
}

.form-success p {
  margin: 0;
  color: var(--text-muted);
}

.contact-form {
  position: relative;
}

.contact-messengers {
  display: none;
}

/* Footer */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__inner p {
  margin: 0;
}

/* Responsive */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
    justify-content: center;
  }

  .hero__card--license {
    left: 2%;
    bottom: 4%;
  }

  .hero__card--time {
    right: -8px;
    bottom: 26%;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .service-card {
    padding: 1rem;
  }

  .service-card h3 {
    font-size: 0.9375rem;
  }

  .service-card p {
    font-size: 0.8125rem;
  }

  .service-card__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
  }

  .trust__grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .pricing-layout,
  .contact-grid,
  .process-list {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 768px) {
  .contact-messengers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .contact-messengers .btn {
    flex: 1 1 calc(50% - 0.375rem);
    justify-content: center;
  }

  .header__phone {
    display: none;
  }

  .burger {
    display: flex;
    margin-left: auto;
  }

  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero__title {
    max-width: none;
  }

  .hero__card {
    max-width: 180px;
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  .portfolio-carousel {
    padding: 0 2rem;
  }

  .portfolio-carousel__slide {
    flex-basis: clamp(200px, 58vw, 280px);
    width: clamp(200px, 58vw, 280px);
  }
}
