/* ==========================
   STYLE DOC - INSTITUCIONAL (ABC/DGCyE inspired)
   doc.arboldefideos.ar
   ========================== */

:root {
  --bg: #f8fafc;
  --text: #2e3a59;
  --text-soft: rgba(46, 58, 89, 0.78);

  --primary: #1f79bd;
  --primary-soft: #1f9bd1;

  --card-bg: rgba(255, 255, 255, 0.9);
  --border: rgba(46, 58, 89, 0.14);

  --shadow: rgba(0, 0, 0, 0.06);
  --shadow-strong: rgba(0, 0, 0, 0.09);
}

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

/* base */

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* fondo suave */

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background: radial-gradient(circle at 25% 20%, rgba(31, 155, 209, 0.18), transparent 45%),
    radial-gradient(circle at 75% 60%, rgba(31, 121, 189, 0.12), transparent 50%),
    radial-gradient(circle at 55% 90%, rgba(200, 230, 255, 0.20), transparent 50%);

  z-index: -1;
}

/* ==========================
   TOPBAR
   ========================== */

.topbar {
  width: 100%;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid rgba(46, 58, 89, 0.10);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  height: 40px;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.12));
}

.brand-title {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.08em;
  font-size: 14px;
  opacity: 0.95;
}

/* ==========================
   NAV
   ========================== */

.nav {
  display: flex;
  gap: 18px;
}

.nav-link {
  text-decoration: none;
  color: rgba(46, 58, 89, 0.75);
  font-size: 14px;
  transition: 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================
   CONTAINER
   ========================== */

.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 60px 25px;
  animation: fade 0.9s ease;
}

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

.hero {
  display: flex;
  align-items: flex-start;
  gap: 55px;
  margin-bottom: 70px;
}

.hero-logo {
  max-width: 240px;
  filter: drop-shadow(0 0 22px rgba(0, 0, 0, 0.12));
  animation: logo 1.2s ease;
}

.hero-title {
  font-family: "Orbitron", sans-serif;
  font-size: 34px;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  color: #22325a;
}

.hero-manifesto {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 18px;
  font-style: italic;
  color: var(--text);
}

.hero-description {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 25px;
  max-width: 650px;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================
   BOTONES
   ========================== */

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.25s;
  border: 1px solid rgba(46, 58, 89, 0.12);
}

.btn.primary {
  background: rgba(31, 121, 189, 0.12);
  color: var(--primary);
  border-color: rgba(31, 121, 189, 0.22);
}

.btn.primary:hover {
  background: rgba(31, 121, 189, 0.18);
  transform: translateY(-2px);
}

.btn.secondary {
  background: rgba(31, 155, 209, 0.12);
  color: var(--primary);
  border-color: rgba(31, 155, 209, 0.25);
}

.btn.secondary:hover {
  background: rgba(31, 155, 209, 0.18);
  transform: translateY(-2px);
}

.btn.violet {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.18);
  color: rgba(70, 45, 120, 0.95);
}

.btn.violet:hover {
  background: rgba(124, 58, 237, 0.14);
  transform: translateY(-2px);
}

/* ==========================
   GRID + CARDS
   ========================== */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 60px;
}

.card {
  display: block;
  padding: 18px 18px;
  border-radius: 16px;

  border: 1px solid rgba(46, 58, 89, 0.10);
  background: var(--card-bg);
  backdrop-filter: blur(10px);

  transition: 0.25s;

  text-decoration: none;
  color: var(--text);

  box-shadow: 0 6px 18px var(--shadow);
}

.card:hover {
  border-color: rgba(31, 121, 189, 0.30);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow-strong);
}

.card h2,
.card h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #22325a;
}

.card p {
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.88;
  color: rgba(46, 58, 89, 0.82);
}

/* ==========================
   PAGE HEAD
   ========================== */

.page-head {
  margin-bottom: 40px;
}

.page-title {
  font-family: "Orbitron", sans-serif;
  font-size: 28px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  color: #22325a;
}

.page-subtitle {
  font-size: 15px;
  opacity: 0.88;
  line-height: 1.7;
  max-width: 750px;
  color: rgba(46, 58, 89, 0.78);
}

/* ==========================
   ECOSYSTEM
   ========================== */

.ecosystem {
  margin-bottom: 60px;
}

.section-title {
  font-family: "Orbitron", sans-serif;
  font-size: 18px;
  margin-bottom: 18px;
  opacity: 0.95;
  color: #22325a;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.node {
  display: block;
  padding: 16px;
  border-radius: 16px;
  text-decoration: none;

  border: 1px solid rgba(46, 58, 89, 0.10);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);

  transition: 0.25s;
  color: var(--text);

  box-shadow: 0 6px 18px var(--shadow);
}

