/* MHI Hardware Branches: the "choose a branch" page.
   Palette: the MHI logo only (red #EA1E24 for the roof, UI red #D7141C with white text,
   yellow #FCF000, green #A2CC36, charcoal #303036); Magic Build's red #CC0612 on its own card.
   Type: Archivo condensed (like "HARDWARE WHOLESALERS") and Hanken Grotesk. */

@font-face { font-family: "Archivo"; src: url("fonts/archivo-var.woff2") format("woff2"); font-weight: 600 900; font-stretch: 62% 100%; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-var.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
	--ink: #303036;
	--red: #d7141c;
	--red-logo: #ea1e24;
	--red-dk: #b01017;
	--yellow: #fcf000;
	--yellow-dk: #e6db00;
	--green: #a2cc36;
	--green-dk: #5a8212;
	--magic: #cc0612;
	--paper: #f5f5f6;
	--line: #e1e1e5;
	--line-2: #c3c3ca;
	--smoke: #55555f;
	--fog: #85858f;
	--on-ink: #cfcfd6;
	--f-d: "Archivo", "Arial Narrow", Impact, sans-serif;
	--f-b: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--wrap: 1240px;
	--gut: clamp(16px, 4vw, 40px);
	--r: 6px;
	--r-lg: 14px;
	--ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--f-b); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.02; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--yellow); border-radius: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; background: var(--red); color: #fff; font-weight: 700; border-radius: var(--r); transform: translateY(-180%); transition: transform .2s; }
.skip:focus { transform: none; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin-inline: auto; padding-inline: var(--gut); }
.ic { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: 2px solid var(--ink); border-radius: var(--r); font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s, transform .15s var(--ease), box-shadow .15s; }
.btn .ic { width: 18px; height: 18px; }
.btn--go { background: var(--yellow); color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.btn--go:hover { background: var(--yellow-dk); }
.btn--go:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn--red { background: var(--red); color: #fff; border-color: var(--red); }
.btn--red:hover { background: var(--red-dk); border-color: var(--red-dk); }
.btn--red:hover .ic { transform: translateX(3px); }
.btn--red .ic { transition: transform .2s var(--ease); }
.btn--line { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn--line:hover { border-color: var(--ink); }

/* Remembered branch: "Taking you to ..." */
.goto { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; }
.goto__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; min-height: 52px; padding-block: 8px; }
.goto__txt strong { color: var(--yellow); }
.goto__stay { min-height: 40px; padding: 6px 14px; border: 1.5px solid #fff; border-radius: var(--r); background: transparent; color: #fff; font-weight: 700; }
.goto__stay:hover { background: #fff; color: var(--ink); }

/* Top strip */
.top { background: var(--ink); color: #fff; font-size: .8125rem; }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.top__social { display: flex; gap: 16px; }
.top__social a { color: #fff; font-weight: 600; text-decoration: none; }
.top__social a:hover { color: var(--yellow); }

/* Hero: under the roof */
.hero { position: relative; padding: clamp(70px, 9vw, 140px) 0 clamp(40px, 5vw, 64px); background: #fff; overflow: hidden; }
.hero__roof { position: absolute; left: 0; top: 0; width: 100%; height: clamp(70px, 9vw, 140px); }
.hero__sky { fill: var(--yellow); }
.hero__eave { fill: none; stroke: var(--red-logo); stroke-width: 26; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s .1s cubic-bezier(.6, 0, .3, 1) forwards; }
.hero__leaf { fill: var(--green); transform-origin: 0 50%; animation: wipe .9s .7s var(--ease) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wipe { from { transform: scaleX(0); } }
.hero__foot { position: absolute; left: 0; bottom: 0; width: 100%; height: 34px; }
.hero__band-g { fill: var(--green); }
.hero__band-y { fill: var(--yellow); }
.hero__in { position: relative; padding-top: clamp(16px, 3vw, 40px); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.hero__copy { max-width: 700px; }
.hero__mark { position: relative; justify-self: center; width: min(100%, 480px); aspect-ratio: 1 / .95; }
.hero__mhi { position: absolute; left: 0; top: 0; width: 82%; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .14)); }
.hero__magic { position: absolute; right: 0; bottom: 0; width: 44%; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .16)); }
.js .hero__mhi { animation: markIn 1s .2s var(--ease) both; }
.js .hero__magic { animation: markIn 1s .55s var(--ease) both; }
@keyframes markIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.hero__title { font-family: var(--f-d); font-stretch: 74%; font-weight: 900; font-size: clamp(2.7rem, 1.3rem + 5vw, 5.4rem); line-height: .93; text-transform: uppercase; }
.hero__title span { display: block; }
.hero__muted { color: var(--red); }
.hero__lead { max-width: 56ch; margin-top: 18px; color: var(--smoke); font-size: clamp(1.02rem, .96rem + .3vw, 1.18rem); }
.hero__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 26px; }
.hero__msg { font-weight: 700; }
.hero__msg:empty { display: none; }
.remember { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 12px; font-weight: 600; font-size: .95rem; cursor: pointer; }
.remember input { width: 22px; height: 22px; margin: 0; accent-color: var(--red); }
.js .hero__title span, .js .hero__lead, .js .hero__acts, .js .remember { opacity: 0; transform: translateY(16px); animation: rise .8s var(--ease) forwards; }
.js .hero__title span:nth-child(1) { animation-delay: .08s; }
.js .hero__title span:nth-child(2) { animation-delay: .16s; }
.js .hero__lead { animation-delay: .24s; }
.js .hero__acts { animation-delay: .32s; }
.js .remember { animation-delay: .38s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Branch cards + map */
.pick { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 100px); background: var(--paper); }
.pick__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.cards { display: grid; gap: 14px; }
.card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; transition: border-color .25s, box-shadow .25s; }
.card:hover { border-color: var(--line-2); }
.card.is-near { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--yellow); }
.card.is-lit { border-color: var(--ink); }
.card__logo { width: 96px; height: 84px; object-fit: contain; }
.card__name { font-family: var(--f-d); font-stretch: 74%; font-weight: 900; font-size: clamp(1.45rem, 1.2rem + .8vw, 1.9rem); text-transform: uppercase; }
.card--magic .card__name { color: var(--magic); }
.card__area { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--smoke); font-weight: 600; }
.card__km:empty { display: none; }
.card__km { padding: 0 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 800; line-height: 1.7; }
.card.is-near .card__km { background: var(--yellow); color: var(--ink); }
.card__st { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .9rem; font-weight: 700; }
.card__st i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--red-logo); }
.card__st.is-open i { background: var(--green); border-color: var(--green-dk); }
.card__st:not(.is-open) { color: var(--smoke); }
.card__addr { margin-top: 8px; font-size: .925rem; }
.card__hours { display: grid; gap: 2px; margin: 10px 0 0; font-size: .85rem; }
.card__hours div { display: flex; gap: 12px; }
.card__hours dt { min-width: 92px; color: var(--smoke); }
.card__hours dd { margin: 0; font-weight: 600; }
.card__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.card--magic .btn--red { background: var(--magic); border-color: var(--magic); }
.card__dir { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--red); text-underline-offset: 5px; }
.card__dir:hover { text-decoration-color: var(--ink); }

