/* -------------------------------------------------------------------------------------------------------------- */
/* GLS1887 design tokens: palette, semantic colours, typography, dimensions and editorial rhythm                    */
/* -------------------------------------------------------------------------------------------------------------- */
:root {
    --gls-colour-white: #ffffff;
    --gls-colour-charcoal: #24211d;
    --gls-colour-antique-gold: #a88748;
    --gls-colour-warm-grey: #77736d;
    --gls-colour-rule: #d9d2c5;
    --gls-page-background: var(--gls-colour-white);
    --gls-text-primary: var(--gls-colour-charcoal);
    /* Slightly darker than the proposed grey so small supporting text is legible on white. */
    --gls-colour-muted-ink: #69655f;
    --gls-text-muted: var(--gls-colour-muted-ink);
    --gls-heading-colour: var(--gls-colour-charcoal);
    --gls-accent-colour: var(--gls-colour-antique-gold);
    --gls-rule-colour: var(--gls-colour-rule);
    --gls-link-colour: var(--gls-text-primary);
    --gls-focus-colour: var(--gls-text-primary);
    --gls-font-display: "Old Standard TT", Baskerville, Georgia, serif;
    --gls-font-invitation: "Cormorant Garamond", Baskerville, Georgia, serif;
    --gls-invitation-heading-weight: var(--gls-weight-semibold);
    --gls-invitation-society-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
    --gls-font-society-title: "Libre Baskerville", Baskerville, Georgia, serif;
    --gls-font-body: "EB Garamond", Baskerville, Georgia, serif;
    --gls-font-size: clamp(1.1875rem, 1.05rem + 0.4vw, 1.375rem);
    --gls-font-size-small: 1rem;
    --gls-nav-font-size: 1.0625rem;
    --gls-heading-size: clamp(2.25rem, 1.75rem + 2vw, 3.5rem);
    --gls-subheading-size: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
    --gls-body-line-height: 1.7;
    --gls-heading-line-height: 1.1;
    --gls-label-line-height: 1.5;
    --gls-weight-regular: 400;
    --gls-weight-medium: 500;
    --gls-weight-semibold: 600;
    --gls-weight-bold: 700;
    --gls-heading-weight: var(--gls-weight-bold);
    --gls-society-title-weight: var(--gls-weight-medium);
    --gls-society-title-tracking: 0.04em;
    --gls-nav-weight: var(--gls-weight-bold);
    --gls-tracking-label: 0.08em;
    --gls-motto-size: 1.1875rem;
    --gls-motto-tracking: normal;
    --gls-motto-style: italic;
    --gls-motto-transform: none;
    --gls-link-underline-offset: 0.2em;
    --gls-content-width: 68.75rem;
    --gls-reading-width: 45rem;
    --gls-committee-portrait-width: 20rem;
    --gls-committee-officer-gap: clamp(2rem, 4vw, 3rem);
    --gls-committee-title-size: 1.125rem;
    --gls-committee-title-style: italic;
    --gls-committee-office-heading-size: var(--gls-subheading-size);
    --gls-page-gutter: clamp(1.5rem, 3.34vw, 3rem);
    --gls-space-small: 0.75rem;
    --gls-space-paragraph: 1.5rem;
    --gls-space-header: clamp(1.5rem, 3vw, 3rem);
    --gls-space-content: clamp(2rem, 3.34vw, 3rem);
    --gls-space-heading: 1rem;
    --gls-space-section: clamp(3.5rem, 8vw, 7rem);
    --gls-space-nav: 2rem;
    --gls-nav-link-gap: 1rem;
    --gls-gazette-date-size: var(--gls-font-size-small);
    --gls-gazette-date-style: italic;
    --gls-gazette-note-size: 1.5rem;
    --gls-divider-max-width: 53.125rem;
    --gls-divider-space: clamp(2rem, 3.34vw, 3rem);
    --gls-ordinance-marker: upper-roman;
    --gls-ordinance-indent: var(--gls-space-nav);
    --gls-logo-width: clamp(12rem, 22vw, 19rem);
    --gls-logo-aspect-ratio: 3;
    --gls-tap-size: 2.75rem;
    --gls-hairline: 1px;
    --gls-focus-width: 2px;
    --gls-focus-offset: 5px;
    --gls-full-width: 100%;
    --gls-no-space: 0;
    --gls-colour-footer-ink: #514c45;
    --gls-footer-text: var(--gls-colour-footer-ink);
    --gls-footer-font: var(--gls-font-body);
    --gls-footer-style: italic;
    --gls-footer-weight: var(--gls-weight-regular);
    --gls-footer-main-size: 1.125rem;
    --gls-footer-secondary-size: 1rem;
    --gls-footer-line-height: 1.65;
    --gls-footer-alignment: center;
    --gls-footer-line-gap: 1rem;
    --gls-viewport-height: 100vh;
    --gls-crest-native-size: 1254px;
    --gls-crest-size: min(
        var(--gls-crest-native-size),
        calc(100vw - var(--gls-page-gutter) - var(--gls-page-gutter)),
        calc(var(--gls-viewport-height) - var(--gls-page-gutter) - var(--gls-page-gutter))
    );
}

