/* ═══════════════════════════════════════════════════════════════
   D19 — Office map card (footer contact, beside the form)

   The Google Maps embed still loads with the page, as before. It is
   toned into the site's dark/gold palette with a CSS filter (the
   embed itself cannot be restyled), framed like the contact form
   card and closed by an address bar with direct navigation (Google
   Maps directions, Waze). No overlay pin: the embed is cross-origin,
   so nothing drawn on top can follow a pan — Google's own marker,
   toned gold by the filter, marks the office instead.

   Markup: partials/footer.php (.office-map)
   Tokens: css/premium.css :root (--ink, --white, --accent, --ease-out)
   ═══════════════════════════════════════════════════════════════ */

.office-map {
    --om-gold-hi: #f4e0ac;
    --om-gold-lo: #b8873c;
    --om-text-2: rgba(245, 244, 240, 0.64);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: var(--r-lg, 26px);
    background:
        linear-gradient(#131313, #131313) padding-box,
        linear-gradient(150deg, rgba(244, 224, 172, 0.5), rgba(201, 162, 85, 0.1) 35%, rgba(255, 255, 255, 0.06) 65%, rgba(244, 224, 172, 0.3)) border-box;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.85);
    isolation: isolate;
    /* the filtered iframe is composited separately; clip-path keeps every
       layer inside the rounded corners (overflow alone does not in Chrome) */
    clip-path: inset(0 round var(--r-lg, 26px));
}

/* ─── Map ──────────────────────────────────────────────────────── */
.office-map__canvas {
    position: relative;
    flex: 1 1 auto;
    min-height: 340px;
    overflow: hidden;
    border-radius: calc(var(--r-lg, 26px) - 1px) calc(var(--r-lg, 26px) - 1px) 0 0;
    background: #0b0a08;
}

.office-map__canvas iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    /* light Google map → warm night map in the site's palette. The hue turn
       keeps Google's own (red) office marker coloured — it comes out gold —
       so the marker that moves with the map is the one that marks the office. */
    filter: grayscale(0.65) invert(0.91) hue-rotate(212deg) sepia(0.5) saturate(2.6) brightness(0.88) contrast(1.08);
    transition: filter 0.6s var(--ease-out, ease);
}

.office-map:hover .office-map__canvas iframe {
    filter: grayscale(0.65) invert(0.91) hue-rotate(212deg) sepia(0.45) saturate(2.6) brightness(0.98) contrast(1.08);
}

/* edges fall off into the card; never blocks map interaction */
.office-map__vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(8, 7, 6, 0.55) 100%),
        linear-gradient(180deg, transparent 70%, rgba(19, 19, 19, 0.85) 100%);
}

/* Back to the office view (reloads the embed at its original framing) */
.office-map__recenter {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px 0 11px;
    border: 1px solid rgba(201, 162, 85, 0.45);
    border-radius: 100px;
    background: rgba(13, 12, 10, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--om-gold-hi);
    cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.7);
    transition: background-color 0.3s var(--ease-out, ease), border-color 0.3s var(--ease-out, ease), color 0.3s var(--ease-out, ease);
}

.office-map__recenter svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.office-map__recenter:hover,
.office-map__recenter:focus-visible {
    border-color: transparent;
    background: linear-gradient(135deg, var(--om-gold-hi), var(--accent) 60%, var(--om-gold-lo));
    color: var(--ink);
}

.office-map__recenter:focus-visible {
    outline: 2px solid var(--om-gold-hi);
    outline-offset: 3px;
}

.office-map__recenter.is-spinning svg {
    animation: office-recenter 0.7s var(--ease-out, ease);
}

@keyframes office-recenter {
    to { transform: rotate(180deg); }
}

/* ─── Address bar ──────────────────────────────────────────────── */
.office-map__info {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px 24px;
    padding: 22px 26px 24px;
    border-top: 1px solid rgba(201, 162, 85, 0.22);
    /* own corners: Chrome does not clip this painted layer to the card */
    border-radius: 0 0 calc(var(--r-lg, 26px) - 1px) calc(var(--r-lg, 26px) - 1px);
    background:
        radial-gradient(90% 140% at 0% 0%, rgba(201, 162, 85, 0.09), transparent 60%),
        #131313;
}

.office-map__address {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.office-map__title {
    margin: 0 0 2px;
    font-family: 'Lora', serif;
    font-size: 1.28rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--white);
}

.office-map__address p {
    margin: 0;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--om-text-2);
}

.office-map__address .office-map__note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    color: var(--om-gold-hi);
    font-size: 0.84rem;
}

.office-map__note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.office-map__actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.office-map__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid rgba(201, 162, 85, 0.4);
    border-radius: 100px;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--om-gold-hi);
    text-decoration: none;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.02);
    transition:
        background-color 0.3s var(--ease-out, ease),
        border-color 0.3s var(--ease-out, ease),
        color 0.3s var(--ease-out, ease),
        transform 0.3s var(--ease-out, ease),
        box-shadow 0.3s var(--ease-out, ease);
}

.office-map__btn:hover,
.office-map__btn:focus-visible {
    border-color: rgba(244, 224, 172, 0.75);
    background: rgba(201, 162, 85, 0.1);
    color: var(--om-gold-hi);
    transform: translateY(-1px);
}

.office-map__btn--primary {
    border-color: transparent;
    color: var(--ink);
    background: linear-gradient(135deg, var(--om-gold-hi), var(--accent) 58%, var(--om-gold-lo));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 10px 24px -10px rgba(201, 162, 85, 0.55);
}

.office-map__btn--primary:hover,
.office-map__btn--primary:focus-visible {
    border-color: transparent;
    color: var(--ink);
    background: linear-gradient(135deg, #fff1cc, var(--om-gold-hi) 40%, var(--accent));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 14px 30px -10px rgba(201, 162, 85, 0.65);
}

.office-map__btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.office-map__btn:focus-visible {
    outline: 2px solid var(--om-gold-hi);
    outline-offset: 3px;
}

.office-map__btn:active {
    transform: scale(0.97);
}

/* ─── Tablet & phone: map above the form ───────────────────────── */
@media (max-width: 991.98px) {
    .office-map {
        height: auto;
        min-height: 0;
        margin-bottom: 30px;
    }

    .office-map__canvas {
        flex: 0 0 auto;
        height: 380px;
    }
}

@media (max-width: 575.98px) {
    .office-map__canvas {
        height: 320px;
    }

    .office-map__info {
        padding: 20px 20px 22px;
    }

    .office-map__actions {
        width: 100%;
    }

    .office-map__btn {
        flex: 1 1 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .office-map__recenter.is-spinning svg {
        animation: none;
    }
}

@media (forced-colors: active) {
    .office-map__canvas iframe {
        filter: none;
    }
}