.map { position: sticky; top: 20px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.map__svg { width: 100%; height: auto; overflow: visible; }
.map__grid { stroke: var(--line); stroke-width: 1; }
.pin { cursor: pointer; }
.pin__halo { fill: var(--yellow); opacity: 0; transition: opacity .25s; }
.pin__drop { fill: var(--red); stroke: #fff; stroke-width: 2.5; transition: transform .25s var(--ease); transform-origin: 0 0; }
.pin--magic .pin__drop { fill: var(--magic); }
.pin__dot { fill: #fff; }
.pin__label { font-family: var(--f-d); font-stretch: 74%; font-weight: 900; font-size: 20px; text-transform: uppercase; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.pin:hover .pin__drop, .pin.is-lit .pin__drop, .pin:focus-visible .pin__drop { transform: scale(1.18); }
.pin.is-lit .pin__halo, .pin.is-near .pin__halo { opacity: .9; }
.pin:focus-visible { outline: none; }
.map__you-halo { fill: var(--green); opacity: .3; }
.map__you-dot { fill: var(--green-dk); stroke: #fff; stroke-width: 3; }
.map__scale path { fill: none; stroke: var(--ink); stroke-width: 2; }
.map__scale text, .map__north text { font-size: 14px; font-weight: 700; fill: var(--smoke); font-family: var(--f-b); }
.map__north path { fill: var(--ink); }
.map__cap { margin-top: 10px; color: var(--smoke); font-size: .85rem; }
.js .pin { opacity: 0; animation: drop .6s var(--ease) forwards; }
.js .pin:nth-of-type(2) { animation-delay: .08s; }
.js .pin:nth-of-type(3) { animation-delay: .16s; }
.js .pin:nth-of-type(4) { animation-delay: .24s; }
.js .pin:nth-of-type(5) { animation-delay: .32s; }
@keyframes drop { from { opacity: 0; translate: 0 -14px; } to { opacity: 1; translate: 0 0; } }

/* Footer */
.ftr { position: relative; padding: 46px 0 34px; background: var(--ink); color: var(--on-ink); font-size: .875rem; }
.ftr::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath fill='%23a2cc36' d='M0 20C420 0 1000 0 1440 12v7C1000 8 420 10 0 30Z'/%3E%3Cpath fill='%23fcf000' d='M0 30C420 10 1000 8 1440 19v21H0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.ftr__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.ftr a { color: #fff; }

@media (max-width: 960px) {
	.hero__in { grid-template-columns: minmax(0, 1fr); }
	.hero__mark { width: min(100%, 230px); order: -1; justify-self: start; }
	.pick__in { grid-template-columns: minmax(0, 1fr); }
	.map { position: static; order: -1; }
}
@media (max-width: 560px) {
	.card { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; }
	.card__logo { width: 72px; height: 62px; }
	.card__acts .btn { flex: 1 1 100%; }
	.hero__eave { stroke-width: 16; }
	.top__social { display: none; }
	.btn--go { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
	.hero__eave { stroke-dashoffset: 0; }
}
