/*
  Палитра: светлый premium blue — мягкая светлая база + синие акценты.
  globalcarexpert.ru — надёжность, забота, экспертность.
*/

:root {
  --bg-base: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.97);
  --surface-soft: #f1f4ff;
  --text-primary: #1f2740;
  --text-secondary: #5e6788;
  --accent: #4f6dff;
  --accent-2: #314fda;
  --accent-soft: #cdd7ff;
  --btn-text-light: #f8faff;
  --highlight: rgba(79, 109, 255, 0.15);
  --glow: rgba(79, 109, 255, 0.26);
  --border-gold: rgba(79, 109, 255, 0.35);
  --border-gold-strong: rgba(79, 109, 255, 0.55);
  --shadow-soft: rgba(49, 79, 218, 0.12);
  --shadow-mid: rgba(49, 79, 218, 0.17);
  --shadow-strong: rgba(49, 79, 218, 0.24);
  --overlay-dark-soft: rgba(31, 39, 64, 0.34);
  --overlay-dark-mid: rgba(31, 39, 64, 0.44);
  --button-grad-start: #5f7bff;
  --button-grad-end: #314fda;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background: 2–3 radial gradients for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--highlight) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 85% 90%, var(--highlight) 0%, transparent 45%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(79, 109, 255, 0.07) 0%, transparent 55%);
  animation: bgShift 12s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.02); }
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ——— Hero ——— */
.hero {
  padding: 80px 0 100px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 58% 1fr;
  gap: 48px;
  align-items: center;
}

.hero__photo-col {
  position: relative;
  width: 100%;
  justify-self: end;
}

.hero__photo-wrap {
  display: inline-block;
  width: auto;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: 0 10px 28px var(--shadow-soft), 0 0 28px var(--highlight), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.hero__photo-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  object-position: center;
  background: var(--surface-soft);
  display: block;
}

.hero__photo-col .cta {
  display: block;
  text-align: center;
  margin-top: 24px;
  text-decoration: none;
}

.play-btn__icon {
  width: 0;
  height: 0;
  border-left: 20px solid var(--text-primary);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 6px;
}

.play-btn--small .play-btn__icon {
  border-left-width: 14px;
  border-top-width: 9px;
  border-bottom-width: 9px;
  margin-left: 4px;
}

/* CTA buttons */
.cta {
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow);
}

.cta--primary {
  background: linear-gradient(135deg, var(--button-grad-start), var(--button-grad-end));
  color: var(--btn-text-light);
  border-color: var(--border-gold);
  box-shadow: 0 4px 20px var(--highlight);
}

.cta--shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.cta--shine:hover::after {
  left: 100%;
}

.cta--secondary {
  background: #ffffff;
  color: var(--accent-2);
  border: 1px solid var(--border-gold-strong);
  box-shadow: 0 6px 22px var(--shadow-soft);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px var(--highlight); }
  50% { box-shadow: 0 0 30px var(--glow); }
}

.cta--secondary:hover {
  background: var(--surface-soft);
  color: var(--accent-2);
}

/* Hero text column */
.hero__text-col {
  position: relative;
  max-width: 440px;
}

.hero__deco {
  position: absolute;
  width: 320px;
  height: 320px;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--highlight) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.6;
  animation: decoFloat 8s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes decoFloat {
  0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.5; }
  50% { transform: translateY(-50%) scale(1.1); opacity: 0.7; }
}

