/* ============================================================
   home.css — Styles for the Home page only
   ============================================================ */


/* ── Hero ─────────────────────────────────────────────────── */

.hero__bg {
  position: relative;
  height: min(820px, 84vh);
  min-height: 560px;
  background-color: var(--mili-canvas-700); /* shows while photo loads */
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Dark gradient so the white text reads against any photo */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18, 16, 17, 0.18) 0%,
    rgba(18, 16, 17, 0.04) 35%,
    rgba(18, 16, 17, 0.38) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: var(--mili-fashion-white);
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 7.4vw, 108px);
  line-height: 1.0;
  letter-spacing: -0.012em;
  font-weight: 400;
  margin: 0;
  color: var(--mili-fashion-white);
  text-shadow: 0 2px 24px rgba(18, 16, 17, 0.30);
}

.hero__cta {
  display: inline-block;
  margin-top: 32px;
  color: var(--mili-fashion-white);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-underline-offset: 5px;
  text-shadow: 0 1px 14px rgba(18, 16, 17, 0.45);
  transition: text-decoration var(--dur-quick);
}

.hero__cta:hover {
  text-decoration: underline;
}

/* Caption band — the italic paragraph below the photo */
.hero__caption {
  background: var(--mili-canvas-100);
  padding: 40px var(--gutter);
  text-align: center;
}

.hero__caption p {
  max-width: 760px;
  margin-inline: auto;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg1);
}


/* ── Shape strip ──────────────────────────────────────────── */

.shape-strip {
  background: var(--mili-canvas-200);
  padding: 64px 0;
  overflow: hidden;
}

.shape-strip__header {
  max-width: 1280px;
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 36px;
}

.shape-strip__see-all {
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: opacity var(--dur-quick) var(--ease-soft);
}

.shape-strip__see-all:hover {
  opacity: 0.65;
  text-decoration: none;
}

/* The scrolling track — JS fills this with shape cards × 2 */
.shape-strip__track {
  display: flex;
  gap: 96px;
  width: max-content;
  padding: 0 var(--gutter);
}

.shape-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 200px;
  flex-shrink: 0;
  text-align: center;
}

.shape-item__name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--fg1);
}

.shape-item__desc {
  font-size: 13px;
  color: var(--fg2);
  margin-top: 2px;
}


/* ── Visualizer teaser ────────────────────────────────────── */

.vis-teaser {
  background: var(--mili-opal);
  color: var(--mili-shocking-black);
  padding: 120px var(--gutter);
  position: relative;
  overflow: hidden;
}

.vis-teaser__inner {
  max-width: 1280px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.vis-teaser__eyebrow {
  color: rgba(18, 16, 17, 0.62);
  margin-bottom: 24px;
}

.vis-teaser__headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 400;
}

.vis-teaser__body {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(18, 16, 17, 0.78);
  margin-top: 28px;
  max-width: 460px;
}

.vis-teaser__cta {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--mili-shocking-black);
  color: var(--mili-fashion-white);
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 16px 28px;
  transition: opacity var(--dur-quick) var(--ease-soft);
}

.vis-teaser__cta:hover {
  opacity: 0.82;
  text-decoration: none;
}

/* Room preview box — JS injects the canvas shape inside */
.vis-teaser__preview {
  aspect-ratio: 4 / 3;
  background: var(--mili-canvas-700);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

/* CSS-only room interior */
.room-preview {
  position: absolute;
  inset: 0;
}

.room-preview__wall {
  position: absolute;
  inset: 0;
  background: #E6DCC2; /* living room wall: canvas-300 */
}

.room-preview__floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  background: #9A8770;
}

.room-preview__baseboard {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32%;
  height: 1px;
  background: rgba(0, 0, 0, 0.18);
}

.room-preview__light {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 40%);
  pointer-events: none;
}

/* Canvas centered on the room wall — JS populates this */
.room-preview__canvas {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
}


/* ── Story strip ──────────────────────────────────────────── */

.story-strip {
  padding: 120px var(--gutter);
  background: var(--mili-canvas-200);
}

.story-strip__inner {
  max-width: 1080px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
}

/* Painterly placeholder using CSS gradients */
.story-strip__plate {
  height: 520px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 65% 42% at 22% 62%, rgba(77,27,11,0.52) 0%, transparent 68%),
    radial-gradient(circle  28% at 72% 30%, rgba(166,194,196,0.48) 0%, transparent 68%),
    radial-gradient(ellipse 32% 18% at 20% 28%, rgba(230,220,194,0.90) 0%, transparent 70%),
    var(--mili-canvas-200);
  position: relative;
  overflow: hidden;
}

/* Canvas shape inside the painted plate — JS populates this */
.story-strip__plate-canvas {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
}

.story-strip__plate-label {
  position: absolute;
  left: 10%;
  bottom: 10%;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--fg2);
}

.story-strip__eyebrow {
  margin-bottom: 24px;
}

.story-strip__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.18;
  font-weight: 400;
  margin: 0;
  color: var(--fg1);
}

.story-strip__body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg2);
  margin-top: 32px;
}

.story-strip__attribution {
  font-size: 14px;
  color: var(--fg3);
  margin-top: 14px;
  line-height: 1.6;
}

.story-strip__link {
  margin-top: 28px;
}


/* ── Featured collection ──────────────────────────────────── */

.featured-collection {
  padding: 120px 0;
}

.featured-collection__header {
  max-width: 1280px;
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.featured-collection__headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 400;
  max-width: 720px;
}

