/* ================================================================
   css/pages/home.css — стили главной страницы
   ================================================================ */


/* ── Hero ── */

.hero {
  background: var(--c-bg-dark);
  color: var(--c-text-inv);
  padding: 24px;
  min-height: calc(100vh - var(--header-h));
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--w-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-inv-muted);
  margin-bottom: var(--sp-3);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-3xl), 4.5vw, var(--text-5xl));
  font-weight: var(--w-bold);
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: var(--sp-3);
}

.hero__sub {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--lh-relaxed);
  max-width: 420px;
  margin-bottom: var(--sp-2);
}

.hero__stats {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero__rating {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  margin-bottom: var(--sp-6);
  transition: color var(--ease);
}

.hero__rating:hover {
  color: #ffffff;
  text-decoration: none;
}

.hero__stars {
  color: #FFB800;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  background: #ffffff;
  color: #0a0a0a;
  font-size: 16px;
  font-weight: var(--w-semibold);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  margin-bottom: var(--sp-4);
}

.hero__cta:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: #0a0a0a;
}

.hero__messenger-label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: var(--sp-2);
}

.hero__social-btns {
  display: flex;
  gap: var(--sp-1);
  margin-bottom: 0;
}

.hero__social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  border: none;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
}

.hero__social-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  filter: brightness(1.1);
}

.hero__social-icon {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.hero__social-label {
  display: none;
}

.hero__media {
  position: relative;
}

/* Top/bottom vignette — overlays the photo with the hero bg colour */
.hero__media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      var(--c-bg-dark) 0%,
      transparent 13%,
      transparent 87%,
      var(--c-bg-dark) 100%);
}

.hero__media-inner {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  /* Left-edge fade: photo dissolves into the dark hero background */
  mask-image: linear-gradient(to right, transparent 0%, black 18%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18%, black 92%, transparent 100%);
}

.hero__media-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right,    rgba(0,0,0,0.5) 0%, transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(0,0,0,0.5) 0%, transparent 40%),
    rgba(0, 0, 0, 0.30);
  pointer-events: none;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  filter: contrast(1.05) saturate(0.95);
}

/* Mobile: соцкнопки — в столбец на всю ширину */
@media (max-width: 767px) {
  .hero__social-btns {
    flex-direction: column;
    gap: 10px;
  }
  .hero__social-btn {
    width: 100%;
    height: 48px;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 var(--sp-2);
    border-radius: var(--r-md);
  }
  .hero__social-label {
    display: inline;
    font-size: var(--text-sm);
    font-weight: var(--w-semibold);
    color: #fff;
  }
}

/* Mobile: фото становится фоном, текст поверх с оверлеем */
@media (max-width: 767px) {
  .hero {
    display: flex;
    flex-direction: column;
    padding: 0;
    min-height: 88svh;
    min-height: 88vh;
    position: relative;
    background-image: url('/me/optimized/master-at-work-800w.jpg');
    background-image: image-set(
      url('/me/optimized/master-at-work-800w.webp') type('image/webp'),
      url('/me/optimized/master-at-work-800w.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center 35%;
  }

  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 55%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
  }

  .hero__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
  }

  .hero__content {
    flex: 1;
    justify-content: flex-start;
    padding: var(--sp-6) var(--container-px);
  }

  .hero__stats {
    margin-top: var(--sp-2);
  }

  .hero__cta {
    margin-top: auto;
    max-width: 280px;
    width: 100%;
  }

  .hero__social-btns {
    margin-bottom: 0;
  }

  .hero__media {
    display: none;
  }

  .hero__title {
    font-size: clamp(var(--text-2xl), 8vw, var(--text-3xl));
  }

  .hero__sub {
    max-width: 100%;
  }
}


/* ── Мини-галерея ── */

.home-gallery {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, 1fr);
}

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

.home-gallery .gallery-item {
  aspect-ratio: 1;
  border-radius: 0;
}

.home-gallery .gallery-item img {
  height: 100%;
}

.gallery-section__cta {
  margin-top: var(--sp-6);
  text-align: center;
}


/* ── Услуги ── */

.services-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
}

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

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



/* ── Обо мне кратко ── */

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

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 5fr 7fr;
  }
}

.about__img-wrap {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.about__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.about__text h2 {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
  font-weight: var(--w-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-4);
}

.about__text p {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-3);
}

.about__text p:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .about-grid {
    grid-template-areas:
      "header"
      "photo"
      "body";
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .about__img-wrap { grid-area: photo; }

  .about__text {
    display: contents;
  }

  .about__header { grid-area: header; }

  .about__body { grid-area: body; }

  .about__header .section__eyebrow {
    display: block;
    margin-bottom: var(--sp-2);
  }

  .about__text h2 {
    margin-bottom: 0;
  }
}