.hero__title {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero__title-gradient {
  background: linear-gradient(90deg, var(--accent), #2e4acc);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 4s ease infinite;
}

@keyframes gradientText {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero__benefits {
  list-style: none;
  margin-bottom: 28px;
}

.hero__benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.hero__benefits-link {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero__benefits-link:hover {
  color: var(--accent);
}

.hero__benefit-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.hero__actions .cta--secondary {
  display: inline-block;
  text-decoration: none;
}

/* Mobile Hero */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero__photo-col {
    max-width: 100%;
    order: 1;
  }

  .hero__text-col {
    order: 2;
    max-width: 100%;
  }

  .hero__deco {
    right: -40px;
    width: 200px;
    height: 200px;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .hero__actions .cta--secondary {
    margin: 0;
  }
}

/* ——— Section titles ——— */
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ——— Products carousel ——— */
.carousel-section {
  padding: 80px 0 100px;
}

.carousel {
  position: relative;
  padding: 0 56px;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 3;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.carousel__arrow:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 8px 22px var(--shadow-mid);
  background: rgba(255, 255, 255, 0.95);
}

.carousel__arrow--prev {
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23314fda' stroke-width='2'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
  background-size: 24px;
  background-position: center;
  background-repeat: no-repeat;
}

.carousel__arrow--next {
  right: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23314fda' stroke-width='2'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
  background-size: 24px;
  background-position: center;
  background-repeat: no-repeat;
}

.carousel__track-wrap {
  overflow: hidden;
}

.carousel__track {
  display: flex;
  gap: 24px;
  transition: transform var(--transition);
  padding: 20px 0;
}

.product-card {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid rgba(79, 109, 255, 0.25);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
  transition: transform var(--transition), box-shadow var(--transition);
  list-style: none;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px var(--shadow-soft), 0 0 24px var(--highlight);
}

.product-card--active {
  transform: scale(1.05);
  box-shadow: 0 16px 34px var(--shadow-mid), 0 0 30px var(--glow);
}

.product-card--active .product-card__img-wrap img {
  filter: brightness(1.1);
}

.product-card__img-wrap {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-secondary);
}

.product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter var(--transition);
}

.product-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.product-card__specs {
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 14px;
}

.product-card__specs li {
  margin-bottom: 6px;
}

.product-card__price {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(79, 109, 255, 0.16), rgba(49, 79, 218, 0.1));
  border: 1px solid rgba(79, 109, 255, 0.3);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.product-card__price::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: priceShine 3s ease-in-out infinite;
}

@keyframes priceShine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.product-card__price-value {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent-2);
}

.product-card__price-label {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.product-card__trust {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.cta:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.carousel-section__cta {
  text-align: center;
  margin-top: 48px;
}

.carousel-section__cta .cta {
  display: inline-block;
  text-decoration: none;
}

@media (max-width: 768px) {
  .carousel {
    padding: 0 44px;
  }

  .carousel__track {
    padding: 16px 0;
  }

  .product-card {
    flex: 0 0 280px;
    min-width: 280px;
  }
}

/* ——— Video reviews grid ——— */
.video-reviews {
  padding: 80px 0 100px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.video-grid__item {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.video-grid__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--surface-soft), #ffffff);
  border: 1px solid var(--border-gold);
  overflow: hidden;
}

.video-grid__thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-reviews__player {
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.video-reviews__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: opacity var(--transition);
}

.video-grid__thumb--playing .video-reviews__play {
  opacity: 0;
  pointer-events: none;
}

.video-reviews__play-inner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: linear-gradient(135deg, var(--button-grad-start), var(--button-grad-end));
  box-shadow: 0 4px 20px var(--highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.video-reviews__play:hover .video-reviews__play-inner {
  transform: scale(1.06);
  box-shadow: 0 8px 24px var(--glow);
}

.video-reviews__play-inner::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 13px solid var(--btn-text-light);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}

.video-reviews__play:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.video-reviews__cta {
  text-align: center;
}

.video-reviews__cta .cta {
  display: inline-block;
  text-decoration: none;
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

/* ——— Modal ——— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-dark-mid);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: 0 18px 50px var(--shadow-strong);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-gold);
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition);
}

.modal__close:hover {
  background: #ffffff;
}

.modal__close::before,
.modal__close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal__video-wrap {
  aspect-ratio: 9 / 16;
  background: #000;
}

.modal__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ——— Footer ——— */
.footer {
  border-top: 1px solid var(--border-gold);
  background: var(--bg-secondary);
  padding: 24px 0;
}

.footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer__legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.footer__name {
  font-weight: 600;
  color: var(--text-primary);
}

.footer__director {
  color: var(--text-primary);
}
