
/* ==========================================================
   FORGED HORIZON
   Main Website Stylesheet
   ========================================================== */


/* ----------------------------------------------------------
   01. DESIGN SYSTEM
   ---------------------------------------------------------- */

:root {
    --charcoal: #202B30;
    --sage: #829780;
    --blue: #477CA8;
    --cloud: #F1F3EF;
    --white: #FFFFFF;
    --soft-sage: #E0E8DC;

    --text: #29363B;
    --muted: #718087;
    --border: #E1E7E4;

    --shadow: 0 8px 28px rgba(32, 43, 48, 0.035);
}


/* ----------------------------------------------------------
   02. GLOBAL STYLES
   ---------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;

    min-height: 100vh;
    margin: 0;

    background: #F7F9F7;
    color: var(--text);

    font-family: Inter, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Arial, sans-serif;

    font-size: 14px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

.wrap {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}


/* ----------------------------------------------------------
   03. SITE HEADER
   ---------------------------------------------------------- */

.site-header {
    background: var(--charcoal);
    color: var(--white);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;

    min-height: 91px;
}


/* Branding */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;

    white-space: nowrap;
}

.brand-symbol {
    position: relative;

    display: flex;
    align-items: flex-end;
    gap: 3px;

    width: 36px;
    height: 35px;

    transform: skew(-16deg);
}

.brand-symbol span {
    width: 9px;
    background: var(--sage);
    border-radius: 2px 2px 0 0;
}

.brand-symbol span:nth-child(1) {
    height: 18px;
}

.brand-symbol span:nth-child(2) {
    height: 28px;
    background: #B5C6B0;
}

.brand-symbol span:nth-child(3) {
    height: 35px;
    background: #78A7C7;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.7px;
    line-height: 1.2;
}

.brand-name span {
    color: #B3C8B0;
}

.header-tagline {
    padding-left: 23px;

    border-left: 1px solid rgba(255, 255, 255, 0.18);

    color: #B4C1C2;
    font-size: 12px;
}


/* ----------------------------------------------------------
   04. MEMBER & ACCOUNT CONTROLS
   ---------------------------------------------------------- */

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;

    margin-left: auto;
}

.member-label {
    color: #BDCAC7;
    font-size: 12px;
    letter-spacing: 0.2px;
}

.member-label strong {
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
}

.header-actions form {
    display: inline-flex;
    margin: 0;
}


/* Base styling for account links and buttons */

.site-header .header-actions a,
.site-header .header-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 9px 18px;

    border: 1px solid var(--sage);
    border-radius: 7px;

    background: transparent;
    color: var(--white);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


/* Log In — outlined button */

.site-header .header-actions a[href="/login.php"] {
    background: transparent;
    border-color: var(--sage);
    color: var(--white);
}


/* Register — filled sage button */

.site-header .header-actions a[href="/register.php"] {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--charcoal);
}


/* Log Out — outlined button */

.site-header .header-actions button[type="submit"] {
    background: transparent;
    border-color: var(--sage);
    color: var(--white);
}


/* Hover states */

.site-header .header-actions a:hover,
.site-header .header-actions button:hover {
    background: var(--soft-sage);
    border-color: var(--soft-sage);
    color: var(--charcoal);

    transform: translateY(-1px);
}


/* Pressed states */

.site-header .header-actions a:active,
.site-header .header-actions button:active {
    transform: translateY(0);
}


/* Keyboard accessibility */

.site-header .header-actions a:focus-visible,
.site-header .header-actions button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}


/* ----------------------------------------------------------
   05. PRIMARY NAVIGATION
   ---------------------------------------------------------- */

