/* ==========================================================================
   Homepage sections
   ========================================================================== */

/* The homepage keeps the warm off-white page background (inner pages are white, see base.css) */
body { background: var(--color-bg); }

/* ---- Hero slider (full width, copy centred on the calm upper wall) ---- */
.hero__slide { position: relative; }
.hero .media--hero { aspect-ratio: auto; height: 700px; }   /* desktop banner height; tablets and phones keep their ratio below */
.hero__slide .media::after {
  /* soft lift behind the copy so it reads on any photo */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 62%;
  background: linear-gradient(to bottom, var(--color-veil), transparent);
  pointer-events: none;
}
.hero__copy {
  position: absolute;
  inset: var(--space-10) 0 auto;
  z-index: var(--z-raised);
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding-inline: var(--container-gutter);
  text-align: center;
}
.hero__title { max-width: 18ch; font: var(--fw-black) var(--fs-5xl) / var(--lh-tight) var(--font-family); text-wrap: balance; }
.hero__lead { max-width: 46ch; font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--color-text); }
.hero__copy .btn { margin-top: var(--space-2); }
/* ---- Shop by room (sand band + draggable tile carousel) ---- */
.rooms-band { padding: 48px; }
.rooms-rail { --rail-cols: 6.4; --rail-gap: var(--space-3); }   /* tiles at half the earlier size (3.2 per row) */
.rooms-rail .tile__label { inset-inline: var(--space-3); bottom: var(--space-3); font-size: var(--fs-md); }   /* sized for the smaller tiles */
.rooms-band__title { margin-bottom: var(--space-10); text-align: center; font: var(--fw-bold) var(--fs-3xl) / var(--lh-heading) var(--font-family); text-wrap: balance; }
/* ---- Best sellers + New arrivals: the same five columns, so their cards line up ---- */
.best-top,
.arrivals { --five-gap: var(--space-6); }
.best-top { --rail-cols: 5; --rail-gap: var(--five-gap); }   /* a rail, so phones swipe it */
.arrivals { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--five-gap); }
/* New arrivals: the sand panel + four cards */
.arrivals__panel {
  display: grid;
  align-content: space-between;
  gap: var(--space-8);
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-sand-soft);
}
.arrivals__lead { margin-top: var(--space-3); color: var(--color-text-muted); }
.arrivals__actions { display: grid; gap: var(--space-4); justify-items: start; }
.arrivals .rail { --rail-cols: 4; --rail-gap: var(--five-gap); grid-column: span 4; }
/* ---- Collection (Kalma, Larkbury range): story + room photo, then the pieces ---- */
.collection { padding-block: var(--space-10); }
.collection__head { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--space-10); align-items: center; margin-bottom: var(--space-9); }
.collection__copy { display: grid; justify-items: start; gap: var(--space-4); color: var(--color-text-muted); }
.collection__title { font: var(--fw-black) var(--fs-3xl) / var(--lh-heading) var(--font-family); color: var(--color-text); }
.collection__sum strong { font-size: var(--fs-xl); font-weight: var(--fw-black); color: var(--color-text); }
.collection__sum small { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--color-text-subtle); }
/* Room photos: a one-photo rail you drag or swipe, counter in the corner, arrows below */
.collection__rail { --rail-cols: 1; --rail-gap: 0px; height: 100%; }   /* 0px, not 0: a bare 0 breaks the rail's calc() */
.collection__count {
  position: absolute;
  top: var(--space-4);
  inset-inline-end: var(--space-4);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-glass);
  box-shadow: var(--shadow-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  direction: ltr;   /* "1 / 4": RTL text would flip it to "4 / 1" */
}
.collection__arrows { position: absolute; bottom: var(--space-4); inset-inline-start: var(--space-4); }
.collection__pieces { --rail-cols: 3; }
.collection__pieces .product-card { --ratio: 5 / 4; }
.collection__pieces .media { background: var(--color-white); }
.collection__pieces .media img + img { position: absolute; inset: 0; opacity: 0; transition: opacity var(--duration-base) var(--ease-out); }
.collection__pieces .product-card:hover .media img + img { opacity: 1; }   /* the piece in the room on hover */
.collection__desc { margin-bottom: var(--space-2); font-size: var(--fs-sm); color: var(--color-text-subtle); }

/* ---- Made to order ---- */
.mto__grid { display: grid; grid-template-columns: 1fr 1.25fr; }
.mto__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* align the text with the container edge while the photo bleeds */
  padding-block: var(--space-13);
  padding-inline-start: var(--edge-offset);
  padding-inline-end: var(--space-11);
}
.mto__title { margin-bottom: var(--space-3); font: var(--fw-black) var(--fs-4xl) / var(--lh-tight) var(--font-family); color: var(--color-on-dark); }
.mto__lead { margin-bottom: 44px; font-size: var(--fs-lg); color: var(--color-on-dark-muted); }
.promises { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7) var(--space-8); margin-bottom: var(--space-10); }
.promises li { display: flex; gap: 14px; align-items: flex-start; padding-top: 18px; border-top: 1px solid var(--color-line-on-dark); }
.promises .icon { --icon-size: 26px; color: var(--color-sand); }
.promises strong { display: block; font-weight: var(--fw-semibold); color: var(--color-on-dark); }

/* ---- Shop the look: big photo + promo tile + three photos; a dot opens the product card ---- */
.look__grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr; grid-template-rows: 208px 104px 208px; gap: var(--space-3); }
/* The big photo fills the first column. The other four are staggered: in the top row the first is
   shorter than the second, in the bottom row the first is taller (short = 2 rows' share, tall = 3). */
