/* Public layout scaffolding */

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.6); /* Slate 900 with opacity */
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 1050;
}

.page-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Header & Nav */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .site-header {
    background: rgba(15, 23, 42, 0.85); /* Slate 900 */
}

.public-navbar {
    padding: 0.75rem 0;
}

.public-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-text {
    font-family: var(--font-latin);
    font-size: 1.25rem;
    line-height: 1.1;
}

.brand-text span {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.public-navbar .nav-link {
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Dropdowns */
.navbar .dropdown-menu {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 0.5rem;
    min-width: 200px;
}

.navbar .dropdown-item {
    color: var(--text);
    border-radius: var(--radius-xs);
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: var(--surface-2);
    color: var(--primary);
}

.dropdown-divider {
    border-top-color: var(--border);
    margin: 0.5rem 0;
}

/* Main Content */
.site-main {
    flex: 1;
    width: 100%;
}

.content-shell {
    padding-block: 2rem;
}

/* Hero Section */
.hero-banner {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 5vw, 5rem) clamp(2rem, 5vw, 4rem);
    border-radius: var(--radius-xl);
    /* Modern Mesh Gradient */
    background-color: var(--surface);
    background-image:
        radial-gradient(at 0% 0%, rgba(var(--primary-rgb), 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(var(--accent-rgb), 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(var(--primary-rgb), 0.05) 0px, transparent 50%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-strong);
}

[data-theme="dark"] .hero-banner {
    background-color: var(--bg-elevated);
    border-color: var(--border-strong);
}

.hero-banner .lead {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 600px;
}

/* Sections */
.section-shell {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin-inline: auto;
    margin-bottom: 3rem;
}

.section-header .eyebrow {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-lead {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 1px solid var(--border);
}

.site-footer h5, .site-footer h6 {
    color: #f8fafc; /* Always light text for dark footer */
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.site-footer .footer-muted {
    color: #94a3b8; /* Slate 400 */
}

.site-footer .footer-link {
    color: #cbd5e1; /* Slate 300 */
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    transition: color var(--transition-fast);
}

.site-footer .footer-link:hover {
    color: var(--primary);
}

.site-footer hr {
    border-color: var(--color-footer-divider);
    opacity: 1;
}

/* Callout Panel */
.callout-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-soft);
}

@media (min-width: 992px) {
    .callout-panel {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
    .hero-banner {
        padding: 2rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}
