/* ==========================================================================
   Components: header, nav, footer, quote band, WhatsApp, mobile bar, map,
   chips, tiles, cards, breadcrumbs.
   ========================================================================== */

/* Lockup */
.lockup { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.lockup .mark { flex: none; color: var(--ivory); }
.lockup__words { display: flex; flex-direction: column; line-height: 1.05; }
.lockup__name { font-family: var(--f-display); font-weight: 500; font-size: 22px; letter-spacing: -0.005em; }
.lockup__place { font-family: var(--f-display); font-size: 14.5px; color: var(--ivory-soft); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--night-rule); }
.site-header__bar { display: flex; align-items: center; gap: var(--s5); min-height: var(--hdr); }
.site-header__brand { text-decoration: none; color: var(--ivory); flex: none; }
.site-header.on-dark .site-header__brand { color: var(--ivory); }
.site-header__actions { display: flex; align-items: center; gap: var(--s4); margin-left: auto; }
.site-header__phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav { margin-left: auto; }
.nav__list { list-style: none; display: flex; align-items: center; gap: 4px; }
.nav__item { position: relative; display: flex; align-items: center; }
.site-header .nav__link { display: block; padding: 10px 12px; color: var(--ivory); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.site-header .nav__link:hover, .site-header .nav__item.is-current > .nav__link { color: var(--rose-on-dark); }
.nav__caret { display: inline-grid; place-items: center; width: 28px; height: 44px; margin-left: -8px; border: 0; background: none; color: var(--ivory-soft); cursor: pointer; }
.nav__caret .ico { transition: transform .15s; }
.nav__item--has-sub.is-open .nav__caret .ico { transform: rotate(180deg); }
.nav__sub { list-style: none; position: absolute; top: 100%; left: 0; min-width: 300px; padding: 10px; background: var(--night); border: 1px solid var(--night-rule); box-shadow: 0 18px 40px rgba(10, 8, 16, .35); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .12s, transform .12s, visibility .12s; }
.nav__item--has-sub:hover .nav__sub, .nav__item--has-sub:focus-within .nav__sub, .nav__item--has-sub.is-open .nav__sub { opacity: 1; visibility: visible; transform: none; }
.site-header .nav__sub a { display: block; padding: 9px 12px; color: var(--ivory); text-decoration: none; font-size: 15px; }
.site-header .nav__sub a:hover, .site-header .nav__sub a[aria-current] { background: var(--night-2); color: var(--rose-on-dark); }
.nav__sub-all { border-top: 1px solid var(--night-rule); margin-top: 6px; padding-top: 6px; }
.nav__mobile-cta { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; place-items: center; border: 1px solid var(--night-rule); background: none; color: var(--ivory); cursor: pointer; border-radius: var(--radius); }

@media (max-width: 1100px) {
	.site-header__phone span { display: none; }
	.site-header .nav__link { padding: 10px 9px; font-size: 14.5px; }
}
@media (max-width: 1080px) {
	.nav-toggle { display: inline-grid; }
	.site-header__actions .btn { display: none; }
	.nav { position: fixed; left: 0; right: 0; top: var(--hdr); max-height: calc(100dvh - var(--hdr)); overflow-y: auto; overscroll-behavior: contain; background: var(--night); border-top: 1px solid var(--night-rule); padding: var(--s4) var(--gutter) var(--s6); display: none; }
	html.nav-open .nav { display: block; }
	html.nav-open { overflow: hidden; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--night-rule); }
	.site-header .nav__link { flex: 1; padding: 14px 4px; font-size: 17px; }
	.nav__caret { width: 44px; height: 48px; margin: 0; }
	.nav__sub { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 10px 12px; background: transparent; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; }
	.nav__item--has-sub:hover .nav__sub, .nav__item--has-sub:focus-within .nav__sub { display: none; }
	.nav__item--has-sub.is-open .nav__sub { display: block; }
	.site-header .nav__sub a { padding: 10px 8px; color: var(--ivory-soft); }
	.nav__mobile-cta { display: flex; flex-direction: column; gap: 10px; margin-top: var(--s5); }
}
@media (max-width: 420px) { .lockup__name { font-size: 19px; } .lockup .mark { width: 34px; } }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.02em; margin-bottom: var(--s5); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .55; }
.crumbs a { text-decoration: none; }
.crumbs [aria-current] { opacity: .8; }

/* Chips */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 14.5px; }
.chips a:hover { border-color: var(--rose-deep); color: var(--rose-deep); }
.chips--lg a { font-size: 15.5px; padding: 9px 16px; }

/* Service tiles (homepage 05) */
.tiles { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: var(--s4); }
.tile { display: block; height: 100%; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--rule); transition: border-color .15s; }
.tile:hover { border-color: var(--rose-deep); }
.tile__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tile__t { display: block; padding: 10px 12px 12px; font-family: var(--f-mono); font-size: 13px; text-align: center; line-height: 1.4; }

/* Cards (guides and answers) */
.card { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.card:hover { border-color: var(--rose-deep); }
.card__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.card__kicker { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose-deep); }
.card__t { font-family: var(--f-display); font-size: 21px; line-height: 1.2; }
.card__d { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

/* Map */
.map { height: clamp(320px, 42vw, 460px); border: 1px solid var(--rule); background: var(--paper-2); }
.map .leaflet-tile-pane { filter: grayscale(1) sepia(.08) hue-rotate(210deg) brightness(1.06) contrast(.92); }
.map .leaflet-container, .map.leaflet-container { font-family: var(--f-mono); background: var(--paper-2); }
.cvs-pin { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--ink); }
.cvs-home { width: 22px; height: 22px; background: var(--rose-deep); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--rose-deep); clip-path: polygon(50% 0, 100% 42%, 86% 42%, 86% 100%, 14% 100%, 14% 42%, 0 42%); }
.leaflet-tooltip.cvs-tip { background: var(--card); border: 1px solid var(--rule); color: var(--ink); font-family: var(--f-mono); font-size: 11.5px; padding: 2px 6px; border-radius: 0; box-shadow: none; }
.leaflet-tooltip.cvs-tip::before { display: none; }

