/* ============================================================
   21K — global theme
   Everything here is gold. If it is not gold, it is a mistake
   we have not yet corrected.
   ============================================================ */

:root {
    /* ===== THE GOLDS ===== */
    --gold-bright:   #ffe98a;   /* highlight, the top of the bevel */
    --gold:          #d4af37;   /* the canonical, the true, the 21st karat */
    --gold-deep:     #a8791c;   /* midtone */
    --gold-shadow:   #5c3f0a;   /* the bottom of the bevel */
    --gold-ghost:    rgba(212, 175, 55, 0.14);
    --gold-veil:     rgba(212, 175, 55, 0.35);

    /* ===== THE DARKS (so the gold has something to gloat over) ===== */
    --ink:           #0b0906;
    --ink-raised:    #16110a;
    --ink-panel:     #1d160c;

    /* ===== TEXT ===== */
    --parchment:     #f4e8c8;
    --parchment-dim: #c9b98c;

    /* ===== FONTS ===== */
    --font-display: 'Ultra', 'Times New Roman', serif;
    --font-accent:  'Cinzel Decorative', 'Palatino', serif;
    --font-body:    'Cormorant Garamond', Georgia, serif;

    /* ===== METRICS ===== */
    --rule-height: 4px;
    --header-height: 84px;
    --measure: 68ch;
    --page-max: 1180px;

    /* ===== THE GRADIENT. The whole site is really just this. ===== */
    --leaf: linear-gradient(
        175deg,
        var(--gold-shadow) 0%,
        var(--gold-deep) 18%,
        var(--gold-bright) 38%,
        var(--gold) 50%,
        var(--gold-bright) 62%,
        var(--gold-deep) 82%,
        var(--gold-shadow) 100%
    );
}

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

body {
    margin: 0;
    background-color: var(--ink);
    /* Faint radial glow, as if a very large ingot is just off-screen. */
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 175, 55, 0.18), transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 110%, rgba(212, 175, 55, 0.10), transparent 70%);
    background-attachment: fixed;
    color: var(--parchment);
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Gold leaf text: the workhorse ---------- */
.gilt {
    background: var(--leaf);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    /* A shadow under the letterform, so it appears to sit on the page. */
    filter: drop-shadow(0 2px 0 var(--gold-shadow)) drop-shadow(0 5px 14px rgba(0, 0, 0, 0.8));
}

/* ---------- Headings ---------- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;   /* Ultra ships one weight and it is already too much. */
    line-height: 1.05;
    letter-spacing: 0.01em;
    margin: 0 0 0.5em;
}

h1 {
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    text-transform: uppercase;
}

h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    color: var(--gold-bright);
    text-shadow: 0 2px 0 var(--gold-shadow), 0 4px 12px rgba(0, 0, 0, 0.7);
}

h3 {
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    color: var(--gold);
}

h4 {
    font-family: var(--font-accent);
    font-weight: 900;
    font-size: 1.05rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-bright);
    margin: 0 0 0.8em;
}

p {
    margin: 0 0 1.15em;
    max-width: var(--measure);
}

a {
    color: var(--gold-bright);
    text-decoration-color: var(--gold-veil);
    text-underline-offset: 0.2em;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    color: #fff6cf;
    text-shadow: 0 0 18px var(--gold-veil);
}

strong {
    color: var(--gold-bright);
    font-weight: 700;
}

em {
    color: var(--parchment);
}

hr,
.ornament {
    border: 0;
    margin: 3.5rem auto;
    text-align: center;
    color: var(--gold-deep);
    font-size: 1.4rem;
    letter-spacing: 1.2em;
    text-indent: 1.2em; /* compensate for trailing letter-spacing */
}

hr::before {
    content: "\2766 \2766 \2766";  /* ❦ ❦ ❦ */
    display: block;
}

/* Any horizontal band of gold: header rule, footer rule, dividers. */
.header-rule,
.footer-rule {
    height: var(--rule-height);
    background: var(--leaf);
    box-shadow: 0 0 24px var(--gold-veil);
}

/* ---------- Layout ---------- */
#main {
    min-height: 60vh;
    padding: 3.5rem 1.5rem 5rem;
}

.page {
    max-width: var(--page-max);
    margin: 0 auto;
}

.page-narrow {
    max-width: 820px;
    margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(180deg, rgba(11, 9, 6, 0.98), rgba(11, 9, 6, 0.86));
    backdrop-filter: blur(8px);
}

.header-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    height: var(--header-height);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    font-family: var(--font-display);
    font-size: 2.4rem;
    line-height: 1;
    text-decoration: none;
    letter-spacing: -0.02em;
    background: var(--leaf);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 var(--gold-shadow));
}

.brand-karat {
    font-family: var(--font-accent);
    font-weight: 900;
}

.brand:hover {
    filter: drop-shadow(0 2px 0 var(--gold-shadow)) drop-shadow(0 0 20px var(--gold-veil));
}

