/* ========================================
   ALEKS AUTO — Main Stylesheet
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;1,600&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Rubik', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: #202020;
  background-color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ----------------------------------------
   CSS Variables (Design Tokens)
   ---------------------------------------- */
:root {
  --color-red: #D50C0C;
  --color-red-hover: #B00A0A;
  --color-red-light: rgba(213, 12, 12, 0.1);
  --color-black: #000000;
  --color-dark: #202020;
  --color-gray: #666666;
  --color-gray-medium: #787878;
  --color-gray-light: #F4F4F4;
  --color-white: #FFFFFF;

  --font-primary: 'Rubik', sans-serif;
  --font-secondary: 'Rubik', sans-serif;

  --container-max: 1440px;
  --container-padding: 80px;

  --radius-card: 20px;
  --radius-btn: 40px;
  --radius-input: 16px;

  --shadow-card: 0 0 4px rgba(0, 0, 0, 0.15);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.2);

  --transition: 0.3s ease;

  --section-padding: 80px 0;
}

/* ----------------------------------------
   General
   ---------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--section-padding);
}

.section__title {
  font-family: var(--font-primary);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  border-radius: var(--radius-btn);
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}

.btn--primary {
  background-color: var(--color-red);
  color: var(--color-white);
  border: 2px solid var(--color-red);
  border-radius: var(--radius-btn);
  box-shadow: 0 0 15px rgba(188, 15, 15, 0.3);
}

.btn--primary:hover {
  background-color: var(--color-red-hover);
  border-color: var(--color-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn--outline {
  background-color: transparent;
  color: var(--color-dark);
  border: 1px solid #ccc;
  border-radius: var(--radius-btn);
}

.btn--outline:hover {
  border-color: var(--color-dark);
  transform: translateY(-1px);
}

/* ----------------------------------------
   Hero Section
   ---------------------------------------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  color: var(--color-white);
}

.hero__slider {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(32, 32, 32, 0.15);
}

.hero__visual {
  display: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: left;
  width: 100%;
  max-width: 1280px;
  display: flex;
  align-items: stretch;
  height: 100%;
}

.hero__panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 80px 0;
  width: 100%;
}

.hero__text-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero__title {
  font-family: var(--font-primary);
  font-size: 64px;
  font-weight: 600;
  line-height: 1.1;
}

.hero__subtitle {
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 300;
  line-height: 1.2;
}

.hero__btn {
  width: fit-content;
  padding: 16px 24px;
  font-size: 20px;
}

.hero__dots {
  position: absolute;
  bottom: 80px;
  right: 80px;
  z-index: 3;
  display: flex;
  gap: 40px;
}

.hero__dot {
  width: 69.5px;
  height: 3px;
  border-radius: 0;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
}

.hero__dot--active {
  background-color: var(--color-white);
}

/* ----------------------------------------
   Why Choose Us
   ---------------------------------------- */
.why-us {
  padding: 60px 0;
  background-color: var(--color-white);
}

.why-us__grid {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 40px;
  justify-content: space-between;
}

.why-us__card {
  background-color: var(--color-white);
  border: 1px solid var(--color-red);
  border-radius: 20px;
  width: 100%;
  max-width: 314px;
  height: 200px;
  padding: 20px 40px;
  text-align: left;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.why-us__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(212, 12, 12, 0.1);
}

.why-us__card--accent {
  background: linear-gradient(144.4deg, #d50c0c 14.297%, #9a1515 105.17%);
  color: var(--color-white);
  border-radius: 20px 160px 20px 20px;
  border-color: transparent;
}

.why-us__card--accent .why-us__card-title {
  color: var(--color-white);
}

.why-us__card--accent .why-us__card-text {
  color: var(--color-white);
}

.why-us__card--accent .why-us__icon svg {
  color: var(--color-white);
}

.why-us__card--accent .why-us__icon {
  --stroke-0: #FFFFFF;
}

.why-us__card-decor {
  display: none;
}

.why-us__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.why-us__icon svg {
  width: 36px;
  height: 36px;
  color: var(--color-red);
}

.why-us__card-title {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-dark);
}

