/* ==========================================================================
   SEA LAB STUDIOS - MASTER SYSTEM CSS
   ========================================================================== */

:root {
    --bg-dark: #020617;
    --bg-card: #0a0f1d;
    --cyan-accent: #00f2ff;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --container-max-width: 1200px;
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 1. GLOBAL RESET & PROTECTION */
* { box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 2. THE LAYOUT ENGINE (Independent Sidebar Scroll) */
.protocol-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    gap: 4rem;
}

.sidebar-nav {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh; 
    overflow-y: auto; 
    padding: 4rem 0;
    
    /* Invisible Scrollbar logic */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.sidebar-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.main-content {
    flex-grow: 1;
    min-width: 0;
    padding: 4rem 0;
}

/* 3. TYPOGRAPHY */
.haptic-accent {
    font-family: var(--font-mono);
    color: var(--cyan-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 700;
}

.white-paragraph {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 4. HUB & PROTOCOL GRID ALIGNMENT */
.protocol-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
}

.protocol-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.protocol-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.btn-initialise {
    display: block;
    padding: 0.9rem 1.5rem;
    border: 1px solid var(--cyan-accent);
    color: var(--cyan-accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-initialise:hover {
    background: rgba(0, 242, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

/* 5. TACTICAL GRID (Navigator Logs) */
.log-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem; 
    margin-top: 3rem;
}

.image-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
}

.visual-wrapper {
    aspect-ratio: 4/3;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    background: #000;
}

.visual-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual-wrapper.natural-ratio {
    aspect-ratio: auto; 
    background: transparent;
}

.visual-wrapper.natural-ratio img {
    object-fit: contain; 
    height: auto;
}

.card-body { padding: 2rem; }

/* 6. RESPONSIVE */
@media (max-width: 1024px) {
    .protocol-container { flex-direction: column; }
    .sidebar-nav { 
        width: 100%; 
        height: auto; 
        position: relative; 
        padding: 2rem 0;
        overflow-y: visible;
    }
    .protocol-grid, .log-grid { grid-template-columns: 1fr; }
    .image-card { max-width: 100%; }
}
/* 7. SUBSTACK INTEGRATION */
.substack-input {
    width: 100%;
    padding: 0.6rem;
    background: #020617;
    border: 1px solid var(--border-color);
    color: var(--text-white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

.substack-input:focus {
    border-color: var(--cyan-accent);
}

.substack-card {
    margin-top: 3rem;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.5);
}