/* Homepage layout refresh: framed hero and continuous product ribbon. */

html[data-theme="light"] .home-page {
  background: #fff;
}

html[data-theme="light"] .home-page .home-nav {
  background: #fff;
  border-block-end-color: #eeeef5;
}

.home-page .hero {
  display: grid;
  align-items: center;
  min-block-size: max(700px, calc(100svh - 105px));
  padding-block: 86px 96px;
  overflow: visible;
}

.home-page .hero-atmosphere { overflow: hidden; border-radius: inherit; }

html[data-theme="light"] .home-page .hero {
  margin-inline: 12px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 24% 52%, #1c2b67 0%, transparent 42%),
    linear-gradient(110deg, #171d35 0%, #1b1b24 76%);
  color: #fff;
}

html[data-theme="light"] .home-page .hero-atmosphere {
  overflow: hidden;
  border-radius: inherit;
}

.home-page .hero-copy { max-inline-size: 640px; }

.home-page .hero-title {
  max-inline-size: none;
  font-size: clamp(2.8rem, 3.65vw, 4rem);
  line-height: 1.45;
  font-weight: 900;
  letter-spacing: -0.035em;
}

html[data-theme="light"] .home-page .hero-title { color: #fff; }

html[data-theme="light"] .home-page .hero-sub { color: #d6dbef; }

html[data-theme="light"] .home-page .hero-badge {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.16);
  color: #d9d2ff;
}

html[data-theme="light"] .home-page .hero-ctas .btn-ghost {
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.26);
  color: #fff;
}

.home-page .hero-scroll-cue {
  position: absolute;
  inset-block-end: -28px;
  inset-inline-start: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  inline-size: 60px;
  block-size: 60px;
  border: 1px solid #ececf5;
  border-radius: 50%;
  background: #fff;
  color: #1b1d2c;
  box-shadow: 0 10px 30px rgb(20 28 80 / 0.1);
  transform: translateX(50%);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-page .hero-scroll-cue:hover {
  transform: translateX(50%) translateY(4px);
  box-shadow: 0 13px 32px rgb(20 28 80 / 0.18);
}

.home-page .hero-scroll-cue svg { inline-size: 20px; block-size: 20px; }

html[data-theme="dark"] .home-page .hero-scroll-cue {
  border-color: var(--border-strong);
  background: var(--surface-1);
  color: #fff;
}

.home-product-marquee {
  position: relative;
  margin-block: 56px 12px;
  overflow: hidden;
  direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.home-product-marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  direction: ltr;
  inline-size: max-content;
  animation: fp-product-marquee 42s linear infinite;
}

.home-product-marquee:hover .home-product-marquee-track,
.home-product-marquee:focus-within .home-product-marquee-track { animation-play-state: paused; }

.home-product-marquee-set {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
  padding-inline-end: 18px;
  direction: rtl;
}

.home-product-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-block-size: 68px;
  padding: 11px 17px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--home-card);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-product-marquee-item:hover { border-color: var(--accent-400); }

.home-product-marquee-item .product-logo {
  inline-size: 42px;
  block-size: 42px;
  padding: 9px;
  border-radius: 13px;
}

@keyframes fp-product-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.home-page .home-products {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-block: 4px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-300) transparent;
}

.home-page .home-product-card {
  flex: 0 0 clamp(260px, 26vw, 340px);
  scroll-snap-align: start;
}

@media (max-width: 820px) {
  .home-page .hero { min-block-size: auto; padding-block: 112px 68px; }
  .home-page .hero-title { font-size: clamp(2.5rem, 8vw, 3.6rem); line-height: 1.35; }
  .home-product-marquee { margin-block-start: 47px; }
}

@media (max-width: 640px) {
  html[data-theme="light"] .home-page .hero { margin-inline: 8px; border-radius: 20px; }
  .home-page .hero { padding-block: 100px 48px; }
  .home-page .hero-title { font-size: clamp(2.1rem, 9vw, 2.8rem); line-height: 1.34; }
  .home-page .hero-sub { line-height: 1.85; }
  .home-page .hero-scroll-cue { inline-size: 50px; block-size: 50px; inset-block-end: -25px; }
  .home-product-marquee-track { animation-duration: 30s; }
  .home-product-marquee-item { min-block-size: 58px; padding: 8px 13px; font-size: 0.8rem; }
  .home-page .home-product-card { flex-basis: min(78vw, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  .home-product-marquee-track { animation: none; }
  .home-product-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
