/* Swiss Modernism & Bento Grid CSS */

:root {
    /* Stark Contrast */
    --bg-dark: #0A0A0A;
    --text-dark: #FFFFFF;
    
    --bg-light: #FFFFFF;
    --text-light: #0A0A0A;
    
    --accent-blue: #2563EB;
    
    /* Layout & Borders */
    --grid-gap: 16px;
    --border-radius: 0px; /* Swiss modernism usually avoids heavily rounded, let's use 0 or very small. Let's use 0 for strictness */
    --border-radius: 4px; /* But Bento grids usually have slight rounding. Let's use 8px as requested in prompt! */
    --border-radius: 8px;
    --border-light: rgba(10, 10, 10, 0.1);
    --border-dark: rgba(255, 255, 255, 0.08);
    
    --surface-light: rgba(0, 0, 0, 0.02);
    --surface-dark: rgba(255, 255, 255, 0.03);
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Springy transition */
}

/* Base Theme Init */
[data-theme="dark"] {
    --bg-color: var(--bg-dark);
    --text-main: var(--text-dark);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: var(--border-dark);
    --surface-color: var(--surface-dark);
    --hover-surface: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
    --bg-color: var(--bg-light);
    --text-main: var(--text-light);
    --text-muted: rgba(0, 0, 0, 0.5);
    --border-color: var(--border-light);
    --surface-color: var(--surface-light);
    --hover-surface: rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4 {
    letter-spacing: -0.03em;
    font-weight: 600;
}

.mono {
    font-family: 'Geist Mono', monospace;
    letter-spacing: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 64px;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}
.nav-links {
    display: flex;
    gap: 24px;
}
.nav-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--text-main);
}
.nav-links .nav-accent {
    color: var(--accent-blue);
    font-weight: 500;
}
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Bento Layout */
.bento-layout {
    padding-top: 104px; /* nav height + padding */
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap);
}

.bento-box {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.bento-interactive:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.4); /* Blue accent on hover */
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
[data-theme="dark"] .bento-interactive:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}
.box-header h3 {
    font-size: 1.25rem;
}
.tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 4px;
}
.desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 24px;
}

/* Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}
.span-2 {
    grid-column: span 2;
}
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--grid-gap);
}

/* Hero */
.bento-hero {
    padding: 64px 48px;
    text-align: center;
}
.ticker {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.pulse {
    width: 8px;
    height: 8px;
    background-color: #10B981; /* Green */
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.bento-hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}
.bento-hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}
.actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
}
.btn-primary {
    background-color: var(--text-main);
    color: var(--bg-color);
}
.btn-primary:hover {
    background-color: var(--accent-blue);
    color: #FFFFFF;
}
.btn-outline {
    border-color: var(--border-color);
    background-color: transparent;
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--text-main);
}
.full-width {
    width: 100%;
}

/* Module 1: Latency */
.latency-tester input {
    width: 100%;
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    color: var(--text-main);
    border-radius: 4px;
    margin-bottom: 16px;
    font-family: 'Geist Mono', monospace;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}