.nav-shell {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.main-nav {
    display: flex;
    align-items: stretch;
    gap: 28px;

    min-height: 54px;
}

.main-nav a {
    display: flex;
    align-items: center;

    padding: 0 5px;

    border-bottom: 3px solid transparent;

    color: #405258;
    font-weight: 650;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.main-nav a:hover {
    color: var(--blue);
}

.main-nav a.active {
    border-bottom-color: var(--sage);
    color: var(--charcoal);
}

.nav-note {
    align-self: center;

    margin-left: auto;

    color: #96A2A4;
    font-size: 12px;
}


/* ----------------------------------------------------------
   06. MAIN PAGE LAYOUT
   ---------------------------------------------------------- */

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 25px;

    flex: 1;

    padding-top: 37px;
    padding-bottom: 70px;
}

.content-column {
    min-width: 0;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 6px;

    color: var(--sage);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.page-heading h1 {
    margin: 0 0 7px;

    color: var(--charcoal);

    font-size: 27px;
    font-weight: 750;
    letter-spacing: -0.7px;
    line-height: 1.25;
}

.page-subtitle {
    margin: 0;

    color: var(--muted);
    font-size: 13px;
}


/* ----------------------------------------------------------
   07. FORUM DIRECTORY
   ---------------------------------------------------------- */

.forum-directory {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.category-block,
.forum-directory > .empty-state {
    overflow: hidden;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;

    box-shadow: var(--shadow);
}

.section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 14px 20px;

    background: var(--charcoal);
    border-radius: 7px 7px 0 0;

    color: var(--white);
}

.section-bar h2 {
    margin: 0;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1px;
}

.section-hint {
    color: #B9C8C6;
    font-size: 11px;
}

.category-description {
    margin: 0;
    padding: 13px 20px;

    background: #FAFBF9;
    border-bottom: 1px solid var(--border);

    color: var(--muted);
    font-size: 12px;
}

.category-empty {
    margin: 0;
    padding: 24px 20px;

    color: var(--muted);
}


/* Individual forum rows */

.forum-row {
    display: flex;
    align-items: center;
    gap: 17px;

    padding: 20px;

    border-bottom: 1px solid var(--border);
}

.forum-row:last-child {
    border-bottom: 0;
}

.forum-icon {
    display: grid;
    place-items: center;

    width: 45px;
    height: 45px;
    flex: 0 0 45px;

    background: var(--soft-sage);
    border-radius: 12px;

    color: #5F826B;
}

.forum-icon svg {
    width: 22px;
    height: 22px;
}

.forum-info {
    flex: 1;
    min-width: 0;
}

.forum-info h3 {
    margin: 0 0 3px;

    color: var(--charcoal);
    font-size: 15px;
}

.forum-info p {
    margin: 0;

    color: var(--muted);
    font-size: 12px;
}

.forum-status {
    color: #97A4A4;
    font-size: 11px;
}


/* ----------------------------------------------------------
   08. EMPTY STATES
   ---------------------------------------------------------- */

.empty-state {
    padding: 65px 24px 70px;
    text-align: center;
}

.empty-mark {
    display: grid;
    place-items: center;

    width: 52px;
    height: 52px;

    margin: 0 auto 17px;

    background: var(--soft-sage);
    border-radius: 15px;

    color: #648269;
    font-size: 27px;
}

.empty-state h2 {
    margin: 0 0 9px;

    color: var(--charcoal);
    font-size: 17px;
    line-height: 1.4;
}

.empty-state p {
    max-width: 370px;
    margin: 0 auto;

    color: var(--muted);
    font-size: 13px;
}


/* ----------------------------------------------------------
   09. SIDEBAR
   ---------------------------------------------------------- */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 17px;

    padding-top: 2px;
}

.side-card {
    padding: 20px 20px 22px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;

    box-shadow: var(--shadow);
}

.side-card-title {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 12px;
}

.side-card-title h2 {
    margin: 0;

    color: var(--charcoal);
    font-size: 13px;
}

.side-dot {
    width: 8px;
    height: 8px;

    background: var(--sage);
    border-radius: 50%;
}

.side-dot.blue {
    background: var(--blue);
}

.side-card p {
    margin: 0;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}


/* ----------------------------------------------------------
   10. FOOTER
   ---------------------------------------------------------- */

.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    min-height: 70px;

    color: #8A989B;
    font-size: 11px;
}


/* ----------------------------------------------------------
   11. TABLET RESPONSIVENESS
   ---------------------------------------------------------- */

@media (max-width: 800px) {

    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));

        padding-top: 0;
    }

    .header-tagline {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .member-label {
        font-size: 11px;
    }

}


/* ----------------------------------------------------------
   12. MOBILE RESPONSIVENESS
   ---------------------------------------------------------- */

