/* ===== Базовые сбросы и переменные ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  --bg: #e9edf5;
  --brand: #29296b;
  --text: #121212;
  --muted: #8a8a8a;
  --white: #fff;

  --radius-xl: 28px;
  --radius: 24px;

  --pad-inline: clamp(16px, 4vw, 48px);
  --gap: clamp(16px, 2.5vw, 32px);
  --speed: .25s;
}

html, body {
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ===== Плашки с кнопкой "Назад" ===== */
.wrapper {
  background: var(--white);
  border-radius: 25px;
  margin: 30px 40px;
  padding: 21px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.back-link {
  position: relative;
  text-decoration: none;
  font-weight: 380;
  font-size: 20px;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--speed);
}
.back-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -21px;
  width: 30px; height: 4px;
  background: var(--brand);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform var(--speed);
  border-radius: 10px;
}
.back-link:hover { color: var(--brand); }
.back-link:hover::after { transform: translateX(-50%) scaleX(1); }
.back-link:focus-visible {
  outline: 2px solid #a7b4ff;
  outline-offset: 2px;
}

/* ===== Заголовок и описание ===== */
.title-section { padding: 60px 20px 30px; }
.main-title {
  text-align: center;
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 900;
  color: var(--brand);
  margin: 0 0 10px;
  text-transform: uppercase;
}
.main-subtitle {
  text-align: center;
  font-weight: 380;
  font-size: 25px;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ===== Герой-изображение ===== */
.hero {
  width: 100%;
  max-width: 900px;
  margin: 20px auto 12px;
  padding: 0 var(--pad-inline);
  text-align: center;
}
.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.08));
  -webkit-user-drag: none;
  transition: opacity var(--speed) ease;
}
.hero.is-loading .hero-img{ opacity: 0; }

/* ===== ПЕРЕКЛЮЧАТЕЛЬ ЦВЕТОВ — как на главной (index.css) ===== */
/* палитра */
.color-swatches{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:18px 0 24px;
}
/* кружок */
.swatch{
  --size:28px;
  --sw:#ddd;                  /* цвет кружка — переопределяется inline: style="--sw:..." */
  appearance:none;
  width:var(--size);
  height:var(--size);
  border-radius:50%;
  background:var(--sw);
  border:2px solid #fff;      /* белое внутреннее кольцо */
  box-shadow:0 0 0 2px rgba(0,0,0,.08); /* тонкая внешняя обводка */
  cursor:pointer;
  transition:transform .15s ease, box-shadow .2s ease;
}
.swatch:hover{
  transform:scale(1.06);
  box-shadow:0 0 0 3px rgba(0,0,0,.12);
}
/* активный — тёмно-синее кольцо, как в карточке Silicone Case */
.swatch[aria-pressed="true"]{
  box-shadow:0 0 0 3px #29296b;
}

/* ===== Full-bleed секции ===== */
.section-wide {
  width: 100%;
  padding-left: var(--pad-inline);
  padding-right: var(--pad-inline);
}

/* ===== ХАРАКТЕРИСТИКИ ===== */
.features {
  padding-top: clamp(28px, 6vh, 64px);
  padding-bottom: clamp(16px, 4vh, 40px);
}

/* Заголовок секции — отступ 120px до карточек */
.features__title {
  font-weight: 900;
  font-size: clamp(28px, 5vw, 64px);
  color: var(--brand);
  letter-spacing: .5px;
  text-align: center;
  margin-bottom: 120px;
}

/* Сетка: 2×700 по центру */
.features__grid{
  display: grid;
  grid-template-columns: repeat(2, 700px);
  column-gap: 90px;
  row-gap: 120px;
  justify-content: center;
  align-items: start;
}

.feature{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Фото-карточка 700×700 — без теней и ховера */
.feature__img{
  width: 700px;
  height: 700px;
  background: #f4f6fb;
  background-size: cover;
  background-position: center;
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: none;
  transition: none;
}
.feature__img:hover{ transform: none; }
.feature__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Плашка текста 700×200 */
.feature__card{
  width: 700px;
  height: 200px;
  background: var(--white);
  border: 1px solid rgba(41,41,107,0.08);
  border-radius: var(--radius-xl);
  padding: 22px 55px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  overflow: hidden;
  box-shadow: none;
}
.feature__heading{
  color: var(--brand);
  font-weight: 900;
  font-size: 27px;
  line-height: 1.2;
  margin: 0 0 25px 0;
  letter-spacing: .2px;
  text-align: left;
}
.feature__text{
  color: var(--text);
  font-weight: 380;
  font-size: 20px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin: 0;
  text-align: left;
}

/* ===== Галерея (на будущее) ===== */
.gallery {
  padding-top: clamp(24px, 5vh, 60px);
  padding-bottom: clamp(24px, 6vh, 80px);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.gallery-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(41,41,107,0.08);
  box-shadow: none;
  transition: none;
}
.gallery-card:hover { transform: none; }
.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ===== Адаптив ===== */
@media (max-width: 1500px){
  .features__grid{ column-gap: 72px; }
}
@media (max-width: 1200px){
  .features__grid{ column-gap: 48px; }
}
@media (max-width: 980px) {
  .features__title{ margin-bottom: 48px; }
  .features__grid{
    grid-template-columns: 1fr;
    justify-content: center;
    row-gap: 40px;
  }
  .feature__img,
  .feature__card{
    width: min(700px, 92vw);
  }
  .feature__img{
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 520px) {
  .title-section { padding: 70px 16px 24px; }
  .section-wide { padding-left: 16px; padding-right: 16px; }
}

/* Планшеты и узкие ноутбуки */
@media (max-width: 900px){
  .features{ padding-top: 32px; padding-bottom: 32px; }

  .features__title{
    font-size: 28px;
    margin-bottom: 40px;
  }

  .features__grid{
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 28px;
    justify-items: center;
  }

  .feature{ gap: 12px; }

  .feature__img{
    width: min(92vw, 420px);
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 25px;
  }

  .feature__card{
    width: min(92vw, 420px);
    height: auto;
    min-height: 140px;
    padding: 16px 18px;
    border-radius: 25px;
  }

  .feature__heading{ font-size: 20px; }
  .feature__text{ font-size: 16px; line-height: 1.5; }
}

/* Смартфоны */
@media (max-width: 480px){
  .features__title{
    font-size: 24px;
    margin-bottom: 28px;
  }

  .feature__img{
    width: 92vw;
    border-radius: 16px;
  }

  .feature__card{
    width: 92vw;
    padding: 14px 16px;
    border-radius: 25px;
    min-height: 120px;
  }

  .feature__heading{ font-size: 18px; }
  .feature__text{ font-size: 15px; }

  .wrapper{
    margin: 16px;
    padding: 14px;
  }

  /* размер кружков как на главной */
  .swatch{ --size:24px; }
}

/* Заголовок модели — адаптив */
@media (max-width: 900px){
  .title-section{ padding: 40px 16px 24px; }
  .main-title{ font-size: 38px; line-height: 1.1; }
  .main-subtitle{ font-size: 16px; }
}
@media (max-width: 480px){
  .title-section{ padding: 32px 14px 20px; }
  .main-title{ font-size: 45px; line-height: 1.1; letter-spacing: .5px; }
  .main-subtitle{ font-size: 18px; max-width: 92vw; }
}

/* предпочтение минимальной анимации */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
