/* Homepage Redesign CSS
 * Following Design, Style & Tone Guide principles
 * Dark UI, high contrast, panel-based layout
 * Starfleet terminal/briefing interface feel
 */

/* ========================================
 * CSS Variables for Theme
 * ======================================== */
:root {
    --stf-primary: #f8a406;
    --stf-primary-alt: #FF6600;
    --stf-bg-dark: #000000;
    --stf-bg-darker: #060606;
    --stf-bg-panel: #0a0a0a;
    --stf-text-light: #ffffff;
    --stf-text-muted: #cccccc;
    --stf-border: #333333;
    --stf-border-light: #1a1a1a;
    
    /* Typography - 2 fonts max per Design Guide */
    --font-primary: 'Verdana', 'Arial', 'Helvetica', sans-serif;
    --font-secondary: 'Courier New', 'Courier', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Panel spacing (locked to prevent designer "eyeballing") */
    --panel-gap: 2rem;
    --panel-padding: 1.5rem;
}

/* ========================================
 * Base Container
 * ======================================== */
.site-container {
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
    padding: 0;
}

/* ========================================
 * Banner Section (Context Setter)
 * ======================================== */
.header-banner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    background-color: #0b0f14; /* Image-less fallback */
    position: relative;
    min-height: 287px; /* Maintain aspect ratio if image fails */
}

/* Banner images as CSS backgrounds for easier overlays and responsive cropping */
.banner-main-container {
    width: 100%;
    max-width: 1920px;
    background-image: url('/images/top_banner_v18.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 287px;
}

.banner-secondary-container {
    width: 100%;
    max-width: 1920px;
    background-image: url('/images/stf_banner_v18.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 80px;
}

/* Visually hidden images for accessibility/SEO */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Fallback if images are disabled - background color already set on .header-banner */

/* Banner Main Container - wraps first image and context text */
.banner-main-container {
    position: relative;
    width: 100%;
    max-width: 1920px;
}

/* Banner Context Text Overlay - positioned at bottom of main graphic */
.banner-context {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 10;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid var(--stf-primary);
    border-right: 2px solid var(--stf-primary);
}

.banner-context-text {
    margin: 0;
    letter-spacing: 2px;
}

/* ========================================
 * Starfleet Control Interface
 * Zones: Informational | External Systems | Action
 * Visual: Labels, not buttons. No hover animations.
 * Only action gets accent color.
 * ======================================== */
.control-interface {
    background: var(--stf-bg-panel);
    border-top: 1px solid var(--stf-text-light);
    border-bottom: 1px solid var(--stf-text-light);
    padding: var(--spacing-sm) var(--panel-padding);
    margin: 0 auto;
    max-width: 1920px;
}

.control-zones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    min-height: 2.5rem;
}

/* Control Zone - Base */
.control-zone {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.control-zone-primary {
    flex: 1;
    min-width: 200px;
}

.control-zone-external {
    flex-shrink: 0;
}

.control-zone-action {
    flex-shrink: 0;
}

/* Control Labels - Plain text, reads like system labels */
.control-label {
    color: var(--stf-text-light);
    text-decoration: underline;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0;
    /* No boxes, no borders, no hover animations - just labels */
}

.control-label:hover,
.control-label:focus {
    color: var(--stf-text-light);
    text-decoration: underline;
    text-decoration-color: var(--stf-primary);
    text-underline-offset: 2px;
    outline: none;
}

.control-label-external::after {
    content: " ↗";
    font-size: 0.7em;
    opacity: 0.5;
    margin-left: 0.2rem;
}

/* Control Separator - Subtle */
.control-separator {
    color: var(--stf-text-light);
    font-size: 0.85rem;
    opacity: 1;
    user-select: none;
    margin: 0 0.25rem;
}

/* Control Action - Single accent color, minimal styling */
.control-action {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--stf-text-light);
    text-decoration: underline;
    text-decoration-color: var(--stf-primary);
    text-underline-offset: 2px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    white-space: nowrap;
    /* Single accent - underline in primary color */
}

.control-action:hover,
.control-action:focus {
    color: var(--stf-text-light);
    text-decoration: underline;
    text-decoration-color: var(--stf-primary);
    text-decoration-thickness: 2px;
    outline: none;
    /* Thicker underline on hover */
}

/* ========================================
 * Main Content Grid
 * ======================================== */
.main-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    width: 100%;
    max-width: 1920px;
    margin: var(--spacing-lg) auto var(--spacing-md) auto;
    padding: 0 var(--spacing-sm);
    align-items: start; /* Align blocks to top */
}

