@font-face {
    font-family: "JetBrains Mono";
    src: url("/assets/fonts/webfonts/JetBrainsMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #1b3527;
    --ink-soft: #34493b;
    --paper: #ece0c9;
    --paper-light: #f4ead4;
    --line: rgba(27, 53, 39, 0.32);
    --accent: #8f6f3d;
    --content-width: 1260px;
    --reading-width: 780px;
    --font-serif: Georgia, "Times New Roman", serif;
    --font-mono: "JetBrains Mono", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--paper);
    background-image: url("/assets/logos/parchment-tile.png");
    color: var(--ink);
    display: flex;
    flex-direction: column;
    font-family: var(--font-serif);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

body:not(.template-home) main {
    display: flex;
    flex-direction: column;
    padding-bottom: 56px;
}

.template-home main {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-underline-offset: 0.22em;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--accent);
}

.container {
    width: min(calc(100% - 4rem), var(--content-width));
    margin-inline: auto;
}

.template-home .site-header .container,
.template-home .hero .container,
.template-home .enterprises .container {
    width: min(calc(100% - 7rem), 1460px);
}

.site-header {
    position: relative;
    z-index: 2;
}

.template-home .site-header {
    margin-bottom: -4.85rem;
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.brand {
    text-decoration: none;
}

.brand-wordmark {
    display: block;
    color: var(--ink);
    font-size: clamp(1.65rem, 2.55vw, 2.28rem);
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.template-home .brand {
    transform: translateX(clamp(-3.2rem, -3vw, -1.4rem));
}

.template-home .brand-wordmark {
    font-size: clamp(1.9rem, 2.9vw, 2.65rem);
}

.site-nav,
.footer-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.8rem, 3.6vw, 3.8rem);
}

.template-home .site-nav {
    transform: translateX(clamp(2rem, 4vw, 4.5rem));
}

.site-nav a,
.footer-nav a {
    position: relative;
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.45rem;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 140ms ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.hero {
    position: relative;
    overflow: hidden;
    height: clamp(596px, calc(50vw - 3.3rem), 756px);
    line-height: 1.6;
    text-align: center;
}

.hero-inner {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    display: grid;
    justify-items: center;
    padding-top: 0;
}

.hero-seal {
    width: clamp(155px, 16vw, 228px);
    margin-top: 0;
}

.hero h1 {
    margin: clamp(0.45rem, 1vw, 0.8rem) 0 0;
    font-size: clamp(1.35rem, 2.1vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.18em;
    line-height: 1.25;
    text-transform: uppercase;
}

.rule-mark {
    display: grid;
    grid-template-columns: minmax(3rem, 1fr) auto minmax(3rem, 1fr);
    align-items: center;
    gap: 1rem;
    width: min(14rem, 76%);
    margin-block: 0.55rem 0.75rem;
}

.rule-mark::before,
.rule-mark::after {
    content: "";
    height: 1px;
    background: var(--line);
}

.rule-mark span {
    width: 1rem;
    height: 1rem;
    background: url("/assets/logos/fleur-de-lis-transparent.png") center / contain no-repeat;
}

.hero p {
    max-width: 700px;
    margin: 0 auto clamp(0.45rem, 0.9vw, 0.85rem);
    color: var(--ink);
    font-size: clamp(1rem, 1.34vw, 1.22rem);
    font-style: italic;
    line-height: 1.32;
}

.hero-image {
    position: absolute;
    right: 0;
    bottom: 2.1rem;
    left: 0;
    width: 100%;
    height: auto;
    min-width: 1200px;
    max-width: none;
    margin-inline: 50%;
    transform: translateX(-50%);
}

.enterprises {
    display: flex;
    align-items: center;
    flex: 1 0 auto;
    margin-top: -1.9rem;
    padding-block: 0.8rem 0.75rem;
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.4rem;
    width: min(560px, 100%);
    margin: 0 auto 0.65rem;
}

.section-heading span {
    height: 1px;
    background: var(--line);
}

.section-heading h2 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.enterprise-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.enterprise {
    display: grid;
    grid-template-columns: minmax(116px, 0.48fr) minmax(18rem, 1fr);
    align-items: center;
    gap: clamp(1.2rem, 3vw, 2.4rem);
    min-height: 124px;
    padding: 0 clamp(0.8rem, 2.6vw, 2.2rem) 0.25rem;
}

.enterprise + .enterprise {
    border-left: 1px solid var(--line);
}

.enterprise img {
    max-height: 104px;
    margin-inline: auto;
    object-fit: contain;
}

.enterprise h3 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.16rem, 1.7vw, 1.48rem);
    font-weight: 400;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.enterprise p {
    max-width: 18rem;
    margin: 0 auto 0.7rem 0;
    font-size: 0.98rem;
    font-style: italic;
    line-height: 1.22;
}

.text-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    border-bottom: 1px solid currentColor;
    font-size: 0.76rem;
    letter-spacing: 0.15em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
}