.latency-tester input:focus {
    border-color: var(--accent-blue);
}
.node-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}
/* Scrollbar */
.node-list::-webkit-scrollbar { width: 4px; }
.node-list::-webkit-scrollbar-thumb { background: var(--border-color); }
.node-row {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: var(--hover-surface);
    border-radius: 4px;
    font-size: 0.875rem;
}
.flag { margin-right: 12px; font-size: 1.1rem; }
.name { flex-grow: 1; }
.ping { font-weight: 500; }
.ping.good { color: #10B981; }
.ping.mid { color: #F59E0B; }

/* Module 2: Unlock Matrix */
.protocol-matrix {
    position: relative;
}
.tab-switches {
    display: flex;
    position: relative;
    background: var(--hover-surface);
    padding: 4px;
    border-radius: 6px;
    margin-bottom: 24px;
}
.pill-bg {
    position: absolute;
    top: 4px;
    bottom: 4px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}
.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 0;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.3s;
}
.tab-btn.active {
    color: var(--text-main);
}
.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}
.tab-content.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.matrix-list {
    list-style: none;
}
.matrix-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-family: 'Geist Mono', monospace;
}
.matrix-list li:last-child {
    border-bottom: none;
}
.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 12px;
}
.dot.green { background-color: #10B981; }
.dot.blue { background-color: var(--accent-blue); }

/* Module 3: BGP */
.bgp-graph {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
}
.graph-node {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--hover-surface);
    border-radius: 4px;
}
.graph-lines {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}
.line {
    height: 2px;
    width: 100%;
    background-color: var(--border-color);
    position: relative;
    overflow: hidden;
}
.line.active::after {
    content: '';
    position: absolute;
    top: 0; left: 0; height: 100%; width: 30%;
    background-color: var(--accent-blue);
    animation: stream 1.5s infinite linear;
}
.line.failover { border-top: 2px dashed var(--border-color); background: none; }
@keyframes stream {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* Pricing */
.pricing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}
.billing-toggle {
    font-size: 0.75rem;
}
.billing-toggle .active { color: var(--text-main); }
.billing-toggle .muted { color: var(--text-muted); }
.billing-toggle .separator { margin: 0 8px; color: var(--border-color); }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.tier-card {
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.tier-card.highlight {
    border-color: var(--accent-blue);
    background-color: rgba(37, 99, 235, 0.05);
}
.badge {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: #FFF;
    padding: 2px 8px;
    font-size: 0.7rem;
}
.tier-name {
    font-weight: 600;
    margin-bottom: 12px;
}
.tier-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.tier-price .mono {
    font-size: 2rem;
    color: var(--text-main);
    font-weight: 500;
}
.tier-features {
    list-style: none;
    margin-bottom: 32px;
    flex-grow: 1;
}
.tier-features li {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Reviews & FAQ */
.review-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}
.review-item:last-child {
    border-bottom: none; margin: 0; padding: 0;
}
.quote {
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.author {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.acc-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.acc-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px;
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}
.acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 16px;
}
.acc-content p {
    padding-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.footer-links a:hover {
    color: var(--text-main);
}
.footer-bottom {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Subpages General (for news, about, etc.) */
.page-content { 
    padding-top: 120px;
    padding-bottom: 80px;
    max-width: 800px; 
}
.page-content h1 { 
    font-size: 2.5rem;
    margin-bottom: 40px;
}
.page-content h2 { 
    font-size: 1.5rem; 
    margin: 40px 0 16px; 
}
.page-content p, .page-content li { 
    margin-bottom: 16px; 
    color: var(--text-muted); 
}
.page-content ul { 
    padding-left: 24px; 
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .span-2 {
        grid-column: span 1;
    }
    .bottom-grid {
        grid-template-columns: 1fr;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .bento-hero h1 {
        font-size: 2rem;
    }
    .actions {
        flex-direction: column;
    }
    .pricing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
}

/* SEO Article Specific */
.article-header { margin-bottom: 40px; border-bottom: 1px solid var(--border-color); padding-bottom: 24px; }
.article-meta { font-family: 'Geist Mono', monospace; font-size: 0.875rem; color: var(--text-muted); margin-top: 16px; }
.toc-box { background: var(--hover-surface); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 24px; margin-bottom: 40px; }
.toc-box h3 { margin-top: 0; margin-bottom: 16px; font-size: 1.1rem; }
.toc-box ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.toc-box ul li { margin-bottom: 8px; }
.toc-box ul li a { color: var(--text-muted); transition: color 0.2s; }
.toc-box ul li a:hover { color: var(--accent-blue); }
.article-body h2 { margin-top: 48px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.article-body h3 { margin-top: 32px; margin-bottom: 16px; font-size: 1.2rem; }
.article-body p { margin-bottom: 16px; line-height: 1.8; color: var(--text-muted); }
.article-body .highlight-link { color: var(--accent-blue); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(37, 99, 235, 0.4); text-underline-offset: 4px; }
.related-reading { margin-top: 64px; border-top: 1px solid var(--border-color); padding-top: 32px; }
.related-reading h3 { margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.related-card { border: 1px solid var(--border-color); padding: 16px; border-radius: var(--border-radius); transition: all 0.3s; }
.related-card:hover { border-color: var(--accent-blue); transform: translateY(-2px); }
.related-card h4 { font-size: 1rem; margin-bottom: 8px; }
.related-card p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0; }
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }

