/**
 * Serinity homepage — additive layout for index.php only.
 * Brand tokens come from the existing design system.
 */

body[data-page="index"] {
  --home-max: 80rem;
  --home-gutter: 1.5rem;
}

@media (min-width: 1024px) {
  body[data-page="index"] {
    --home-gutter: 2.5rem;
  }
}

body[data-page="index"] .m-section-nav,
body[data-page="index"] .m-section-nav.is-on {
  display: none;
}

.home-announce {
  position: relative;
  z-index: 60;
  width: 100%;
  max-width: 100%;
  height: 2.5rem;
  overflow: hidden;
}

.home-announce[hidden] {
  display: none !important;
}

.home-announce > div {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  padding-right: 2.5rem;
}

.home-announce .animate-marquee {
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
}

.home-announce__dismiss {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
}

.home-hero {
  position: relative;
  z-index: 0;
  overflow: visible;
  background: var(--p-ivory, #f8f5f0);
}

.home-hero__track {
  position: relative;
}

.home-hero__slide[hidden] {
  display: none !important;
}

.home-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  width: min(100% - (var(--home-gutter) * 2), var(--home-max));
  margin-inline: auto;
  padding-block: 2.5rem 3rem;
}

@media (min-width: 1024px) {
  .home-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.75rem;
    align-items: center;
    padding-block: 3rem 3.5rem;
  }
}

.home-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.home-hero__title em {
  font-family: var(--font-serif-luxe, "Cormorant Garamond", serif);
  font-style: italic;
  font-weight: 500;
  color: var(--p-maroon, #7a1f2b);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.home-hero__visual {
  position: relative;
  min-width: 0;
  width: min(100%, 28rem);
  margin-inline: auto;
}

.home-hero__media {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--p-sandal-soft, #efe6d9);
  border-radius: 1.25rem;
  box-shadow:
    0 1px 0 color-mix(in oklab, var(--p-gold, #d4af37) 28%, transparent),
    0 28px 56px -32px rgba(62, 39, 35, 0.38);
}

.home-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .home-hero__visual {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    margin-inline: 0;
  }

  .home-hero__media {
    aspect-ratio: 4 / 5;
    border-radius: 1.35rem;
  }
}

.home-hero__rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: min(100% - (var(--home-gutter) * 2), var(--home-max));
  margin-inline: auto;
  padding-bottom: 1.75rem;
}

.home-hero__dots {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.home-hero__arrow,
.home-hero__dot {
  border: 0;
  cursor: pointer;
  background: transparent;
}

.home-hero__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid color-mix(in oklab, var(--p-earth, #3e2723) 14%, transparent);
  border-radius: 999px;
  color: var(--p-earth, #3e2723);
}

.home-hero__dot {
  width: 0.44rem;
  height: 0.44rem;
  padding: 0;
  border-radius: 999px;
  background: color-mix(in oklab, var(--p-earth, #3e2723) 22%, transparent);
}

.home-hero__dot.is-on {
  background: var(--p-maroon, #7a1f2b);
  transform: scale(1.45);
}

@media (min-width: 1280px) {
  .home-hero__rail {
    position: absolute;
    right: clamp(0.75rem, 2vw, 1.75rem);
    top: 50%;
    z-index: 4;
    width: auto;
    margin: 0;
    padding: 0;
    flex-direction: column;
    transform: translateY(-50%);
  }

  .home-hero__dots {
    flex-direction: column;
    gap: 0.85rem;
  }

  .home-hero__arrow {
    width: 1.75rem;
    height: 1.75rem;
  }
}

.home-section h2 em {
  font-family: var(--font-serif-luxe, "Cormorant Garamond", serif);
}

.home-tabs {
  scrollbar-width: none;
}

.home-tabs::-webkit-scrollbar {
  display: none;
}

.home-tab {
  flex: 0 0 auto;
  padding: 0.55rem 1rem;
  border: 1px solid color-mix(in oklab, var(--p-earth, #3e2723) 12%, transparent);
  border-radius: 999px;
  background: #fff;
  color: var(--p-earth, #3e2723);
  font-family: var(--font-ui, Manrope, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.home-tab.is-on {
  background: var(--p-maroon, #7a1f2b);
  border-color: var(--p-maroon, #7a1f2b);
  color: var(--p-ivory, #f8f5f0);
}

.home-look {
  position: relative;
  min-height: 22rem;
  border-radius: 0;
}

.home-look img {
  position: absolute;
  inset: 0;
  height: 100%;
}

.home-sale__panel {
  border-radius: 0;
}

.home-sale__clock {
  min-width: 10rem;
}

.home-chip {
  cursor: pointer;
}

.home-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-chip span {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border: 1px solid color-mix(in oklab, var(--p-earth, #3e2723) 12%, transparent);
  border-radius: 999px;
  background: #fff;
  font-size: 0.84rem;
}

.home-chip input:checked + span,
.home-chip input:focus-visible + span {
  border-color: var(--p-gold, #d4af37);
  background: var(--p-maroon, #7a1f2b);
  color: var(--p-ivory, #f8f5f0);
}

.home-ugc {
  border-radius: 0;
}

.home-trust {
  position: relative;
  z-index: 1;
}

.home-trust__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  width: min(100% - (var(--home-gutter, 1.5rem) * 2), var(--home-max, 80rem));
  margin-inline: auto;
  padding-block: 2.25rem;
}

@media (min-width: 640px) {
  .home-trust__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .home-trust__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .home-look {
    min-height: 18rem;
  }

  .p-rail.lg\:grid-cols-4 > .product-card,
  .p-rail.lg\:grid-cols-4 > div {
    flex: 0 0 min(72%, 16.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-look img,
  .home-ugc img {
    transition: none;
  }
}
