/* ==========================================================================
   LIVSDO — Home page
   ========================================================================== */

/* ==========================================================================
   Hero
   Sized to its own content rather than to the viewport, so the sections below
   are part of the first frame instead of being pushed off it.
   ========================================================================== */

.hero {
  position: relative;
  background: var(--c-navy);
  min-height: clamp(420px, 52vw, 640px);
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* The supplied hero is a styled tabletop still life; biasing the crop down
     keeps the table surface in frame instead of centring on the wall behind. */
  object-position: center 58%;
}
/* Two stops rather than a flat scrim: the top of the image stays open and the
   type sits on enough darkness to hold contrast. */
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 24, 77, 0.88) 0%,
    rgba(2, 24, 77, 0.55) 34%,
    rgba(2, 24, 77, 0.10) 62%,
    rgba(2, 24, 77, 0) 80%
  );
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  width: 100%;
}
.hero__content { max-width: 34rem; }
.hero__eyebrow { color: var(--c-lime); margin-bottom: var(--s-4); }
.hero__title {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-display);
  line-height: 1.04;
  color: var(--c-white);
  letter-spacing: var(--ls-hero);
}
.hero__body {
  margin-top: var(--s-4);
  color: var(--c-on-dark);
  font-size: var(--fs-base);
  max-width: 30rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero__caption {
  position: absolute;
  right: var(--gutter);
  bottom: var(--s-5);
  z-index: 1;
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  color: var(--c-on-dark-muted);
  text-align: right;
}
@media (max-width: 767.98px) {
  .hero__caption { display: none; }
}

/* ==========================================================================
   Shop by category
   ========================================================================== */

/* Laid out to Ref/livsdo-homepage.html: a stack of rows rather than one grid
   of cards. Each row is four cells across at a single fixed height, holding
   three photographs and one text callout, and the callout changes position
   from row to row (home.js decides which cell) so the block reads as a set of
   bands rather than a column of identical stripes.

   Two departures from the mockup, both deliberate:

   The mockup pins every row to 320px. That is what makes the rows read as
   bands, so it is kept — but only from the four-across breakpoint up. Below
   it the height is released, because a 320px cell two-across on a phone crops
   the furniture down to a detail.

   Colour comes from LIVSDO's own tokens, not the mockup's linen / graphite /
   oxide palette. Every other section on this page is built on the navy-and-
   lime set, and bringing a second palette in for one band would leave it
   looking imported. The structure, proportions, gutters and behaviour are the
   mockup's throughout. */

.category-rows {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.category-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 992px) {
  .category-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 320px;
  }
}

/* ---- photograph cell ---------------------------------------------------- */

/* The three photographs repeat the callout's own link, so they are taken out
   of the tab order and hidden from assistive tech in the markup — four links
   to the same collection would otherwise be read out for every row. */
.cat-plain {
  position: relative;
  overflow: hidden;
  background: var(--c-tint);
  aspect-ratio: 1 / 1;
}
@media (min-width: 992px) { .cat-plain { aspect-ratio: auto; } }

.cat-plain img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
@media (hover: hover) { .cat-plain:hover img { transform: scale(1.05); } }

/* ---- text cell ---------------------------------------------------------- */

.cat-callout {
  position: relative;
  background: var(--c-tint);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* On a phone the row is two across; the callout takes the full width there so
   the category name is not squeezed into half a screen. */
@media (max-width: 991.98px) { .cat-callout { grid-column: 1 / -1; } }

/* The mockup's short accent bar in the top-left corner. */
.cat-callout::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 34px; height: 4px;
  background: var(--c-lime);
}

.cat-callout__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-bottom: var(--s-4);
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-ink);
}
.cat-callout__link svg { transition: transform var(--t-fast) var(--ease); }
.cat-callout:hover .cat-callout__link svg { transform: translateX(3px); }

.cat-callout__name {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-display);
  margin-bottom: var(--s-3);
}
.cat-callout:hover .cat-callout__name { color: var(--c-blue); }

/* These category descriptions run longer than the mockup's one-liners, and a
   fixed 320px cell has no give. Clamped rather than left to overflow, which
   would push the text out under the accent bar of the row below. */
.cat-callout__desc {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .cat-callout { padding: var(--s-5); }
  .cat-callout__name { font-size: var(--fs-h3); }
  .cat-callout__desc { -webkit-line-clamp: 3; }
}

/* ==========================================================================
   Brand story — three alternating blocks
   ========================================================================== */

.story-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: var(--s-8);
}
.story-head__title {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h1);
  line-height: 1.16;
  max-width: 18ch;
  letter-spacing: var(--ls-display);
}
.story-head__action { flex: none; }

