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

:root {
  --bg-color: #f5f5f7;
  --text-color: #1a1a1c;
  --primary-color: #007aff;
  --primary-hover: #005bb5;
  --accent-color: #34c759;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(245, 245, 247, 0.85);
  --footer-bg: #e5e5ea;
  --footer-text: #3a3a3c;
  --grid-color: rgba(0, 0, 0, 0.05);
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glow: 0 0 10px rgba(0, 122, 255, 0.3);
}

[data-theme="dark"] {
  /* Obsidian Dark & Neon UI */
  --bg-color: #08080A;
  --text-color: #ffffff;
  --primary-color: #00F0FF;
  --primary-hover: #00C0CC;
  --accent-color: #00FF66;
  --card-bg: #111115;
  --card-border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(8, 8, 10, 0.85);
  --footer-bg: #040405;
  --footer-text: #888;
  --grid-color: rgba(255, 255, 255, 0.05);
  --glow: 0 0 15px rgba(0, 240, 255, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background-color: var(--bg-color); }

body { 
    font-family: var(--font-ui); 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.6; 
    transition: background-color 0.3s ease, color 0.3s ease;
    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 top;
    animation: pageFadeIn 0.25s ease-out forwards;
}

body.page-fade-out {
    animation: pageFadeOut 0.15s ease-out forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pageFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.mono { font-family: var(--font-mono); }

/* Navigation */
nav { 
    position: fixed; top: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; 
    padding: 1rem 5%; background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    z-index: 1000; border-bottom: 1px solid var(--card-border);
    transition: all 0.3s ease;
}
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-color); letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px;}
.logo-dot { width: 8px; height: 8px; background: var(--accent-color); border-radius: 50%; box-shadow: 0 0 8px var(--accent-color); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--text-color); opacity: 0.7; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--primary-color); text-shadow: var(--glow); }

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

/* Theme Switch */
.theme-switch { 
    background: transparent; border: 1px solid var(--card-border); color: var(--text-color); 
    cursor: pointer; border-radius: 8px; width: 36px; height: 36px; display: flex; justify-content: center; align-items: center; 
    transition: var(--transition); 
}
.theme-switch:hover { border-color: var(--primary-color); background: var(--card-bg); box-shadow: var(--glow); color: var(--primary-color);}

/* Buttons */
.btn { 
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; font-size: 0.95rem;
    transition: var(--transition); cursor: pointer; border: 1px solid transparent;
}
.btn-primary { 
    background-color: var(--primary-color); color: #000; border: 1px solid var(--primary-color);
}
[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { 
    box-shadow: var(--glow); transform: translateY(-1px);
}
.btn-outline { background: transparent; border: 1px solid var(--card-border); color: var(--text-color); }
.btn-outline:hover { border-color: var(--primary-color); color: var(--primary-color); box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.1); }

/* Layout & Typography */
section { padding: 6rem 5% 4rem; max-width: 1280px; margin: 0 auto; position: relative; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 1rem; font-weight: 700; letter-spacing: -0.5px; }
.section-subtitle { text-align: center; font-size: 1.1rem; opacity: 0.7; margin-bottom: 3.5rem; max-width: 600px; margin-inline: auto; }

/* Hero Split Layout */
.hero { display: flex; align-items: center; justify-content: space-between; min-height: 90vh; padding: 8rem 5% 4rem; gap: 4rem; max-width: 1280px; margin: 0 auto;}
.hero-content { flex: 1; max-width: 600px; }
.hero-content h1 { font-size: 4rem; font-weight: 700; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -1px; }
.hero-content h1 span { color: var(--primary-color); text-shadow: var(--glow); }
.hero-content p { font-size: 1.15rem; opacity: 0.8; margin-bottom: 2.5rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 1rem; }

/* Telemetry Card */
.telemetry { flex: 1; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 2rem; box-shadow: 0 20px 40px rgba(0,0,0,0.2); position: relative; overflow: hidden; }
.telemetry::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--primary-color), transparent); opacity: 0.5; }
.tel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--card-border); }
.tel-title { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-color); opacity: 0.6; }
.tel-status { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--accent-color); font-weight: 600; font-family: var(--font-mono);}
.tel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.tel-item { display: flex; flex-direction: column; gap: 0.5rem; }
.tel-label { font-size: 0.75rem; opacity: 0.6; text-transform: uppercase; font-family: var(--font-mono); letter-spacing: 1px;}
.tel-value { font-size: 2.2rem; font-weight: 700; font-family: var(--font-mono); color: var(--primary-color); display: flex; align-items: baseline; gap: 4px; text-shadow: var(--glow); }
.tel-unit { font-size: 1rem; opacity: 0.5; text-shadow: none; }

/* Graph Mock */
.tel-graph { margin-top: 2rem; height: 60px; display: flex; align-items: flex-end; gap: 4px; }
.graph-bar { flex: 1; background: var(--primary-color); opacity: 0.2; border-radius: 2px 2px 0 0; transition: height 0.3s ease; }
.graph-bar.active { opacity: 0.8; box-shadow: var(--glow); }

/* Node List */
.node-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.node-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; background: rgba(255,255,255,0.02); border: 1px solid var(--card-border); border-radius: 8px; transition: var(--transition); cursor: default; }
.node-item:hover { border-color: var(--primary-color); background: rgba(0, 240, 255, 0.05); }
.node-info { display: flex; align-items: center; gap: 1rem; }
.node-flag { font-size: 1.2rem; }
.node-name { font-weight: 500; font-size: 0.95rem; font-family: var(--font-mono); opacity: 0.9;}
.node-ping { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-color); background: rgba(0, 255, 102, 0.1); padding: 2px 8px; border-radius: 4px; border: 1px solid rgba(0, 255, 102, 0.2); }

