/* ==================================================
   HOME PAGE - FIELD OFFICE MASTHEAD

   Loads AFTER style.css. Only touches the home
   page: the masthead, the dispatch strip and the
   four file cards. Delete the link tag in
   index.html and the old plain home returns.

   The idea: the home page is the front of the
   field office. The name over the door, the
   current work in the window, the four doors
   inside.
================================================== */


/* --------------------------------------------------
   THE MASTHEAD

   Big name over the door. The title uses the
   display font at full size, the lead sits
   beneath it in mono, and the whole block is
   left-aligned like a stamped document header
   rather than a centred hero banner.
-------------------------------------------------- */

.hq-masthead {
    padding: 60px 0 30px;

    border-bottom: 1px solid var(--border);
}


.hq-masthead h1 {
    margin: 18px 0 22px;

    color: var(--green-dark);

    font-family: var(--font-display);

    font-size: clamp(3rem, 9vw, 6.5rem);

    font-weight: 400;

    line-height: 1;

    letter-spacing: .01em;
}


.hq-masthead .hq-lead {
    max-width: 560px;

    margin: 0 0 14px;

    color: var(--text-soft);

    font-size: .95rem;

    line-height: 1.65;
}


.hq-masthead .hq-est {
    margin: 0;

    color: var(--text-soft);

    font-family: var(--font-mono);

    font-size: .62rem;

    letter-spacing: .16em;

    text-transform: uppercase;

    opacity: .75;
}


/* --------------------------------------------------
   RECENT DISPATCHES

   The work in the window: a strip of squares,
   each one a piece from the Trading Post. The
   caption slides up over the bottom of the
   picture on hover, like a label being stuck on.
-------------------------------------------------- */

.dispatches {
    padding: 40px 0 10px;
}


.dispatch-strip {
    display: grid;

    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 14px;

    margin-top: 18px;
}


.dispatch {
    position: relative;

    display: block;

    aspect-ratio: 1;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 3px;

    background: rgba(255, 255, 255, 0.25);
}


.dispatch img {
    width: 100%;

    height: 100%;

    object-fit: contain;

    padding: 10px;

    transition: transform .35s ease;
}


.dispatch:hover img {
    transform: scale(1.04);
}


.dispatch-caption {
    position: absolute;

    left: 0;

    right: 0;

    bottom: 0;

    padding: 7px 10px;

    background: rgba(232, 226, 212, 0.92);

    border-top: 1px solid var(--border);

    color: var(--green-dark);

    font-family: var(--font-mono);

    font-size: .55rem;

    letter-spacing: .14em;

    text-transform: uppercase;

    text-align: left;

    transform: translateY(100%);

    transition: transform .25s ease;
}


.dispatch:hover .dispatch-caption {
    transform: translateY(0);
}


/* on a screen without hover (phones), the
   captions stay visible: they are the labels */

@media (hover: none) {

    .dispatch-caption {
        transform: translateY(0);
    }

}


.dispatch-more {
    display: inline-block;

    margin-top: 16px;

    color: var(--green-dark);

    font-family: var(--font-mono);

    font-size: .62rem;

    letter-spacing: .16em;

    text-transform: uppercase;
}


.dispatch-more:hover {
    text-decoration: underline;
}


/* --------------------------------------------------
   THE FOUR FILES

   The doors into the site. Same cards as before,
   dressed: they lift on hover, the label tag
   fills green, and a thin rule sits under the
   title like a typed file heading.
-------------------------------------------------- */

.hq-grid {
    padding: 40px 0 60px;
}


.hq-card {
    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}


.hq-card:hover {
    transform: translateY(-4px);

    border-color: var(--green-dark);

    box-shadow: 0 8px 22px rgba(41, 38, 31, 0.12);
}


.hq-card .label-tag {
    transition:
        background .25s ease,
        color .25s ease;
}


.hq-card:hover .label-tag {
    background: var(--green-dark);

    color: var(--paper-light);
}


.hq-card h3 {
    padding-bottom: 8px;

    margin-bottom: 10px;

    border-bottom: 1px solid var(--border);
}


.hq-card:hover h3 {
    border-bottom-color: var(--green-dark);
}


/* --------------------------------------------------
   SMALL SCREENS

   The dispatch strip becomes a two-row scroll:
   squares keep their size and the strip slides
   sideways, like a rail of work.
-------------------------------------------------- */

@media (max-width: 850px) {

    .hq-masthead {
        padding: 40px 0 24px;
    }

    .dispatch-strip {
        grid-template-columns: repeat(5, 44vw);

        grid-auto-flow: column;

        overflow-x: auto;

        padding-bottom: 8px;

        gap: 10px;
    }

    .dispatch img {
        padding: 6px;
    }

    .hq-grid {
        padding: 30px 0 40px;
    }

}