@media (max-width: 560px) {

    .wrap {
        width: min(100% - 28px, 1200px);
    }

    .header-inner {
        min-height: 76px;
        gap: 12px;
    }

    .brand-name {
        font-size: 17px;
    }

    .brand-symbol {
        margin-right: -5px;

        transform: skew(-16deg) scale(0.85);
        transform-origin: left center;
    }

    .header-actions {
        gap: 6px;
    }

    .member-label {
        display: none;
    }

    .site-header .header-actions a,
    .site-header .header-actions button {
        min-height: 36px;
        padding: 7px 12px;

        font-size: 12px;
    }

    .main-layout {
        padding-top: 26px;
        gap: 24px;
    }

    .page-heading h1 {
        font-size: 23px;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .nav-note {
        display: none;
    }

    .forum-status,
    .section-hint {
        display: none;
    }

    .forum-row {
        padding: 17px 15px;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        gap: 1px;

        text-align: center;
    }

}


/* ----------------------------------------------------------
   13. REDUCED MOTION
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .site-header .header-actions a,
    .site-header .header-actions button,
    .main-nav a {
        transition: none;
    }

}

/* FH_PAGE_ALIGNMENT_START */
/* Shared geometry takes priority over legacy page-specific important widths. */
/* Shared content edges follow the approved Forged Horizon banner. */
:root{--fh-page-width:min(1280px,calc(100% - 20px))}
@media(max-width:700px){:root{--fh-page-width:calc(100% - 16px)}}
html:root:root body .fh-unified-header,
html:root:root body .fh-admin-workspace-inner,
html:root:root body header.site-header,
html:root:root body header.header,
html:root:root body header.fh4-header,
html:root:root body .fh-site-nav-shell,
html:root:root body .fh-sitewide-nav-shell,
html:root:root body .nav-shell,
html:root:root body.fh-premium-interior>main,
html:root:root body>main,
html:root:root body main.wrap,
html:root:root body .main-layout.wrap,
html:root:root body .fh-forum-main,
html:root:root body .fh-topic-main,
html:root:root body .fh-directory-main,
html:root:root body .fh-compose,
html:root:root body .profile-page,
html:root:root body .admin-page,
html:root:root body .fm-page,
html:root:root body .members-page,
html:root:root body .fh-settings,
html:root:root body .fh-rp,
html:root:root body .fh-analytics,
html:root:root body .audit-wrap,
html:root:root body .ba-wrap,
html:root:root body .dc-main,
html:root:root body .rc-site-banner,
html:root:root body .rc-site-chrome,
html:root:root body .game-layout,
html:root:root body .game-heading,
html:root:root body>.capacity-notice,
html:root:root body>.game-guide,
html:root:root body .site-footer>.footer-inner {
 box-sizing:border-box!important;
 width:var(--fh-page-width)!important;
 max-width:none!important;
 min-width:0!important;
 margin-left:auto!important;
 margin-right:auto!important;
}
/* Outer content frames are flush; panels keep their own internal padding. */
html:root:root body>main:not(.panel),
html:root:root body main.wrap,
html:root:root body .main-layout.wrap,
html:root:root body .fh-forum-main,
html:root:root body .fh-topic-main,
html:root:root body .fh-directory-main,
html:root:root body .fh-compose,
html:root:root body .profile-page,
html:root:root body .admin-page,
html:root:root body .fm-page,
html:root:root body .members-page,
html:root:root body .game-heading,
html:root:root body>.game-guide,
html:root:root body .site-footer>.footer-inner {
 padding-left:0!important;padding-right:0!important;
}
html:root:root body .game-layout>#main{width:auto!important;max-width:none!important;min-width:0!important;padding-left:26px!important;padding-right:0!important}
html:root:root body .guide-page>.game-guide{width:100%!important;max-width:none!important;padding-left:0!important;padding-right:0!important}
html:root:root body .game-layout>.sidebar{min-width:0!important}
html:root:root body .game-layout+#game-guide,
html:root:root body .game-layout~.game-guide{width:var(--fh-page-width)!important;max-width:none!important;padding-left:0!important;padding-right:0!important}
html:root:root body>.game-heading~footer:not(.site-footer){box-sizing:border-box!important;width:var(--fh-page-width)!important;margin-left:auto!important;margin-right:auto!important;padding-left:0!important;padding-right:0!important}
@media(max-width:760px){html:root:root body .game-layout>#main{padding-left:0!important;padding-right:0!important}html:root:root body .game-layout>.sidebar{width:100%!important}}

html:root:root body .fh-unified-header .fh-unified-nav-inner{box-sizing:border-box!important;width:100%!important;max-width:none!important;padding-left:20px!important;padding-right:20px!important}
html:root:root body .fh-unified-header>.fh-unified-banner,html:root:root body .fh-unified-header>.fh-unified-nav{box-sizing:border-box!important;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
/* Game chrome is already inside the shared-width wrapper: do not inset it twice. */
html:root:root body .rc-site-chrome>.fh-site-nav-shell{box-sizing:border-box!important;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
/* Keep the sticky estate strip within the same edges as the banner and game. */
html:root:root body>#status-strip.status-strip{box-sizing:border-box!important;width:var(--fh-page-width)!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important;padding-left:20px!important;padding-right:20px!important}
/* Start Forums beside the frame on every shared navigation layout. */
html:root:root body .fh-site-nav-shell>nav,
html:root:root body .fh-sitewide-nav-shell>nav,
html:root:root body .nav-shell>nav,
html:root:root body nav.fh-site-nav,
html:root:root body nav.main-nav,
html:root:root body nav.fh-sitewide-nav,
html:root:root body .fh-unified-header .fh-unified-nav-inner{
 box-sizing:border-box!important;width:100%!important;max-width:none!important;
 margin-left:0!important;margin-right:0!important;
 padding-left:4px!important;padding-right:4px!important;gap:0!important;
}
html:root:root body .fh-site-nav-shell,
html:root:root body .fh-sitewide-nav-shell,
html:root:root body .nav-shell,
html:root:root body .fh-unified-header>.fh-unified-nav{
 background:linear-gradient(to bottom,#4a6263 0%,#253f43 8%,#0d2b30 25%,#071e24 67%,#19353a 91%,#0a1b20 100%)!important;
}
@media(max-width:1050px){
 html:root:root body nav.fh-site-nav,
 html:root:root body nav.main-nav,
 html:root:root body nav.fh-sitewide-nav,
 html:root:root body .fh-unified-nav-inner{flex-wrap:wrap!important}
}
/* FH_PAGE_ALIGNMENT_END */
