/* ==========================================================================
   Site chrome — header, navigation, footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header
   Solid rather than transparent-over-hero: the hero is photography-led only
   when photography exists, and a header that inverts depending on content is
   a contrast bug waiting to happen.
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background-color: var(--color-bg-primary);
    /* Border is always present but transparent, so gaining it on scroll does
       not shift the page by a pixel. */
    border-block-end: var(--border-width) solid transparent;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header[data-scrolled="true"] {
    border-block-end-color: var(--color-border);
    box-shadow: var(--shadow-xs);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    block-size: var(--header-height);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   Brand
   -------------------------------------------------------------------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--color-text-primary);
}

.brand:hover {
    color: var(--color-text-primary);
}

.brand__logo {
    display: block;
    inline-size: auto;
    block-size: 2.125rem;
}

/* The mark sits with the wordmark's cap height rather than its baseline, so
   the pair reads as one lockup. */
.brand__mark {
    display: block;
    inline-size: 2rem;
    color: var(--color-text-primary);
    transform: translateY(0.08em);
}

.brand__mark svg {
    display: block;
    inline-size: 100%;
    block-size: auto;
    /* base.css sets `svg { fill: currentColor }` as an icon default, and a
       stylesheet beats the fill="none" presentation attribute — without this
       the three nested outlines render as one solid shape. */
    fill: none;
}

.brand__wordmark {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    /* Wide tracking suits a four-letter wordmark; it reads as a mark rather
       than as a word. */
    letter-spacing: 0.14em;
    line-height: 1;
}

.brand__rule {
    inline-size: 1.5rem;
    block-size: 1px;
    background-color: var(--color-border-strong);
    transform: translateY(-0.28em);
}

.brand__tag {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    letter-spacing: var(--letter-spacing-eyebrow);
    text-transform: uppercase;
}

/* Below the tablet breakpoint the tagline is noise next to the wordmark. */
@media (max-width: 767px) {
    .brand__rule,
    .brand__tag {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Desktop navigation
   -------------------------------------------------------------------------- */

.site-nav {
    display: none;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__link {
    position: relative;
    /* inline-flex with a minimum height rather than inline-block with padding:
       an inline-block's own height still collapses to the line box in the flex
       row this sits in, which left the real hit area at 17px — under the 24px
       minimum target size — even though the padding was declared. */
    display: inline-flex;
    align-items: center;
    min-block-size: 2.75rem;
    padding-block: var(--space-2);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-wide);
    text-decoration: none;
}

/* Rule grows from the left on hover rather than appearing all at once. */
.site-nav__link::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    inline-size: 0;
    block-size: 1px;
    background-color: var(--color-accent);
    transition: inline-size var(--transition-base);
}

.site-nav__link:hover {
    color: var(--color-accent-text);
}

.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after {
    inline-size: 100%;
}

.site-nav__link[aria-current="page"] {
    color: var(--color-accent-text);
}

@media (min-width: 1024px) {
    .site-header__inner {
        block-size: var(--header-height-lg);
    }

    .site-nav {
        display: block;
    }
}

/* --------------------------------------------------------------------------
   Menu toggle
   Hidden entirely without JavaScript — a button that cannot do anything must
   not occupy a tap target.
   -------------------------------------------------------------------------- */

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    inline-size: 44px;
    block-size: 44px;
    margin-inline-end: calc(var(--space-2) * -1);
    color: var(--color-text-primary);
}

.js .nav-toggle {
    display: inline-flex;
}

@media (min-width: 1024px) {
    .js .nav-toggle {
        display: none;
    }
}

.nav-toggle__bars {
    position: relative;
    display: block;
    inline-size: 22px;
    block-size: 12px;
}

.nav-toggle__bars span {
    position: absolute;
    inset-inline: 0;
    block-size: 1.5px;
    background-color: currentColor;
    transition: transform var(--transition-base), opacity var(--transition-fast);
}

.nav-toggle__bars span:first-child {
    inset-block-start: 0;
}

.nav-toggle__bars span:last-child {
    inset-block-end: 0;
}

/* Bars fold into a cross while the panel is open. */
.site-header--menu-open .nav-toggle__bars span:first-child {
    transform: translateY(5.25px) rotate(45deg);
}

