/* ==========================================================================
   assets/css/home.css — the homepage (index.php), loaded only there.

   Built on the approved design's tokens from jbm.css — charcoal --ink, JBM
   --yellow, warm --paper, --line, the 9px --radius (and multiples of it for
   the larger panels), Arial — so it reads as the same brand with more room
   for photography. Every class is hm-*, so nothing here can reach another page.

   Depth is a three-layer shadow (contact, near, long and soft), never a border
   standing in for one. Motion is a lift on hover; prefers-reduced-motion keeps
   everything still.
   ========================================================================== */

.hm { --hm-r: calc(var(--radius) * 1.5); --hm-R: calc(var(--radius) * 2); --hm-gold-ink: #8a6300;
      --hm-shadow: 0 1px 2px rgba(23,27,25,.05), 0 8px 18px -10px rgba(23,27,25,.18), 0 26px 44px -30px rgba(23,27,25,.45);
      --hm-shadow-lift: 0 2px 4px rgba(23,27,25,.06), 0 16px 28px -12px rgba(23,27,25,.24), 0 38px 60px -34px rgba(23,27,25,.55); }
.hm a:focus-visible, .hm button:focus-visible, .hm input:focus-visible { outline: 3px solid #a67d00; outline-offset: 3px; }

/* --- Hero ---------------------------------------------------------------- */
.hm-hero {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 24px; min-height: 600px;
  border-radius: var(--hm-R); background: var(--ink); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; padding: 64px clamp(24px, 5vw, 64px) 128px;
  box-shadow: 0 2px 6px rgba(23,27,25,.18), 0 30px 60px -36px rgba(23,27,25,.8);
}
.hm-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; z-index: -2; }
.hm-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(23,27,25,.95) 0%, rgba(23,27,25,.88) 32%, rgba(23,27,25,.45) 60%, rgba(23,27,25,.08) 100%),
    linear-gradient(0deg, rgba(23,27,25,.7) 0%, rgba(23,27,25,0) 34%);
}
.hm-hero-slash { position: absolute; top: 0; left: 54%; width: 56px; height: 150px; z-index: 0;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-hover)); transform: skew(-24deg); }
.hm-hero-copy { position: relative; z-index: 1; max-width: 600px; min-width: 0; }
.hm-hero > * { min-width: 0; }
.hm-eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--yellow); }
.hm-hero h1 { font-size: clamp(40px, 5.2vw, 72px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; margin: 16px 0 18px; color: #fff; }
.hm-hero-text { font-size: 19px; line-height: 1.5; color: #d5d9d6; max-width: 470px; }

.hm-search { margin-top: 28px; max-width: 560px; padding: 14px; border-radius: 14px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px); }
.hm-search label { display: block; margin: 0 0 8px 4px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #eef0ee; }
.hm-search-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px; padding: 6px 6px 6px 14px; }
.hm-search-row .icon { width: 20px; height: 20px; color: #69706c; }
.hm-search-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; padding: 10px 0; }
.hm-search-row .button { min-height: 44px; }

.hm-hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hm-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: var(--radius);
  font-size: 15px; font-weight: 800; transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.hm-btn-light { background: var(--yellow); color: var(--ink); box-shadow: 0 10px 22px -12px rgba(246,191,20,.9); }
.hm-btn-light:hover { background: var(--yellow-hover); }
.hm-btn-ghost { border: 1.5px solid rgba(255,255,255,.55); color: #fff; }
.hm-btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.hm-btn-dark { background: var(--ink); color: #fff; box-shadow: 0 10px 22px -12px rgba(23,27,25,.8); }
.hm-btn-dark:hover { background: #2c3330; }
.hm-btn-outline { border: 1.5px solid var(--ink); color: var(--ink); }
.hm-btn-outline:hover { background: rgba(23,27,25,.06); }

.hm-facts { position: absolute; z-index: 1; left: clamp(24px, 5vw, 64px); right: clamp(24px, 5vw, 64px); bottom: 28px;
  display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.hm-facts li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: rgba(23,27,25,.55); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); }
.hm-facts strong { color: var(--yellow); font-size: 15px; }
.hm-facts .icon { width: 18px; height: 18px; color: var(--yellow); }

/* --- What the site does -------------------------------------------------- */
.hm-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--hm-r); box-shadow: var(--hm-shadow); }
.hm-value { display: flex; gap: 14px; padding: 18px; min-width: 0; }
.hm-value + .hm-value { border-left: 1px solid var(--line); }
.hm-value-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--ink);
  background: linear-gradient(145deg, #ffd75a, var(--yellow-hover));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.1), 0 8px 16px -10px rgba(229,173,3,.9); }
.hm-value-icon .icon { width: 22px; height: 22px; }
.hm-value h2 { font-size: 15px; letter-spacing: -.01em; margin: 2px 0 4px; }
.hm-value p { font-size: 13px; line-height: 1.45; color: var(--muted); }

/* --- Section furniture --------------------------------------------------- */
.hm-section { margin-top: 76px; }
.hm-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.hm-heading h2, .hm-steps h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -.028em; }
.hm-kicker { font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--hm-gold-ink); margin-bottom: 8px; }
.hm-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; padding-bottom: 3px; border-bottom: 2px solid var(--yellow); white-space: nowrap; }
.hm-link .icon { width: 18px; height: 18px; transition: transform .2s; }
.hm-link:hover .icon { transform: translateX(3px); }
.hm-link-light { color: #fff; }

/* --- Categories ---------------------------------------------------------- */
.hm-categories { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.hm-category { position: relative; isolation: isolate; display: block; overflow: hidden; aspect-ratio: 3 / 4;
  border-radius: var(--hm-r); background: var(--paper); box-shadow: var(--hm-shadow); transition: transform .3s, box-shadow .3s; }
.hm-category-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hm-category-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,27,25,0) 38%, rgba(23,27,25,.86) 100%); }
.hm-category-copy { position: absolute; left: 18px; right: 60px; bottom: 16px; display: grid; gap: 2px; color: #fff; }
.hm-category-copy strong { font-size: 19px; letter-spacing: -.01em; }
.hm-category-copy span { font-size: 13px; color: #e3e6e3; }
.hm-category-arrow { position: absolute; right: 14px; bottom: 16px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--yellow); color: var(--ink); box-shadow: 0 8px 16px -8px rgba(0,0,0,.6); transition: transform .3s; }
.hm-category-arrow .icon { width: 18px; height: 18px; }

/* --- Products ------------------------------------------------------------ */
.hm-products { margin-top: 76px; padding: 64px 0 70px; background: var(--paper); }
.hm-shelves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.hm-shelf { display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: var(--hm-r); box-shadow: var(--hm-shadow); transition: transform .3s, box-shadow .3s; }
.hm-shelf-head { position: relative; isolation: isolate; display: block; height: 190px; overflow: hidden; }
.hm-shelf-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hm-shelf-title { position: absolute; left: 20px; right: 20px; bottom: 16px; display: grid; gap: 2px; color: #fff; }
.hm-shelf-title strong { font-size: 24px; letter-spacing: -.02em; }
.hm-shelf-title span { font-size: 13px; color: #e3e6e3; }
.hm-shelf-list { list-style: none; margin: 0; padding: 8px 20px; flex: 1; }
.hm-shelf-list li + li { border-top: 1px solid var(--line); }
.hm-shelf-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 13px 0; }
.hm-shelf-list a:hover .hm-shelf-name { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hm-shelf-name { font-size: 14px; font-weight: 700; line-height: 1.35; min-width: 0; }
.hm-shelf-price { flex-shrink: 0; font-size: 15px; font-weight: 800; white-space: nowrap; }
.hm-shelf-price small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.hm-shelf-more { align-self: flex-start; margin: 4px 20px 22px; }

/* --- How ordering works -------------------------------------------------- */
.hm-ordering { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hm-collage { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, 210px); gap: 14px; }
.hm-collage-photo { width: 100%; height: 100%; object-fit: cover; border-radius: var(--hm-r); box-shadow: var(--hm-shadow); }
.hm-collage-1 { grid-row: 1 / span 2; }
.hm-collage-3 { display: none; }
.hm-collage-stat { display: grid; align-content: end; gap: 4px; padding: 22px; border-radius: var(--hm-r); color: var(--ink);
  background: linear-gradient(145deg, #ffd75a, var(--yellow-hover));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 18px 32px -20px rgba(229,173,3,.9); }
.hm-collage-stat strong { font-size: 48px; line-height: 1; letter-spacing: -.03em; }
.hm-collage-stat span { font-size: 15px; font-weight: 700; }
.hm-steps ol { list-style: none; margin: 22px 0 0; padding: 0; }
.hm-steps li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.hm-steps li:last-child { border-bottom: 0; }
.hm-step-n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 800;
  background: var(--ink); color: var(--yellow); box-shadow: 0 8px 16px -8px rgba(23,27,25,.7); }
.hm-steps h3 { font-size: 17px; margin: 2px 0 4px; }
.hm-steps p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.hm-postcode { display: flex; gap: 8px; max-width: 340px; margin-top: 12px; }
.hm-postcode input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; font-size: 15px; border: 1px solid #d8dad6; border-radius: var(--radius); background: #fff; }
.hm-postcode .button { min-height: 44px; }
.hm-postcode-status { font-size: 13px; color: var(--muted); margin-top: 6px; min-height: 1.2em; }

/* --- Neighbouring sections inside the homepage --------------------------- */
.hm .clearance { margin-top: 76px; }
.hm .mp-home { margin-top: 76px; }

/* --- Help ---------------------------------------------------------------- */
.hm-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.hm-help-card { position: relative; overflow: hidden; min-height: 240px; border-radius: var(--hm-r); box-shadow: var(--hm-shadow); transition: transform .3s, box-shadow .3s; }
.hm-help-card h3 { font-size: 24px; letter-spacing: -.02em; margin: 16px 0 8px; }
.hm-help-card p { font-size: 15px; line-height: 1.55; margin-bottom: 18px; max-width: 460px; }
.hm-help-dark { padding: 32px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #2c3530 0%, var(--ink) 60%); }
.hm-help-dark p { color: #c6cac7; }
.hm-help-icon { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; color: var(--ink);
  background: linear-gradient(145deg, #ffd75a, var(--yellow-hover)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 20px -10px rgba(246,191,20,.9); }
.hm-help-icon .icon { width: 24px; height: 24px; }
.hm-help-photo { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); background: #fff; border: 1px solid var(--line); }
.hm-help-photo img { width: 100%; height: 100%; object-fit: cover; }
.hm-help-photo > div { padding: 32px 30px; }
.hm-help-photo h3 { margin-top: 0; }
.hm-help-photo p { color: var(--muted); }

/* --- Closing band -------------------------------------------------------- */
.hm-cta { margin-top: 76px; padding: 52px 0; background: linear-gradient(100deg, var(--yellow) 0%, #ffd34d 100%); }
.hm-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.hm-cta h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.025em; color: var(--ink); }
.hm-cta p { font-size: 16px; color: #3a3420; margin-top: 6px; }
.hm-cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Hover depth --------------------------------------------------------- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .hm-category:hover, .hm-category:focus-visible { transform: translateY(-5px); box-shadow: var(--hm-shadow-lift); }
  .hm-category:hover .hm-category-photo, .hm-shelf-head:hover .hm-shelf-photo { transform: scale(1.06); }
  .hm-category:hover .hm-category-arrow { transform: translateX(3px); }
  .hm-shelf:hover, .hm-help-card:hover { transform: translateY(-4px); box-shadow: var(--hm-shadow-lift); }
  .hm-btn:hover { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .hm * { transition: none !important; }
}

/* --- Narrower screens ---------------------------------------------------- */
@media (max-width: 1100px) {
  .hm-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-value:nth-child(3) { border-left: 0; }
  .hm-value:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hm-ordering { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hm-shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-help { grid-template-columns: minmax(0, 1fr); }
  .hm-hero-slash { left: 64%; }
}
@media (max-width: 760px) {
  .hm-hero { min-height: 0; padding: 40px 22px 150px; margin-top: 16px; }
  .hm-hero::before { background: linear-gradient(180deg, rgba(23,27,25,.86) 0%, rgba(23,27,25,.78) 60%, rgba(23,27,25,.9) 100%); }
  .hm-hero-slash { display: none; }
  .hm-hero-text { font-size: 17px; }
  .hm-facts { left: 22px; right: 22px; bottom: 22px; gap: 8px; }
  .hm-facts li { font-size: 12.5px; padding: 7px 12px; }
  .hm-values { grid-template-columns: minmax(0, 1fr); }
  .hm-value + .hm-value { border-left: 0; border-top: 1px solid var(--line); }
  .hm-section, .hm-products, .hm .clearance, .hm .mp-home, .hm-cta { margin-top: 56px; }
  .hm-heading { flex-direction: column; align-items: flex-start; }
  .hm-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hm-category-copy { left: 14px; right: 50px; bottom: 12px; }
  .hm-category-copy strong { font-size: 16px; }
  .hm-category-arrow { width: 32px; height: 32px; right: 10px; bottom: 12px; }
  .hm-collage { grid-template-rows: repeat(2, 150px); }
  .hm-collage-stat strong { font-size: 36px; }
  .hm-help, .hm-shelves { grid-template-columns: minmax(0, 1fr); }
  .hm-help-photo { grid-template-columns: minmax(0, 1fr); }
  .hm-help-photo img { height: 180px; }
  .hm-postcode input { font-size: 16px; }
  .hm-search-row input { font-size: 16px; }
}