.about__cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}


/* ── Отзывы ── */

.reviews-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
}

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

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

.reviews-cta {
  margin-top: var(--sp-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.reviews-cta__more {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color var(--ease);
}

.reviews-cta__more:hover {
  color: var(--c-text);
}


/* ── Карусель переписок ── */

.chat-carousel-wrap {
  position: relative;
}

.chat-carousel {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--sp-2);
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
}

.chat-carousel::-webkit-scrollbar {
  height: 4px;
}

.chat-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.chat-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}

.chat-card {
  scroll-snap-align: start;
  flex-shrink: 0;
  /* Height is explicit; width resolves from the image's natural proportions */
  height: 400px;
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
  background: var(--c-bg-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
}

/* Fix the CSS percentage-height chain:
   img { height: 100% } resolves to `auto` when its parent <picture> has
   height: auto — because the spec treats auto parents as unspecified.
   Making <picture> height: 100% propagates the card's 400px down, so the
   img correctly fills the card and the card's width becomes the img's
   natural proportional width. */
.chat-card picture {
  display: block;
  height: 100%;
  width: auto;
  max-width: none; /* override base.css max-width: 100% */
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .chat-card { height: 320px; }
}

.chat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}

.chat-card__img {
  height: 100%;
  width: auto;
  display: block;
  /* object-fit: contain is implicit here — with height:100% and width:auto
     the image scales to fill the card height at its natural aspect ratio */
  background: var(--c-bg-dark);
}

.chat-carousel__fade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: var(--sp-2);
  width: 80px;
  background: linear-gradient(to right, transparent, var(--c-bg-dark));
  pointer-events: none;
}


/* ── Контакты ── */

.contacts-grid {
  display: grid;
  gap: var(--sp-8);
}

@media (min-width: 768px) {
  .contacts-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-12);
  }
}

.contacts__address {
  font-style: normal;
}

.contacts__address-label {
  font-size: var(--text-xs);
  font-weight: var(--w-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-inv-muted);
  margin-bottom: var(--sp-2);
}

.contacts__address p {
  font-size: var(--text-base);
  color: var(--c-text-inv-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-1);
}

.contacts__address strong {
  color: var(--c-text-inv);
  font-weight: var(--w-semibold);
}

.contacts__channels-label {
  font-size: var(--text-xs);
  font-weight: var(--w-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-inv-muted);
  margin-bottom: var(--sp-2);
}

.contacts-channels {
  display: flex;
  flex-direction: column;
}


/* ── Калькулятор стоимости ── */

/* Компактный padding секции + header margin для одного экрана */
@media (min-width: 768px) {
  #calculator { padding-block: 48px; }
  #calculator .section__header { margin-bottom: var(--sp-4); }
}

.calc__subtitle {
  margin-top: var(--sp-2);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.6);
  line-height: var(--lh-relaxed);
  max-width: 560px;
  margin-inline: auto;
}

/* Block */
.calc__block {
  margin-top: 16px;
}