/* Quote band (global #quote) */
.quote { padding-block: var(--pad-sec); }
.quote__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.quote__title { font-size: clamp(2.4rem, 4.4vw, 3.6rem); margin-bottom: var(--s6); }
.quote__points { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s5) var(--s6); }
.quote__points li { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 15px; max-width: 9.5em; }
.quote__points .ico { color: var(--ivory); }
.quote__points .ico--sightline .dots { stroke: var(--rose); }
.quote__call { margin-top: var(--s6); font-size: 17px; }
.quote__form { background: var(--card); padding: clamp(12px, 2vw, 22px); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(10, 8, 16, .35); min-height: 640px; }
.quote__form iframe { display: block; }
@media (max-width: 900px) { .quote__grid { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.site-footer { padding-top: var(--s8); border-top: 1px solid var(--night-rule); }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: var(--s6) var(--s5); padding-bottom: var(--s7); }
.site-footer__brand { grid-column: span 2; max-width: 34em; }
@media (max-width: 640px) { .site-footer__brand { grid-column: auto; } }
.site-footer__brand .lockup__name { font-size: 26px; }
.site-footer__tag { margin-top: var(--s4); color: var(--ivory-soft); font-size: 15.5px; }
.site-footer__contact { margin-top: var(--s4); font-size: 15.5px; }
.site-footer__h { font-family: var(--f-body); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: var(--s3); color: var(--ivory); }
.site-footer__col ul { list-style: none; display: grid; gap: 6px; }
.site-footer.on-dark .site-footer__col a { color: var(--ivory-soft); text-decoration: none; font-size: 15px; }
.site-footer.on-dark .site-footer__col a:hover { color: var(--rose-on-dark); }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s6); padding-block: var(--s5); border-top: 1px solid var(--night-rule); font-size: 14px; color: var(--ivory-soft); }
.site-footer.on-dark .site-footer__sitemap { color: var(--ivory); }
.site-footer__credit { margin-left: auto; font-family: var(--f-display); font-style: italic; font-size: 16px; }
@media (max-width: 760px) { .site-footer__bottom { padding-bottom: calc(var(--s5) + 72px); } .site-footer__credit { margin-left: 0; } }

/* Mobile conversion bar: visible from the first pixel (§7d.4). */
.mbar { display: none; }
@media (max-width: 760px) {
	.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--night); border-top: 1px solid var(--night-rule); }
	.mbar__btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid var(--night-rule); color: var(--ivory); text-decoration: none; font-weight: 600; font-size: 15px; }
	.mbar__btn--main { background: var(--rose); border-color: var(--rose); color: var(--night); }
	.mbar__btn--main .ico .dots { stroke: var(--night); }
}

/* WhatsApp widget (§4g, house standard) */
.wa { position: fixed; right: 18px; bottom: 18px; z-index: 95; }
@media (max-width: 760px) {
	.wa { bottom: 84px; right: 12px; }
	/* The mobile bar carries WhatsApp while no phone is set: one route, not two. */
	body:has(.mbar [data-wa-open]) .wa__pill { display: none; }
	body:has(.mbar [data-wa-open]) .wa__panel { bottom: 0; }
}
.wa__pill { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 20px 10px 16px; border: 0; border-radius: 999px; background: #1B7D45; color: #fff; font-weight: 600; font-size: 16px; cursor: pointer; box-shadow: 0 10px 28px rgba(10, 8, 16, .28); transition: opacity .2s, transform .2s; }
.wa__pill:hover { background: #156338; }
.wa.is-tucked .wa__pill { opacity: 0; pointer-events: none; transform: translateY(8px); }
@media (max-width: 480px) { .wa__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); } .wa__pill { padding: 10px 14px; } }
.wa__panel { position: absolute; right: 0; bottom: 64px; width: min(360px, calc(100vw - 24px)); max-height: min(560px, calc(100dvh - 140px)); overflow-y: auto; background: var(--card); color: var(--ink); border: 1px solid var(--rule); box-shadow: 0 20px 50px rgba(10, 8, 16, .3); padding: 18px; }
.wa__panel[hidden] { display: none; }
.wa__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wa__title { font-family: var(--f-display); font-size: 21px; }
.wa__close { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; }
.wa__form { display: grid; gap: 6px; }
.wa__form label { font-size: 13.5px; font-weight: 500; margin-top: 6px; }
.wa__form input, .wa__form textarea, .wa__form select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.wa__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 10px; }
.btn--wa { margin-top: 12px; background: #1B7D45; color: #fff; letter-spacing: 0.04em; }
.btn--wa:hover { background: #156338; color: #fff; }
.wa__note { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

/* Header/footer link colours outrank the generic .on-dark link rule (§7c.3: outrank, never tie). */
.site-header.on-dark .nav__link { color: var(--ivory); }
.site-header.on-dark .nav__link:hover, .site-header.on-dark .nav__item.is-current > .nav__link { color: var(--rose-on-dark); }
.site-header.on-dark .nav__sub a { color: var(--ivory); }
.site-header.on-dark .nav__sub a:hover, .site-header.on-dark .nav__sub a[aria-current] { color: var(--rose-on-dark); }
.on-dark a.site-header__brand, .on-dark .site-footer__brand > a, .on-dark .site-header__phone { color: var(--ivory); text-decoration: none; }
@media (max-width: 1080px) { .site-header.on-dark .nav__sub a { color: var(--ivory-soft); } }
