/* ============================================
   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 {
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 700; color: var(--accent); }
h2 { font-size: 1.875rem; font-weight: 600; color: var(--text-primary); }
h3 { font-size: 1.5rem; font-weight: 600; color: var(--text-primary); }
h4 { font-size: 1.25rem; font-weight: 500; color: var(--text-primary); }

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: 2rem 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 - Hamburger button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: -0.5rem;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger to X transformation when menu is open */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    text-align: center;
    padding: 4rem 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.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1rem;
}

.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;
    margin: .5rem .5rem;
}

.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);
    margin: .5rem .5rem;
}

.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 and Plugins Features Pages */
.core-features,
.plugins {
    padding-bottom: 2rem;
}

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

.core-feature h2,
.plugin h2 {
    margin-bottom: 0.5rem;
}

.core-feature ul,
.plugin ul {
    list-style: none;
}

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

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

/* ============================================
   Feature Section Two-Column Layout
   ============================================ */
.feature-section {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.feature-content {
    flex: 1;
    min-width: 0;
}

.feature-content h2 {
    margin-bottom: 0.5rem;
}

.feature-content ul {
    list-style: none;
}

.feature-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

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

.feature-screenshot {
    flex: 0 0 auto;
    width: 350px;
}

.feature-screenshot a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-screenshot a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.feature-screenshot img {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================
   Lightbox Styles
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s;
    line-height: 1;
}

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

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Responsive breakpoints for lightbox image */
@media (max-width: 1400px) {
    .lightbox-image {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .lightbox {
        padding: 1rem;
    }
    
    .lightbox-image {
        max-width: 100%;
        max-height: 85vh;
    }
    
    .lightbox-close {
        top: 0.75rem;
        right: 1rem;
        font-size: 2rem;
    }
}

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

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

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

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

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

.plugin-download h2 {
    margin-bottom: 0.5rem;
}

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

/* ============================================
   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 {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.contact form {
    max-width: 800px;
    margin: auto;
}

.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;
    margin-bottom: .75rem;
}

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

/* ============================================
   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
   ============================================ */
.support {
    padding-bottom: 1.5rem;
}

.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;
}

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

.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
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .feature-screenshot {
        width: 280px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Mobile Navigation Dropdown */
    header nav ul {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    header nav ul.active {
        max-height: 400px; /* Enough for all nav items */
        padding: 0.5rem 0;
    }
    
    header nav li {
        border-bottom: 1px solid var(--border);
    }
    
    header nav li:last-child {
        border-bottom: none;
    }
    
    header nav li a {
        padding: 1rem 1.5rem;
        display: block;
        font-size: 1rem;
    }
    
    header nav li a:hover,
    header nav li a:focus {
        background: var(--bg-tertiary);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .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;
        margin-bottom: 1.25rem;
        padding: 0 2rem;
    }
    
    /* Feature section responsive - stack vertically */
    .feature-section {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .feature-screenshot {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

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