/* ==========================================================================
   Stats - Modern Homepage Stylesheet
   Pure CSS3 - Zero External Dependencies - Zero JavaScript
   ========================================================================== */

/* --- CSS Variables & Design System --- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Cantarell, "Ubuntu", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "Fira Code", monospace;

  /* Colors */
  --bg-dark: #090b10;
  --bg-surface: #11141f;
  --bg-card: #181d2c;
  --bg-card-hover: #21283c;
  --bg-elevated: #283047;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(53, 132, 228, 0.35);

  /* Brand Accents (GNOME Adwaita Inspired Palette) */
  --primary: #3584e4;
  --primary-hover: #4a90e2;
  --primary-light: #78aeed;
  --primary-dark: #1c5196;
  --primary-glow: rgba(53, 132, 228, 0.3);
  
  --accent-cyan: #00d2ff;
  --accent-emerald: #2ec27e;
  --accent-purple: #ab47bc;
  --accent-amber: #f5c211;

  /* Typography Colors */
  --text-main: #f6f8fa;
  --text-muted: #9ab0c7;
  --text-dim: #62748b;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  /* Transitions & Shadows */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 50px rgba(53, 132, 228, 0.25);
}

/* --- Global Resets & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Background Glow Effects */
.bg-glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glow-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(53, 132, 228, 0.15) 0%, rgba(9, 11, 16, 0) 70%);
  filter: blur(60px);
}

.bg-glow-2 {
  position: absolute;
  top: 40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(171, 71, 188, 0.12) 0%, rgba(9, 11, 16, 0) 70%);
  filter: blur(80px);
}

/* --- Typography Helpers --- */
h1, h2, h3, h4 {
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 700;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 50%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(9, 11, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.nav-brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(53, 132, 228, 0.3);
}

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

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

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

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  text-decoration: none;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #2b6cb0 100%);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #3182ce 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(53, 132, 228, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

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

.badge-wrapper {
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: rgba(53, 132, 228, 0.12);
  border: 1px solid rgba(53, 132, 228, 0.3);
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
  font-size: 3.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem auto;
  font-weight: 400;
  line-height: 1.6;
}

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

/* Command Snippet Bar */
.hero-cmd-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 100%;
  overflow-x: auto;
}

.hero-cmd-bar code {
  color: var(--accent-cyan);
}

.cmd-prompt {
  color: var(--primary-light);
  user-select: none;
}

/* --- Showcase Mockup Window (GNOME / Libadwaita Style) --- */
.showcase-section {
  padding: 3rem 0 5rem 0;
}

.mockup-window {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md), 0 0 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
  max-width: 850px;
  margin: 0 auto;
}

/* GNOME / Libadwaita Headerbar */
.mockup-header {
  height: 46px;
  background: #242424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  user-select: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gnome-app-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

.header-center {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

.gnome-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gnome-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.gnome-btn.gnome-close:hover {
  background: #e01b24;
  color: #ffffff;
}

/* CSS-Only Screenshot Tabs Switcher */
.tab-radio {
  display: none;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: #181818;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Tab Labels */
.tab-label {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-label:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* Checked Tab Label Highlight */
#tab-dashboard-input:checked ~ .gallery-tabs label[for="tab-dashboard-input"],
#tab-edit-input:checked ~ .gallery-tabs label[for="tab-edit-input"],
#tab-processes-input:checked ~ .gallery-tabs label[for="tab-processes-input"] {
  background: var(--primary);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(53, 132, 228, 0.4);
}

/* Gallery View Content & Active Image Display */
.gallery-content {
  position: relative;
  background: #000000;
  min-height: 480px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.tab-pane img {
  max-width: 850px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Active Pane Logic via CSS Sibling Selector */
#tab-dashboard-input:checked ~ .gallery-content .pane-dashboard,
#tab-edit-input:checked ~ .gallery-content .pane-edit,
#tab-processes-input:checked ~ .gallery-content .pane-processes {
  display: block;
}

.pane-caption {
  background: #1a1a1a;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pane-caption strong {
  color: var(--text-main);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.995); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Features Section --- */
.section {
  padding: 5rem 0;
}

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

.section-tag {
  color: var(--primary-light);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

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

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

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(53, 132, 228, 0.12);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(53, 132, 228, 0.2);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Hardware Support Tags --- */
.sensors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.sensor-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sensor-chip-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.sensor-chip-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.sensor-chip-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Installation Section --- */
.install-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-surface) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 5rem 0;
}

.install-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .install-box {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

.install-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.install-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.install-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.terminal-block {
  background: #0d0f17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.terminal-header {
  background: #141824;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-main);
  overflow-x: auto;
}

.terminal-line {
  display: flex;
  gap: 0.75rem;
}

.terminal-line .comment {
  color: var(--text-dim);
}

.terminal-line .cmd {
  color: var(--accent-cyan);
}

/* --- Security / Sandboxing Table --- */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.perm-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.perm-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary-light);
  background: rgba(53, 132, 228, 0.12);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(53, 132, 228, 0.25);
}

.perm-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Languages Section --- */
.lang-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.lang-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.lang-chip:hover {
  border-color: var(--primary-light);
  background: var(--bg-card-hover);
  color: #fff;
  transform: translateY(-2px);
}

.lang-chip.active {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: #fff;
}

/* --- AI Statement Section --- */
.ai-statement-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.ai-card:hover {
  border-color: rgba(53, 132, 228, 0.3);
  transform: translateY(-2px);
}

.ai-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(53, 132, 228, 0.12);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(53, 132, 228, 0.2);
}

.ai-card-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.ai-card-content p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* --- Footer --- */
.footer {
  background: #06070a;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand p {
  margin-top: 0.8rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

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

.footer-col a {
  color: var(--text-muted);
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
  
  .nav-links {
    display: none; /* Mobile simplicity */
  }

  .gallery-tabs {
    flex-wrap: wrap;
  }

  .pane-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