.calc__block-label {
  font-size: var(--text-xs);
  font-weight: var(--w-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

/* Cards grid — единая система */
.calc__cards {
  display: grid;
  gap: 10px;
}

.calc__cards--4        { grid-template-columns: repeat(4, 1fr); }
.calc__cards--location { grid-template-columns: 1fr; gap: 10px; }
.calc__cards--color    { grid-template-columns: repeat(2, 1fr); }
.calc__cards--detail   { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 767px) {
  .calc__cards--4      { grid-template-columns: repeat(2, 1fr); }
  .calc__cards--color  { grid-template-columns: repeat(2, 1fr); }
  .calc__cards--detail { grid-template-columns: repeat(3, 1fr); }
  .calc__row           { display: block; }
  .calc__row .calc__block { margin-top: 16px; }
}

@media (max-width: 479px) {
  .calc__cards--detail { grid-template-columns: 1fr; }
}

/* Card */
.calc__card {
  position: relative;
  cursor: pointer;
  display: block;
}

.calc__card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.calc__card-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  min-height: 65px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
  height: 100%;
  user-select: none;
}

.calc__card:hover .calc__card-inner {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.calc__card input:checked + .calc__card-inner {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 2px 16px rgba(255, 255, 255, 0.18);
}

.calc__card input:focus-visible + .calc__card-inner {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

.calc__card-title {
  font-size: 15px;
  font-weight: var(--w-semibold);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
}

.calc__card input:checked + .calc__card-inner .calc__card-title {
  color: #0a0a0a;
}

.calc__card-desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: var(--w-regular);
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.35;
}

.calc__card input:checked + .calc__card-inner .calc__card-desc {
  color: rgba(0, 0, 0, 0.5);
}

/* Result wrap */
.calc__result-wrap {
  margin-top: 20px;
}

/* Result block */
.calc__result {
  padding: 20px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.calc__result-label {
  font-size: var(--text-xs);
  font-weight: var(--w-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: var(--sp-2);
}

.calc__result-price {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: var(--w-bold);
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

@media (max-width: 767px) {
  .calc__result-price { font-size: clamp(2rem, 7vw, 2.5rem); }
}

@media (max-width: 479px) {
  .calc__result-price { font-size: 1.75rem; }
}

.calc__result-line {
  white-space: nowrap;
  display: inline-block;
}

.calc__result-note {
  margin-top: var(--sp-3);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  line-height: var(--lh-relaxed);
  max-width: 480px;
  margin-inline: auto;
}

.calc__result-msg {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.65);
  line-height: var(--lh-relaxed);
  max-width: 480px;
  margin-inline: auto;
}

.calc__result-prompt {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
  width: 100%;
}

/* Footer (CTA button) */
.calc__footer {
  margin-top: var(--sp-5);
  display: flex;
  justify-content: center;
}

.calc__vk-btn {
  width: 400px;
  max-width: 100%;
  padding: 20px 40px;
  font-size: var(--text-base);
  border-radius: var(--r-md);
}

@media (max-width: 639px) {
  .calc__vk-btn {
    width: 100%;
  }
}

/* ── Desktop hybrid calc ─────────────────────────────────── */

/* Mobile-first hidden elements */
.calc__slider-desktop { display: none; }
.calc__slider-cur     { display: none; }

@media (min-width: 768px) {

  /* ── Row layout (60/40 split) ── */
  .calc__row {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 28px;
    align-items: start;
    margin-top: 20px;
  }
  .calc__row .calc__block { margin-top: 0; }

  /* Block header: label left, current-value right */
  .calc__block-hd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }
  .calc__block-hd .calc__block-label { margin-bottom: 0; }
  .calc__slider-cur {
    display: inline;
    font-size: 13px;
    font-weight: var(--w-medium);
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
  }

  /* ── Row 1: Style — pill row ── */
  [aria-labelledby="lbl-style"] {
    display: flex;
    gap: 10px;
  }
  [aria-labelledby="lbl-style"] .calc__card { flex: 1; position: relative; }
  [aria-labelledby="lbl-style"] .calc__card-inner {
    border-radius: 100px;
    min-height: 44px;
    padding: 10px 16px;
    justify-content: center;
    text-align: center;
  }
  [aria-labelledby="lbl-style"] .calc__card-desc { display: none; }
  [aria-labelledby="lbl-style"] .calc__card:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #2a2a2a;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    line-height: 1.4;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.08);
  }

  /* ── Location: standalone full-width, 3 columns ── */
  .calc__cards--location { grid-template-columns: repeat(3, 1fr); }
  [aria-labelledby="lbl-location"] .calc__card-inner {
    min-height: 58px;
    border-radius: 10px;
  }

  /* ── Row 2 right: Detail slider (hide cards) ── */
  [aria-labelledby="lbl-detail"] { display: none; }
  #detail-slider-wrap { display: block; }

  /* ── Row 3 left: Size slider (hide cards) ── */
  [aria-labelledby="lbl-size"] { display: none; }
  #size-slider-wrap { display: block; }

  /* ── Row 3 right: Color — segmented toggle ── */
  [aria-labelledby="lbl-color"] {
    display: flex;
    gap: 0;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    overflow: hidden;
  }
  [aria-labelledby="lbl-color"] .calc__card { flex: 1; }
  [aria-labelledby="lbl-color"] .calc__card-inner {
    border-radius: 0;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.10);
    min-height: 48px;
    justify-content: center;
    text-align: center;
  }
  [aria-labelledby="lbl-color"] .calc__card:last-child .calc__card-inner { border-right: none; }
  [aria-labelledby="lbl-color"] .calc__card input:checked + .calc__card-inner { box-shadow: none; }

  /* ── Range slider (compact) ── */
  .calc__range-wrap { padding: 4px 0; }
  .calc__range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(
      to right,
      rgba(255,255,255,0.9) var(--range-fill, 0%),
      rgba(255,255,255,0.15) var(--range-fill, 0%)
    );
    outline: none;
    cursor: pointer;
  }
  .calc__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
    cursor: pointer;
    transition: box-shadow var(--ease);
  }
  .calc__range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
    cursor: pointer;
    transition: box-shadow var(--ease);
  }
  .calc__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(255,255,255,0.28); }
  .calc__range:focus-visible::-moz-range-thumb     { box-shadow: 0 0 0 5px rgba(255,255,255,0.28); }

  /* Tick labels */
  .calc__range-ticks { display: grid; margin-top: 6px; }
  .calc__range-ticks--4 { grid-template-columns: repeat(4, 1fr); }
  .calc__range-ticks--3 { grid-template-columns: repeat(3, 1fr); }
  .calc__range-ticks span {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    text-align: center;
  }
  .calc__range-ticks span:first-child { text-align: left; }
  .calc__range-ticks span:last-child  { text-align: right; }

  /* ── Result box — fixed size, centred ── */
  .calc__result-wrap {
    max-width: 720px;
    margin-inline: auto;
    margin-top: 20px;
  }
  .calc__result {
    min-height: 130px;
    padding: 24px 32px;
    align-items: center;
  }
  .calc__result-label { margin-bottom: 6px; }
  .calc__result-price {
    font-size: 30px;
    line-height: 1.1;
  }
  .calc__result-price br { display: none; }
  .calc__result-note { margin-top: 6px; }
  .calc__result-msg  { font-size: 16px; line-height: 1.5; }

  /* Result animation */
  @keyframes calc-result-pop {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .calc__result--anim { animation: calc-result-pop 0.2s ease both; }
}

