/* Home: "today's best local deals" (round 2, Nov 13). Loads after
   residents.css on the front page only (includes/home-page.php).
   Design-system tokens (system.css); 5px corners, never pills; Poppins
   headings, DM Sans text. Light and simple: white space, few heavy blocks. */

/* ── Rise-in, on top of visible content ─────────────────────────────
   Nothing is hidden by default. The script adds .hm-rise to a block that
   started below the screen when it scrolls in. */
@keyframes hm-rise { from { opacity: 0; translate: 0 22px; } }
@media (prefers-reduced-motion: no-preference) {
	.cul-home4 .hm-rise { animation: hm-rise .55s ease both; }
}

.hm-sub { margin: -14px 0 22px !important; color: var(--ui-muted, #55657A); font-size: 1rem; }
.hm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* ── Hero: the deals themselves ─────────────────────────────────── */
.hm-hero { background: var(--ui-navy, #1B3A5C); color: #fff; padding: 56px 0 48px; }
.hm-hero__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.cul-home4 .hm-hero__kick { margin: 12px 0 0 !important; font: 500 clamp(1.15rem, 1rem + .6vw, 1.45rem)/1.35 var(--ui-font) !important; color: rgba(255,255,255,.92) !important; }
.cul-home4 .hm-hero__kick b { font: 700 1.3em var(--ui-font-display); color: rgba(255,255,255,.82); }
.cul-home4 .hm-hero__h1 { margin: 0 !important; font: 700 clamp(2rem, 1.1rem + 3vw, 3.6rem)/1.05 var(--ui-font-display) !important; letter-spacing: -.03em; color: #fff !important; max-width: 18ch; }
.hm-hero__nav { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.hm-arrow { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 5px; background: rgba(255,255,255,.12); color: #fff; font: 600 1.2rem var(--ui-font-display); cursor: pointer; transition: background-color .15s ease; }
.hm-arrow:hover:not(:disabled) { background: rgba(255,255,255,.24); }
.hm-arrow:disabled { opacity: .35; cursor: default; }
.hm-arrow:focus-visible, .hm-hero__all:focus-visible, .hm-deals:focus-visible { outline: 3px solid #F4B987; outline-offset: 2px; }
.hm-hero__all { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 5px; background: var(--rx-btn, #BC5A0E); color: #fff !important; font: 600 1rem var(--ui-font-display); text-decoration: none !important; white-space: nowrap; }
.hm-hero__all:hover { background: var(--rx-btn-h, #9E4A0A); }
.hm-hero__none { margin: 0; font-size: 1.1rem; color: rgba(255,255,255,.9); }
.hm-hero__none a { color: rgba(255,255,255,.82) !important; }

/* the swipe row: 4 cards on desktop, a peek of the next on smaller screens */
.hm-deals { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 6px; margin: -4px -2px 0; }
.hm-deals::-webkit-scrollbar { display: none; }
.hm-deals > .cul-ofx-card { scroll-snap-align: start; border-color: transparent; }
/* the discount is the headline */
.cul-home4 .hm-deals .cul-ofx-card__head { font-size: 2rem !important; line-height: 1.1 !important; }
.cul-home4 .hm-deals .cul-ofx-card__head--mid { font-size: 1.55rem !important; line-height: 1.2 !important; }
.cul-home4 .hm-deals .cul-ofx-card__head--long { font-size: 1.25rem !important; }
.cul-home4 .hm-deals .cul-ofx-card__for { font-size: 1rem !important; -webkit-line-clamp: 1; }
.cul-home4 .hm-deals .cul-ofx-card__foot a.cul-ofx-claim { width: 100% !important; justify-content: center; min-height: 46px !important; font-size: 1rem !important; }

/* ── One-line explainer ─────────────────────────────────────────── */
.hm-how { background: #fff; border-bottom: 1px solid var(--ui-line, #e3eaf2); }
.cul-home4 .hm-how__line { margin: 0 !important; padding: 18px 0; font-size: 1.1rem; line-height: 1.5; color: var(--ui-ink, #1a1a2e); text-align: center; }
.hm-how__line b { font: 600 1.1rem var(--ui-font-display); color: var(--ui-navy); }
.hm-how__line span { color: var(--ui-muted, #55657A); }

/* ── Sections ───────────────────────────────────────────────────── */
/* Popular: heading on the left when there are only two or three offers. */
.hm-popular__in { display: block; }
.hm-popular__head .rx-h2 { margin: 0 !important; }
.hm-popular__head .hm-sub { margin: 10px 0 16px !important; }
.hm-popular__head { margin-bottom: 24px; }
.hm-popular__in--2, .hm-popular__in--3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.hm-popular__in--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
.hm-popular__in--2 .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hm-popular__in--3 .hm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hm-popular__in--2 .hm-popular__head, .hm-popular__in--3 .hm-popular__head { margin: 0; padding-top: 8px; }
.cul-home4 .hm-sec { padding-block: 72px; }
.cul-home4 .hm-popular + .hm-events { padding-top: 0; }
.hm-events { background: #fff; }

/* events: photo, when, title, where, Add to calendar + the host's offer */
.hm-evs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hm-ev { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--ui-line, #e3eaf2); border-radius: 5px; overflow: hidden; }
.hm-ev__pic { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ui-navy, #1B3A5C); }
.hm-ev__pic img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; border-radius: 0 !important; transition: transform .4s ease; }
.hm-ev:hover .hm-ev__pic img { transform: scale(1.04); }
.hm-ev__pic.is-tile { display: flex; align-items: center; justify-content: center; }
.hm-ev__pic.is-tile b { font: 600 1.6rem var(--ui-font-display); color: #fff; }
.hm-ev__body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; min-width: 0; }
.cul-home4 .hm-ev__when { margin: 0 !important; font: 700 .92rem/1.4 var(--ui-font) !important; color: var(--ui-navy) !important; }
.cul-home4 .hm-ev__t { margin: 4px 0 0 !important; font: 600 1.1rem/1.3 var(--ui-font-display) !important; color: var(--ui-navy) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-ev__t a { color: inherit !important; text-decoration: none !important; }
.hm-ev__t a:hover { text-decoration: underline !important; }
.cul-home4 .hm-ev__where { margin: 4px 0 0 !important; font-size: .92rem; color: var(--ui-muted, #55657A); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-ev__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; min-width: 0; }
.hm-ev__cal, .hm-ev__offer { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 5px; font: 600 .88rem/1.25 var(--ui-font); text-decoration: none !important; max-width: 100%; box-sizing: border-box; }
.hm-ev__cal { border: 1.5px solid var(--ui-navy, #1B3A5C); color: var(--ui-navy) !important; }
.hm-ev__cal::before { content: "+"; margin-right: 6px; font-weight: 700; }
.hm-ev__cal:hover { background: var(--ui-navy); color: #fff !important; }
.hm-ev__offer { display: block; align-self: flex-start; margin-top: 10px; line-height: 24px; background: var(--ui-page); color: var(--ui-navy) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ev__offer::before { content: "Offer: "; font-weight: 700; }
.hm-ev__offer:hover { background: var(--ui-line); }

/* ── Trust strip: a face, a promise, two real numbers ───────────── */
.hm-trust { background: var(--ui-page, #EEF4FB); padding-block: 56px; }
.hm-trust__in { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 28px; background: #fff; border: 1px solid var(--ui-line, #e3eaf2); border-radius: 5px; padding: 26px 30px; }
.cul-home4 .hm-trust__face { width: 96px; height: 96px; border-radius: 5px !important; object-fit: cover; background: var(--ui-navy); }
.hm-trust__face.is-tile { display: inline-flex; align-items: center; justify-content: center; color: #fff; font: 600 1.6rem var(--ui-font-display); }
.cul-home4 .hm-trust__hi { margin: 0 !important; font: 600 1.35rem/1.3 var(--ui-font-display) !important; color: var(--ui-navy) !important; }
.cul-home4 .hm-trust__line { margin: 6px 0 0 !important; font-size: 1rem; line-height: 1.5; color: #3d4b5c; }
.hm-trust__line a { color: var(--ui-navy) !important; font-weight: 600; text-decoration: underline !important; text-underline-offset: 3px; white-space: nowrap; }
.hm-trust__nums { display: flex; gap: 28px; margin: 0; }
.hm-trust__nums > div { min-width: 0; max-width: 160px; }
.cul-home4 .hm-trust__nums dt { font: 700 2.2rem/1 var(--ui-font-display); color: var(--ui-navy); letter-spacing: -.02em; }
.cul-home4 .hm-trust__nums dd { margin: 6px 0 0; font-size: .9rem; line-height: 1.35; color: var(--ui-muted, #55657A); }

/* ── The Weekly: sign up + last week's issue ────────────────────── */
.hm-weekly { background: var(--ui-navy, #1B3A5C); color: #fff; }
.hm-weekly__in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-block: 64px; }
.cul-home4 .hm-weekly__kick { margin: 0 !important; font: 600 .95rem var(--ui-font) !important; color: rgba(255,255,255,.82) !important; }
.cul-home4 .hm-weekly__h2 { margin: 8px 0 0 !important; font: 700 clamp(1.7rem, 1.1rem + 1.8vw, 2.6rem)/1.15 var(--ui-font-display) !important; color: #fff !important; letter-spacing: -.02em; }
.cul-home4 .hm-weekly__p { margin: 12px 0 22px !important; font-size: 1.05rem; line-height: 1.5; color: rgba(255,255,255,.88); max-width: 48ch; }
.hm-weekly .cul-newsletter-signup { background: transparent !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; margin: 0 !important; max-width: 520px !important; text-align: left; }
.hm-weekly .cul-newsletter-signup__k, .hm-weekly .cul-newsletter-signup__title, .hm-weekly .cul-newsletter-signup__sub, .hm-weekly .cul-newsletter-signup__fine { display: none !important; }
.hm-weekly .cul-newsletter-signup__form { display: flex; gap: 8px; margin: 0 !important; }
.hm-weekly .cul-newsletter-signup__input { flex: 1; min-width: 0; min-height: 52px !important; border-radius: 5px !important; border: 0 !important; background: #fff !important; padding: 0 14px !important; }
.cul-home4 .hm-weekly .cul-newsletter-signup__btn { min-height: 52px; padding: 0 22px !important; border: 0 !important; border-radius: 5px !important; background: var(--rx-btn, #BC5A0E) !important; color: #fff !important; font: 600 1rem var(--ui-font-display) !important; cursor: pointer; }
.cul-home4 .hm-weekly .cul-newsletter-signup__btn:hover { background: var(--rx-btn-h, #9E4A0A) !important; }
.hm-weekly .cul-newsletter-signup__msg { color: #fff !important; }
.hm-issue { display: grid; grid-template-columns: 140px minmax(0, 1fr); background: #fff; color: var(--ui-ink) !important; border-radius: 5px; overflow: hidden; text-decoration: none !important; transition: box-shadow .15s ease; }
.hm-issue:hover { box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.hm-issue__pic { position: relative; background: var(--ui-page); min-height: 140px; }
.hm-issue__pic img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; border-radius: 0 !important; }
.hm-issue__body { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; min-width: 0; }
.hm-issue__k { font: 600 .85rem var(--ui-font); color: var(--ui-muted, #55657A); }
.hm-issue__t { font: 600 1.15rem/1.3 var(--ui-font-display); color: var(--ui-navy); }
.hm-issue__p { font-size: .95rem; line-height: 1.45; color: #3d4b5c; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-issue__go { margin-top: 6px; font: 600 .95rem var(--ui-font-display); color: var(--ui-navy); }
.hm-issue__go::after { content: " →"; }

/* ── Owners, just above the footer ──────────────────────────────── */
.hm-owner2 { background: #fff; }
.hm-owner2__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 56px; }
.cul-home4 .hm-owner2__h2 { margin: 0 !important; font: 700 clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem)/1.2 var(--ui-font-display) !important; color: var(--ui-navy) !important; }
.cul-home4 .hm-owner2__p { margin: 8px 0 0 !important; font-size: 1.05rem; line-height: 1.5; color: #3d4b5c; max-width: 52ch; }
.cul-home4 .hm-search--owner { margin: 0; max-width: none; box-shadow: inset 0 0 0 2px #c9d2dd; }

@media (max-width: 1100px) {
	.hm-deals { grid-auto-columns: calc((100% - 32px) / 2.6); }
	.hm-grid, .hm-evs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hm-trust__in { grid-template-columns: 96px minmax(0, 1fr); }
	.hm-trust__nums { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
	.hm-popular__in--2, .hm-popular__in--3 { display: block; }
	.hm-popular__in--2 .hm-popular__head, .hm-popular__in--3 .hm-popular__head { margin-bottom: 20px; }
	.hm-weekly__in, .hm-owner2__in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 640px) {
	.hm-hero { padding: 32px 0; }
	.hm-hero__top { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
	.hm-hero__nav { width: 100%; }
	.hm-hero__nav .hm-arrow { display: none; }
	.hm-hero__all { width: 100%; justify-content: center; box-sizing: border-box; }
	.hm-deals { grid-auto-columns: 82%; gap: 12px; }
	/* in the swipe row the card stays a tall card on phone too */
	.cul-home4 .hm-deals .cul-ofx-card { display: flex; flex-direction: column; }
	.cul-home4 .hm-deals .cul-ofx-card__shot { aspect-ratio: 16 / 10; min-height: 0; }
	.cul-home4 .hm-deals .cul-ofx-card__flag:not(.cul-ofx-card__flag--body) { display: inline-flex; }
	.cul-home4 .hm-deals .cul-ofx-card__flag--body { display: none; }
	.cul-home4 .hm-deals .cul-ofx-card__head { font-size: 1.7rem !important; }
	.cul-home4 .hm-how__line { text-align: left; font-size: 1rem; padding: 16px 0; }
	.hm-how__line span { display: block; }
	.cul-home4 .hm-sec { padding-block: 48px; }
	.hm-sub { margin-top: -8px !important; }
	.hm-grid, .hm-evs, .hm-popular__in .hm-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 12px; }
	.hm-ev { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
	.hm-ev__pic { aspect-ratio: auto; min-height: 100%; }
	.hm-ev__pic.is-tile b { font-size: 1rem; }
	.hm-ev__body { padding: 12px 14px; }
	.hm-ev__acts { padding-top: 10px; }
	.hm-trust { padding-block: 40px; }
	.hm-trust__in { grid-template-columns: 64px minmax(0, 1fr); gap: 14px 16px; padding: 20px; }
	.cul-home4 .hm-trust__face { width: 64px; height: 64px; }
	.cul-home4 .hm-trust__hi { font-size: 1.1rem !important; }
	.hm-trust__nums { gap: 20px; }
	.cul-home4 .hm-trust__nums dt { font-size: 1.8rem; }
	.hm-weekly__in { padding-block: 44px; }
	.hm-weekly .cul-newsletter-signup__form { flex-direction: column; }
	.cul-home4 .hm-weekly .cul-newsletter-signup__btn { width: 100%; }
	.hm-issue { grid-template-columns: 96px minmax(0, 1fr); }
	.hm-issue__pic { min-height: 0; }
	.hm-issue__body { padding: 14px 16px; }
	.hm-owner2__in { padding-block: 40px; gap: 20px; }
	.cul-home4 .hm-search--owner { box-shadow: none; }
	.cul-home4 .hm-search--owner input[type="search"] { box-shadow: inset 0 0 0 2px #c9d2dd !important; }
}

/* ── Round 3 (Nov 13) ───────────────────────────────────────────── */
/* quick filters above the deals */
.hm-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.hm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 5px; background: rgba(255,255,255,.12); color: #fff !important; font: 600 .95rem var(--ui-font); text-decoration: none !important; transition: background-color .15s ease; white-space: nowrap; }
.hm-chip:hover { background: rgba(255,255,255,.24); }
.hm-chip:focus-visible { outline: 3px solid var(--ui-line); outline-offset: 2px; }
.hm-chip--near { background: #fff; color: var(--ui-navy) !important; }
.hm-chip--near:hover { background: #F4F7FB; }
.hm-chip--near svg { color: var(--ui-navy); }

/* how it works: three icon steps that stand out */
.hm-how { background: var(--ui-page); border-bottom: 1px solid var(--ui-page); }
.hm-how__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.hm-steps { display: flex; align-items: center; gap: 12px; margin: 0 !important; padding: 0 !important; list-style: none !important; counter-reset: hm; }
.hm-steps li { display: flex; align-items: center; gap: 10px; margin: 0 !important; counter-increment: hm; }
.hm-steps li + li::before { content: ""; width: 28px; height: 2px; margin-right: 2px; background: var(--ui-line); border-radius: 1px; }
.hm-steps__i { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 5px; background: var(--ui-navy); color: #fff; flex: 0 0 44px; }
.hm-steps b { font: 600 1.1rem/1.25 var(--ui-font-display); color: var(--ui-navy); }
.hm-steps b::before { content: counter(hm) ". "; color: var(--ui-navy); }
.cul-home4 .hm-how__free { margin: 0 !important; font: 600 1rem/1.4 var(--ui-font) !important; color: var(--ui-navy) !important; text-align: right; }

/* popular: 3 or 4 cards in one even row */
.hm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cul-home4 .hm-popular .rx-h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem) !important; }
.cul-home4 .hm-events .rx-h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem) !important; }

/* event place: a name in navy; a bare street is a quiet map link */
.cul-home4 .hm-ev__where.is-named { color: var(--ui-navy) !important; font-weight: 600; }
.hm-ev__where a { color: inherit !important; text-decoration: underline !important; text-decoration-color: #c9d2dd !important; text-underline-offset: 3px; }

@media (max-width: 1100px) {
	.hm-how__in { flex-direction: column; align-items: flex-start; gap: 12px; }
	.cul-home4 .hm-how__free { text-align: left; }
	.hm-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.hm-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
	.hm-chips::-webkit-scrollbar { display: none; }
	.hm-steps { flex-direction: column; align-items: flex-start; gap: 10px; }
	.hm-steps li + li::before { display: none; }
	.hm-steps__i { width: 38px; height: 38px; flex-basis: 38px; }
	.hm-steps b { font-size: 1.02rem; }
	.hm-grid--3 { grid-template-columns: minmax(0, 1fr); }
}

/* Round 4: what the hero row is ("Newest offers", "Ending soon"…) */
.cul-home4 .hm-hero__label { margin: 0 0 12px !important; font: 600 .95rem var(--ui-font) !important; color: rgba(255,255,255,.82) !important; letter-spacing: .01em; }

/* trust strip: one face, or two overlapping when the city has a second person */
.hm-trust__faces { display: inline-flex; }
.hm-trust__faces.is-two .hm-trust__face--2 { margin-left: -22px; box-shadow: 0 0 0 4px #fff; }
.hm-trust__in:has(.hm-trust__faces.is-two) { grid-template-columns: 170px minmax(0, 1fr) auto; }
@media (max-width: 1100px) { .hm-trust__in:has(.hm-trust__faces.is-two) { grid-template-columns: 170px minmax(0, 1fr); } }
@media (max-width: 640px) {
	.hm-trust__in:has(.hm-trust__faces.is-two) { grid-template-columns: minmax(0, 1fr); }
	.hm-trust__faces.is-two .hm-trust__face--2 { margin-left: -14px; }
	.hm-sep { display: none; }
	.hm-sms { display: inline-block; margin-top: 6px; }
}

/* Orange is only for things you tap (Derek, Nov 13). The steps strip is
   information, so it goes navy on the light blue page tone. */
.hm-how { background: var(--ui-page, #EEF4FB); border-bottom: 1px solid var(--ui-line, #E3EAF2); }
.hm-steps__i { background: var(--ui-navy, #1B3A5C); }
.hm-steps b::before { color: var(--ui-navy, #1B3A5C); }
.hm-steps li + li::before { background: #C9D6E4; }
.cul-home4 .hm-how__free { color: var(--ui-navy, #1B3A5C) !important; }
