/* ==========================================================================
   Homepage — editorial redesign. Mobile-first; scales to a composed desktop
   layout. Scoped under .hp so nothing leaks into other pages. Warm neutral
   palette that matches the footer (ink / gold / cream).
   ========================================================================== */

.hp {
  --hp-ink: #26241f;
  --hp-cream: #f6f2ec;
  --hp-card: #ffffff;
  --hp-muted: #76716a;
  --hp-line: rgba(38, 36, 31, 0.12);
  --hp-gold: #c8a45c;
  --hp-gold-dark: #b1894130;
  background: var(--hp-cream);
  color: var(--hp-ink);
  overflow-x: clip;
}

/* Shared section shell */
.hp-section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.hp-container {
  width: min(100% - 2.5rem, 1240px);
  margin-inline: auto;
}

.hp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.hp-kicker {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hp-gold);
}

.hp-h2 {
  margin: 0;
  font-size: clamp(1.6rem, 1.1rem + 2.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.hp-section-link {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hp-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--hp-gold);
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.hp-section-link:hover {
  color: var(--hp-gold);
}

/* Buttons */
.hp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.hp-btn:hover {
  transform: translateY(-2px);
}

.hp-btn--primary {
  background: var(--hp-ink);
  color: #fff;
}

.hp-btn--primary:hover {
  background: var(--hp-gold);
  color: var(--hp-ink);
}

.hp-btn--ghost {
  border-color: var(--hp-ink);
  color: var(--hp-ink);
}

.hp-btn--ghost:hover {
  background: var(--hp-ink);
  color: #fff;
}

/* ========================== HERO ========================== */
.hp-hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.hp-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 5vw, 3rem);
  align-items: center;
}

.hp-eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--hp-gold);
}

.hp-title {
  margin: 0;
  font-size: clamp(2.4rem, 1.2rem + 7vw, 4.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.hp-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--hp-gold);
}

.hp-lead {
  margin: 1.25rem 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  color: var(--hp-muted);
  line-height: 1.6;
}

.hp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hp-hero-media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 30px 60px -30px rgba(38, 36, 31, 0.45);
}

.hp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Floating stat chip on the hero image */
.hp-hero-chip {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hp-ink);
}

.hp-hero-chip i {
  color: var(--hp-gold);
  font-size: 1.1rem;
}

@media (min-width: 900px) {
  .hp-hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
  }
  .hp-hero-media {
    aspect-ratio: 5 / 6;
  }
}

/* ========================== CATEGORY TILES ========================== */
.hp-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (min-width: 700px) {
  .hp-cats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }
}

@media (min-width: 1000px) {
  .hp-cats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hp-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 96px;
  /* Extra top padding reserves room for the absolute index so a 2-line name
     (bottom-aligned) can't grow up and overlap the counter. */
  padding: 2.2rem 0.9rem 0.9rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--hp-ink);
  background: var(--hp-card);
  border: 1px solid var(--hp-line);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Keep tile text on-theme in every interaction state, so the browser's default
   link blue never shows on hover / focus / tap (notably mobile :active). */
.hp-cat:link,
.hp-cat:visited,
.hp-cat:hover,
.hp-cat:focus,
.hp-cat:active {
  color: var(--hp-ink);
  text-decoration: none;
}

@media (min-width: 700px) {
  .hp-cat {
    min-height: 140px;
  }
}

.hp-cat:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -18px rgba(38, 36, 31, 0.4);
}

/* Rotating warm tints so the tiles read as an editorial set without images */
.hp-cat:nth-child(4n + 1) {
  background: #efe7da;
}
.hp-cat:nth-child(4n + 2) {
  background: #e7ded6;
}
.hp-cat:nth-child(4n + 3) {
  background: #ece4d2;
}
.hp-cat:nth-child(4n + 4) {
  background: #e4ddd2;
}

.hp-cat-index {
  position: absolute;
  top: 0.7rem;
  left: 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--hp-gold);
}

.hp-cat-name {
  font-size: clamp(0.95rem, 0.88rem + 0.6vw, 1.3rem);
  font-weight: 700;
  line-height: 1.15;
}

.hp-cat-go {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hp-muted);
  transition: color 0.2s ease;
}

.hp-cat:hover .hp-cat-go {
  color: var(--hp-ink);
}

/* ========================== PRODUCTS ========================== */
.hp-products {
  background: var(--hp-card);
}

/* Reuse the shared product grid markup; just give the section room to breathe. */
.hp-products .row {
  row-gap: 1.5rem;
}

/* ========================== VALUE STRIP ========================== */
.hp-values-band {
  background: var(--hp-ink);
  color: #fff;
}

.hp-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
}

@media (min-width: 800px) {
  .hp-values {
    /* Two value props left — keep them centered instead of clinging to the
       left edge of a wide 4-up grid. */
    grid-template-columns: repeat(2, minmax(0, 16rem));
    justify-content: center;
    gap: 2rem 4rem;
  }
}

.hp-value {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hp-value i {
  font-size: 1.6rem;
  color: var(--hp-gold);
}

.hp-value-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hp-value-sub {
  font-size: 0.82rem;
  color: #b9b3a8;
  line-height: 1.45;
}

/* ========================== BRAND MARQUEE ========================== */
.hp-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 7%,
    #000 93%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 7%,
    #000 93%,
    transparent
  );
}

.hp-marquee-track {
  display: flex;
  width: max-content;
  /* Uniform trailing margin on EVERY item (incl. the last) — not flex `gap` —
     so the track width is an exact multiple of one item. translateX(-50%)
     then lands precisely one full copy over: seamless loop, no gap, no flash. */
  animation: hp-scroll 55s linear infinite;
  /* Held until the brand logos finish preloading (JS adds .is-ready), so the
     strip never animates through not-yet-loaded, empty squares. */
  animation-play-state: paused;
}

.hp-marquee.is-ready .hp-marquee-track {
  animation-play-state: running;
}

/* Each half is one flex run; the track holds two identical halves. */
.hp-marquee-half {
  display: flex;
  flex: 0 0 auto;
}

.hp-marquee:hover .hp-marquee-track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .hp-marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    gap: 1.1rem;
    justify-content: center;
  }
  /* Collapse the halves so the real logos flow into the wrap, and drop the
     decorative duplicates so each brand appears once. */
  .hp-marquee-half {
    display: contents;
  }
  .hp-brand--dup {
    display: none;
  }
  .hp-marquee-track .hp-brand {
    margin-right: 0;
  }
}

@keyframes hp-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.hp-brand {
  flex: 0 0 auto;
  margin-right: 1.1rem;
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--hp-card);
  border: 1px solid var(--hp-line);
  border-radius: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hp-brand:hover {
  border-color: var(--hp-gold);
  box-shadow: 0 12px 24px -14px rgba(38, 36, 31, 0.4);
}

.hp-brand img {
  /* Fill the padded box and let object-fit scale + center the logo on both
     axes, regardless of the logo's intrinsic aspect ratio. */
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* ========================== CLOSING CTA ========================== */
.hp-cta-band {
  background: linear-gradient(135deg, #2c2a23, #3a352b);
  color: #fff;
  text-align: center;
}

.hp-cta-band .hp-h2 {
  color: #fff;
  max-width: 18ch;
  margin-inline: auto;
}

.hp-cta-band p {
  margin: 1rem auto 2rem;
  max-width: 50ch;
  color: #c9c3b8;
  line-height: 1.6;
}