/* Mobile browser chrome reduces the available height; keep the whole entrance
   crest visible without enlarging the original artwork on a larger display. */
@supports (height: 100svh) {
    :root {
        --gls-viewport-height: 100svh;
    }
}

/* -------------------------------------------------------------------------------------------------------------- */
/* Self-hosted title, heading and body faces, including genuine italics and retained redistribution licences         */
/* -------------------------------------------------------------------------------------------------------------- */
/* Font-face descriptors require literal family names and weight ranges; custom
   properties do not resolve inside these descriptors. Component rules use tokens. */
@font-face {
    font-family: "Cormorant Garamond";
    src: url("../fonts/cormorant-garamond-latin-semibold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Libre Baskerville";
    src: url("../fonts/libre-baskerville-latin-medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Old Standard TT";
    src: url("../fonts/old-standard-tt-latin-bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "EB Garamond";
    src: url("../fonts/eb-garamond-latin-variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

@font-face {
    font-family: "EB Garamond";
    src: url("../fonts/eb-garamond-latin-italic-variable.woff2") format("woff2");
    font-style: italic;
    font-weight: 400 800;
    font-display: swap;
}

/* -------------------------------------------------------------------------------------------------------------- */
/* Bootstrap supplies layout and behaviour; GLS1887 supplies typography, colour and restrained geometry             */
/* -------------------------------------------------------------------------------------------------------------- */
:root,
[data-bs-theme="light"] {
    --bs-body-bg: var(--gls-page-background);
    --bs-body-color: var(--gls-text-primary);
    --bs-body-font-family: var(--gls-font-body);
    --bs-body-font-size: var(--gls-font-size);
    --bs-body-font-weight: var(--gls-weight-regular);
    --bs-body-line-height: var(--gls-body-line-height);
    --bs-heading-color: var(--gls-heading-colour);
    --bs-secondary-color: var(--gls-text-muted);
    --bs-link-color: var(--gls-link-colour);
    --bs-link-hover-color: var(--gls-link-colour);
    --bs-border-color: var(--gls-rule-colour);
    --bs-border-radius: var(--gls-no-space);
    --bs-border-radius-sm: var(--gls-no-space);
    --bs-border-radius-lg: var(--gls-no-space);
}

body {
    font-synthesis: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--gls-font-display);
    font-weight: var(--gls-heading-weight);
    line-height: var(--gls-heading-line-height);
    text-wrap: balance;
}

h1 {
    font-size: var(--gls-heading-size);
}

h2 {
    font-size: var(--gls-subheading-size);
}

strong {
    font-weight: var(--gls-weight-semibold);
}

button,
input,
select,
textarea,
.btn,
.form-control,
.form-select {
    font-family: var(--gls-font-body);
    color: var(--gls-text-primary);
}

button,
.btn {
    font-family: var(--gls-font-display);
    font-weight: var(--gls-nav-weight);
}

a {
    color: var(--gls-link-colour);
    text-decoration-color: var(--gls-accent-colour);
    text-underline-offset: var(--gls-link-underline-offset);
}

/* -------------------------------------------------------------------------------------------------------------- */
/* White stationery header with a home-linked wordmark and discreet, accessible responsive navigation               */
/* -------------------------------------------------------------------------------------------------------------- */
.gls-navigation {
    padding: var(--gls-space-header) var(--gls-page-gutter);
    background-color: var(--gls-page-background);
}

.gls-navigation {
    --bs-navbar-color: var(--gls-text-primary);
    --bs-navbar-hover-color: var(--gls-text-primary);
    --bs-navbar-active-color: var(--gls-text-primary);
    --bs-navbar-toggler-border-color: var(--gls-rule-colour);
    --bs-navbar-padding-y: var(--gls-no-space);
    --bs-navbar-nav-link-padding-x: var(--gls-no-space);
    font-family: var(--gls-font-display);
}

.gls-header-inner {
    max-inline-size: var(--gls-content-width);
    padding-inline: var(--gls-no-space);
    column-gap: var(--gls-space-nav);
}

.gls-logo-link {
    display: block;
    position: relative;
    inline-size: var(--gls-logo-width);
    max-inline-size: var(--gls-full-width);
    aspect-ratio: var(--gls-logo-aspect-ratio);
    flex-shrink: 0;
    text-decoration: none;
    margin: var(--gls-no-space);
}

/* The source PNG includes white margins. Its display window removes only that
   empty space; the artwork's proportions and the original media remain intact. */
.gls-logo {
    display: block;
    inline-size: var(--gls-full-width);
    block-size: var(--gls-full-width);
    object-fit: cover;
}

.gls-navigation .navbar-nav {
    gap: var(--gls-nav-link-gap);
}

.gls-navigation .nav-link {
    display: flex;
    align-items: center;
    min-block-size: var(--gls-tap-size);
    font-size: var(--gls-nav-font-size);
    font-weight: var(--gls-nav-weight);
    letter-spacing: var(--gls-tracking-label);
    text-transform: uppercase;
}

.gls-navigation .nav-link:hover,
.gls-navigation .nav-link[aria-current="page"],
.gls-navigation .nav-link[aria-current="location"] {
    text-decoration: underline;
    text-decoration-color: var(--gls-accent-colour);
    text-decoration-thickness: var(--gls-hairline);
    text-underline-offset: var(--gls-space-small);
}

.gls-navigation .navbar-toggler {
    min-block-size: var(--gls-tap-size);
    padding: var(--gls-space-small);
    border: var(--gls-hairline) solid var(--gls-rule-colour);
    border-radius: var(--gls-no-space);
    font-size: var(--gls-nav-font-size);
    font-weight: var(--gls-nav-weight);
    letter-spacing: var(--gls-tracking-label);
    text-transform: uppercase;
}

/* Keep Bootstrap's display rules so the toggle stays hidden on wide screens. */
.gls-navigation .navbar-toggler:focus {
    box-shadow: none;
}

/* -------------------------------------------------------------------------------------------------------------- */
/* Crest entrance: retain the quiet, centred artwork and the working Introduction link                              */
/* -------------------------------------------------------------------------------------------------------------- */
.gls-entrance {
    display: grid;
    place-items: center;
    min-block-size: var(--gls-viewport-height);
    padding: var(--gls-page-gutter);
}

.gls-crest-link {
    display: block;
    inline-size: var(--gls-crest-size);
    max-inline-size: var(--gls-full-width);
}

.gls-crest {
    display: block;
    inline-size: var(--gls-full-width);
    block-size: auto;
}

/* -------------------------------------------------------------------------------------------------------------- */
/* Shared articles: ceremonial headings, left-aligned literary prose and quiet closing inscriptions                 */
/* -------------------------------------------------------------------------------------------------------------- */
.gls-main,
.gls-article {
    max-inline-size: calc(var(--gls-reading-width) + var(--gls-page-gutter) + var(--gls-page-gutter));
    margin-inline: auto;
    padding: var(--gls-space-content) var(--gls-page-gutter) var(--gls-space-section);
}

.gls-article p {
    margin-block: var(--gls-no-space) var(--gls-space-paragraph);
}

.gls-article-image {
    display: block;
    inline-size: var(--gls-full-width);
    max-inline-size: var(--gls-full-width);
    block-size: auto;
    margin-block-end: var(--gls-space-paragraph);
}

.gls-article-heading,
.gls-closing {
    text-align: center;
}

.gls-introduction h1 {
    font-family: var(--gls-font-society-title);
    font-weight: var(--gls-society-title-weight);
    letter-spacing: var(--gls-society-title-tracking);
}

.gls-article h1 {
    margin-block-end: var(--gls-space-heading);
}

.gls-article h2 {
    margin-block-end: var(--gls-space-paragraph);
}

.gls-article-section + .gls-article-section {
    margin-block-start: var(--gls-space-section);
}

/* The invitation uses the requested letter typography without changing public
   page headings; its stationery header reuses the original society wordmark. */
.gls-invitation h1,
.gls-invitation h2,
.gls-invitation-society {
    font-family: var(--gls-font-invitation);
    font-weight: var(--gls-invitation-heading-weight);
}

.gls-invitation-society {
    font-size: var(--gls-invitation-society-size);
    line-height: var(--gls-label-line-height);
}

.gls-invitation-artwork {
    margin-block: var(--gls-space-content);
}

.gls-declaration {
    text-align: center;
}

.gls-ordinance {
    list-style-type: var(--gls-ordinance-marker);
    padding-inline-start: var(--gls-ordinance-indent);
}

.gls-ordinance li {
    margin-block-end: var(--gls-space-paragraph);
}

.gls-ordinance li::marker {
    font-weight: var(--gls-weight-semibold);
}

.gls-article-heading p {
    margin-block-end: var(--gls-space-heading);
}

.gls-eyebrow {
    font-family: var(--gls-font-display);
    font-size: var(--gls-font-size-small);
    font-weight: var(--gls-heading-weight);
    line-height: var(--gls-label-line-height);
    letter-spacing: var(--gls-tracking-label);
    text-transform: uppercase;
    color: var(--gls-text-muted);
}

.gls-motto {
    font-family: var(--gls-font-body);
    font-size: var(--gls-motto-size);
    font-weight: var(--gls-weight-regular);
    font-style: var(--gls-motto-style);
    line-height: var(--gls-label-line-height);
    letter-spacing: var(--gls-motto-tracking);
    text-transform: var(--gls-motto-transform);
}

/* -------------------------------------------------------------------------------------------------------------- */
/* Victorian ornamental section divider: preserve the supplied artwork's proportions and generous white space       */
/* -------------------------------------------------------------------------------------------------------------- */
.gls-section-divider {
    display: block;
    inline-size: var(--gls-full-width);
    max-inline-size: var(--gls-divider-max-width);
    block-size: auto;
    margin-block: var(--gls-divider-space);
    margin-inline: auto;
    object-fit: contain;
}

.gls-closing {
    margin-block-start: var(--gls-space-section);
}

/* The footer is a publication's closing inscription: true italics at readable
   sizes and full-opacity warm charcoal, rather than faded legal small print. */
.gls-publication-footer {
    color: var(--gls-footer-text);
    font-family: var(--gls-footer-font);
    font-style: var(--gls-footer-style);
    font-weight: var(--gls-footer-weight);
    line-height: var(--gls-footer-line-height);
    text-align: var(--gls-footer-alignment);
}

.gls-footer-statement {
    font-size: var(--gls-footer-main-size);
}

.gls-footer-disclaimer {
    font-size: var(--gls-footer-secondary-size);
}

.gls-publication-footer p {
    margin-block-end: var(--gls-footer-line-gap);
}

.gls-publication-footer p:last-child {
    margin-block-end: var(--gls-no-space);
}

/* -------------------------------------------------------------------------------------------------------------- */
/* Committee layout primitives: approved portraits remain unaltered, with matching dimensions and no card styling   */
/* -------------------------------------------------------------------------------------------------------------- */
.gls-committee {
    max-inline-size: calc(var(--gls-content-width) + var(--gls-page-gutter) + var(--gls-page-gutter));
}

.gls-committee-reading {
    max-inline-size: var(--gls-reading-width);
    margin-inline: auto;
}

.gls-committee-biography {
    max-inline-size: var(--gls-reading-width);
}

.gls-committee-office h3 {
    font-size: var(--gls-committee-office-heading-size);
    margin-block-end: var(--gls-space-paragraph);
}

.gls-committee-officer {
    display: grid;
    gap: var(--gls-committee-officer-gap);
    align-items: start;
}

.gls-committee-portrait {
    display: block;
    inline-size: var(--gls-full-width);
    max-inline-size: var(--gls-committee-portrait-width);
    block-size: auto;
    margin-inline: auto;
}

.gls-committee-title {
    font-size: var(--gls-committee-title-size);
    font-style: var(--gls-committee-title-style);
    color: var(--gls-text-muted);
}

/* Match Bootstrap's lg breakpoint: a portrait beside its biography needs more
   room than a single reading column. Below this width, source order stacks them. */
@media (min-width: 992px) {
    .gls-committee-officer {
        grid-template-columns: var(--gls-committee-portrait-width) minmax(0, 1fr);
    }
}

/* -------------------------------------------------------------------------------------------------------------- */
/* Keyboard focus and mobile rhythm: visible dark focus, generous touch targets and no hidden navigation links      */
/* -------------------------------------------------------------------------------------------------------------- */
.gls-skip-link {
    display: inline-block;
    padding: var(--gls-space-small);
}

a:focus-visible,
button:focus-visible,
.gls-navigation .navbar-toggler:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: var(--gls-focus-width) solid var(--gls-focus-colour);
    outline-offset: var(--gls-focus-offset);
}

/* Collapse at Bootstrap's xl breakpoint to give the six links enough room.
   Bootstrap continues to manage the menu behaviour and aria-expanded state. */
@media (max-width: 1199.98px) {
    .gls-navigation .navbar-nav {
        gap: var(--gls-space-small);
        padding-block-start: var(--gls-space-paragraph);
    }
}

/* -------------------------------------------------------------------------------------------------------------- */
/* Gazette: narrow literary reading columns, dated typographic entries and restrained archival notes                 */
/* -------------------------------------------------------------------------------------------------------------- */
.gls-gazette-date {
    font-size: var(--gls-gazette-date-size);
    font-style: var(--gls-gazette-date-style);
    color: var(--gls-text-muted);
}

.gls-gazette-entry h2 a {
    text-decoration: none;
}

.gls-gazette-entry h2 a:hover,
.gls-gazette-entry h2 a:focus-visible {
    text-decoration: underline;
}

.gls-gazette-empty {
    text-align: center;
    margin-block: var(--gls-space-content);
}

.gls-gazette .gls-gazette-note {
    font-family: var(--gls-font-body);
    font-size: var(--gls-gazette-note-size);
    font-weight: var(--gls-weight-regular);
    font-style: var(--gls-gazette-date-style);
    line-height: var(--gls-body-line-height);
}