.node:hover {
  border-color: rgba(31, 155, 209, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow-strong);
}

.node-title {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  color: #22325a;
}

.node-desc {
  font-size: 13px;
  opacity: 0.82;
  color: rgba(46, 58, 89, 0.75);
}

/* ==========================
   CALLOUT
   ========================== */

.callout {
  border: 1px solid rgba(46, 58, 89, 0.10);
  background: rgba(255, 255, 255, 0.80);
  padding: 22px;
  border-radius: 18px;
  margin-bottom: 60px;

  box-shadow: 0 6px 18px var(--shadow);
}

.callout h2 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #22325a;
}

.callout p {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.9;
  color: rgba(46, 58, 89, 0.78);
}

/* ==========================
   SISTEMA CARDS (si se usan)
   ========================== */

.system-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.system-card .small-note {
  font-size: 12px;
  opacity: 0.75;
}

.system-card.prod {
  border-color: rgba(31, 155, 209, 0.22);
}

.system-card.test {
  border-color: rgba(124, 58, 237, 0.18);
}

/* ==========================
   TREE (si se usa)
   ========================== */

.tree {
  margin-bottom: 60px;
}

.tree-root {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(46, 58, 89, 0.10);
  background: rgba(255, 255, 255, 0.80);
  box-shadow: 0 6px 18px var(--shadow);
}

.tree-label {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.08em;
  font-size: 14px;
  margin-bottom: 18px;
  opacity: 0.9;
  color: #22325a;
}

.tree-branch {
  margin-left: 16px;
  border-left: 1px solid rgba(46, 58, 89, 0.14);
  padding-left: 14px;
  margin-bottom: 18px;
}

.tree-item {
  margin-bottom: 14px;
}

.tree-item-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.tree-item-desc {
  font-size: 13px;
  opacity: 0.8;
  line-height: 1.6;
}

.tree-link {
  display: block;
  text-decoration: none;
  color: rgba(31, 121, 189, 0.95);
  font-size: 14px;
  padding: 6px 0;
  transition: 0.2s;
}

.tree-link:hover {
  opacity: 0.75;
}

.tree-link.test {
  color: rgba(124, 58, 237, 0.85);
}

.tree-link.muted {
  opacity: 0.5;
}

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

.footer {
  margin-top: 60px;
  padding: 25px 10px;
  display: flex;
  justify-content: center;
  font-size: 12px;
  opacity: 0.8;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(46, 58, 89, 0.85);
  text-decoration: none;
}

.footer-link:hover {
  opacity: 0.9;
}

.footer-logo {
  height: 40px;
}

/* ==========================
   MENÚ MÓVIL (sin JS)
   ========================== */

.menu-toggle {
  display: none;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(46, 58, 89, 0.12);
  background: rgba(255, 255, 255, 0.85);
  transition: 0.25s;
}

.menu-btn:hover {
  border-color: rgba(31, 121, 189, 0.25);
}

.menu-btn span {
  display: block;
  width: 26px;
  height: 2px;
  background: rgba(46, 58, 89, 0.75);
  border-radius: 2px;
  transition: 0.25s;
}

/* Panel desplegable */
.mobile-menu {
  display: none;
  position: absolute;
  top: 72px;
  right: 18px;
  width: 270px;
  padding: 14px;
  border-radius: 18px;

  border: 1px solid rgba(46, 58, 89, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.mobile-link {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  color: rgba(46, 58, 89, 0.80);
  transition: 0.2s;
}

.mobile-link:hover {
  background: rgba(31, 155, 209, 0.12);
  color: var(--primary);
}

.mobile-divider {
  margin: 10px 0;
  height: 1px;
  background: rgba(46, 58, 89, 0.12);
}

/* Activación cuando el checkbox está marcado */
.menu-toggle:checked ~ .mobile-menu {
  display: block;
  animation: fadeMenu 0.25s ease;
}

/* Animación del panel */
@keyframes fadeMenu {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación hamburguesa -> X */
.menu-toggle:checked ~ .menu-btn span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle:checked ~ .menu-btn span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked ~ .menu-btn span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================
   ANIMACIONES
   ========================== */

@keyframes logo {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================
   RESPONSIVE
   ========================== */

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

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

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

  /* Oculta nav desktop */
  .nav {
    display: none;
  }

  /* Muestra botón hamburguesa */
  .menu-btn {
    display: flex;
  }

  /* Necesario para que el panel se ubique relativo al header */
  .topbar {
    position: relative;
  }
}
