/* ==========================================================================
   CELLOS OPERATING SYSTEM — DESIGN SYSTEM
   Cybernetic High-Assurance Dark Obsidian & Cellular Microkernel Theme
   DXSL Foundation Non-Profit Open Research Commons
   ========================================================================== */

:root {
  --bg-dark: #040711;
  --bg-card: rgba(11, 19, 38, 0.75);
  --bg-card-hover: rgba(18, 30, 60, 0.9);
  --bg-glass: rgba(6, 12, 26, 0.85);

  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.35);
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --emerald: #10b981;
  --rose: #f43f5e;
  --amber: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-subtle: rgba(56, 189, 248, 0.15);
  --border-active: rgba(0, 240, 255, 0.45);

  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 85% 90%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    linear-gradient(to bottom, #040711 0%, #060b18 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ==========================================================================
   HOMEPAGE GATEWAY (NO DESCRIPTIVE TEXT — VISUAL & ANIMATION ONLY)
   ========================================================================== */

.gateway-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  padding: 1.75rem 2rem;
  z-index: 10;
}

/* Interactive Canvas Background Layer */
#cellos-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* Gateway Top: Logo Brand */
.gateway-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.gateway-logo {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.25));
  transition: var(--transition);
}

.gateway-logo:hover {
  filter: drop-shadow(0 0 24px rgba(0, 240, 255, 0.5));
  transform: scale(1.02);
}

/* Gateway Center Indicator (Audio/Pulse Anchor) */
.gateway-center-indicator {
  position: relative;
  z-index: 5;
  pointer-events: none;
}

/* Gateway Bottom Navigation: Language Selection & Footer Backlink */
.gateway-nav {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.lang-switch-group {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.lang-switch-group:hover {
  border-color: var(--border-active);
  box-shadow: 0 8px 32px var(--cyan-glow);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.lang-btn.active, .lang-btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(59, 130, 246, 0.25) 100%);
  border: 1px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

.lang-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.lang-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Gateway Footer Link to DXSL */
.gateway-footer {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.75px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gateway-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

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

.gateway-separator {
  color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   CONTENT PAGES (EN PORTAL & SUB-PAGES)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-img {
  height: 38px;
  width: auto;
}

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

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

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 100%);
  color: #040711;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.55);
  transform: translateY(-1.5px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-active);
  color: var(--cyan);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 6rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}
.badge-alpha {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Architecture Blueprint Section */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

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

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--cyan-glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Comparison Table / Box */
.compare-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.compare-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--border-subtle);
}

.compare-box.cellos-box {
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
}

.compare-header {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.compare-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.compare-item svg {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

/* Code & Terminal Block */
.terminal-block {
  background: #020408;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  margin: 2rem 0;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 0.45rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.25rem;
  color: #38bdf8;
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-x: auto;
}

/* Technical Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.specs-table th, .specs-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.specs-table th {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 600;
  background: rgba(0, 240, 255, 0.04);
}

.specs-table td {
  color: var(--text-secondary);
}

.specs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #02040a;
  padding: 4rem 0 2.5rem;
  margin-top: 5rem;
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-dxsl-link {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-dxsl-link:hover {
  text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 860px) {
  .compare-container {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 580px) {
  .gateway-stage {
    padding: 1.25rem 1rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