/* ========================================
 * Narrative Block
 * ======================================== */
.narrative-block {
    background: var(--stf-bg-panel);
    border: 1px solid var(--stf-border);
    padding: var(--panel-padding);
    display: flex;
    flex-direction: column;
    font-family: var(--font-primary);
}

.narrative-title {
    color: var(--stf-primary);
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 var(--spacing-md) 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--stf-border);
    padding-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.narrative-text {
    flex: 1;
}

.narrative-text p {
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0 0 var(--spacing-md) 0;
}

.narrative-text p:last-of-type {
    margin-bottom: var(--spacing-md);
}

.narrative-attribution {
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--stf-border);
    text-align: right;
}

.narrative-attribution p {
    color: var(--stf-text-muted);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.6;
}

.narrative-attribution a {
    color: var(--stf-primary);
    text-decoration: none;
}

.narrative-attribution a:hover {
    text-decoration: underline;
}

/* ========================================
 * Community Block
 * ======================================== */
.community-block {
    background: var(--stf-bg-panel);
    border: 1px solid var(--stf-border);
    padding: var(--panel-padding);
    display: flex;
    flex-direction: column;
    font-family: var(--font-primary);
}

.community-title {
    color: var(--stf-primary);
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 var(--spacing-md) 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--stf-border);
    padding-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.community-intro {
    margin-bottom: var(--spacing-md);
}

.community-intro p {
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0 0 var(--spacing-md) 0;
}

.character-spotlight {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--stf-border);
}

.spotlight-title {
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 var(--spacing-sm) 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spotlight-content {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.spotlight-photo {
    flex-shrink: 0;
    width: 120px;
    height: 155px;
    border: 1px solid var(--stf-border);
    background: var(--stf-bg-darker);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Personnel record treatment: neutral framing, no dramatic crops */
}

.spotlight-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* No stylistic effects - treated as personnel record, not portrait */
}

.spotlight-info {
    flex: 1;
}

.spotlight-name {
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: bold;
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.4;
}

.spotlight-details {
    color: var(--stf-text-muted);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.community-stats {
    flex: 1;
}

.stats-title {
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 var(--spacing-sm) 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.community-stats p {
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 var(--spacing-sm) 0;
}

.community-stats strong {
    color: var(--stf-primary);
    font-weight: bold;
}

.latest-members {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--stf-border);
}

/* ========================================
 * Invitation Block
 * ======================================== */
.invitation-block {
    background: var(--stf-bg-panel);
    border: 1px solid var(--stf-border);
    padding: var(--panel-padding);
    display: flex;
    flex-direction: column;
    font-family: var(--font-primary);
}

.invitation-title {
    color: var(--stf-primary);
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 var(--spacing-md) 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--stf-border);
    padding-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.invitation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.invitation-content > p {
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0 0 var(--spacing-lg) 0;
}

.invitation-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: auto;
}

.invitation-link {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--stf-text-light);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    border: 1px solid var(--stf-border);
    background: var(--stf-bg-darker);
    text-align: center;
    transition: border-color 0.2s ease, color 0.2s ease;
    /* Open door feeling, not CTA button */
}

.invitation-link:hover,
.invitation-link:focus {
    color: var(--stf-primary);
    border-color: var(--stf-primary);
    background: var(--stf-bg-darker); /* Keep same background */
    outline: 1px solid var(--stf-primary);
    outline-offset: 1px;
}

