:root {
    --bg: #090807;
    --bg-soft: #11100e;
    --panel: #f1eadf;
    --panel-muted: #d8cfc1;
    --panel-dark: #17130f;
    --ink: #15100c;
    --ink-muted: #6f6256;
    --gold: #b89b5e;
    --gold-soft: rgba(184, 155, 94, 0.22);
    --red: #6f1d1d;
    --red-soft: #a84646;
    --cream: #f5efe5;
    --line: rgba(184, 155, 94, 0.38);
    --shadow: rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--cream);
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    line-height: 1.55;
}
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, .serif, blockquote {
    margin: 0;
    font-family: "Cormorant Garamond", "Playfair Display", "Libre Baskerville", Georgia, "Times New Roman", serif;
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: 0;
    overflow-wrap: break-word;
}
h1 { font-size: clamp(2.4rem, 5vw, 5rem); }
h2 { font-size: clamp(2.25rem, 5vw, 5rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 2.2rem); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 14px clamp(20px, 4vw, 64px);
    padding-left: max(clamp(20px, 4vw, 64px), env(safe-area-inset-left));
    padding-right: max(clamp(20px, 4vw, 64px), env(safe-area-inset-right));
    border-bottom: 1px solid var(--line);
    background: rgba(9, 8, 7, 0.94);
    backdrop-filter: blur(16px);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gold);
    background: var(--panel);
    color: var(--ink);
    font: 900 0.75rem/1 "Segoe UI", Arial, sans-serif;
}
.brand-seal {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
}
.brand-seal img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.brand-text {
    display: grid;
    gap: 3px;
}
.brand-name {
    color: var(--cream);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}
.brand-subtitle {
    color: var(--gold);
    font: 900 0.58rem/1 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px clamp(8px, 1.35vw, 18px);
    color: var(--panel-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: clamp(7px, 0.8vw, 10px);
    padding: 4px 0 5px;
    border-bottom: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}
.site-nav a:not(:last-child)::after {
    content: "·";
    color: var(--gold);
    opacity: 0.6;
    transform: translateY(-0.03em);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav a[aria-current="page"] { border-bottom-color: rgba(184, 155, 94, 0.75); }

.page-hero, .split-band, .section-band, .cta-band {
    padding: clamp(58px, 8vw, 118px) clamp(20px, 6vw, 96px);
}
.page-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
    gap: clamp(24px, 3vw, 48px);
    align-items: stretch;
    min-height: clamp(520px, 78vh, 820px);
    min-height: clamp(520px, 78dvh, 820px);
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(120deg, rgba(9, 8, 7, 0.98), rgba(23, 19, 15, 0.9)),
        radial-gradient(circle at 78% 18%, rgba(184, 155, 94, 0.16), transparent 30%);
}
.hero-copy { display: flex; flex-direction: column; justify-content: flex-start; max-width: 1040px; }
.hero-kicker, .section-kicker, .card-kicker, .placeholder-label, .placeholder-purpose {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.hero-line {
    margin-top: 24px;
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.55rem, 3.2vw, 3.6rem);
    line-height: 1.05;
}
.hero-copy > p:not(.hero-kicker, .hero-line), .section-lede {
    max-width: 720px;
    margin-top: 20px;
    color: var(--panel-muted);
    font-size: clamp(1.02rem, 1.45vw, 1.24rem);
}
.hero-actions, .action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}
.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 15px;
    border: 1px solid var(--gold);
    border-radius: 3px;
    background: transparent;
    color: var(--gold);
    font: 900 0.72rem/1 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}
.button.primary, button.primary, .official-command {
    background: var(--red);
    color: var(--cream);
}
.button:hover, button:hover { background: var(--gold); color: var(--ink); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.image-placeholder {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 320px;
    padding: 24px;
    border: 1px dashed var(--line);
    background:
        linear-gradient(135deg, rgba(184, 155, 94, 0.12), rgba(0, 0, 0, 0.2)),
        var(--panel-dark);
    color: var(--cream);
}
.placeholder-label::before { content: "IMAGE PLACEHOLDER / "; }
.placeholder-purpose { margin-top: 8px; color: var(--panel-muted); }
.placeholder-prompt {
    margin: 12px 0 16px;
    white-space: pre-wrap;
    color: rgba(245, 239, 229, 0.76);
    font: 0.82rem/1.45 Consolas, "Courier New", monospace;
}
.copy-prompt { align-self: flex-start; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.file-card, .dark-card, .cream-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 3px;
}
.file-card, .cream-card { background: var(--panel); color: var(--ink); }
.dark-card { background: rgba(241, 234, 223, 0.06); color: var(--cream); }
.file-card p, .cream-card p { color: var(--ink-muted); }
.dark-card p { color: var(--panel-muted); }
.file-card h3, .dark-card h3, .cream-card h3 { margin-top: 16px; }
.file-card p, .dark-card p, .cream-card p { margin-top: 14px; }
.stamp {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 8px;
    border: 1px solid rgba(111, 29, 29, 0.55);
    color: rgba(111, 29, 29, 0.75);
    font: 900 0.58rem/1 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transform: rotate(-3deg);
}
.ritual-divider {
    padding: clamp(28px, 5vw, 58px) clamp(20px, 6vw, 96px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--panel-dark);
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4vw, 4.6rem);
    text-align: center;
}
.split-band {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.75fr);
    gap: clamp(28px, 6vw, 88px);
    align-items: center;
    border-bottom: 1px solid var(--line);
}
.cta-band { background: var(--red); text-align: center; }
.cta-band p { max-width: 720px; margin: 18px auto 0; color: rgba(245, 239, 229, 0.78); }
.cta-band .hero-actions { justify-content: center; }

