/* ============================================================
   BARRINGTON — admin-managed HOME sections
   marquee · stats · testimonials · bento. Content is owner-curated
   (KV via /api/home); honest-by-default (renders nothing when empty).
   Dark + one red, reduced-motion safe, no AI-purple. Reuses the
   site tokens (--ink/--panel/--line/--red/--cream/--edge/--lift).
   ============================================================ */

.hm-sec { position: relative; }
.hm-eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase; color: var(--muted-2);
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.hm-eyebrow::before {
  content: ""; width: var(--tick); height: var(--setout-w);
  background: var(--red); display: inline-block; box-shadow: 0 0 12px -2px var(--red);
}

/* ---------- 1 · CREDENTIAL / SUPPLIER MARQUEE ---------- */
.hm-marquee { padding-block: clamp(24px, 4vw, 44px); border-block: 1px solid var(--line); overflow: hidden; }
.hm-marquee__head { color: var(--muted-2); font-size: .72rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; text-align: center; margin-bottom: 20px; }
.hm-marquee__view {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.hm-marquee__track { display: flex; gap: 14px; width: max-content; animation: hm-scroll 42s linear infinite; will-change: transform; }
.hm-marquee__view:hover .hm-marquee__track { animation-play-state: paused; }
.hm-chip {
  display: inline-flex; align-items: center; gap: 11px; white-space: nowrap;
  padding: 12px 20px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); box-shadow: var(--edge);
}
.hm-chip__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); flex: none; }
.hm-chip b { color: var(--cream); font-weight: 700; letter-spacing: .01em; font-size: .95rem; }
.hm-chip span { color: var(--muted); font-size: .82rem; }
@keyframes hm-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .hm-marquee__view { -webkit-mask-image: none; mask-image: none; }
  .hm-marquee__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
}

/* ---------- 2 · STATS / SETTING-OUT COUNTER ---------- */
.hm-stats .container { text-align: center; }
.hm-stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: clamp(22px, 4vw, 48px); margin-top: 8px; }
.hm-stat { position: relative; padding-top: 22px; }
.hm-stat::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: var(--tick); height: var(--setout-w); background: var(--red); }
.hm-stat__num { font-family: var(--serif); font-weight: 700; font-size: clamp(2.7rem, 6.5vw, 4.4rem); line-height: .95; color: var(--cream); font-variant-numeric: lining-nums tabular-nums; }
.hm-stat__num em { font-style: normal; color: var(--red); }
.hm-stat__label { margin-top: 12px; color: var(--muted); font-size: .98rem; line-height: 1.4; }

/* ---------- 3 · TESTIMONIAL / QUOTE WALL ---------- */
.hm-quotes { columns: 3 300px; column-gap: 18px; margin-top: 6px; }
.hm-quote {
  break-inside: avoid; margin: 0 0 18px; padding: 24px 24px 22px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--edge);
}
.hm-quote__mark { font-family: var(--serif); font-size: 2.4rem; line-height: .4; color: var(--red); display: block; height: .7em; }
.hm-quote__text { color: var(--cream); font-size: 1.02rem; line-height: 1.62; }
.hm-quote__by { margin-top: 16px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hm-quote__by b { color: var(--cream); font-weight: 700; font-size: .95rem; }
.hm-quote__by span { color: var(--muted-2); font-size: .85rem; }
.hm-quote__by span::before { content: "· "; }
.hm-quotes--solo { columns: 1; max-width: 640px; margin-inline: auto; }

/* ---------- 4 · BENTO SERVICES / PORTFOLIO GRID ---------- */
.hm-bento__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(0, 1fr); gap: 14px; margin-top: 6px; }
.hm-tile {
  position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line);
  background: var(--panel-2); box-shadow: var(--edge); min-height: 210px;
  display: block; isolation: isolate;
}
.hm-tile--lg { grid-column: span 2; grid-row: span 2; }
.hm-tile--wide { grid-column: span 2; }
.hm-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: var(--img-grade); transition: transform .6s var(--ease-out); }
.hm-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(8,8,10,.18) 60%, rgba(8,8,10,.86)); z-index: 1; }
a.hm-tile:hover img { transform: scale(1.045); }
.hm-tile__cap { position: absolute; left: 0; bottom: 0; z-index: 2; padding: 20px 22px; }
.hm-tile__cap b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(1.05rem, 1.6vw, 1.4rem); color: var(--cream); letter-spacing: .005em; }
.hm-tile__cap span { display: block; margin-top: 5px; color: var(--muted); font-size: .85rem; }
.hm-tile--lg .hm-tile__cap b { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.hm-tile__kick { position: absolute; top: 16px; left: 18px; z-index: 2; font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--muted-2); }
.hm-tile__kick::before { content: ""; display: inline-block; width: 16px; height: var(--setout-w); background: var(--red); vertical-align: middle; margin-right: 8px; }

@media (max-width: 860px) {
  .hm-bento__grid { grid-template-columns: repeat(2, 1fr); }
  .hm-tile--lg { grid-column: span 2; grid-row: span 1; }
  .hm-quotes { columns: 1; }
}
@media (max-width: 460px) {
  .hm-bento__grid { grid-template-columns: 1fr; }
  .hm-tile--lg, .hm-tile--wide { grid-column: span 1; }
}
