/* =========================================
   Copyright SITLE - Satellite Hardware Website
   Zero External Dependencies | Dark Tech Theme
   ========================================= */

:root {
    --bg-primary: #0b0d12;
    --bg-surface: #13161f;
    --bg-card: #1a1e29;
    --text-primary: #e6e9ef;
    --text-secondary: #9ca3af;
    --accent: #0ea5e9;
    --accent-hover: #38bdf8;
    --badge-available: #10b981;
    --badge-launch: #f59e0b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --radius-sm: 6px;
    --radius-md: 10px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-stack);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Layout Utilities */
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 var(--spacing-sm); }
.section-title { font-size: 1.75rem; margin-bottom: var(--spacing-md); text-align: center; letter-spacing: -0.02em; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(11, 13, 18, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--spacing-sm) 0;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 32px; width: auto; }
.main-nav { display: flex; gap: var(--spacing-md); align-items: center; }
.main-nav a { font-weight: 500; color: var(--text-secondary); font-size: 0.95rem; }
.main-nav a:hover, .main-nav a.active { color: var(--accent); }
.cta-small { border: 1px solid var(--border-subtle); padding: 6px 14px; border-radius: var(--radius-sm); }

/* Hero */
.hero { 
    position: relative;
    overflow: hidden;   
    
    width: 100%;        
    padding: var(--spacing-xl) 0 var(--spacing-lg); 
    text-align: center; 
}

.hero h1 { font-size: clamp(2rem, 5vw, 2rem); line-height: 1.2; margin-bottom: var(--spacing-sm); letter-spacing: -0.03em; }
.subtitle { color: var(--text-secondary); font-size: 1.15rem; max-width: 600px; margin: 0 auto var(--spacing-md); }

/* Trust Bar */

.trust-title { text-align: center; color: var(--text-secondary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--spacing-sm); }
.trust-bar { 
    padding: 2rem 0;
    border-top: 1px solid var(--border-subtle); 
    border-bottom: 1px solid var(--border-subtle); 
    background: var(--bg-surface); 
}

.logo-grid { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: center; 
    gap: 2.5rem;
    opacity: 0.75; 
    filter: grayscale(80%); 
    transition: opacity 0.3s ease, filter 0.3s ease; 
}

.logo-grid:hover { opacity: 1; filter: grayscale(0%); }

.logo-grid img { 
    height: 40px;
    width: auto; 
    object-fit: contain; 
    transition: transform 0.2s ease;
}

.logo-grid img:hover { transform: translateY(-3px); }

/* Products */
.products { padding: var(--spacing-xl) 0; background: var(--bg-primary); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--spacing-lg); margin-top: var(--spacing-md); }

.product-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: rgba(14, 165, 233, 0.3); }

.badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    padding: 4px 10px; border-radius: var(--radius-sm);
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #fff;
}

.badge-available { background: var(--badge-available); }
.badge-launch { background: var(--badge-launch); }

.card-image img { width: 100%; height: 220px; object-fit: cover; border-bottom: 1px solid var(--border-subtle); }

.card-content { padding: var(--spacing-md); }
.card-content h3 { font-size: 1.4rem; margin-bottom: var(--spacing-xs); letter-spacing: -0.02em; }
.card-content p { color: var(--text-secondary); margin-bottom: var(--spacing-sm); font-size: 0.95rem; }

.specs-list { margin-bottom: var(--spacing-md); }
.specs-list li { position: relative; padding-left: 18px; color: var(--text-primary); font-size: 0.9rem; margin-bottom: 6px; }
.specs-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: bold; }

.card-actions { display: flex; gap: var(--spacing-sm); flex-wrap: wrap; }
.btn { display: inline-block; padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.9rem; text-align: center; cursor: pointer; transition: all 0.2s ease; }
.btn-primary { background: var(--accent); color: #fff; border: none; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.btn-secondary:hover { border-color: var(--text-primary); color: var(--text-primary); }

/* Downloads Page */
.page-content { padding-top: var(--spacing-xl); }
.downloads-hero { text-align: center; margin-bottom: var(--spacing-lg); }
.download-section { padding: var(--spacing-md) 0; border-bottom: 1px solid var(--border-subtle); }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--spacing-md); margin-top: var(--spacing-sm); }

.download-card {
    display: flex; align-items: center; gap: var(--spacing-sm);
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    padding: var(--spacing-md); border-radius: var(--radius-md);
    transition: all 0.2s ease;
}
.download-card:hover { border-color: var(--accent); background: var(--bg-card); }
.file-icon { font-size: 1.8rem; line-height: 1; }
.file-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.file-info p { color: var(--text-secondary); font-size: 0.9rem; }

.download-note { padding: var(--spacing-lg) 0; text-align: center; color: var(--text-secondary); font-size: 0.95rem; border-top: 1px solid var(--border-subtle); margin-top: var(--spacing-md); }
.download-note a { color: var(--accent); text-decoration: underline; }

/* Footer */
.site-footer { background: var(--bg-surface); padding: var(--spacing-lg) 0 var(--spacing-sm); margin-top: var(--spacing-xl); border-top: 1px solid var(--border-subtle); }
.footer-content { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: var(--spacing-md); }
.footer-col h4 { font-size: 1.2rem; margin-bottom: var(--spacing-xs); }
.footer-col p, .email-link { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 4px; }
.email-link:hover { color: var(--accent); }
.footer-nav { display: flex; gap: var(--spacing-md); }
.footer-nav a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--text-primary); }
.copyright { text-align: center; color: #4b5563; font-size: 0.8rem; margin-top: var(--spacing-md); padding-top: var(--spacing-sm); border-top: 1px solid rgba(255,255,255,0.05); }

/* Responsive */
@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: var(--spacing-sm); }
    .main-nav { justify-content: center; width: 100%; }
    .hero h1 { font-size: 2rem; }
    .product-grid { grid-template-columns: 1fr; }
    .card-actions { flex-direction: column; }
    .btn { width: 100%; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
    :root { --spacing-xl: 3rem; --spacing-lg: 2rem; }
    .logo-grid img { height: 22px; }
}

/* =========================================
   Modal Overlay & Content
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    width: 92%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transform: translateY(15px) scale(0.98);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover { color: var(--accent); }

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    padding-right: 2rem; /* Space for close button */
    letter-spacing: -0.02em;
}

.modal-section { margin-bottom: var(--spacing-sm); }
.modal-section h3 { font-size: 1.1rem; color: var(--accent); margin-bottom: 6px; }
.modal-section p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: var(--bg-surface); border-radius: 4px; }
.modal-content::-webkit-scrollbar-thumb { background: #3a3f4b; border-radius: 4px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: #525867; }

@media (max-width: 480px) {
    .modal-content { padding: var(--spacing-sm); width: 96%; }
}

/* =========================================
   Starfield Background Styling
   ========================================= */
.hero {
    position: relative; /* Allows absolute positioning inside */
    overflow: hidden;   /* Ensures stars don't spill out of bounds */
}

#starfield {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;        /* Puts it behind the text */
    pointer-events: none; /* Crucial: lets user click buttons through the stars */
}

/* Ensures the content wrapper sits on TOP of the stars */
.hero-content-wrapper {
    position: relative;
    z-index: 2; 
}