.why-us__card-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.why-us__card-text {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-gray);
}

/* ----------------------------------------
   How to Buy
   ---------------------------------------- */
.how-to-buy {
  padding: 60px 0;
  background-color: var(--color-gray-light);
  border-radius: 40px;
}

.how-to-buy__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 48px;
}

.how-to-buy__card {
  background-color: var(--color-white);
  border-radius: 32px;
  padding: 20px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 330px;
  height: 340px;
  box-shadow: var(--shadow-card);
}

.how-to-buy__card-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.how-to-buy__card-number {
  font-family: var(--font-primary);
  font-size: 64px;
  font-weight: 500;
  color: var(--color-red);
  line-height: 1;
}

.how-to-buy__card-title {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-dark);
}

.how-to-buy__card-text {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-gray);
}

.how-to-buy__image {
  border-radius: 32px;
  height: 340px;
  background-size: 100% auto;
  background-position: bottom;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  flex: 1 0 0;
  min-width: 0;
}

.how-to-buy__image--wide {
  flex: none;
  width: 588px;
  color: var(--color-white);
}

.how-to-buy__image-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.35);
  border-radius: 32px;
}

.how-to-buy__image-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 20px 40px;
  color: var(--color-white);
}

.how-to-buy__image-content .how-to-buy__card-number {
  color: var(--color-white);
}

.how-to-buy__image-content .how-to-buy__card-title {
  color: var(--color-white);
}

.how-to-buy__image-content .how-to-buy__card-text {
  color: var(--color-white);
  font-weight: 400;
}

/* ----------------------------------------
   Contact Section
   ---------------------------------------- */
.contact {
  padding: 60px 0;
  padding-right: 0;
  background-color: var(--color-dark);
  color: var(--color-white);
  border-radius: 40px;
  overflow: hidden;
}

.contact__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 0;
}

.contact__left {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact__info {
  /* left column */
}

.contact__title {
  font-family: var(--font-primary);
  font-size: 40px;
  font-weight: 600;
  font-style: normal;
  margin-bottom: 16px;
}

.contact__subtitle {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-white);
}

.contact__form {
  width: 335px;
}

.contact__form-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact__form-group {
  /* structural */
}

.contact__label {
  display: block;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.6);
}

.contact__input {
  width: 100%;
  height: 51px;
  padding: 16px 20px;
  background-color: transparent;
  border: 1px solid var(--color-red);
  border-radius: 16px;
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 300;
  transition: border-color var(--transition), background-color var(--transition);
}

.contact__input::placeholder {
  color: #cccccc;
}

.contact__input:focus {
  border-color: var(--color-red);
  background-color: rgba(255, 255, 255, 0.05);
}

.contact__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='9' fill='none'%3E%3Cpath d='M15 1L8 8L1 1' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.contact__textarea {
  min-height: 104px;
  resize: vertical;
}

.contact__btn {
  margin-top: 40px;
}

.contact__image {
  flex-shrink: 0;
  align-self: center;
  margin-right: -80px;
}

.contact__image-placeholder {
  display: block;
  width: 560px;
  height: auto;
  max-width: none;
  object-fit: contain;
  background-color: transparent;
  border-radius: 0;
  transform: scaleX(-1);
}

/* ----------------------------------------
   Animations
   ---------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

img {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img.loaded {
  opacity: 1;
}

.why-us__icon img {
  opacity: 1;
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(180deg, #f8f9fc, #ffffff);
  padding: 24px;
}

.error-page__content {
  max-width: 560px;
}

.error-page__code {
  font-size: 88px;
  line-height: 1;
  color: var(--color-red);
  font-weight: 600;
  font-family: var(--font-primary);
}

.error-page__title {
  margin-top: 12px;
  font-size: 40px;
  font-family: var(--font-primary);
  font-weight: 600;
}

.error-page__text {
  margin-top: 12px;
  color: var(--color-gray-medium);
  font-family: var(--font-secondary);
  font-size: 16px;
}

.error-page__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.legal-page__content {
  max-width: 800px;
  margin: 32px auto 0;
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-gray);
}

.legal-page__content p {
  margin-bottom: 16px;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
