/* assets/css/pages/contact.css
 *
 * Contact.
 *
 * The first pass was two plain cards and two info tiles — correct, and
 * indistinguishable from every other contact page on the internet. This one
 * does two things a static card cannot: it draws the distance between the
 * offices in the same language the rest of the site uses, and it shows the
 * local time in each. A clock is the cheapest possible proof that somebody is
 * actually there, and it answers the question a visitor really has, which is
 * not "where are you" but "is anyone awake".
 *
 * NOTE ON CONTENT: the location cards carry addresses only, deliberately —
 * no entity names. That is the owner's decision, made for compliance reasons,
 * and must not be "helpfully" reinstated.
 */

/* --- Offices ------------------------------------------------------------ */

.offices {
    background: var(--white);
}

.office-map {
    position: relative;
    margin-top: 2.5rem;
}

/* The arc sits ABOVE the cards, in its own strip. Behind them it was almost
   entirely occluded — all a reader saw was a short segment in the gutter,
   which looks like a rendering fault rather than a connection. */
.office-arc {
    display: block;
    width: 100%;
    height: 110px;
    margin-bottom: -2px;
    pointer-events: none;
}

.office-arc-line {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    opacity: .38;
    animation: office-draw 2.4s cubic-bezier(.22, .61, .36, 1) forwards;
}

@keyframes office-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.office-arc-node {
    opacity: 0;
    animation: office-node .6s ease-out forwards;
}

.office-arc-node.is-b {
    animation-delay: 2s;
}

@keyframes office-node {
    to {
        opacity: .9;
    }
}

.office-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.office {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    background: var(--white);
    box-shadow: 0 14px 40px rgba(2, 48, 71, .07);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease;
}

.office:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 56px rgba(2, 48, 71, .12);
}

/* The country name carries a drawn flag rather than a region label above it
   — one line instead of two, and the flag does the identifying faster than
   any word does. */
.office-name {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.office-flag {
    flex: none;
    width: 34px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(2, 48, 71, .18);
}

.office h3 {
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--brand-dark);
    margin: 0 0 .5rem;
}

/* The live clock. Mono and tabular so the digits do not reshuffle the line
   width every time a minute ticks over. */
.office-time {
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--text-light);
    margin: 0 0 1.75rem;
    font-variant-numeric: tabular-nums;
}

.office-time b {
    color: var(--brand-dark);
    font-weight: 700;
}

.office-address {
    margin: 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    font-style: normal;
    color: var(--text-muted);
    font-size: .9375rem;
    line-height: 1.8;
}

/* --- The header's own actions ------------------------------------------
 *
 * The email is the thing most visitors came for, so it sits in the header
 * rather than at the foot of the page under two sections of preamble.
 */
.contact-header .subheading {
    margin-bottom: 2.75rem;
}

.contact-book {
    min-height: 46px;
    padding: .75rem 1.75rem;
}

/* The address used to be 1.6rem mono, bold, with a 2px accent underline —
   on a dark header that is a shout, not an invitation. It is now a normal
   sentence with a link in it, which is how a person would actually say it. */
.contact-mail {
    margin: 1.25rem 0 0;
    font-size: .9375rem;
    color: rgba(255, 255, 255, .55);
}

.contact-mail a {
    font-family: var(--font-mono);
    font-size: .9375rem;
    color: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(255, 255, 255, .3);
    padding-bottom: 1px;
    transition: color .2s ease, border-color .2s ease;
    word-break: break-word;
}

.contact-mail a:hover {
    color: var(--brand-accent);
    border-bottom-color: var(--brand-accent);
}

/* --- The number on each card ------------------------------------------ */

.office-wa {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1.5rem;
    padding: .6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    font-family: var(--font-mono);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--brand-dark);
    align-self: flex-start;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.office-wa:hover {
    border-color: #25D366;
    background: rgba(37, 211, 102, .08);
    color: #128C4A;
}

.office-wa-icon {
    flex: none;
    color: #25D366;
}

/* One quiet label instead of a kicker, a heading and a paragraph narrating
   two cards that say the same thing themselves. */
.offices-label {
    text-align: center;
    font-family: var(--font-mono);
    /* Was .72rem in --text-light: too small and too pale to read on white.
       Bigger, heavier, and in a colour with actual contrast. */
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-primary);
    margin: 0;
}

/* --- Narrow ------------------------------------------------------------ */

@media (max-width: 860px) {
    .office-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Stacked, there is no distance for the arc to span, and a curve behind a
       single column reads as a stray line. */
    .office-arc {
        display: none;
    }

    .office {
        padding: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .office-arc-line {
        animation: none;
        stroke-dashoffset: 0;
    }

    .office-arc-node {
        animation: none;
        opacity: .9;
    }

    .office {
        transition: none;
    }
}