.page-hero > *,
.image-placeholder > * {
    position: relative;
    z-index: 1;
}
.page-hero::after {
    content: "";
    position: absolute;
    right: clamp(18px, 4vw, 68px);
    bottom: clamp(18px, 4vw, 56px);
    width: clamp(150px, 20vw, 280px);
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.09;
    pointer-events: none;
}
.image-placeholder::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 18px;
    width: 92px;
    aspect-ratio: 1;
    background: url("../img/seal.svg") center / contain no-repeat;
    opacity: 0.12;
    pointer-events: none;
}
.file-card::before,
.cream-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(var(--red), rgba(111, 29, 29, 0));
    opacity: 0.62;
}
.dark-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 3px solid rgba(184, 155, 94, 0.35);
    pointer-events: none;
}
.stamp.gold {
    border-color: rgba(184, 155, 94, 0.62);
    color: rgba(184, 155, 94, 0.84);
}
.button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-block {
        opacity: 1;
        transform: none;
    }
}
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 24px clamp(20px, 6vw, 96px);
    padding-left: max(clamp(20px, 6vw, 96px), env(safe-area-inset-left));
    padding-right: max(clamp(20px, 6vw, 96px), env(safe-area-inset-right));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #050504;
    color: rgba(245, 239, 229, 0.72);
    font-size: 0.85rem;
}
.reveal-block { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal-block.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
    .site-header { align-items: flex-start; flex-direction: column; }
    .site-nav { justify-content: flex-start; }
    .page-hero, .split-band { grid-template-columns: minmax(0, 1fr); }
    .card-grid, .card-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .site-nav { gap: 6px 12px; font-size: 0.72rem; letter-spacing: 0.08em; }
    .site-nav a { gap: 7px; }
    .brand-seal { width: 42px; height: 42px; flex-basis: 42px; }
    .brand-subtitle { display: none; }
    h1 { font-size: clamp(2.2rem, 12vw, 4rem); }
    .card-grid, .card-grid.four { grid-template-columns: 1fr; }
    .button, button { width: 100%; }
    .site-footer { flex-direction: column; }
}
@media (min-width: 1121px) {
    h1 { font-size: clamp(3rem, 4.4vw, 5rem); }
}
.hero-image {
    position: relative;
    overflow: hidden;
    margin: 0;
    min-height: 320px;
    border: 1px solid var(--line);
    background: var(--panel-dark);
}

.hero-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(9, 8, 7, 0), rgba(9, 8, 7, 0.28)),
        linear-gradient(90deg, rgba(9, 8, 7, 0.18), rgba(9, 8, 7, 0));
    pointer-events: none;
}

.hero-image figcaption {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 1;
    border: 1px solid rgba(184, 155, 94, 0.48);
    max-width: min(560px, calc(100% - 36px));
    padding: 9px 11px;
    background: rgba(9, 8, 7, 0.72);
    color: var(--gold);
    font: 900 clamp(0.58rem, 0.72vw, 0.72rem)/1.28 "Segoe UI", Inter, Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: none;
    text-wrap: balance;
}

.hero-image-global {
    min-height: clamp(440px, 62vw, 760px);
}

@media (max-width: 920px) {
    .hero-image-global {
        min-height: clamp(360px, 88vw, 620px);
    }
}

.feature-image {
    min-height: 320px;
}

.feature-image-feed {
    aspect-ratio: 16 / 9;
}

@media (max-width: 720px) {
    .feature-image-feed {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }
}

@media (max-width: 720px) {
    .hero-image figcaption {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        font-size: 0.58rem;
        line-height: 1.3;
    }
}
.hero-image-doctrine {
    min-height: clamp(420px, 54vw, 720px);
}

.hero-image-assessment {
    min-height: clamp(420px, 54vw, 720px);
}

.hero-image-program {
    min-height: clamp(420px, 54vw, 720px);
}

.hero-image-service-profiles {
    min-height: clamp(420px, 54vw, 720px);
}

.hero-image-enrollment {
    min-height: clamp(420px, 54vw, 720px);
}

.hero-image-superior-review {
    min-height: clamp(420px, 54vw, 720px);
}

.hero-image-oath {
    min-height: clamp(360px, 42vw, 600px);
}

.hero-image-service-archive {
    min-height: clamp(360px, 42vw, 620px);
}

.hero-image-assessment img {
    object-position: center center;
}

@media (max-width: 920px) {
    .hero-image-doctrine,
    .hero-image-assessment,
    .hero-image-program,
    .hero-image-service-profiles,
    .hero-image-enrollment,
    .hero-image-superior-review,
    .hero-image-oath,
    .hero-image-service-archive {
        min-height: clamp(360px, 86vw, 620px);
    }
}

.feature-image-portrait {
    min-height: clamp(440px, 56vw, 720px);
}

.feature-image-portrait img {
    object-position: center center;
}

@media (max-width: 720px) {
    .feature-image-portrait {
        min-height: clamp(380px, 118vw, 680px);
    }
}

.feature-image-doctrine-wall {
    min-height: clamp(420px, 54vw, 720px);
}

.feature-image-doctrine-wall img {
    object-position: center center;
}

@media (max-width: 720px) {
    .feature-image-doctrine-wall {
        min-height: clamp(360px, 100vw, 640px);
    }
}

/* Unread dispatch count on the Dispatches item in the main navigation. */
.site-nav .nav-badge {
    display: inline-block;
    min-width: 16px;
    padding: 1px 5px;
    margin-left: 3px;
    border-radius: 9px;
    background: var(--gold);
    color: #090807;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
    vertical-align: 2px;
}
