/* ==================================================
   BEACONCORE — LAYOUT
   Global structure: html/body, header, nav, main, grid, spacing.
   No palette. No component behaviour.
   ================================================== */

/* --------------------------------------------------
   BASELINE
   -------------------------------------------------- */
html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background: #ffffff;
    color: #111111;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

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

/* --------------------------------------------------
   HEADER
   -------------------------------------------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid #e2e2e2;
    flex-wrap: wrap;
    gap: 10px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

html.saber-on header {
    border-bottom-color: rgba(0, 180, 255, 0.16);
}

html.saber-on header:hover {
    border-bottom-color: rgba(0, 180, 255, 0.55);
    box-shadow: 0 4px 22px rgba(0, 180, 255, 0.10), 0 1px 6px rgba(0, 180, 255, 0.18);
}

/* Surfaces page — red saber header override */
html.saber-on body.surfaces-page header {
    border-bottom-color: rgba(200, 80, 80, 0.22);
}

html.saber-on body.surfaces-page header:hover {
    border-bottom-color: rgba(220, 60, 60, 0.65);
    box-shadow: 0 4px 22px rgba(200, 40, 40, 0.12), 0 1px 6px rgba(220, 60, 60, 0.24);
}

@media (max-width: 900px) {
    header { padding: 14px 20px; }
    .nav-right a { margin-left: 14px; font-size: 0.82rem; }
    .nav-left a { font-size: 17px; }
}

@media (max-width: 600px) {
    header {
        flex-direction: row;
        align-items: center;
        padding: 14px 16px;
        gap: 0;
        position: relative;
    }
    .nav-right {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 12px 0 4px 0;
        gap: 0;
    }
    .nav-right.open { display: flex; }
    .nav-right a {
        margin-left: 0;
        margin-right: 0;
        font-size: 0.95rem;
        min-width: unset;
        padding: 10px 0;
        border-bottom: 1px solid rgba(128,128,128,0.15);
        opacity: 0.9;
    }
    .nav-right a:last-child { border-bottom: none; }
    .nav-hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        margin-left: auto;
        cursor: pointer;
        padding: 4px;
        background: none;
        border: none;
        outline: none;
    }
    .nav-hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: currentColor;
        border-radius: 2px;
        transition: opacity 0.15s ease;
    }
    .nav-break { flex-basis: 100%; height: 0; }
}

@media (min-width: 601px) {
    .nav-hamburger { display: none; }
    .nav-break { display: none; }
}

/* --------------------------------------------------
   SIGIL
   -------------------------------------------------- */

/* Sigil wrapper */
.bc-sigil-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    margin-right: 16px;
    margin-top: 4px;
    flex-shrink: 0;
    vertical-align: middle;
    padding: 3px;
    cursor: pointer;
    position: relative;
    transition: filter 0.25s ease;
}

.bc-sigil-wrap:hover {
    filter: drop-shadow(0 0 8px rgba(0, 180, 255, 0.85));
}

.bc-sigil {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    overflow: hidden;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .bc-sigil-wrap {
        width: 54px;
        height: 54px;
        margin-right: 10px;
        padding: 2px;
    }
    .bc-sigil {
        height: 50px;
        width: 50px;
    }
}

/* --------------------------------------------------
   NAV LINKS
   -------------------------------------------------- */
.nav-left a,
.nav-right a {
    text-decoration: none;
    color: inherit;
}

.nav-left a {
    font-size: 20px;
    font-weight: 600;
}

/* Wordmark split-glow on hover */
.wm-beacon,
.wm-core {
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-left a:hover .wm-beacon {
    color: rgba(0, 200, 255, 0.95);
    text-shadow: 0 0 10px rgba(0, 180, 255, 0.7), 0 0 22px rgba(0, 180, 255, 0.3);
}

.nav-left a:hover .wm-core {
    color: rgba(220, 70, 70, 0.95);
    text-shadow: 0 0 10px rgba(210, 50, 50, 0.7), 0 0 22px rgba(210, 50, 50, 0.3);
}

.nav-right a {
    margin-left: 24px;
    opacity: 0.85;
}

.nav-right a.active {
    font-weight: 700;
    opacity: 1;
}

html.saber-on .nav-right a {
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

html.saber-on .nav-right a:hover { opacity: 1; }

html.saber-on header { color: inherit; }
html.saber-on header a { color: inherit !important; }

/* --------------------------------------------------
   MAIN CONTENT AREA
   -------------------------------------------------- */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.artifact-main,
.structural-container {
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 40px 20px;
}

/* --------------------------------------------------
   TRIAD GRID
   -------------------------------------------------- */
.triad-layout {
    display: grid;
    grid-template-columns: 1fr;
    margin: 2.5rem 0;
    border: 1px solid #e2e2e2;
}
html.saber-on .triad-layout {
    border-color: rgba(0, 180, 255, 0.16);
}

@media (min-width: 750px) {
    .triad-layout { grid-template-columns: repeat(3, 1fr); }
}

.triad-column {
    padding: 16px;
    border-left: 1px solid #e2e2e2;
    min-width: 0;
}
html.saber-on .triad-column {
    border-left-color: rgba(0, 180, 255, 0.16);
}

.triad-column:first-child { border-left: none; }

.triad-column h4 {
    margin-bottom: 8px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.triad-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: monospace;
    font-size: 0.8rem;
}

.triad-column ul,
.triad-column li { overflow-wrap: anywhere; }

/* --------------------------------------------------
   STRUCTURAL CONTAINER (archivist)
   -------------------------------------------------- */
.structural-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.structural-description {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.structural-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 2rem 0;
}

.structural-footer {
    margin-top: 1rem;
    opacity: 0.6;
    font-size: 0.85rem;
}

/* --------------------------------------------------
   SF LIST / MISC
   -------------------------------------------------- */
.sf-list {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}