.page-shell {
    flex: 1;
    padding-block: 4rem;
}

.page-grid {
    display: grid;
    grid-template-columns: 12rem minmax(0, var(--reading-width));
    gap: clamp(3rem, 8vw, 8rem);
    align-items: start;
}

.page-kicker {
    position: sticky;
    top: 2rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--ink);
    color: var(--ink-soft);
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.page-content {
    max-width: var(--reading-width);
}

.page-content img {
    width: 100%;
    margin: 0 0 2rem;
    border: 1px solid var(--line);
}

.page-content h1 {
    margin: 0 0 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.05em;
}

.page-content h2 {
    margin: 2.4rem 0 0.75rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.page-content p {
    margin: 0 0 1.15rem;
    color: var(--ink-soft);
    font-size: 1.08rem;
    line-height: 1.72;
}

.site-footer {
    background: var(--ink);
    color: var(--paper-light);
}

body:not(.template-home) .site-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.footer-inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-footer p {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-nav {
    gap: 1.6rem;
}

.footer-nav a {
    color: var(--paper-light);
    font-size: 0.68rem;
}

@media (max-width: 980px) {
    .template-home .site-header {
        margin-bottom: 0;
    }

    .template-home .site-header .container,
    .template-home .hero .container,
    .template-home .enterprises .container {
        width: min(calc(100% - 3rem), var(--content-width));
    }

    .header-inner {
        min-height: auto;
        padding-block: 1.25rem;
        align-items: flex-start;
        flex-direction: column;
        gap: 1.2rem;
    }

    .site-nav {
        width: 100%;
        justify-content: space-between;
        gap: 0.8rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        transform: none;
    }

    .hero {
        height: clamp(528px, calc(78vw - 2rem), 618px);
    }

    .hero-image {
        bottom: 1rem;
        min-width: 980px;
    }

    .enterprise-grid {
        grid-template-columns: 1fr;
    }

    .enterprises {
        margin-top: -0.75rem;
    }

    .enterprise + .enterprise {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .page-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .page-kicker {
        position: static;
        width: 12rem;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(calc(100% - 2rem), var(--content-width));
    }

    .template-home .site-header .container,
    .template-home .hero .container,
    .template-home .enterprises .container {
        width: min(calc(100% - 2rem), var(--content-width));
    }

    .brand-wordmark {
        font-size: 1.45rem;
        white-space: normal;
    }

    .template-home .brand {
        transform: none;
    }

    .site-nav a {
        font-size: 0.78rem;
    }

    .hero-seal {
        width: 190px;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .hero {
        height: 540px;
    }

    .hero-image {
        bottom: 0.4rem;
        min-width: 720px;
    }

    .enterprise {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .enterprises {
        margin-top: 0;
    }

    .enterprise h3 {
        white-space: normal;
    }

    .enterprise p {
        margin-inline: auto;
    }

    .footer-inner {
        padding-block: 1rem;
        align-items: flex-start;
        flex-direction: column;
    }
}
