/*
  ==========================================================
  STYLES.CSS
  Минималистичный строгий стиль для одностраничного сайта
  на тему красного Jaguar XE.
  ==========================================================

  ОСНОВНЫЕ ПРИНЦИПЫ СТИЛЯ:
  1. Темная премиальная палитра
  2. Акцентный красный цвет в деталях
  3. Крупная, чистая типографика
  4. Простая сетка и спокойные отступы
  5. Минимум декоративного шума
*/

/* Базовая цветовая схема через CSS-переменные */
:root {
  --bg-dark: #0f1115;
  --bg-soft-dark: #171a20;
  --bg-light: #f3f4f6;
  --card-dark: rgba(255, 255, 255, 0.04);
  --card-light: #ffffff;
  --text-main: #f5f7fb;
  --text-dark: #15171b;
  --text-muted-light: rgba(255, 255, 255, 0.72);
  --text-muted-dark: #616672;
  --line-dark: rgba(255, 255, 255, 0.08);
  --line-light: rgba(15, 17, 21, 0.1);
  --accent: #b31421;
  --accent-hover: #cf1a2a;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.18);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1240px;
}

/* Плавный переход к якорям */
html {
  scroll-behavior: smooth;
}

/* Сброс базовых отступов */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Универсальный контейнер для ограничения ширины контента */
.container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}

/* Универсальные секции */
.section {
  padding: 110px 0;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-main);
}

.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* Шапка сайта */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(15, 17, 21, 0.72);
  border-bottom: 1px solid var(--line-dark);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.84);
  transition: color 0.25s ease, opacity 0.25s ease;
}

.main-nav a:hover {
  color: #ffffff;
}

/* Главный экран */
.hero {
  padding: 72px 0 110px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  max-width: 760px;
}

.eyebrow,
.section-label {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-text {
  max-width: 620px;
  margin-top: 22px;
  font-size: 1.08rem;
  color: var(--text-muted-light);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  border-color: var(--line-dark);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.02);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-visual img,
.split-image img,
.gallery-item img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
}

.hero-visual img {
  min-height: 580px;
}

/* Вводный блок */
.section-head {
  margin-bottom: 42px;
}

.section-head h2,
.split-content h2,
.details-grid h2,
.final-cta-box h2 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.section-intro {
  max-width: 820px;
  margin-top: 16px;
  color: var(--text-muted-dark);
  font-size: 1.04rem;
}

/* Карточки преимуществ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.metric-card {
  background: var(--card-light);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: 0 12px 28px rgba(15, 17, 21, 0.05);
}

.metric-value {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
}

.metric-card h3,
.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.metric-card p {
  color: var(--text-muted-dark);
}

/* Блок с изображением и текстом */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.split-image img {
  min-height: 620px;
}

.split-content > p {
  max-width: 680px;
  color: var(--text-muted-light);
}

.feature-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.feature-item {
  padding: 22px;
  background: var(--card-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
}

.feature-item p {
  color: var(--text-muted-light);
}

/* Галерея */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.gallery-item {
  grid-column: span 4;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.gallery-large {
  grid-column: span 8;
}

.gallery-item img {
  height: 100%;
  min-height: 290px;
  transition: transform 0.45s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Блок деталей */
.details-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 38px;
  align-items: start;
}

.details-text p {
  font-size: 1.04rem;
  color: var(--text-muted-light);
}

.details-text p + p {
  margin-top: 18px;
}

/* Финальный CTA */
.final-cta {
  padding-top: 90px;
  padding-bottom: 120px;
}

.final-cta-box {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 100%);
  border: 1px solid var(--line-light);
  border-radius: 28px;
  padding: 42px;
  box-shadow: 0 18px 40px rgba(15, 17, 21, 0.08);
}

.final-cta-box p {
  max-width: 760px;
  margin-top: 16px;
  margin-bottom: 24px;
  color: var(--text-muted-dark);
}

/* Адаптивность для планшетов */
@media (max-width: 1100px) {
  .hero-grid,
  .split-grid,
  .details-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .gallery-large,
  .gallery-item {
    grid-column: span 6;
  }

  .hero-visual img,
  .split-image img {
    min-height: 420px;
  }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .section {
    padding: 80px 0;
  }

  .header-inner {
    min-height: 68px;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .main-nav {
    gap: 14px;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-content h1 {
    font-size: clamp(2.2rem, 9vw, 3.5rem);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-large,
  .gallery-item {
    grid-column: auto;
  }

  .metric-card,
  .feature-item,
  .final-cta-box {
    padding: 22px;
  }
}

.final-text{
    max-width:640px;
    margin:20px auto 40px auto;
    line-height:1.7;
    opacity:0.85;
}

.contact-card{
    margin:40px auto;
    padding:40px;
    max-width:520px;
    border:1px solid rgba(0,0,0,0.1);
    background:rgba(0,0,0,0.02);
}

.contact-card h3{
    font-size:20px;
    margin-bottom:10px;
}

.contact-card p{
    font-size:15px;
    line-height:1.6;
    opacity:0.75;
    margin-bottom:20px;
}

.contact-button{
    display:inline-block;
    padding:12px 26px;
    border:1px solid #c40000;
    color:#000;
    text-decoration:none;
    transition:0.3s;
}

.contact-button:hover{
    background:#c40000;
    color:#fff;
}

.back-top{
    margin-top:30px;
}