/* ==========================================================================
   Designer Flair - containers, sections, header, footer scaffolding
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--wide {
    max-width: var(--container-wide);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding-block: var(--section-y);
}

.section--tight {
    padding-block: var(--section-y-tight);
}

.section--ground {
    background-color: var(--ground);
}

.section--dark {
    background-color: var(--ink);
    color: #fff;
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
    color: #fff;
}

/* Heading block used at the top of every section.
   These widths are in rem, not ch: `ch` on a container resolves against the
   container's own (body-size) font, which would make it far too narrow for the
   large display headline inside it. */
.section-heading {
    max-width: 42rem;
}

.section-heading--center {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.section-heading__title {
    font-size: var(--fs-h1);
    letter-spacing: -.015em;
    text-wrap: balance;
}

.section-heading__support {
    margin-top: var(--space-md);
    max-width: 56ch;
}

.section-heading--center .section-heading__support {
    margin-inline: auto;
}

/* A thin gold rule used to close off a heading block. Faded at both ends so it
   reads as a highlight under the heading rather than a hard divider. */
.rule {
    width: 72px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold) 22%, var(--gold) 78%, transparent);
    border: 0;
    border-radius: 2px;
    margin-top: var(--space-md);
}

.section-heading--center .rule {
    margin-inline: auto;
}

/* ---- Announcement bar --------------------------------------------------- */

.announce {
    background: var(--ink);
    color: rgba(255, 255, 255, .82);
    /* min-height, not height: on narrow screens the list wraps to two lines and
       must be allowed to grow rather than be clipped. */
    min-height: var(--announce-h);
    padding-block: .5rem;
    display: flex;
    align-items: center;
}

.announce__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(.5rem, 2vw, 1.25rem);
    width: 100%;
    margin: 0;
    padding-inline: var(--gutter);
    font-size: clamp(.625rem, .55rem + .25vw, .75rem);
    font-weight: 500;
    letter-spacing: var(--ls-eyebrow);
    text-transform: uppercase;
}

.announce__item {
    display: flex;
    align-items: center;
    gap: clamp(.5rem, 2vw, 1.25rem);
    white-space: nowrap;
}

/* Gold bullet between items, hidden before the first. */
.announce__item::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--gold);
    flex: none;
}

.announce__item:first-child::before {
    display: none;
}

/* ---- Header ------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--paper);
    border-bottom: 1px solid transparent;
    transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

/* Over the hero the header is transparent; it solidifies once the page scrolls. */
.site-header--transparent {
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, .18);
}

.site-header--scrolled {
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px -26px rgba(23, 21, 20, .6);
}

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

.site-header__brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.6vw, 2.75rem);
}

.site-nav__link {
    position: relative;
    font-size: var(--fs-small);
    font-weight: 500;
    letter-spacing: var(--ls-nav);
    text-transform: uppercase;
    text-decoration: none;
    /* Keeps the clickable area a comfortable size without changing the layout. */
    padding-block: .8rem;
    color: var(--ink);
    transition: color var(--transition);
}

.site-header--transparent .site-nav__link {
    color: #fff;
}

/* Gold underline that grows from the left on hover. */
.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after,
.site-nav__link[aria-current="true"]::after {
    transform: scaleX(1);
}

.site-nav__link:hover {
    color: var(--gold-deep);
}

.site-header--transparent .site-nav__link:hover {
    color: var(--gold-light);
}

/* ---- Mobile navigation -------------------------------------------------- */

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    margin-right: -12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--ink);
    transition: transform var(--transition), opacity var(--transition);
}

.site-header--transparent .nav-toggle__bar {
    background: #fff;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.nav-panel {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: none;
    background: var(--ink);
    padding: calc(var(--header-h) + var(--space-2xl)) var(--gutter) var(--space-2xl);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nav-panel__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin: 0;
}

.nav-panel__link {
    display: block;
    padding: var(--space-md) 0;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 1.3rem + 2.4vw, 2.5rem);
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid var(--line-on-dark);
    transition: color var(--transition), padding-left var(--transition);
}

.nav-panel__link:hover,
.nav-panel__link:focus-visible {
    color: var(--gold-light);
    padding-left: var(--space-sm);
}

/* The section the visitor is currently reading, so opening the menu shows
   where they are as well as where they can go. */
.nav-panel__link[aria-current="true"] {
    color: var(--gold-light);
}

.nav-panel__footer {
    margin-top: var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    font-size: var(--fs-small);
    color: var(--text-on-dark);
}

.nav-panel__footer a {
    color: var(--gold-light);
    text-decoration: none;
}

/* Stops the page behind the panel from scrolling. */
body.nav-open {
    overflow: hidden;
}

/* Stops the page behind a full-screen overlay from scrolling.
   Stronger than the rule above because iOS Safari ignores overflow:hidden on
   the body - only pinning it actually holds. site.js stashes and restores the
   scroll position around this, and sets the inline `top` that keeps the page
   visually still while it is pinned. */
body.scroll-locked {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

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

.site-footer {
    background: var(--ink);
    color: var(--text-on-dark);
    padding-block: var(--section-y-tight) var(--space-xl);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: var(--space-2xl) var(--space-xl);
}

.site-footer__title {
    font-family: var(--font-body);
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: var(--ls-eyebrow);
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: var(--space-md);
}

.site-footer__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin: 0;
    font-size: var(--fs-small);
}

.site-footer__list a {
    text-decoration: none;
    transition: color var(--transition);
    /* The email address is one long unbreakable word - let it wrap rather than
       push the footer wider than the screen. */
    overflow-wrap: anywhere;
}

.site-footer__list a:hover {
    color: var(--gold-light);
}

.site-footer__slogan {
    margin-top: var(--space-md);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, .62);
}

.site-footer__bottom {
    margin-top: var(--section-y-tight);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--line-on-dark);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
    justify-content: space-between;
    align-items: center;
    font-size: .8125rem;
    color: rgba(255, 255, 255, .55);
}