.story-block {
  display: grid;
  align-items: center;
  gap: clamp(1.5rem, 0.5rem + 4vw, 4.5rem);
}
.story-block + .story-block { margin-top: var(--s-9); }
@media (min-width: 768px) {
  .story-block { grid-template-columns: 1fr 1.15fr; }
  /* Image right by default; `--left` swaps the columns without reordering the
     DOM, so the text still comes first for a screen reader. */
  .story-block--left .story-block__text  { order: 2; }
  .story-block--left .story-block__media { order: 1; }
}
.story-block__media { overflow: hidden; background: var(--c-tint); }
.story-block__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Desaturated so the craft photography reads as one editorial set rather
     than as three unrelated photographs. */
  filter: grayscale(100%);
  transition: filter var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
@media (hover: hover) {
  .story-block:hover .story-block__media img { filter: grayscale(0%); transform: scale(1.02); }
}
.story-block__index {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  color: var(--c-blue);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-3);
}
.story-block__title { font-size: var(--fs-h3); margin-bottom: var(--s-4); }
.story-block__body { font-size: var(--fs-sm); color: var(--c-muted); max-width: 42ch; }
.story-block__cta { margin-top: var(--s-5); }

/* ==========================================================================
   New arrivals — deterministic editorial grid
   Six cards. The first spans two columns and two rows; the remaining five fill
   exactly around it, so the grid tiles completely with no holes and no
   masonry script. Card heights vary; row edges still align.
   ========================================================================== */

.arrivals {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 576px) {
  .arrivals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arrivals > :first-child { grid-column: span 2; }
}
@media (min-width: 992px) {
  .arrivals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: clamp(200px, 19vw, 280px);
    gap: var(--s-5);
  }
  .arrivals > :first-child { grid-column: span 2; grid-row: span 2; }
  /* Every card stretches to its grid area, so the well fills the row rather
     than leaving a gap under a shorter image. */
  .arrivals > * { min-height: 0; }
  .arrivals .pcard { display: flex; flex-direction: column; height: 100%; }
  .arrivals .pcard__media { flex: 1 1 auto; aspect-ratio: auto; min-height: 0; }
  .arrivals .pcard__body { flex: none; }
}

/* ==========================================================================
   Manufacturing unit
   ========================================================================== */

.mfg { background: var(--c-navy); color: var(--c-white); }
.mfg__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}
@media (min-width: 992px) { .mfg__grid { grid-template-columns: 1fr 1.1fr; } }

.mfg__eyebrow { color: var(--c-lime); margin-bottom: var(--s-4); }
.mfg__title {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h1);
  line-height: 1.18;
  color: var(--c-white);
  letter-spacing: var(--ls-display);
}
.mfg__body { margin-top: var(--s-5); color: var(--c-on-dark-muted); font-size: var(--fs-sm); max-width: 46ch; }
.mfg__cta { margin-top: var(--s-6); }

.mfg__media { overflow: hidden; }
.mfg__media img { width: 100%; height: 100%; object-fit: cover; }

.mfg__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.mfg__stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-display);
  color: var(--c-lime);
  line-height: 1;
}
.mfg__stat-label {
  margin-top: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--c-on-dark-muted);
  line-height: 1.45;
}
@media (max-width: 575.98px) {
  .mfg__stats { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* ==========================================================================
   Four brand differentiators
   ========================================================================== */

.usp-grid {
  display: grid;
  gap: var(--s-6) var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 576px) { .usp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .usp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.usp {
  padding-top: var(--s-5);
  border-top: 2px solid var(--c-navy);
}
.usp__icon {
  color: var(--c-blue);
  margin-bottom: var(--s-4);
}
.usp__title { font-size: var(--fs-h3); margin-bottom: var(--s-3); }
.usp__body { font-size: var(--fs-sm); color: var(--c-muted); }

/* ==========================================================================
   Newsletter strip
   ========================================================================== */

.news-strip {
  border-top: var(--border);
  border-bottom: var(--border);
}
.news-strip__grid {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  padding-block: var(--s-7);
}
@media (min-width: 768px) {
  .news-strip__grid { grid-template-columns: 1fr auto; gap: var(--s-8); }
}
.news-strip__title {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h2);
  line-height: 1.2;
  max-width: 22ch;
  letter-spacing: var(--ls-display);
}
.news-strip__body { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--c-muted); max-width: 46ch; }
.news-strip__form { min-width: min(100%, 26rem); }
.news-strip__consent { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--c-muted); }
