/* ==========================================================================
   YADEA — Home page
   Sections, in page order:
   1. Hero slider          5. Electric scooter cards
   2. Series (tabs+banner) 6. Planet counters + green slider
   3. Model showcase       7. News & events
   4. E8S feature          8. Social media
   Responsive overrides live in responsive.css.
   ========================================================================== */

/* ---------- 1. Hero ---------- */
.hero {
  --hero-interval: 6s;
  position: relative;
  height: calc(100svh - var(--topbar-h));
  min-height: 560px;
  overflow: hidden;
  background: #000;
  color: #fff;
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1.2s var(--ease), visibility 0s linear 1.2s;
}
.hero__slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity 1.2s var(--ease), visibility 0s; }
.hero__media, .hero__media img { width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: center; }
/* slides whose artwork already carries the model name: keep the text for
   screen readers only, so it is not printed twice */
.hero__slide--baked .hero__title, .hero__slide--baked .hero__sub {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hero__slide.is-active .hero__media img { animation: kenburns 9s var(--ease) both; }
.hero__slide::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .18) 38%, rgba(0, 0, 0, 0) 62%),
    linear-gradient(0deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 35%);
  pointer-events: none;
}

.hero__content {
  position: absolute; left: 0; right: 0; bottom: clamp(150px, 24vh, 260px);
  z-index: 2;
}
.hero__title {
  color: #fff;
  font-size: clamp(2.25rem, 1.3rem + 2.7vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .005em;
}
.hero__sub { margin-top: 14px; font-size: clamp(1rem, .9rem + .45vw, 1.375rem); font-weight: 400; }
.hero__sub .line > span { --d: 140ms; }
.hero__cta {
  margin-top: clamp(24px, 3.2vh, 40px);
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s var(--ease) .1s, transform .9s var(--ease-expo) .1s, color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hero__slide.is-active .hero__cta { opacity: 1; transform: none; transition-delay: .45s, .45s, 0s, 0s; }
.hero__slide:not(.is-active) .line > span { transition-duration: .4s; }

.hero__ui {
  position: absolute; left: 0; right: 0; bottom: clamp(36px, 7vh, 80px);
  z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
}
.hero__dots { display: flex; gap: 6px; }
.hero__dot {
  position: relative;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  font-size: var(--fs-sm); font-weight: 700;
  color: #fff; opacity: .65;
  transition: opacity var(--dur-fast) var(--ease);
}
.hero__dot:hover, .hero__dot.is-active { opacity: 1; }
.hero__ring { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); transform: rotate(-90deg); }
.hero__ring circle { fill: none; stroke: #fff; stroke-width: 1.6; stroke-dasharray: 100.6; stroke-dashoffset: 100.6; }
.hero__dot.is-active .hero__ring circle { animation: heroRing var(--hero-interval) linear forwards; }
.hero.is-paused .hero__dot.is-active .hero__ring circle { animation-play-state: paused; }
@keyframes heroRing { to { stroke-dashoffset: 0; } }

.hero__scroll { display: grid; place-items: center; width: 44px; height: 44px; font-size: 26px; color: #fff; opacity: .85; }
.hero__scroll .icon { animation: cueBounce 2s var(--ease) infinite; }
.hero__scroll:hover { opacity: 1; color: var(--c-brand); }

/* ---------- 2. Series ---------- */
.series { padding-top: var(--section-y); }
.series__intro { text-align: center; padding-bottom: clamp(48px, 5.5vw, 88px); }
.series__intro .section-title { font-size: var(--fs-3xl); line-height: 1.18; }

.series__tabs {
  position: sticky; top: var(--header-h); z-index: 20;
  background: rgba(246, 246, 246, .94);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.series__tabs-inner {
  display: flex; justify-content: center; gap: clamp(28px, 5.4vw, 104px);
  height: 58px;
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.series__tabs-inner::-webkit-scrollbar { display: none; }
.series__tab {
  position: relative; flex: none;
  font-size: var(--fs-base); font-weight: 500;
  color: #5f5f5f;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.series__tab:hover { color: var(--c-ink); }
.series__tab.is-active { color: var(--c-ink); -webkit-text-stroke: .45px currentColor; }
.series__tab::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--c-brand);
  transform: scaleX(0);
  transition: transform .6s var(--ease-expo);
}
.series__tab.is-active::after { transform: scaleX(1); }

.series__stage {
  --series-interval: 7s;
  position: relative;
  height: clamp(420px, 46.9vw, calc(100svh - var(--header-h) - 58px));
  overflow: hidden;
  background: #111;
}
.series__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1s var(--ease), visibility 0s linear 1s;
}
.series__slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity 1s var(--ease), visibility 0s; }
.series__slide picture, .series__slide img { width: 100%; height: 100%; }
.series__slide img { object-fit: cover; transform: scale(1.07); transition: transform 7s var(--ease); }
.series__slide.is-active img { transform: scale(1); }
.series__slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, .12) 40%, rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}
.series__caption {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding-left: calc(var(--gutter) + clamp(0px, 5.8vw, 112px));
  color: #fff;
}
.series__title { color: #fff; font-size: clamp(1.75rem, 1.05rem + 2vw, 2.875rem); font-weight: 700; line-height: 1.16; }
.series__title .line + .line > span { --d: 110ms; }
.series__caption .btn {
  margin-top: 30px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .8s var(--ease-expo), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.series__slide.is-active .series__caption .btn { opacity: 1; transform: none; transition-delay: .35s, .35s, 0s, 0s; }

.series__arrow { position: absolute; top: 50%; z-index: 3; margin-top: -24px; }
.series__arrow--prev { left: var(--gutter); }
.series__arrow--next { right: calc(var(--gutter) + 56px); }
.series__progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 3px; background: rgba(255, 255, 255, .18); }
.series__progress span { display: block; height: 100%; background: var(--c-brand); transform: scaleX(0); transform-origin: left center; }
.series__stage.is-running .series__progress span { animation: seriesProgress var(--series-interval) linear forwards; }
.series__stage.is-paused .series__progress span { animation-play-state: paused; }
@keyframes seriesProgress { to { transform: scaleX(1); } }

/* ---------- 3. Showcase ---------- */
.showcase { position: relative; padding-block: clamp(56px, 6vw, 100px) clamp(64px, 7vw, 116px); overflow: hidden; }
.showcase__viewport { position: relative; }
.showcase__track { display: flex; transition: transform 1s var(--ease-expo); will-change: transform; }
.showcase__item {
  --item-w: 44%;
  flex: 0 0 var(--item-w);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  opacity: .28;
  transform: scale(.7);
  transition: opacity .8s var(--ease), transform 1s var(--ease-expo);
  cursor: pointer;
}
.showcase__item.is-active { opacity: 1; transform: none; cursor: default; }
.showcase__img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.showcase__item.is-active .showcase__img { filter: drop-shadow(0 30px 30px rgba(0, 0, 0, .12)); }
.showcase__info {
  margin-top: 20px;
  opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .8s var(--ease-expo);
}
.showcase__item.is-active .showcase__info { opacity: 1; transform: none; pointer-events: auto; transition-delay: .2s; }
.showcase__name { font-size: clamp(1.25rem, 1rem + .8vw, 1.75rem); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.showcase__tags { margin-top: 6px; font-size: 13px; color: var(--c-muted); }
.showcase__info .btn { margin-top: 22px; }
.showcase__arrow { position: absolute; top: 27%; z-index: 2; }
.showcase__arrow--prev { left: calc(var(--gutter) + 6%); }
.showcase__arrow--next { right: calc(var(--gutter) + 6%); }
.showcase__dots { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.showcase__dots button { width: 22px; height: 3px; background: #d8d8d8; transition: width var(--dur) var(--ease-expo), background var(--dur-fast) var(--ease); }
.showcase__dots button.is-active { width: 40px; background: var(--c-ink); }

/* ---------- 4. Feature (E8S) ---------- */
.feature { padding-block: var(--section-y); background: var(--c-bg-soft); overflow-x: clip; }
.feature__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(40px, 6.5vw, 128px); align-items: center; }
.feature__media { position: relative; aspect-ratio: 1740 / 1420; overflow: hidden; background: #d9dde2; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__overlay {
  position: absolute; top: 7%; left: 0; right: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  color: #fff; text-align: center; pointer-events: none;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.feature__overlay-title { font-size: clamp(2rem, 1.1rem + 2.8vw, 3.75rem); font-weight: 700; line-height: 1; }
.feature__overlay-sub { margin-top: 10px; font-size: clamp(.625rem, .55rem + .25vw, .8125rem); font-weight: 500; letter-spacing: .38em; }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--c-brand); }
.feature__title { margin-top: 14px; font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -.01em; }
.feature__tagline { margin-top: 10px; font-size: var(--fs-md); font-weight: 400; letter-spacing: .32em; text-transform: uppercase; color: var(--c-muted); }
.feature__pills { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.feature__pills li { padding: 9px 20px; font-size: var(--fs-sm); font-weight: 500; background: #fff; border: 1px solid var(--c-line); border-radius: 999px; }
.feature__actions { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- 5. Models ---------- */
.models { padding-block: var(--section-y); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 3vw, 44px); }
.section-head__nav { display: flex; align-items: center; gap: 12px; }
.section-head__nav .link-arrow { margin-right: 12px; }

.models__track,
.news__track {
  --cols: 3;
  --gap: 16px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.models__track::-webkit-scrollbar, .news__track::-webkit-scrollbar { display: none; }

.model-card { scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; }
.model-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 576 / 504;
  display: grid; place-items: center;
  background: var(--c-bg-soft);
  overflow: hidden;
}
.model-card__tag { position: absolute; top: 20px; left: 22px; right: 22px; font-size: 13px; font-weight: 600; color: var(--c-ink); }
.model-card__img {
  width: 78%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  transition: transform .9s var(--ease-expo), opacity .35s var(--ease);
}
.model-card__img.is-swapping { opacity: 0; transform: scale(.97); }
.model-card:hover .model-card__img { transform: scale(1.05) translateY(-6px); }
.model-card__colors { position: absolute; left: 0; right: 0; bottom: 30px; display: flex; justify-content: center; gap: 12px; }
.swatch {
  position: relative;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14);
}
.swatch.is-active::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .55); }
button.swatch { transition: transform var(--dur-fast) var(--ease); }
button.swatch:hover { transform: scale(1.18); }
.model-card__name { margin-top: 18px; font-size: clamp(1.5rem, 1.05rem + 1.2vw, 2.375rem); font-weight: 500; }
.model-card .btn { margin-top: 22px; }

/* ---------- 6. Planet ---------- */
.planet {
  position: relative;
  min-height: clamp(560px, 40vw, 780px);
  display: flex; align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.planet__bg { position: absolute; inset: 0; }
.planet__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 80%; }
.planet::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 16%, rgba(0, 0, 0, 0) 38%, rgba(4, 28, 14, .62) 100%);
}
.planet__inner { position: relative; z-index: 2; padding-block: clamp(200px, 17vw, 330px) clamp(64px, 6vw, 104px); text-align: center; }
.planet__title { color: #fff; font-size: clamp(1.75rem, 1.05rem + 2.5vw, 3.5rem); font-weight: 600; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.planet__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; max-width: 1320px; margin: clamp(44px, 5vw, 80px) auto 0; }
.stat__icon { width: 64px; height: 64px; margin: 0 auto 18px; }
.stat__value { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-size: clamp(1.5rem, 1rem + 1.5vw, 2.625rem); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat__unit { font-size: 13px; font-weight: 600; }
.stat__label { margin-top: 6px; font-size: 13px; opacity: .85; }

/* Green slider */
.green { padding-block: clamp(56px, 6vw, 100px) var(--section-y); }
.green__inner { max-width: 1560px; }
.green__slider { position: relative; aspect-ratio: 1408 / 692; overflow: hidden; background: #cfd8d2; }
.green__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s var(--ease), visibility 0s linear 1.2s; }
.green__slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.2s var(--ease), visibility 0s; }
.green__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 8s linear; }
.green__slide.is-active img { transform: scale(1); }
.green__caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
  color: #fff; text-align: center;
  font-size: clamp(1.25rem, .85rem + 1.4vw, 2.5rem); font-weight: 700; line-height: 1.25;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .3);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .22), rgba(0, 0, 0, 0) 65%);
}
.green__caption .line + .line > span { --d: 110ms; }
.green__slide.is-active .green__caption .line > span { transition-delay: calc(.35s + var(--d, 0ms)); }
.green__dots { position: absolute; left: 50%; bottom: 22px; z-index: 2; display: flex; gap: 8px; transform: translateX(-50%); }
.green__dots button { width: 26px; height: 3px; background: rgba(255, 255, 255, .5); transition: width var(--dur) var(--ease-expo), background var(--dur-fast) var(--ease); }
.green__dots button.is-active { width: 42px; background: #fff; }
.green__note { margin-top: 22px; text-align: center; font-size: var(--fs-xs); color: var(--c-muted); }

/* ---------- 7. News ---------- */
.news { padding-block: var(--section-y); background: var(--c-bg-soft); }
.news-card {
  position: relative;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: #fff;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease-expo);
}
.news-card:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, .08); }
.news-card__media { aspect-ratio: 16 / 10.4; overflow: hidden; background: #e9e9e9; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-expo); }
.news-card:hover .news-card__media img { transform: scale(1.06); }
.news-card__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 28px 30px 30px; }
.news-card__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; }
.news-card__share {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 14px; color: var(--c-ink);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.news-card__share:hover { background: var(--c-brand); color: #fff; }
.news-card__title { margin: 16px 0 28px; font-size: var(--fs-base); font-weight: 500; line-height: 1.65; color: var(--c-ink); }
.news-card__title a { transition: color var(--dur-fast) var(--ease); }
.news-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.news-card:hover .news-card__title a { color: var(--c-brand); }
.news-card__tag { margin-top: auto; padding: 4px 10px; font-size: 11px; color: var(--c-muted); background: var(--c-bg-soft); }

/* ---------- 8. Social ---------- */
.social { padding-block: var(--section-y); }
.social__title { text-align: center; font-size: var(--fs-3xl); font-weight: 600; }
.social__grid {
  margin-top: clamp(40px, 4vw, 64px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 576px));
  justify-content: center;
  gap: clamp(20px, 2.6vw, 48px);
}
.social-card {
  display: block;
  padding: 40px 40px 0;
  transition: transform var(--dur) var(--ease-expo), box-shadow var(--dur) var(--ease);
}
.social-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0, 0, 0, .12); }
.social-card--sky { background: linear-gradient(140deg, #5d81dc 0%, #98b1ec 52%, #e3eafc 100%); }
.social-card--sunset { background: linear-gradient(95deg, #d41cf2 0%, #ec7ec6 42%, #f8c7b0 78%, #fde6d3 100%); }
.social-card__frame { display: block; aspect-ratio: 496 / 400; overflow: hidden; }
.social-card__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-expo); }
.social-card:hover .social-card__frame img { transform: scale(1.05); }
.social-card__more {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  height: 72px;
  font-size: var(--fs-md); font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: #fff;
}
.social-card__more .icon { color: var(--c-brand); stroke-width: 3; transition: transform var(--dur-fast) var(--ease); }
.social-card:hover .social-card__more .icon { transform: translateX(4px); }

/* Model card whose picture is a photograph rather than a cut-out (YADEA M6) */
.model-card--photo .model-card__img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 30% 55%; }
.model-card--photo:hover .model-card__img { transform: scale(1.05); }
.model-card--photo .model-card__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .3), transparent 30%, transparent 66%, rgba(0, 0, 0, .34)); }
.model-card--photo .model-card__tag, .model-card--photo .model-card__colors { z-index: 1; }
.model-card--photo .model-card__tag { color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .3); }
.model-card--photo .swatch { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.model-card--photo .swatch.is-active::after { border-color: #fff; }

/* photograph used in the model showcase (the M6 has no transparent cut-out) */
.showcase__img--photo { object-fit: cover; border-radius: 4px; }