.site-header--menu-open .nav-toggle__bars span:last-child {
    transform: translateY(-5.25px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Mobile navigation
   Without JavaScript this is an ordinary list below the header, so every link
   stays reachable. The .js rules turn it into a panel (CLAUDE.md 47).
   -------------------------------------------------------------------------- */

.mobile-nav {
    border-block-start: var(--border-subtle);
    background-color: var(--color-bg-primary);
}

.mobile-nav__inner {
    padding-block: var(--space-6);
}

.mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav__link {
    display: block;
    padding-block: var(--space-4);
    border-block-end: var(--border-subtle);
    color: var(--color-text-primary);
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-regular);
    letter-spacing: var(--letter-spacing-tight);
    text-decoration: none;
}

.mobile-nav__link[aria-current="page"] {
    color: var(--color-accent-text);
}

.mobile-nav__contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-block-start: var(--space-8);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

@media (min-width: 1024px) {
    .mobile-nav {
        display: none;
    }
}

.js .mobile-nav {
    position: fixed;
    inset-block-start: var(--header-height);
    inset-block-end: 0;
    inset-inline: 0;
    z-index: var(--z-drawer);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-block-start: none;
    /* Closed state. visibility keeps it out of the tab order; opacity and the
       small lift are what actually animate. */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.75rem);
    transition: opacity var(--transition-base), transform var(--transition-base),
        visibility 0s linear var(--duration-base);
}

.js .mobile-nav--open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--transition-base), transform var(--transition-base),
        visibility 0s;
}

/* Links arrive in sequence, which reads as one gesture rather than a pop. */
.js .mobile-nav__item {
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity var(--duration-base) var(--ease-out),
        transform var(--duration-base) var(--ease-out);
}

.js .mobile-nav--open .mobile-nav__item {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(60ms + var(--index) * 45ms);
}

/* The stagger is decorative; users who asked for less motion get none of it. */
@media (prefers-reduced-motion: reduce) {
    .js .mobile-nav__item {
        opacity: 1;
        transform: none;
        transition-delay: 0s;
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    margin-block-start: auto;
    padding-block-start: var(--section-spacing-md);
    background-color: var(--color-bg-secondary);
    border-block-start: var(--border-subtle);
}

.site-footer__inner {
    display: grid;
    gap: var(--space-10);
    padding-block-end: var(--section-spacing-sm);
}

.site-footer__wordmark {
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    letter-spacing: 0.05em;
}

.site-footer__line {
    max-inline-size: 34ch;
    margin-block-start: var(--space-3);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

.site-footer__heading {
    margin-block-end: var(--space-4);
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-eyebrow);
    text-transform: uppercase;
}

.site-footer__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__list a {
    /* Padded to clear the 24px minimum target size. The footer is a column of
       links with no other affordance around them, so each one has to be
       comfortably tappable on its own. */
    display: inline-flex;
    align-items: center;
    min-block-size: 1.75rem;
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    text-decoration: none;
}

.site-footer__list a:hover {
    color: var(--color-accent-text);
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.site-footer__address {
    margin-block-start: var(--space-5);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

.site-footer__legal {
    padding-block: var(--space-6);
    border-block-start: var(--border-subtle);
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
}

@media (min-width: 640px) {
    .site-footer__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .site-footer__inner {
        /* The brand column carries more weight than the link columns. */
        grid-template-columns: 1.6fr repeat(3, 1fr);
        gap: var(--space-12);
    }
}


/* --------------------------------------------------------------------------
   Footer credit
   -------------------------------------------------------------------------- */

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3) var(--space-6);
}

.site-footer__credit a {
    display: inline-flex;
    align-items: center;
    min-block-size: 1.5rem;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    letter-spacing: var(--letter-spacing-eyebrow);
    text-transform: uppercase;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-footer__credit a:hover {
    color: var(--color-accent-text);
}

/* The staff entrance. Deliberately quiet — it is a utility for the team, not
   part of the site's message — but a real target, not 12px of dead text. */
.site-footer__staff a {
    display: inline-block;
    padding-block: var(--space-2);
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    letter-spacing: var(--letter-spacing-eyebrow);
    text-transform: uppercase;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-footer__staff a:hover {
    color: var(--color-accent-text);
}
