/* ============================================
   CSS Variables - Hermetic Suite Color Scheme
   ============================================ */
:root {
    /* Backgrounds */
    --bg-primary: #040404;
    --bg-secondary: #0c0c0c;
    --bg-tertiary: #2a3139;
    
    /* Text */
    --text-primary: #e7e9ea;
    --text-secondary: #8b98a5;
    
    /* Accent & Status Colors */
    --accent: #1d9bf0;
    --accent-hover: #1a8cd8;
    --success: #00ba7c;
    --warning: #ffd400;
    --danger: #f4212e;
    --info: #8b98a5;
    
    /* Severity Colors */
    --critical: #f4212e;
    --high: #ff7a00;
    --medium: #ffd400;
    --low: #00ba7c;
    
    /* Borders */
    --border: #2f3942;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 70px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 1.875rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 500; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
    font-size: 0.875em;
    color: var(--accent);
}

pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    min-height: calc(100vh - var(--header-height) - 200px);
}

section {
    padding: 4rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ============================================
   Header & Navigation
   ============================================ */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

header nav img {
    height: 40px;
    width: auto;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

header nav li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

header nav li a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    text-decoration: none;
}

header nav li a.active {
    color: var(--accent);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-container img {
    height: 40px;
    width: auto;
    display: block;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    text-align: center;
    padding: 5rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Buttons / CTAs
   ============================================ */
.btn, .cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover, .cta:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary, .cta.primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover, .cta.primary:hover {
    background: var(--accent-hover);
    color: white;
}

.btn-secondary, .cta.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover, .cta.secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
    border-color: var(--accent);
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Value Props Grid */
.value-props {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 4rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ============================================
   Features Section
   ============================================ */
.features-preview {
    border-top: 1px solid var(--border);
}

.features-preview h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.features-preview ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    list-style: none;
}

.features-preview li {
    background: var(--bg-tertiary);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.features-preview li::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
}

/* Core Features Page */
.core-features h1 {
    margin-bottom: 2rem;
}

.core-features h2 {
    color: var(--accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.core-features ul,
.plugin-features ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.core-features li,
.plugin-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.core-features li::before,
.plugin-features li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ============================================
   Downloads Section
   ============================================ */
.downloads {
    padding-bottom: 2rem;
}

.core-download {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.core-download h2 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.core-download p {
    margin-bottom: 0.5rem;
}

.plugins-downloads table {
    width: 100%;
}

/* ============================================
   Tables
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-secondary);
}

tr:hover td {
    background: var(--bg-secondary);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

input::placeholder, textarea::placeholder {
    color: var(--text-secondary);
}

button[type="submit"] {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover {
    background: var(--accent-hover);
}

/* Contact Form */
.contact form {
    max-width: 600px;
}

.contact input,
.contact select,
.contact textarea {
    margin-bottom: 1rem;
}

/* Newsletter Form */
form:has(input[name="newsletter_email"]) {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 2rem auto;
}

form:has(input[name="newsletter_email"]) input {
    flex: 1;
}

form:has(input[name="newsletter_email"]) button {
    white-space: nowrap;
}

/* ============================================
   FAQ Accordion
   ============================================ */
.faq-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-tertiary);
}

.faq-question::after {
    content: "+";
    font-size: 1.25rem;
    color: var(--accent);
    transition: transform 0.2s;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

.faq-answer.active {
    display: block;
}

/* ============================================
   Support / Donations Section
   ============================================ */
.donations {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem auto;
}

.donations h2 {
    margin-bottom: 1rem;
}

.donations a {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.donations a:hover {
    background: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

.commercial {
    text-align: center;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin: 2rem 0;
}

/* ============================================
   Footer CTA
   ============================================ */
.footer-cta {
    text-align: center;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-top: 1px solid var(--border);
}

.footer-cta p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

footer ul a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer ul a:hover {
    color: var(--accent);
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: #000; }
.badge-danger { background: var(--danger); color: white; }
.badge-info { background: var(--info); color: white; }
.badge-secondary { background: var(--text-secondary); color: white; }

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(0, 186, 124, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(255, 212, 0, 0.15);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: rgba(244, 33, 46, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    header nav ul {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
    }
    
    header nav ul.active {
        display: flex;
    }
    
    header nav li a {
        padding: 0.75rem 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .value-props {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }
    
    section {
        padding: 2rem 1rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    .hero .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    form:has(input[name="newsletter_email"]) {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    footer ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}