.header-nav {
    margin-left: auto;
}

.header-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav a {
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gold);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.header-nav a:hover {
    color: var(--gold-bright);
    border-bottom-color: var(--gold);
}

/* ---------- Hamburger ---------- */
.menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 8px;
    background: transparent;
    border: 2px solid var(--gold-deep);
    border-radius: 3px;
    cursor: pointer;
}

.menu-btn:hover {
    border-color: var(--gold-bright);
    box-shadow: 0 0 16px var(--gold-ghost);
}

.menu-bar {
    display: block;
    height: 3px;
    background: var(--leaf);
    border-radius: 2px;
}

/* ---------- Side nav ---------- */
.nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: min(340px, 84vw);
    height: 100vh;
    padding: 2.5rem 2rem;
    overflow-y: auto;
    background: var(--ink-panel);
    border-right: var(--rule-height) solid transparent;
    border-image: var(--leaf) 1;
    box-shadow: 8px 0 60px rgba(0, 0, 0, 0.9);
    transform: translateX(-102%);
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.side-nav.open {
    transform: translateX(0);
}

.side-nav-crest {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gold-veil);
}

.crest-glyph {
    display: block;
    font-size: 2.6rem;
    color: var(--gold);
    text-shadow: 0 0 24px var(--gold-veil);
}

.crest-est {
    font-family: var(--font-accent);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--parchment-dim);
    margin: 0.6rem 0 0;
}

.side-nav-links {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.side-nav-links li + li {
    margin-top: 0.35rem;
}

.side-nav-links a {
    display: block;
    padding: 0.85rem 1rem;
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    color: var(--gold);
    border-left: 3px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.side-nav-links a:hover {
    background: var(--gold-ghost);
    border-left-color: var(--gold-bright);
    color: var(--gold-bright);
}

.side-nav-motto {
    font-style: italic;
    text-align: center;
    color: var(--parchment-dim);
    border-top: 1px solid var(--gold-veil);
    padding-top: 1.5rem;
    margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.95rem 2.4rem;
    font-family: var(--font-accent);
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    background: var(--leaf);
    border: 2px solid var(--gold-bright);
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--gold-shadow), 0 10px 26px rgba(0, 0, 0, 0.65);
    transition: transform 0.12s ease, box-shadow 0.12s ease, color 0.2s ease;
}

.btn:hover {
    color: var(--ink);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--gold-shadow), 0 14px 34px rgba(212, 175, 55, 0.35);
    text-shadow: none;
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--gold-shadow), 0 4px 12px rgba(0, 0, 0, 0.7);
}

.btn-ghost {
    color: var(--gold-bright);
    background: transparent;
    border-color: var(--gold-deep);
    box-shadow: none;
}

.btn-ghost:hover {
    color: var(--gold-bright);
    background: var(--gold-ghost);
    border-color: var(--gold-bright);
    box-shadow: 0 0 28px var(--gold-ghost);
}

/* ---------- Panels ---------- */
.panel {
    padding: 2.25rem;
    background: linear-gradient(160deg, var(--ink-panel), var(--ink-raised));
    border: 2px solid var(--gold-deep);
    border-radius: 3px;
    box-shadow: inset 0 1px 0 var(--gold-veil), 0 18px 40px rgba(0, 0, 0, 0.55);
}

.panel h3 {
    margin-top: 0;
}

.panel p:last-child {
    margin-bottom: 0;
}

/* ---------- Flash messages ---------- */
.flash {
    max-width: var(--measure);
    margin: 0 0 2rem;
    padding: 1rem 1.5rem;
    font-family: var(--font-accent);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    border-left: 5px solid var(--gold);
    background: var(--gold-ghost);
}

.flash-error {
    border-left-color: #c8442e;
    background: rgba(200, 68, 46, 0.14);
    color: #f0c0b4;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 5rem;
    background: linear-gradient(180deg, var(--ink-raised), var(--ink));
}

.footer-container {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
}

.footer-section p {
    margin: 0 0 0.4em;
    font-size: 1.05rem;
    color: var(--parchment-dim);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    font-family: var(--font-accent);
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
}

.footer-bottom {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    text-align: center;
    border-top: 1px solid var(--gold-veil);
}

.footer-bottom p {
    max-width: none;
    margin: 0.4em 0;
    color: var(--parchment-dim);
    font-size: 1rem;
}

.footer-ornament {
    color: var(--gold-deep);
    letter-spacing: 0.8em;
    text-indent: 0.8em;
}

.footer-fine {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.75;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
    body {
        font-size: 1.15rem;
    }

    .header-nav {
        display: none;   /* the hamburger takes over */
    }

    .brand {
        margin-left: auto;
        margin-right: auto;
    }

    #main {
        padding: 2.5rem 1.25rem 3.5rem;
    }
}