.look__grid > :nth-child(1) { grid-column: 1; grid-row: 1 / 4; }
.look__grid > :nth-child(2) { grid-column: 2; grid-row: 1; }
.look__grid > :nth-child(3) { grid-column: 3; grid-row: 1 / 3; }
.look__grid > :nth-child(4) { grid-column: 2; grid-row: 2 / 4; }
.look__grid > :nth-child(5) { grid-column: 3; grid-row: 3; }
.look__photo { position: relative; overflow: visible; height: 100%; border-radius: var(--radius-md); }
.look__photo > img { border-radius: inherit; }
.look__promo {
  display: grid;
  align-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-white);
}
.look__kicker { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); opacity: .85; }
.look__title { display: block; margin-top: var(--space-2); font: var(--fw-bold) var(--fs-xl) / var(--lh-heading) var(--font-family); }
.look__promo .icon-btn { justify-self: start; background: var(--color-white); color: var(--color-accent); transition: transform var(--duration-base) var(--ease-out); }
.look__promo:hover .icon-btn { transform: translateX(-4px); }
.look__promo:dir(ltr):hover .icon-btn { transform: translateX(4px); }
.hotspot[aria-expanded="true"]::before { background: var(--color-accent); transform: scale(1.3); }
/* The card a dot opens (placed by main.js; a sheet at the bottom on phones) */
.spot-card {
  position: absolute;
  z-index: var(--z-overlay);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--space-3);
  align-items: center;
  width: 260px;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}
.spot-card[hidden] { display: none; }
.spot-card img { width: 64px; height: 64px; border-radius: var(--radius-xs); object-fit: cover; }
.spot-card__name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 1.4; }
.spot-card__price { margin-top: 2px; font-weight: var(--fw-bold); }
.spot-card__price small { font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.spot-card .btn { grid-column: 1 / -1; justify-content: center; }

/* ---- Trust strip ---- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust__item { display: flex; gap: var(--space-4); align-items: center; padding: 2px var(--space-7); }
.trust__item + .trust__item { border-inline-start: 1px solid var(--color-line-on-green); }
.trust .icon { color: var(--color-sand); }
.trust strong { display: block; font-weight: var(--fw-semibold); }
.trust span { font-size: var(--fs-sm); color: var(--color-sand); }


/* ==========================================================================
   Tablets and phones (breakpoints in tokens.css)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero .media--hero { --ratio: 4 / 3; aspect-ratio: var(--ratio); height: auto; }
  .hero__copy { inset-block-start: var(--space-10); }

  .trust { grid-template-columns: 1fr 1fr; }
  .trust__item { padding: 2px var(--space-5); }
  .trust__item:nth-child(odd) { border-inline-start: 0; }
  .trust__item:nth-child(n + 3) { border-top: 1px solid var(--color-line-on-green); }

  .rooms-band { padding: 48px 0; }
  .rooms-band__title { margin-bottom: var(--space-8); }
  .rooms-rail { --rail-cols: 4.6; }
  .best-top { --rail-cols: 3.3; }

  /* New arrivals: the panel becomes a header row above the rail */
  .arrivals { grid-template-columns: 1fr; }
  .arrivals__panel { grid-template-columns: 1fr auto; align-items: end; }
  .arrivals .rail { --rail-cols: 3.3; grid-column: auto; }

  .collection { padding-block: var(--space-10); }
  .collection__head { grid-template-columns: 1fr; gap: var(--space-8); }

  /* the big photo on top, then the same stagger in two columns */
  .look__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 340px 160px 80px 160px; }
  .look__grid > :nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
  .look__grid > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .look__grid > :nth-child(3) { grid-column: 2; grid-row: 2 / 4; }
  .look__grid > :nth-child(4) { grid-column: 1; grid-row: 3 / 5; }
  .look__grid > :nth-child(5) { grid-column: 2; grid-row: 4; }

  .mto__grid { grid-template-columns: 1fr; }
  .mto__grid .media { --ratio: 16 / 9; order: -1; }   /* the photo leads */
  .mto__copy { padding: var(--space-11) var(--edge-offset); }
}

@media (max-width: 640px) {
  .hero .media--hero { --ratio: 4 / 5; }
  .hero__copy { inset-block-start: var(--space-8); }
  .hero__lead { font-size: var(--fs-base); }

  .trust__item { flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: 2px var(--space-4); }
  .trust .icon { --icon-size: 26px; }

  .rooms-band__title { margin-bottom: var(--space-6); }
  .rooms-rail { --rail-cols: 3.2; }
  .look__grid { grid-template-rows: 280px 130px 65px 130px; }
  .look__promo { padding: var(--space-4); }
  .look__title { font-size: var(--fs-lg); }
  .spot-card { position: fixed; inset: auto var(--space-4) var(--space-4); width: auto; }
  .rooms-rail .tile__label { inset-inline: var(--space-2); bottom: var(--space-2); font-size: var(--fs-sm); }
  .best-top { --rail-cols: 1.8; }

  .arrivals__panel { grid-template-columns: 1fr; gap: var(--space-5); padding: var(--space-6) var(--space-5); }
  .arrivals .rail { --rail-cols: 1.8; }

  .collection__head { gap: var(--space-6); margin-bottom: var(--space-6); }
  .collection__pieces { --rail-cols: 1.3; }

  .mto__grid .media { --ratio: 4 / 3; }
  .mto__copy { padding-block: var(--space-10); }
  .mto__lead { margin-bottom: var(--space-6); }
  .promises { grid-template-columns: 1fr; gap: var(--space-4); margin-bottom: var(--space-8); }
}