/* Grids */
.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; }

/* Cards */
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 2.5rem; transition: var(--transition); }
.card:hover { border-color: var(--primary-color); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.card-icon { width: 48px; height: 48px; border-radius: 10px; background: rgba(0, 240, 255, 0.1); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--primary-color); border: 1px solid rgba(0, 240, 255, 0.2); }
[data-theme="light"] .card-icon { background: rgba(0, 122, 255, 0.1); border-color: rgba(0, 122, 255, 0.2); }
.card h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
.card p { opacity: 0.8; font-size: 0.95rem; line-height: 1.6; }

/* Pricing */
.pricing-toggle { display: flex; justify-content: center; margin-bottom: 3rem; }
.toggle-wrapper { display: inline-flex; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 30px; padding: 4px; position: relative; }
.toggle-btn { padding: 0.5rem 1.5rem; border-radius: 26px; border: none; background: transparent; color: var(--text-color); font-weight: 500; cursor: pointer; position: relative; z-index: 1; transition: color 0.3s; font-family: var(--font-ui); }
.toggle-btn.active { color: #000; font-weight: 600; }
[data-theme="light"] .toggle-btn.active { color: #fff; }
.toggle-indicator { position: absolute; top: 4px; left: 4px; height: calc(100% - 8px); background: var(--primary-color); border-radius: 26px; transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 0; box-shadow: var(--glow); }

.pricing-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 3rem 2rem; display: flex; flex-direction: column; transition: var(--transition); position: relative; }
.pricing-card:hover { border-color: var(--primary-color); transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05); }
[data-theme="dark"] .pricing-card:hover { box-shadow: 0 15px 35px rgba(0, 240, 255, 0.15); }
.pricing-card.popular { border-color: var(--primary-color); box-shadow: var(--glow); transform: scale(1.02); }
.pricing-card.popular:hover { transform: scale(1.02) translateY(-8px); box-shadow: 0 15px 35px rgba(0, 240, 255, 0.25); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary-color); color: #000; padding: 4px 16px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; box-shadow: var(--glow); }
[data-theme="light"] .popular-badge { color: #fff; }
.plan-name { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.price-box { margin-bottom: 2rem; display: flex; align-items: flex-start;}
.price-currency { font-size: 1.5rem; font-weight: 600; margin-top: 0.5rem; color: var(--primary-color); }
.price-value { font-size: 3.5rem; font-weight: 700; font-family: var(--font-mono); line-height: 1; color: var(--primary-color); transition: opacity 0.2s ease; }
.price-period { opacity: 0.5; font-size: 0.9rem; align-self: flex-end; margin-bottom: 0.5rem; margin-left: 0.5rem; }
.pricing-features { margin-bottom: 2.5rem; flex-grow: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 1rem; font-size: 0.95rem; opacity: 0.85; }
.pricing-features li::before { content: ''; display: inline-block; width: 18px; height: 18px; background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="%2300F0FF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/cover; margin-top: 3px; flex-shrink: 0; }
[data-theme="light"] .pricing-features li::before { background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="%23007aff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/cover; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 8px; transition: var(--transition); }
.faq-item:hover { border-color: var(--primary-color); }
.faq-question { width: 100%; text-align: left; padding: 1.5rem; background: transparent; border: none; font-size: 1rem; font-weight: 600; color: var(--text-color); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-ui); }
.faq-answer { padding: 0 1.5rem; max-height: 0; overflow: hidden; transition: all 0.3s ease; opacity: 0; font-size: 0.95rem; line-height: 1.6; }
.faq-item.active .faq-answer { padding: 0 1.5rem 1.5rem; max-height: 300px; opacity: 0.8; }
.faq-icon { font-size: 1.5rem; transition: transform 0.3s; color: var(--primary-color); font-weight: 300;}
.faq-item.active .faq-icon { transform: rotate(45deg); }

/* Footer */
footer { background: var(--footer-bg); padding: 4rem 5% 2rem; border-top: 1px solid var(--card-border); margin-top: 4rem;}
.footer-content { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center; }
.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--footer-text); font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-color); }
.copyright { color: var(--footer-text); font-size: 0.85rem; font-family: var(--font-mono); }

/* Subpages */
.page-content { padding-top: 8rem; max-width: 800px; margin: 0 auto; min-height: 70vh; padding-bottom: 4rem; padding-left: 5%; padding-right: 5%;}
.page-content h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 2rem; color: var(--text-color); letter-spacing: -0.5px; }
.page-content h2 { font-size: 1.5rem; font-weight: 600; margin: 2rem 0 1rem; color: var(--primary-color); }
.page-content p { font-size: 1rem; line-height: 1.8; opacity: 0.85; margin-bottom: 1.2rem; }
.page-content ul { padding-left: 1.5rem; margin-bottom: 1.5rem; list-style-type: square; opacity: 0.85; }
.page-content li { margin-bottom: 0.5rem; }

@media (max-width: 992px) {
    .hero { flex-direction: column; text-align: center; }
    .hero-content h1 { font-size: 3.2rem; }
    .hero-actions { justify-content: center; }
    .telemetry { width: 100%; max-width: 600px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    .pricing-card.popular { transform: none; }
    .btn { padding: 0.8rem 1.5rem; }
}