.featured-collection__desc {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg2);
}

.featured-collection__hint {
  display: block;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--fg3);
}

/* Stage: the hover area that starts the animation */
.featured-collection__stage {
  position: relative;
  overflow: hidden;
  padding: 8px 0 24px;
}

/* Track: the scrolling strip of cards — paused by default */
.featured-collection__track {
  display: flex;
  gap: 28px;
  width: max-content;
  padding: 0 var(--gutter);
  animation: featured-scroll 32s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

@keyframes featured-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* -50% because track is doubled */
}

/* Starts running when the user hovers over the stage */
.featured-collection__stage:hover .featured-collection__track,
.featured-collection__stage:focus-within .featured-collection__track {
  animation-play-state: running;
}

@media (prefers-reduced-motion: reduce) {
  .featured-collection__track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }
}

/* Edge fades — hide the track edges so it looks seamless */
.featured-collection__fade-left,
.featured-collection__fade-right {
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 24px;
  width: var(--gutter);
  z-index: 1;
}

.featured-collection__fade-left {
  left: 0;
  background: linear-gradient(90deg, var(--mili-fashion-white), transparent);
}

.featured-collection__fade-right {
  right: 0;
  background: linear-gradient(270deg, var(--mili-fashion-white), transparent);
}


/* ── Product card ─────────────────────────────────────────── */

.product-card {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  text-decoration: none;
  color: inherit;
}

.product-card__image {
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-soft);
}

.product-card:hover .product-card__image {
  transform: scale(1.012);
}

.product-card__hover-cta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(18, 16, 17, 0.86);
  color: var(--mili-fashion-white);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity var(--dur-quick) var(--ease-soft),
    transform var(--dur-quick) var(--ease-soft);
}

.product-card:hover .product-card__hover-cta {
  opacity: 1;
  transform: translateY(0);
}

.product-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.05;
  color: var(--fg1);
  transition: text-decoration var(--dur-quick);
}

.product-card:hover .product-card__name {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.product-card__desc {
  font-size: 13px;
  color: var(--fg2);
  margin-top: 4px;
}

.product-card__price {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--fg1);
  white-space: nowrap;
}


/* ── Gallery teaser ───────────────────────────────────────── */

.gallery-teaser {
  padding: 120px var(--gutter);
}

.gallery-teaser__inner {
  max-width: 1280px;
  margin-inline: auto;
}

.gallery-teaser__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
}

.gallery-teaser__headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 400;
  max-width: 720px;
}

.gallery-teaser__desc {
  max-width: 320px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg2);
}

.gallery-teaser__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Each artist card */
.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
}

/* Painted image placeholder — palette variants */
.gallery-card__image {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-soft);
}

.gallery-card:hover .gallery-card__image {
  transform: scale(1.01);
}

/* CSS painted backgrounds per palette */
.gallery-card__image--warm {
  background:
    radial-gradient(ellipse 60% 40% at 20% 60%, rgba(77,27,11,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 30% 30% at 70% 30%, rgba(166,194,196,0.50) 0%, transparent 70%),
    radial-gradient(ellipse 28% 16% at 18% 30%, rgba(230,220,194,0.90) 0%, transparent 70%),
    var(--mili-canvas-200);
}

.gallery-card__image--opal {
  background:
    radial-gradient(ellipse 60% 40% at 22% 62%, rgba(111,142,144,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 30% 30% at 68% 28%, rgba(77,27,11,0.35)  0%, transparent 70%),
    radial-gradient(ellipse 28% 16% at 20% 28%, rgba(226,237,237,0.90) 0%, transparent 70%),
    var(--mili-opal-100);
}

.gallery-card__image--dusk {
  background:
    radial-gradient(ellipse 60% 40% at 20% 60%, rgba(52,18,8,0.60)  0%, transparent 70%),
    radial-gradient(ellipse 30% 30% at 70% 32%, rgba(111,142,144,0.50) 0%, transparent 70%),
    radial-gradient(ellipse 28% 16% at 18% 30%, rgba(182,98,75,0.70)  0%, transparent 70%),
    var(--mili-canvas-200);
}

/* Canvas shape centered inside the painted card */
.gallery-card__canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.gallery-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.gallery-card__artist {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--fg1);
}

.gallery-card__handle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--fg2);
  margin-top: 2px;
}

.gallery-teaser__cta-row {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}

.gallery-teaser__cta {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 15px 27px;
  border: 1px solid var(--mili-shocking-black);
  border-radius: var(--radius-md);
  color: var(--mili-shocking-black);
  text-decoration: none;
  transition: background var(--dur-quick) var(--ease-soft);
}

.gallery-teaser__cta:hover {
  background: var(--mili-canvas-200);
  text-decoration: none;
}


/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 1024px) {
  .vis-teaser__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .vis-teaser__preview {
    aspect-ratio: 16 / 9;
    max-height: 360px;
  }

  .story-strip__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .story-strip__plate {
    height: 360px;
  }

  .featured-collection__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .gallery-teaser__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .gallery-teaser__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero__caption {
    padding: 32px var(--gutter);
  }

  .hero__caption p {
    font-size: 17px;
  }

  .vis-teaser,
  .story-strip,
  .gallery-teaser {
    padding: 80px var(--gutter);
  }

  .featured-collection {
    padding: 80px 0;
  }

  .gallery-teaser__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .product-card {
    flex: 0 0 260px;
  }

  .product-card__image {
    height: 280px;
  }
}
