@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --bg-primary:    #F9F8F6;
    --bg-secondary:  #FFFFFF;
    --bg-tertiary:   #F3F1ED;
    --bg-input:      #FFFFFF;
    --text-primary:  #1A1A1A;
    --text-secondary:#6B6860;
    --border-color:  #E4E0D8;
    --shadow:        rgba(28, 24, 20, 0.07);
    --accent:        #1C2B4A;
    --accent-warm:   #B8860B;
    --font-body:     'Outfit', system-ui, -apple-system, sans-serif;
}

html.dark-mode, body.dark-mode {
    --bg-primary:    #13161E;
    --bg-secondary:  #1C2130;
    --bg-tertiary:   #232840;
    --bg-input:      #232840;
    --text-primary:  #EAE8E2;
    --text-secondary:#9895A0;
    --border-color:  #2E3450;
    --shadow:        rgba(0, 0, 0, 0.35);
    --accent:        #4A6FA5;
    --accent-warm:   #C8960E;
}

/* ============================================================
   Site Nav — matches landing page "scrolled" state
   ============================================================ */

.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(249, 248, 246, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 16px rgba(28, 24, 20, 0.06);
}

html.dark-mode .site-nav {
    background: rgba(19, 22, 30, 0.97);
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.25);
}

.site-nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo */
.site-nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 8px;
}

/* No disc behind the mark: the logo carries its own circular watch face, and a
   navy badge both clipped the ruler's right edge and read as circle-in-circle.
   The artwork also needs ~30px to stay legible -- its tick marks turn to mush
   below that -- so it fills the full box rather than sitting inset inside one. */
/* CSS mask, not <img>: the mark has to flip to white in dark mode, and an <img>
   cannot be recoloured from CSS. background-color drives it from one asset. */
.site-nav-logo-mark {
    width: 30px; height: 30px;
    flex-shrink: 0;
    -webkit-mask: url(/images/wsc-mark.svg) center / contain no-repeat;
            mask: url(/images/wsc-mark.svg) center / contain no-repeat;
    background-color: #1C2B4A;
}
html.dark-mode .site-nav-logo-mark { background-color: #ffffff; }
html.dark-mode .site-footer-logo-mark { background-color: #ffffff; }

/* Nav links — centered */
.site-nav-links {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.site-nav-link {
    padding: 7px 14px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.site-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.site-nav-link.active {
    color: var(--accent);
    font-weight: 600;
}

/* Actions — right side */
.site-nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Dark mode toggle */
.dark-mode-btn {
    background: none;
    border: 1.5px solid var(--border-color);
    border-radius: 7px;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.dark-mode-btn:hover {
    background: var(--bg-tertiary);
    border-color: #C8C3BA;
}

html.dark-mode .dark-mode-btn:hover {
    border-color: #4A5070;
}

/* CTA button in nav */
.site-nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
    background: var(--accent-warm);
    color: #fff;
    border-color: var(--accent-warm);
}

.site-nav-cta:hover {
    background: #9A7009;
    border-color: #9A7009;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.3);
}

html.dark-mode .site-nav-cta {
    background: var(--accent-warm);
    border-color: var(--accent-warm);
}

html.dark-mode .site-nav-cta:hover {
    background: #D4A020;
    border-color: #D4A020;
}

/* Burger menu */
.site-nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.site-nav-burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* Mobile nav panel */
.site-nav-mobile {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 24px 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.site-nav-mobile.open {
    display: block;
}

.site-mobile-link {
    display: block;
    padding: 11px 0;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--bg-tertiary);
}

.site-mobile-link:last-of-type {
    border-bottom: none;
}

.site-mobile-cta {
    display: block;
    margin-top: 12px;
    text-align: center;
    padding: 13px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--accent-warm);
    color: #fff;
    border: 1.5px solid var(--accent-warm);
}

.site-mobile-cta:hover {
    background: #9A7009;
}

/* User button area in nav */
.site-nav-actions #user-button {
    display: flex;
    align-items: center;
}

.site-nav-actions .user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: 7px;
    cursor: pointer;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s;
    white-space: nowrap;
}

.site-nav-actions .user-avatar-btn:hover {
    background: var(--bg-tertiary);
    border-color: #C8C3BA;
}

.site-nav-actions .user-avatar-btn img {
    width: 24px; height: 24px;
    border-radius: 50%;
}

/* User dropdown */
.user-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 20px var(--shadow);
    z-index: 1000;
    min-width: 160px;
    padding: 4px;
}

.dropdown-content a {
    display: block;
    padding: 9px 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    border-radius: 5px;
    transition: background 0.15s;
}

.dropdown-content a:hover {
    background: var(--bg-tertiary);
}

.hidden {
    display: none !important;
}

/* ============================================================
   Site Footer — matches landing page dark footer
   ============================================================ */

.site-footer {
    background: #1C2B4A;
    padding: 64px 40px 36px;
}

.site-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.site-footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.site-footer-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #EAE8E2;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-decoration: none;
}

.site-footer-logo-mark {
    width: 28px; height: 28px;
    flex-shrink: 0;
    -webkit-mask: url(/images/wsc-mark.svg) center / contain no-repeat;
            mask: url(/images/wsc-mark.svg) center / contain no-repeat;
    background-color: rgba(255, 255, 255, 0.75);
}

.site-footer-tagline {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: rgba(234, 232, 226, 0.42);
    line-height: 1.65;
    max-width: 230px;
}

.site-footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(234, 232, 226, 0.35);
    margin-bottom: 16px;
}

.site-footer-col a {
    display: block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: rgba(234, 232, 226, 0.55);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.site-footer-col a:hover {
    color: #EAE8E2;
}

.site-footer-bottom {
    padding-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer-copy {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(234, 232, 226, 0.28);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1000px) {
    .site-nav-links { display: none; }
    .site-nav-burger { display: flex; margin-left: 0; }
    .site-nav-cta { display: none; }
    /* Right-align actions group when nav links are hidden */
    .site-nav-actions { margin-left: auto; }
    /* Show compact user button on mobile */
    .site-nav-actions #user-button { display: flex; align-items: center; }
    /* Compact avatar: hide name + arrow, show only avatar circle */
    .site-nav-actions .user-avatar-btn {
        padding: 0;
        background: none;
        border: none;
        width: 32px;
        height: 32px;
        overflow: hidden;
        font-size: 0;
        gap: 0;
    }
    .site-nav-actions .user-avatar-btn img {
        width: 32px !important;
        height: 32px !important;
        margin: 0 !important;
    }
    .site-nav-actions .user-avatar-btn span { display: none; }
    /* Compact sign-in button on mobile */
    .site-nav-actions #user-button .btn {
        font-size: 0.75rem;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .site-footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .site-nav-inner { padding: 0 16px; gap: 8px; }

    /* The wordmark used to vanish below 640px, which is a common desktop window
       width when a browser is docked beside something else -- it read as broken
       rather than as a deliberate mobile collapse (more so now the mark is bare
       artwork instead of a distinctive navy disc). Only collapse on real phone
       widths; see the 430px block below. */
    .site-nav-logo-mark { flex-shrink: 0; }

    .site-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .site-footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .site-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* The wordmark is never hidden. It used to collapse below 640px, then 430px, on
   the assumption the nav actions needed the room -- measured, and they don't:
   at 320px the header content ends at 304px, with slack to spare. A logo that
   vanishes at some widths reads as a broken page, not as responsive design. */
@media (max-width: 430px) {
    .site-nav-logo { font-size: 0.85rem; gap: 8px; }
    .site-nav-logo-mark { width: 26px; height: 26px; }
}
