* {
  box-sizing: border-box;
}
body {
  font-family: "Rubik", sans-serif;
}
html {
  scroll-behavior: smooth;
}

/* Marquee animation */
@keyframes marquee-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
@keyframes marquee-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}
.marquee-left {
  animation: marquee-left 40s linear infinite;
}
.marquee-right {
  animation: marquee-right 40s linear infinite;
}
.marquee-left:hover,
.marquee-right:hover,
.marquee-left:focus-within,
.marquee-right:focus-within {
  animation-play-state: paused;
}

/* Phone mockup */
.phone-frame {
  height: 50vh;
  aspect-ratio: 9 / 16;
  border: none;
  padding: 0;
}

/* Nav shadow on scroll */
.nav-scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

/* ---- Scroll-reveal system ---- */
[data-reveal] {
  opacity: 0;
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  will-change: opacity, transform;
}
[data-reveal="fade-up"] {
  transform: translateY(40px);
}
[data-reveal="fade-left"] {
  transform: translateX(-40px);
}
[data-reveal="fade-right"] {
  transform: translateX(40px);
}
[data-reveal="scale-in"] {
  transform: scale(0.92);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* ---- Hero entrance (scroll-triggered) ---- */
.hero-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
}
.hero-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.hero-reveal-d1 { transition-delay: 0.1s; }
.hero-reveal-d2 { transition-delay: 0.25s; }
.hero-reveal-d3 { transition-delay: 0.4s; }
.hero-phone {
  opacity: 0;
  transform: translateX(40px) scale(0.95);
  transition:
    opacity 1s ease,
    transform 1s ease;
  transition-delay: 0.3s;
  will-change: opacity, transform;
  margin-top: -35vh;
  z-index: 2;
}
.hero-phone.revealed {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* ---- Intro splash logo animation ---- */
.intro-logo {
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 1s ease,
    transform 1s ease;
  will-change: opacity, transform;
}
.intro-logo.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ---- Swipe deck inside phone ---- */
.swipe-deck {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  border-radius: 2rem;
  perspective: 800px;
}
.swipe-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  will-change: transform, opacity;
  transform-origin: left top;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  padding: 0;
}
.swipe-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.25rem;
  display: block;
}
/* Image dots bar at top */
.card-dots {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.card-dots span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
}
.card-dots span.active {
  background: rgba(255, 255, 255, 0.95);
}
/* Bottom overlay with item data */
.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0 0 1.25rem 1.25rem;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.35) 60%,
    transparent 100%
  );
  padding: 40px 12px 12px;
  color: #fff;
  z-index: 1;
}
.card-title-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.card-brand-name {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}
.card-price {
  font-size: 1.15rem;
  font-weight: 600;
  opacity: 0.95;
}
.card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  font-size: 0.65rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}
.card-tag .material-icons-outlined {
  font-size: 12px;
}
/* Favorite button */
.card-fav {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #222126;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.card-fav .material-icons-outlined {
  font-size: 18px;
  color: #fff;
}
/* Card leave animation — scale up + shift left + fade */
@keyframes card-leave {
  0% {
    opacity: 1;
    transform: scale(1) translateX(0) rotateY(-15deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.1) translateX(-35%) rotateY(-15deg);
  }
}
.swipe-card.stack-leaving {
  transition: none;
  animation: card-leave 0.4s ease-out forwards;
}

/* ---- Enhanced hover: feature list items ---- */
.feature-li {
  transition:
    padding-left 0.25s ease,
    color 0.25s ease;
}
.feature-li:hover {
  padding-left: 6px;
}
.feature-li:hover .text-medium-grey {
  color: #222126;
}

/* ---- Footer link underline slide ---- */
.footer-link {
  position: relative;
  display: inline-block;
}
.footer-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}
.footer-link:hover::after {
  width: 100%;
}

/* ---- Get the App nav button pulse ---- */
.nav-cta-btn {
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.nav-cta-btn:hover {
  transform: scale(1.05);
  opacity: 0.92;
}

/* ---- Brand pills hover ---- */
.brand-pill {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.brand-pill:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---- Hero parallax background ---- */
.hero-section {
  position: relative;
  overflow-x: clip;
}
.hero-parallax-wrap {
  position: absolute;
  inset: 0;
  overflow: clip;
  z-index: 0;
}
.hero-parallax-bg {
  position: absolute;
  inset: 0;
  bottom: -30%;
  background: linear-gradient(
    135deg,
    #f6f6f6 0%,
    #f3ece3 50%,
    #f6f6f6 100%
  );
  will-change: transform;
  transform: translateY(var(--parallax-y, 0));
  pointer-events: none;
}
.hero-section > *:not(.hero-parallax-wrap) {
  position: relative;
  z-index: 1;
}

/* ---- Stagger delays for grouped reveals ---- */
[data-reveal-delay="1"] {
  transition-delay: 0.1s;
}
[data-reveal-delay="2"] {
  transition-delay: 0.2s;
}
[data-reveal-delay="3"] {
  transition-delay: 0.3s;
}
[data-reveal-delay="4"] {
  transition-delay: 0.4s;
}


/* Style category cards — row, decreasing size, offset right */
.style-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}
.style-card {
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.style-card:nth-child(1) { width: 270px; z-index: 4; }
.style-card:nth-child(2) { width: 243px; z-index: 3; margin-left: -120px; }
.style-card:nth-child(3) { width: 216px; z-index: 2; margin-left: -100px; }
.style-card:nth-child(4) { width: 189px; z-index: 1; margin-left: -80px; }
.style-card:nth-child(1) .style-card-label { font-size: 22px; }
.style-card:nth-child(2) .style-card-label { font-size: 20px; }
.style-card:nth-child(3) .style-card-label { font-size: 18px; }
.style-card:nth-child(4) .style-card-label { font-size: 16px; }
.style-card-label {
  position: absolute;
  top: 0;
  right: 0;
  writing-mode: vertical-rl;
  padding: 10px 6px;
  background: #222126;
  border-radius: 0 12px 0 8px;
  color: #EDE1D3;
  font-weight: 600;
  letter-spacing: 0.05em;
}
@media (max-width: 640px) {
  .style-card:nth-child(1) { width: 48vw; }
  .style-card:nth-child(2) { width: 42vw; }
  .style-card:nth-child(3) { width: 36vw; }
  .style-card:nth-child(4) { width: 30vw; }
  .style-card:not(:first-child) {
    margin-left: -22vw;
  }
  .style-card:nth-child(1) .style-card-label { font-size: 16px; }
  .style-card:nth-child(2) .style-card-label { font-size: 14.5px; }
  .style-card:nth-child(3) .style-card-label { font-size: 13px; }
  .style-card:nth-child(4) .style-card-label { font-size: 11.5px; }
  .style-card-label {
    padding: 6px 4px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .hero-reveal,
  .hero-phone,
  .intro-logo,
  .swipe-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
