/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Matte Black Dark Theme (Default) */
    --bg-main: #0A0A0C;
    --bg-surface: rgba(25, 25, 30, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --accent: #4F46E5;
    --accent-glow: rgba(79, 70, 229, 0.15);
    --nav-bg: rgba(10, 10, 12, 0.8);
    --transition-speed: 0.3s;
}

[data-theme="light"] {
    /* Clean Light Theme */
    --bg-main: #F8FAFC;
    --bg-surface: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --accent: #4338CA;
    --accent-glow: rgba(67, 56, 202, 0.1);
    --nav-bg: rgba(248, 250, 252, 0.8);
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    background-image: radial-gradient(circle at 50% -20%, var(--accent-glow) 0%, transparent 60%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

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

/* Minimal Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-speed) ease;
}

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

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

/* Common Layout */
section {
    padding: 6rem 5%;
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    font-size: 1.125rem;
}

/* Buttons */
.cta-btn {
    display: inline-block;
    background-color: var(--text-primary);
    color: var(--bg-main) !important;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.cta-btn:hover {
    transform: scale(0.98);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.1);
    opacity: 0.9;
}

.cta-btn.outline {
    background-color: transparent;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

.cta-btn.outline:hover {
    background-color: var(--bg-surface);
}

[data-theme="light"] .cta-btn {
    background-color: var(--accent);
    color: #fff !important;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

/* Animated CLI Terminal */
.terminal-window {
    background: #000;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    font-family: "JetBrains Mono", "Courier New", monospace;
}

.terminal-header {
    background: #111;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot.r { background: #ff5f56; }
.terminal-dot.y { background: #ffbd2e; }
.terminal-dot.g { background: #27c93f; }

.terminal-body {
    padding: 1.5rem;
    color: #a3a3a3;
    font-size: 0.875rem;
    line-height: 1.6;
    height: 250px;
    overflow: hidden;
}

.term-line {
    opacity: 0;
    animation: termReveal 0.1s forwards;
}

.term-line:nth-child(1) { animation-delay: 0.2s; }
.term-line:nth-child(2) { animation-delay: 0.8s; }
.term-line:nth-child(3) { animation-delay: 1.4s; }
.term-line:nth-child(4) { animation-delay: 2.0s; }
.term-line:nth-child(5) { animation-delay: 2.6s; }

.term-success { color: #10b981; }
.term-highlight { color: #8b5cf6; }

@keyframes termReveal {
    to { opacity: 1; }
}

[data-theme="light"] .terminal-window {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .terminal-header {
    background: #f1f5f9;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

[data-theme="light"] .terminal-body {
    color: #334155;
}


/* Glassmorphism Cards with Spotlight */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

/* Spotlight Effect */
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle 250px at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}
[data-theme="light"] .card::before {
    background: radial-gradient(circle 250px at var(--mouse-x, 0) var(--mouse-y, 0), rgba(0,0,0,0.04), transparent 80%);
}

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

.card > * { position: relative; z-index: 1; }

.card-icon {
    margin-bottom: 1.5rem;
}
.card-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-primary);
    stroke-width: 1.5;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Speed Test Demo Widget */
.speed-test-widget {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    margin-top: -6px;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--border-color);
    border-radius: 2px;
}
.node-list {
    list-style: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.node-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: all 0.3s;
}

/* Protocol / Pricing Table */
.pricing-card {
    text-align: center;
}

.pricing-card:hover {
    background: rgba(255,255,255,0.03);
}

[data-theme="light"] .pricing-card:hover {
    background: rgba(0,0,0,0.02);
}

.price-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1.5rem 0;
    color: var(--text-primary);
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.protocol-specs {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.protocol-specs li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
}

/* Accordion FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

details.accordion {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

summary {
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

summary::-webkit-details-marker {
    display: none;
}

.accordion-content {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

details[open] summary {
    border-bottom: 1px solid transparent; /* seamless */
    color: var(--accent);
}

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

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

.copyright {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Media Queries */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 4rem;
    }
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
    .nav-links {
        display: none; /* Can implement hamburger if needed, kept simple for now */
    }
}

/* Page Entrance Animations */
@keyframes fadeInUpPage {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-entrance {
    animation: fadeInUpPage 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