.invitation-link-primary {
    background: var(--stf-bg-darker);
    border-color: var(--stf-primary);
    color: var(--stf-primary);
    font-weight: normal; /* Not bold - keep it restrained */
    font-size: 0.95rem; /* Slightly larger but not dramatic */
}

.invitation-link-primary:hover,
.invitation-link-primary:focus {
    background: var(--stf-bg-darker); /* No background change */
    border-color: var(--stf-primary);
    color: var(--stf-text-light);
}

/* Quick Links Section */
.invitation-quick-links {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--stf-border);
}

.quick-links-title {
    color: var(--stf-text-light);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: bold;
    margin: 0 0 var(--spacing-sm) 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.quick-links-column {
    display: flex;
    flex-direction: column;
}

.quick-links-heading {
    color: var(--stf-primary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: bold;
    margin: 0 0 var(--spacing-xs) 0;
}

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

.quick-links-list li {
    margin: 0 0 var(--spacing-xs) 0;
}

.quick-links-list a {
    color: var(--stf-text-muted);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.quick-links-list a:hover,
.quick-links-list a:focus {
    color: var(--stf-primary);
    text-decoration: underline;
}

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

/* Tablets and small desktops (768px - 1200px) */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .banner-context {
        font-size: 1.2rem;
        bottom: 10px;
    }
}

/* Mobile phones (below 768px) */
@media (max-width: 768px) {
    .main-content {
        padding: 0 var(--spacing-xs);
        gap: var(--spacing-sm);
    }
    
    .narrative-block,
    .community-block,
    .invitation-block {
        padding: var(--spacing-md);
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .banner-context {
        font-size: 1rem;
        padding: 0.25rem 0.5rem;
        bottom: 5px;
    }
    
    .banner-context-text {
        letter-spacing: 1px;
    }
    
    .command-bar-container {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .command-bar {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .action-strip {
        width: 100%;
        justify-content: center;
    }
    
    .action-button {
        width: 100%;
        max-width: 300px;
    }
    
    .spotlight-content {
        flex-direction: column;
        align-items: center;
    }
    
    .spotlight-photo {
        width: 100px;
        height: 130px;
    }
}

/* ========================================
 * Footer Section
 * ======================================== */
.site-footer {
    width: 100%;
    max-width: 1920px;
    margin: var(--spacing-md) auto 0 auto;
    text-align: center;
    background-color: var(--stf-bg-dark);
    padding: var(--spacing-md) var(--spacing-sm);
}

.site-footer table {
    width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
}

.site-footer td {
    text-align: center;
    padding: 0;
}

.social-icons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 15px 0;
    margin: 0 auto;
}

.social-icons-container a {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.social-icons-container a:hover {
    opacity: 0.7;
}

.footer-copyright {
    text-align: center;
    font-size: 9px;
    color: var(--stf-text-light);
    padding: 10px 20px;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
}

.compile-quote-section {
    max-width: 1920px;
    margin: var(--spacing-md) auto 0 auto;
    padding: var(--spacing-md);
    background-color: rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--stf-border);
}

.compile-quote-section > div {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.compile-quote-text {
    font-style: italic;
    color: var(--stf-primary);
    font-size: 1.1em;
    margin: 0 0 10px 0;
    line-height: 1.6;
    font-family: var(--font-primary);
}

.compile-quote-attribution {
    color: var(--stf-text-light);
    font-size: 0.9em;
    margin: 10px 0 0 0;
    font-family: var(--font-primary);
}

.compile-quote-location {
    color: var(--stf-primary);
}

/* ========================================
 * Accessibility
 * ======================================== */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-to-main:focus {
    left: 6px;
    top: 7px;
    background: var(--stf-primary);
    color: var(--stf-bg-dark);
    padding: 8px;
    text-decoration: none;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--stf-primary);
    outline-offset: 2px;
}

