:root {
  /* Nuances of Beige & Light Green for background */
  --bg-primary: #f2ebd9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;

  /* Deep Brown / Black for Text */
  --text-primary: #2b1008;
  --text-secondary: #56331d;
  --text-muted: #8a7364;

  /* Accents from the Palette */
  --accent-primary: #cc6f3a;
  /* Terracotta/Orange */
  --accent-secondary: #567345;
  /* Dark Olive Green */
  --accent-tertiary: #bada55;
  /* Lime-ish Green derived from light green */

  --accent-glow: rgba(204, 111, 58, 0.15);
  --border-color: rgba(43, 16, 8, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Fundo Animado e Glassmorph Adaptado para Light Theme */
.background-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-primary);
  /* Optional texture overlay if desired, keeping clean for now */
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: moveBlob 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  animation-duration: 25s;
}

.blob-3 {
  top: 40%;
  left: 30%;
  width: 30vw;
  height: 30vw;
  background: radial-gradient(circle, #f9f5ed 0%, transparent 70%);
  animation-duration: 15s;
  opacity: 0.6;
}

@keyframes moveBlob {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(10vw, -10vh) scale(1.1);
  }

  66% {
    transform: translate(-5vw, 15vh) scale(0.9);
  }

  100% {
    transform: translate(5vw, 5vh) scale(1);
  }
}

/* Layout Principal */
.hub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hub-header {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInDown 0.8s ease-out;
}

.logo-wrapper {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.site-logo {
  max-width: 250px;
  height: auto;
  /* Adds a very subtle shadow behind the logo to pop out from the background */
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
  transition: transform 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.02);
}

.hub-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

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

/* Grid de Sistemas */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.system-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out backwards;
}

.system-card:nth-child(2) {
  animation-delay: 0.1s;
}

.system-card:nth-child(3) {
  animation-delay: 0.2s;
}

.system-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(204, 111, 58, 0.05), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}

.system-card:hover {
  transform: translateY(-5px);
  border-color: rgba(204, 111, 58, 0.2);
  /* Terracotta subtle border */
  box-shadow: 0 15px 35px rgba(43, 16, 8, 0.06);
}

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

.card-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(204, 111, 58, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(204, 111, 58, 0.1);
  z-index: 1;
  transition: var(--transition);
}

.card-icon {
  font-size: 1.8rem;
  color: var(--accent-primary);
  transition: var(--transition);
}

.system-card:hover .card-icon-wrapper {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.system-card:hover .card-icon {
  color: #fff;
}

.card-content {
  flex: 1;
  z-index: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.system-card:hover .card-title {
  color: var(--accent-primary);
}

.card-description {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--accent-secondary);
  /* Use green for the action hint initially */
  z-index: 1;
  transition: var(--transition);
}

.card-action i {
  transition: transform 0.3s;
}

.system-card:hover .card-action {
  color: var(--accent-primary);
}

.system-card:hover .card-action i {
  transform: translateX(5px);
}

/* Estado Disabled para Futuros Módulos */
.system-card.disabled {
  opacity: 0.7;
  cursor: not-allowed;
  filter: grayscale(0.5);
  background: rgba(255, 255, 255, 0.5);
}

.system-card.disabled:hover {
  transform: none;
  border-color: var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.system-card.disabled:hover::before {
  opacity: 0;
}

.system-card.disabled:hover .card-icon-wrapper {
  background: rgba(43, 16, 8, 0.03);
  border-color: var(--border-color);
  box-shadow: none;
}

.system-card.disabled:hover .card-icon {
  color: var(--text-muted);
}

.system-card.disabled .card-action {
  color: var(--text-muted);
}

.system-card.disabled:hover .card-title {
  color: var(--text-primary);
}

/* Footer */
.hub-footer {
  text-align: center;
  margin-top: auto;
  padding-top: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  animation: fadeIn 1s ease-out 0.5s backwards;
}

/* Utilities & Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .hub-container {
    padding: 3rem 1.5rem;
  }

  .hub-title {
    font-size: 2.2rem;
  }

  .systems-grid {
    grid-template-columns: 1fr;
  }
}