/* ==============================================================================
   ComputeMesh Official Portal Design System & Stylesheet
   ============================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121d;
  --bg-surface: #131b2a;
  --bg-card: rgba(19, 27, 42, 0.75);
  --bg-card-hover: rgba(28, 40, 62, 0.9);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(0, 240, 255, 0.3);
  --border-emerald: rgba(16, 185, 129, 0.3);
  
  --accent-cyan: #00f0ff;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-glow-cyan: 0 0 30px rgba(0, 240, 255, 0.15);
  --shadow-glow-emerald: 0 0 30px rgba(16, 185, 129, 0.15);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, .brand-logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-emerald {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.4rem;
}

.brand-badge {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--border-bright);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Toggle Button */
.lang-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.lang-toggle:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 240, 255, 0.4);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

/* Hero Section */
section.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-bright);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
}

.hero p.hero-sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

/* Telemetry Ticker */
.telemetry-ticker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  text-align: left;
}

.ticker-item {
  border-left: 2px solid var(--accent-cyan);
  padding-left: 1rem;
}

.ticker-item.emerald {
  border-left-color: var(--accent-emerald);
}

.ticker-item.indigo {
  border-left-color: var(--accent-indigo);
}

.ticker-item.amber {
  border-left-color: var(--accent-amber);
}

.ticker-val {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.ticker-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Section Headings */
.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-glow-cyan);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-bright);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

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

/* Calculator Section */
section.calculator-sec {
  padding: 5rem 0;
}

.calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(16px);
}

.calc-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.calc-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.calc-tab.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-bright);
}

.calc-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.slider-group {
  margin-bottom: 1.75rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-cyan);
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.calc-result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}

.calc-big-num {
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  margin: 0.5rem 0;
}

/* Downloads Section */
section.downloads-sec {
  padding: 5rem 0;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.download-card.highlight {
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-glow-emerald);
}

.dl-platform-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.download-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.download-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.dl-code-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

/* Code Snippet Box */
.code-window {
  background: #05070a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

pre {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #e2e8f0;
  overflow-x: auto;
}

/* Modal Window */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

/* Footer */
footer.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 900px) {
  .hero h1 { font-size: 2.6rem; }
  .calc-content { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
