:root {
    --color-green: #2f4a3a;
    --color-green-deep: #243a2e;
    --color-gold: #b08a3e;
    --color-gold-soft: #f4efe4;
    --color-text: #4a4a46;
    --color-muted: #777870;
    --color-border: #e8e6df;
    --color-surface: #faf9f6;
    --color-white: #ffffff;
    --font-heading: "Oswald", "Arial Narrow", sans-serif;
    --font-body: "Aptos", "Segoe UI", sans-serif;
    --page-width: 1180px;
    --page-gutter: clamp(1.25rem, 4vw, 3rem);
    --section-space: clamp(4rem, 8vw, 7rem);
    --shadow-subtle: 0 18px 55px rgba(37, 53, 43, 0.07);
}

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

html { scroll-behavior: smooth; }

body {
    min-width: 320px;
    margin: 0;
    background: var(--color-white);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body, button, input, textarea, select { font-family: var(--font-body); }
img { max-width: 100%; }

a {
    color: var(--color-green);
    text-decoration-color: rgba(176, 138, 62, 0.65);
    text-underline-offset: 0.22em;
}

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

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    color: var(--color-green);
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.015em;
    line-height: 1.16;
}

h1:focus { outline: none; }
::selection { background: var(--color-gold-soft); color: var(--color-green-deep); }

/* Shared layout and editorial utilities */
.page-container,
.wrap {
    width: min(100%, var(--page-width));
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

.page-section { padding-block: var(--section-space); }
.page-section--compact { padding-block: clamp(2.75rem, 6vw, 4.75rem); }
.section-spacing { margin-top: clamp(3.5rem, 7vw, 6rem); }

.page-header {
    max-width: 760px;
    margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 1rem;
    color: var(--color-gold);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    line-height: 1.2;
    text-transform: uppercase;
}

.page-kicker::before {
    width: 2rem;
    height: 1px;
    background: currentColor;
    content: "";
}

.page-title {
    margin: 0;
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

.page-intro {
    max-width: 680px;
    margin: 1.35rem 0 0;
    color: var(--color-muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.75;
}

.section-title {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.015em;
}

.editorial-text {
    color: var(--color-text);
    font-size: clamp(1.02rem, 1.5vw, 1.13rem);
    line-height: 1.9;
}

.editorial-text > :last-child { margin-bottom: 0; }
.text-muted { color: var(--color-muted) !important; }

.button-primary,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.72rem 1.5rem;
    border: 1px solid var(--color-green);
    border-radius: 2px;
    background: var(--color-green);
    color: var(--color-white);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary:hover,
.btn-primary:hover {
    border-color: var(--color-gold);
    background: var(--color-gold);
    color: var(--color-white);
}

.button-secondary { border-color: var(--color-border); background: transparent; color: var(--color-green); }

.text-link,
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    background: transparent;
    color: var(--color-green);
    font-weight: 600;
    text-decoration: none;
}

.text-link::after { color: var(--color-gold); content: "\2192"; transition: transform 160ms ease; }
.text-link:hover::after { transform: translateX(0.2rem); }

.content-surface {
    border: 1px solid var(--color-border);
    border-radius: 3px;
    background: var(--color-white);
    box-shadow: var(--shadow-subtle);
}

.status-page {
    display: grid;
    place-items: center;
    min-height: clamp(430px, 64vh, 680px);
    padding-block: var(--section-space);
    text-align: center;
}

.status-page__content { max-width: 620px; }
.status-page .page-kicker { justify-content: center; }
.status-page .page-intro { margin-inline: auto; margin-bottom: 2rem; }

.image-frame {
    position: relative;
    padding: clamp(0.5rem, 1vw, 0.75rem);
    border: 1px solid var(--color-border);
    background: var(--color-white);
    box-shadow: var(--shadow-subtle);
}

.image-frame::after {
    position: absolute;
    right: -0.55rem;
    bottom: -0.55rem;
    width: 46%;
    height: 42%;
    border-right: 1px solid rgba(176, 138, 62, 0.55);
    border-bottom: 1px solid rgba(176, 138, 62, 0.55);
    pointer-events: none;
    content: "";
}

.image-frame img,
.image-frame .ant-image,
.image-frame .ant-image-img { display: block; width: 100%; }

/* Customised AntDesign foundation */
.ant-layout { min-height: 100vh; background: var(--color-white); }
.ant-layout-header { height: auto; padding: 0; background: var(--color-white); line-height: normal; }
.ant-layout-content { min-height: 0; background: var(--color-white); }
.ant-layout-footer { padding: 0; background: var(--color-green-deep); color: rgba(255, 255, 255, 0.74); }
.ant-carousel .slick-dots li button { height: 2px; background: rgba(47, 74, 58, 0.32); }
.ant-carousel .slick-dots li.slick-active button { background: var(--color-gold); }
.ant-image-preview-operations { background: rgba(36, 58, 46, 0.94); }

/* Forms retain Bootstrap behaviour with the public palette */
.form-control,
.form-select { border-color: #d9d8d1; border-radius: 2px; }

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus-visible,
.button-primary:focus-visible,
.text-link:focus-visible {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 0.2rem rgba(176, 138, 62, 0.16);
    outline: none;
}

.form-check-input:checked { border-color: var(--color-green); background-color: var(--color-green); }
.valid.modified:not([type="checkbox"]) { outline: 1px solid var(--color-green); }
.invalid { outline: 1px solid #a43c32; }
.validation-message, .text-danger { color: #9b3b32 !important; }

.blazor-error-boundary {
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--color-gold);
    background: #f7eee8;
    color: #6c2f2a;
}

.blazor-error-boundary::after { content: "An error has occurred."; }
.darker-border-checkbox.form-check-input { border-color: #92928b; }

@media (max-width: 850px) {
    :root { --page-gutter: 1.25rem; --section-space: 4rem; }
    .page-header { margin-bottom: 2.5rem; }
}

@media (max-width: 575px) {
    .page-title { font-size: clamp(2.65rem, 15vw, 4rem); }
    .page-section { padding-block: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
