/* ==========================================================================
   ECOSSISTEMA MAKER · ARTES DO SUL (SENTINEL STATUS & HUBS)
   ========================================================================== */

:root {
  --bg-base: #06090e;
  --bg-surface: #0c121d;
  --bg-surface-elevated: #131c2d;
  --bg-card: rgba(12, 18, 29, 0.78);
  --bg-glass: rgba(8, 13, 22, 0.75);

  --ink-primary: #f8fafc;
  --ink-secondary: #94a3b8;
  --ink-muted: #64748b;
  --line: rgba(255, 255, 255, 0.08);
  --line-focus: rgba(255, 107, 53, 0.45);

  --accent-orange: #ff6b35; /* Growth & Hardware Action */
  --accent-orange-soft: rgba(255, 107, 53, 0.15);
  --accent-cyan: #00d9ff;   /* Logic & Telemetry */
  --accent-cyan-soft: rgba(0, 217, 255, 0.12);
  --accent-green: #10b981;  /* Verified & Online */
  --accent-green-soft: rgba(16, 185, 129, 0.15);
  --accent-purple: #8b5cf6; /* Homelab AI & Edge */
  --accent-purple-soft: rgba(139, 92, 246, 0.15);
  --accent-blue: #03a9f4;   /* HAOS & Core */
  --accent-gold: #f59e0b;   /* Analog & Special */

  --font-display: "Bricolage Grotesque", -apple-system, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", Consolas, monospace;

  --glass-blur: blur(14px);
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.55);
  --shadow-glow-orange: 0 0 25px rgba(255, 107, 53, 0.25);
  --shadow-glow-cyan: 0 0 25px rgba(0, 217, 255, 0.22);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-base);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Subtle Mesh Gradient */
.mesh-gradient {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(at 0% 0%, rgba(255, 107, 53, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(0, 217, 255, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(139, 92, 246, 0.06) 0px, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ff8c5f;
}

.app-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
  padding: 40px 32px;
  box-shadow: var(--shadow-card);
}

.hero-image-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.60) saturate(1.15);
  transform: scale(1.02);
  transition: transform 10s ease;
}

.hero-section:hover .hero-image {
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    to top,
    rgba(6, 9, 14, 0.98) 0%,
    rgba(6, 9, 14, 0.70) 50%,
    rgba(6, 9, 14, 0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  width: 100%;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.validation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.4);
  color: var(--accent-orange);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.2);
}

.status-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-green);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.pulse-green {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse-dot 2s infinite ease-in-out;
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 8px;
}

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

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 800px;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.stat-card {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* ==========================================================================
   MAIN TWO-COLUMN LAYOUT
   ========================================================================== */

.main-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}

/* ==========================================================================
   SIDEBAR & PANELS
   ========================================================================== */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 24px;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-orange);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-description {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.action-link-btn {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  cursor: pointer;
  text-decoration: underline;
}

.action-link-btn:hover {
  color: var(--accent-orange);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

#search-input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search-input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.clear-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

.clear-btn.visible {
  display: block;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  padding: 5px 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.tag-pill:hover {
  border-color: rgba(255, 107, 53, 0.4);
  color: #fff;
}

.tag-pill.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #050505;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.35);
}

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--bg-base);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid var(--line);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-cyan));
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

/* Checklist */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checklist-item:hover {
  border-color: rgba(255, 107, 53, 0.3);
}

.checklist-item.activated {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.checklist-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checklist-status-icon {
  font-size: 0.85rem;
}

/* Terminal */
.terminal-panel {
  background: #04070c;
  border-color: rgba(0, 217, 255, 0.25);
}

.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ink-secondary);
  max-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.terminal-line.ready-line {
  color: var(--accent-green);
}

.terminal-line.user-line {
  color: var(--accent-orange);
}

/* ==========================================================================
   CONTENT AREA & HUBS GRID
   ========================================================================== */

.content-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.content-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.view-meta-info {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.hubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.hub-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 53, 0.45);
  box-shadow: var(--shadow-card), 0 0 25px rgba(255, 107, 53, 0.18);
}

.hub-card.featured {
  border-color: rgba(0, 217, 255, 0.35);
}

.hub-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hub-icon-box {
  width: 44px;
  height: 44px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.hub-header-meta {
  flex-grow: 1;
}

.hub-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.hub-subdomain {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  margin-top: 2px;
}

.hub-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.tier-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-transform: uppercase;
}

.tier-s {
  background: rgba(255, 107, 53, 0.2);
  color: var(--accent-orange);
  border: 1px solid var(--accent-orange);
}

.tier-a {
  background: rgba(0, 217, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.health-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hub-summary {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.hub-metrics-box {
  display: flex;
  justify-content: space-between;
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-item span:first-child {
  color: var(--ink-muted);
}

.metric-item span:last-child {
  color: var(--ink-primary);
  font-weight: 600;
}

.tech-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tech-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-surface-elevated);
  color: var(--ink-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hub-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-visit-hub {
  padding: 8px 14px;
  background: var(--accent-orange);
  border: 1px solid var(--accent-orange);
  color: #050505;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-visit-hub:hover {
  background: #ff8c5f;
  box-shadow: var(--shadow-glow-orange);
  color: #050505;
}

.btn-card-icon {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-icon:hover {
  border-color: var(--accent-cyan);
  color: #fff;
}

.btn-card-icon.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.branded-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.footer-mantra {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  font-style: italic;
}

.footer-signature {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.artesdosul-link {
  color: var(--accent-orange);
  font-weight: 600;
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
}
