/* CREDLYTIC - Clean Cyber Security Theme (Light/Dark Ready) */

:root {
    /* DARK MODE DEFAULT */
    --bg-main: #050505;
    --card-bg: rgba(20, 20, 20, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #888888;
    
    --primary: #00e676; 
    --primary-dim: rgba(0, 230, 118, 0.15);
    
    --grid-color: rgba(255, 255, 255, 0.03);
    --font-main: 'Inter', -apple-system, sans-serif;
}

[data-theme="light"] {
    /* LIGHT MODE OVERRIDES */
    --bg-main: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --primary: #00c853; 
    --primary-dim: rgba(0, 200, 83, 0.1);
    --grid-color: rgba(0, 0, 0, 0.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    
    /* The Dim Check Squares Pattern */
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.container {
    width: 92%; 
    max-width: 1600px; 
    margin: 0 auto;
    position: relative;
    z-index: 10; 
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; }
.text-accent { color: var(--primary); }
.hidden { display: none !important; }

/* --- Global Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

/* The Sub-Brand Text (e.g. ADMIN WORKSPACE) */
.nav-sub-brand {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    padding-left: 12px;
    border-left: 1px solid var(--card-border);
    margin-left: 12px;
    text-transform: uppercase;
}

.nav-center {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-center a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-center a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* The Email Pill */
.nav-email-pill {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-dim);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 224, 121, 0.2);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.theme-toggle:hover { 
    color: var(--primary); 
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    max-width: 1100px;
}

.hero p {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 3rem;
}

/* --- Buttons --- */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap !important; /* Prevents text wrap on mobile */
}

.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 4px 15px var(--primary-dim);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- Glass Cards & Grids --- */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 8rem 0 4rem 0; 
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--primary-dim);
}

.glass-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.glass-card p { color: var(--text-muted); font-size: 1rem; }

/* --- Workflow Section --- */
.workflow-step { text-align: center; display: flex; flex-direction: column; align-items: center; }
.workflow-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--primary-dim); color: var(--primary);
    font-weight: 800; font-size: 1.5rem; margin-bottom: 1.5rem; border: 1px solid var(--primary);
}

/* --- Tech Architecture Banner --- */
.tech-banner {
    background: var(--card-bg); border: 1px solid var(--card-border);
    padding: 4rem 2rem; border-radius: 16px; margin-top: 2rem;
    text-align: center; backdrop-filter: blur(16px);
}

.tech-grid { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; margin-top: 3rem; }
.tech-item {
    background: rgba(0, 230, 118, 0.05); border: 1px solid var(--card-border);
    padding: 1.5rem 2rem; border-radius: 12px; min-width: 220px;
    transition: transform 0.2s, border-color 0.2s;
}
.tech-item:hover { transform: translateY(-3px); border-color: var(--primary); }

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .container { width: 90%; }
    
    /* Nav Mobile Overrides */
    .nav-center { display: none; } 
    .nav-sub-brand { display: none; } /* Hides extra text */
    .nav-email-pill { display: none !important; } /* Hides email */
    .nav-actions { gap: 12px; }
    
    /* Prevents nav buttons from going 100% width */
    nav .btn { 
        width: auto; 
        margin-bottom: 0; 
        padding: 8px 16px; 
        font-size: 0.85rem; 
    }

    .hero { padding: 4rem 0 2rem 0; } 
    .hero h1 { 
        font-size: clamp(2.5rem, 11vw, 3.5rem); 
        line-height: 1.1;
        letter-spacing: -1px;
    }
    .hero p { font-size: 1rem; margin-bottom: 2.5rem; padding: 0 10px; }
    
    /* Main body buttons go full width */
    main .btn, header .btn { width: 100%; margin-bottom: 0.8rem; }
    
    .tech-banner { padding: 3rem 1.5rem; }
    .tech-item { width: 100%; }
}