@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Linear-inspired Light Mode (Fallback/Toggle) */
    --bg-color: #ffffff;
    --text-color: #111827;
    --text-muted: #6b7280;
    --card-bg: #fafafa;
    --border-color: rgba(0, 0, 0, 0.08);
    --primary-color: #000000;
    --primary-hover: #374151;
    --header-bg: rgba(255, 255, 255, 0.8);
    --spotlight-color: rgba(0, 0, 0, 0.03);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    /* Deep obsidian matte canvas */
    --bg-color: #090A0D;
    --text-color: #ffffff;
    --text-muted: #94A3B8;
    --card-bg: rgba(255, 255, 255, 0.02);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary-color: #ffffff;
    --primary-hover: #e2e8f0;
    --header-bg: rgba(9, 10, 13, 0.8);
    --spotlight-color: rgba(255, 255, 255, 0.06);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    -webkit-font-smoothing: antialiased;
}

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

/* Numerals use monospace */
.stats, .price, .ping-value {
    font-family: var(--font-mono);
}

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

a:hover {
    color: var(--text-muted);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.nav-links a {
    color: var(--text-muted);
}
.nav-links a:hover {
    color: var(--text-color);
}

.nav-links a.highlight-link {
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--card-bg);
    color: var(--text-color);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Hero Section */
.hero {
    max-width: 1000px;
    margin: 10rem auto 6rem;
    text-align: center;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(180deg, var(--text-color) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--bg-color) !important;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: 1px solid transparent;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color);
}
.cta-button.secondary:hover {
    background-color: var(--card-bg);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
}

/* Ping Widget */
.ping-widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.ping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ping-run-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    transition: background 0.2s;
}
.ping-run-btn:hover {
    background: rgba(255,255,255,0.1);
}

.ping-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ping-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.ping-bar-bg {
    flex-grow: 1;
    height: 4px;
    background: var(--border-color);
    margin: 0 1rem;
    border-radius: 2px;
    overflow: hidden;
}

.ping-bar-fill {
    height: 100%;
    background: #10b981; /* green for good ping */
    width: 0%;
    transition: width 0.5s ease-out;
}

/* Sections */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.bento-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Linear-style Cards */
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Spotlight Effect */
.bento-card::before {
    content: '';
    position: absolute;
    top: var(--y, -100px);
    left: var(--x, -100px);
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--spotlight-color) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.bento-card:hover {
    transform: translateY(-4px);
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-content {
    position: relative;
    z-index: 1;
}

/* Hidden Diagnostics on hover */
.bento-hidden {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    max-height: 0;
}

.bento-card:hover .bento-hidden {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
}

.bento-card svg {
    width: 24px;
    height: 24px;
    margin-bottom: 1rem;
    stroke: var(--text-color);
    fill: none;
    stroke-width: 1.5;
}

.bento-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.bento-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Pricing */
.pricing-card {
    display: flex;
    flex-direction: column;
}

.pricing-card h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.price {
    font-size: 2.5rem;
    font-weight: 500;
    margin: 1rem 0;
    color: var(--text-color);
}

.price span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.pricing-features {
    list-style: none;
    margin: 1.5rem 0 2rem;
    flex-grow: 1;
}

.pricing-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pricing-features li::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

.pricing-card .cta-button {
    width: 100%;
}

/* Reviews */
.review-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.review-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.review-author {
    font-size: 0.85rem;
    font-weight: 600;
}

/* FAQ */
.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}
.faq-summary {
    padding: 1.2rem;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-summary::-webkit-details-marker {
    display: none;
}
.faq-summary::after {
    content: '+';
    color: var(--text-muted);
}
details[open] .faq-summary::after {
    content: '-';
}
.faq-content {
    padding: 0 1.2rem 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-color);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* Page content for subpages */
.page-content {
    max-width: 700px;
    margin: 8rem auto 4rem;
    padding: 0 2rem;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
}

.page-content h2 {
    font-size: 1.2rem;
    margin: 2.5rem 0 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.page-content p {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.page-content ul {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid, .bento-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links a:not(.highlight-link) {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
}
