/* ============================
   S-WORKS LANDING — Ябайк
   ============================ */

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

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

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* --- CSS Variables --- */
:root {
  --color-primary: #CF2027;
  --color-primary-hover: #B81C22;
  --color-bg: #000000;
  --color-bg-alt: #0A0A0A;
  --color-bg-section: #0D0D0D;
  --color-card: #111111;
  --color-card-hover: #161616;
  --color-input: #1A1A1A;
  --color-text: #FFFFFF;
  --color-text-secondary: #999999;
  --color-text-muted: #666666;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);

  --font-heading: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-accent: Georgia, 'Times New Roman', serif;

  --section-py: 120px;
  --section-py-mobile: 64px;
  --container-max: 1200px;
  --container-px: 24px;
  --gap: 24px;

  --transition: 0.3s ease;
  --header-h: 56px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

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

.section {
  padding: var(--section-py-mobile) 0;
}

@media (min-width: 960px) {
  .section {
    padding: var(--section-py) 0;
  }
}

/* --- Label (section tag) --- */
.label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-primary);
  margin-bottom: 16px;
  display: block;
}

.label--muted {
  color: var(--color-text-secondary);
  opacity: 0.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

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

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(207, 32, 39, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-hover);
}

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

.btn--small {
  padding: 10px 24px;
  font-size: 13px;
}

.btn--full {
  width: 100%;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  background: rgba(0, 0, 0, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__logo-img {
  height: 28px;
  width: auto;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 639px) {
  .header__right { gap: 12px; }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-image: url('media/remco.webp');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.15) 100%),
    linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 30%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding-top: var(--header-h);
}

.hero__subtitle {
  font-size: 18px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  max-width: 480px;
  line-height: 1.6;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
}

.hero__scroll-link {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--transition);
}

.hero__scroll-link:hover {
  color: var(--color-text);
}

@media (max-width: 639px) {
  .hero {
    background-image: url('media/ETS19867_1.jpg');
    background-position: center top;
    align-items: flex-end;
    padding-bottom: 48px;
  }
  .hero::before {
    background:
      linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 70%);
  }
  .hero__cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Tech Section --- */
.tech {
  background: var(--color-bg-alt);
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.tech-card {
  flex: 1 1 calc(33.333% - 16px);
  min-width: 280px;
}

.tech-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 20px;
}

.tech-card h4 {
  margin-bottom: 8px;
}

.tech-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* --- Models Section --- */
.models {
  background: var(--color-bg);
}

.models__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  margin-bottom: 32px;
}

.model-card {
  flex: 1 1 calc(33.333% - 16px);
  min-width: 300px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.model-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(207, 32, 39, 0.08);
  border-color: var(--color-border-hover);
}

.model-card__image {
  width: 100%;
  height: 280px;
  object-fit: contain;
  margin-bottom: 20px;
}

.model-card__subtitle {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.model-card h3 {
  margin-bottom: 12px;
}

.model-card__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Mini cards — "Also in catalog" */
.models__also-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mini-card {
  flex: 1 1 calc(25% - 12px);
  min-width: 180px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition);
  text-decoration: none;
}

.mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-hover);
}

.mini-card__image {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: var(--color-card);
  padding: 8px;
}

.mini-card__info {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
}

.mini-card__info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.mini-card__info span {
  font-size: 13px;
  color: var(--color-text-muted);
}

.models__more {
  text-align: center;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 639px) {
  .models__also-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .mini-card {
    flex: 0 0 180px;
    min-width: 180px;
    scroll-snap-align: start;
  }
}

@media (max-width: 639px) {
  .models__grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .model-card {
    flex: 0 0 300px;
    min-width: 300px;
    scroll-snap-align: start;
  }
}

/* --- CTA Mid Section --- */
.cta-mid {
  background: var(--color-bg-alt);
  text-align: center;
  padding: 64px 0;
  border-top: 1px solid var(--color-primary);
}

.cta-mid h3 {
  margin-bottom: 24px;
}

.cta-mid__bonuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
}

.bonus-badge {
  background: var(--color-input);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 20px 28px;
  max-width: 360px;
  text-align: left;
  flex: 1 1 280px;
}

.bonus-badge__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bonus-badge__icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.bonus-badge p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* --- Heritage Section (compact) --- */
.heritage {
  position: relative;
  background-image: url('media/Road_Bikes.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-align: center;
  padding: 80px 0;
}

.heritage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.heritage .container {
  position: relative;
  z-index: 2;
}

.heritage__compact {
  max-width: 900px;
  margin: 0 auto;
}

.heritage__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  margin-bottom: 32px;
}

.stat {
  text-align: center;
  min-width: 120px;
}