/* Toast */
.calc__toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-md);
  padding: 14px 24px;
  font-size: var(--text-sm);
  font-weight: var(--w-medium);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.calc__toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 479px) {
  .calc__toast {
    left: 16px;
    right: 16px;
    bottom: 20px;
    transform: translateY(16px);
    white-space: normal;
  }
  .calc__toast.is-visible {
    transform: translateY(0);
  }
}


/* ── Модальное окно: инструкция по буферу обмена ── */

.calc__modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 24px;
  backdrop-filter: blur(6px);
}

.calc__modal-overlay[hidden] {
  display: none;
}

.calc__modal {
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 44px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.calc__modal-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #22c55e;
  line-height: 1;
}

.calc__modal-title {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: var(--w-bold);
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.25;
}

.calc__modal-text {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  line-height: var(--lh-relaxed);
  margin-bottom: 6px;
}

.calc__modal-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.calc__modal-list li {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--r-md);
  line-height: var(--lh-relaxed);
}

.calc__modal-list strong {
  color: #ffffff;
}

.calc__modal-btn {
  display: block;
  width: 100%;
  background: #0077FF;
  color: #ffffff;
  border: none;
  padding: 16px 32px;
  font-size: var(--text-base);
  font-weight: var(--w-semibold);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--ease);
  font-family: var(--font-base);
}

.calc__modal-btn:hover {
  background: #0060dd;
}

@media (max-width: 479px) {
  .calc__modal {
    padding: 32px 20px;
  }
}


/* ── Safety block ── */
.safety-lead {
  font-size: var(--text-lg);
  line-height: var(--lh-relaxed);
  color: var(--c-text-muted);
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--sp-8);
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.safety-card {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
}

.safety-card__icon {
  font-size: 2rem;
  margin-bottom: var(--sp-2);
  display: block;
}

.safety-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--w-bold);
  color: var(--c-text);
  margin-bottom: var(--sp-2);
  line-height: var(--lh-snug);
}

.safety-card__text {
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--c-text-muted);
}

/* ── Certificate block ── */
.cert-lead {
  font-size: var(--text-lg);
  line-height: var(--lh-relaxed);
  color: var(--c-text-inv-muted);
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--sp-8);
}

.cert-cards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
  margin-bottom: var(--sp-6);
}

.cert-card {
  border: 2px solid var(--c-border-dark);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-4);
  min-width: 140px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  background: var(--c-bg-dark-2);
}

.cert-card--any {
  border-color: rgba(255,255,255,0.4);
  background: var(--c-bg-dark-3);
}

.cert-card__amount {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--w-bold);
  color: var(--c-text-inv);
  line-height: 1;
}

.cert-card__label {
  font-size: var(--text-xs);
  color: var(--c-text-inv-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cert-actions {
  text-align: center;
}

.cert-btn {
  cursor: pointer;
}

@media (max-width: 767px) {
  .cert-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: var(--sp-2);
  }
  .cert-card {
    min-width: 0;
    padding: var(--sp-3);
    justify-content: center;
    align-items: center;
  }
  .cert-card__amount {
    font-size: clamp(1rem, 4.5vw, var(--text-xl));
    white-space: nowrap;
  }
}

/* ── About subheading ── */
.about__sub {
  font-size: var(--text-base);
  color: var(--c-text-muted);
  margin-top: var(--sp-1);
  margin-bottom: var(--sp-4);
}