.stat__number {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat__label {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.heritage__tagline {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 639px) {
  .heritage {
    background-attachment: scroll;
    padding: 56px 0;
  }
  .heritage__stats {
    gap: 24px;
  }
  .stat {
    flex: 0 0 calc(50% - 12px);
  }
}

/* --- Advantages Section --- */
.advantages {
  background: var(--color-bg-section);
}

.advantages__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.advantage {
  flex: 1 1 calc(50% - 12px);
  min-width: 280px;
  padding: 32px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.advantage__icon {
  width: 40px;
  height: 40px;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.advantage h4 {
  margin-bottom: 8px;
}

.advantage p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

@media (max-width: 639px) {
  .advantage {
    flex: 1 1 100%;
    padding: 24px;
  }
}

/* --- Form Section --- */
.form-section {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.form-section__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  align-items: center;
}

.form-section__text {
  flex: 1 1 400px;
}

.form-section__text h2 {
  margin-bottom: 16px;
}

.form-section__text p {
  font-size: 17px;
  line-height: 1.7;
}

.form-section__form {
  flex: 1 1 380px;
  max-width: 460px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-input);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  color: var(--color-text);
  font-size: 16px;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group select option {
  background: var(--color-card);
  color: var(--color-text);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form__fine-print {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 16px;
  line-height: 1.5;
}

@media (max-width: 639px) {
  .form-section__text { display: none; }
  .form-section__form {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

/* --- FAQ --- */
.faq {
  background: var(--color-bg-alt);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 24px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
}

.faq-item__question:hover {
  color: var(--color-primary);
}

.faq-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
  margin-left: 16px;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  transition: transform var(--transition);
}

.faq-item__icon::before {
  width: 16px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item__icon::after {
  width: 2px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item.is-open .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.is-open .faq-item__answer {
  max-height: 300px;
}

.faq-item__answer p {
  padding-bottom: 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* --- Footer --- */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-primary);
  padding: 64px 0 32px;
}

.footer__logo {
  margin-bottom: 40px;
}

.footer__logo-img {
  height: 40px;
  width: auto;
}

.footer__about {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: 40px;
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__col {
  flex: 1 1 200px;
  min-width: 200px;
}

.footer__col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.footer__col p,
.footer__col a {
  font-size: 15px;
  line-height: 2;
  color: var(--color-text-secondary);
  display: block;
}

.footer__col a:hover {
  color: var(--color-text);
}

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Stock Section --- */
.stock {
  background: var(--color-bg-section);
  border-bottom: 1px solid var(--color-border);
}

.stock__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.stock-card {
  flex: 1 1 calc(33.333% - 16px);
  min-width: 300px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.stock-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(207, 32, 39, 0.08);
  border-color: var(--color-border-hover);
}

.stock-card__image {
  width: 100%;
  height: 280px;
  object-fit: contain;
  margin-bottom: 20px;
  background: var(--color-card);
}

.stock-card__price {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 16px;
}

.stock-card__status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 2px;
  white-space: nowrap;
  display: inline-block;
  margin-bottom: 8px;
}

.stock-card__status--available {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.stock-card__status--transit {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
}

.stock-card__status--reserved {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
}

.stock-card h3 {
  margin-bottom: 12px;
}

.stock-card__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.stock-card .btn--disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

.stock__loading {
  padding: 0;
}

.stock__loading-text {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.stock__skeletons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.skeleton-card {
  flex: 1 1 calc(33.333% - 16px);
  min-width: 300px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 24px;
}

.skeleton-img {
  width: 100%;
  height: 280px;
  background: var(--color-input);
  border-radius: 2px;
  margin-bottom: 20px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
  height: 14px;
  background: var(--color-input);
  border-radius: 2px;
  margin-bottom: 12px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line--short { width: 30%; }
.skeleton-line--long { width: 80%; height: 20px; }
.skeleton-line--medium { width: 60%; }
.skeleton-line--btn { width: 100%; height: 40px; margin-top: 16px; margin-bottom: 0; }

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@media (max-width: 639px) {
  .stock__skeletons {
    flex-wrap: nowrap;
    overflow-x: hidden;
  }
  .skeleton-card {
    flex: 0 0 300px;
    min-width: 300px;
  }
}

/* --- Booking Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  color: var(--color-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color var(--transition);
}

.modal__close:hover {
  color: var(--color-text);
}

.modal h3 {
  margin-bottom: 8px;
}

.modal__bike-name {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

/* --- Stock Mobile --- */
@media (max-width: 639px) {
  .stock__grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .stock-card {
    flex: 0 0 300px;
    min-width: 300px;
    scroll-snap-align: start;
  }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
