/* RESET */

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

/* VARIABLES */

:root {
  --primary-orange: #f26207;
  --bg-ivory: #fffaf0;
  --btn-gray: #ddd7cf;
  --text-dark: #5a5a5a;
  --text-muted: #8b8b8b;
  --border-light: #ece7df;
  --white-soft: rgba(255, 255, 255, 0.92);

  --demo-text: #7c756d;
  --demo-circle: #f2b3a4;
  --demo-circle-hover: #ee9b88;
  --demo-arrow: #ffffff;
}

/* BASE */

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  background: var(--bg-ivory);
  color: #1a1a1a;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* SIDEBAR */

.sidebar {
  width: 45%;
  min-width: 340px;
  max-width: 560px;
  background: var(--bg-ivory);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-top-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
  padding-top: 0;
}

.top-centralis-logo {
  height: 92px;
  width: auto;
  display: block;
  margin-bottom: 0;
}

.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px 108px;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 22px;
  margin-top: 0;
}

.title-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.hub-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.hub-version {
  font-size: 6px;
  line-height: 1;
  color: #a8a8a8;
  margin-left: 2px;
  position: relative;
  top: 0.42em;
}

.hub-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  font-weight: 400;
}

/* MINI GRID HEADER */

.mini-grid-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  overflow: visible;
}

.mini-dot {
  fill: #cfcfcf;
  transition: fill 0.2s ease, transform 0.2s ease;
  transform-origin: center;
}

.mini-dot.active {
  fill: #7c3aed;
}

/* NAV */

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sidebar-nav a {
  width: 252px;
  min-height: 39px;
  padding: 0;
  border-radius: 8px;
  background: var(--btn-gray);
  text-decoration: none;
  color: #6f6f6f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  transition:
    background-color 0.3s ease-in-out,
    color 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out,
    transform 0.3s ease-in-out;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--primary-orange);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(242, 98, 7, 0.18);
}

.sidebar-nav a .menu-inner {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
}

.sidebar-nav a:hover .menu-inner,
.sidebar-nav a.active .menu-inner {
  transform: translateX(4px);
}

.sidebar-nav a .icon {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  flex: 0 0 16px;
}

.nav-logo {
  height: 18px;
  width: auto;
  opacity: 0.82;
  transition:
    filter 0.3s ease-in-out,
    opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out;
}

.sidebar-nav a:hover .nav-logo,
.sidebar-nav a.active .nav-logo {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.sidebar-nav a .text {
  width: auto;
  text-align: left;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: color 0.3s ease-in-out;
}

/* DEMOS CTA */

.demo-cta-wrapper {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  width: 252px;
}

.demo-cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content:  letter-spacing: 0.04em;
  gap: 10px;
  text-decoration: none;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--demo-text);
  padding: 0;
  min-height: 42px;
}

.demo-cta-text {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--demo-text);
  transition: color 0.25s ease, transform 0.25s ease;
}

.demo-cta-circle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--demo-circle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.demo-cta-arrow {
  color: var(--demo-arrow);
  font-size: 22px;
  line-height: 1;
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.demo-cta:hover .demo-cta-text {
  color: #66605a;
  transform: translateX(1px);
}

.demo-cta:hover .demo-cta-circle {
  background: var(--demo-circle-hover);
  transform: translateX(2px);
  box-shadow: 0 8px 18px rgba(238, 155, 136, 0.26);
}

.demo-cta:hover .demo-cta-arrow {
  transform: translateX(2px);
}

/* SCROLL DE LOGOS */

.sidebar-bottom-scroll {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-ivory);
  border-top: 1px solid var(--border-light);
  z-index: 5;
}

.scroll-track {
  display: flex;
  width: max-content;
  animation: logosTicker 24s linear infinite;
}

.scroll-logos {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 18px;
}

.scroll-logos img {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: grayscale(1) brightness(0.92);
  opacity: 0.55;
  transition:
    filter 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.scroll-logos img:hover {
  filter: grayscale(0) brightness(1);
  opacity: 1;
  transform: translateY(-1px);
}

@keyframes logosTicker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* HERO */

.main-content {
  width: 55%;
  flex-grow: 1;
  background: #000;
  position: relative;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slowZoom 18s ease-in-out infinite;
}

@keyframes slowZoom {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.main-content.zoom .hero-image {
  transform: scale(1.04);
  transition: transform 0.45s ease;
}

/* OVERLAY */

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white-soft);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

#heroText {
  color: #ffffff;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* BADGE */

.company-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-orange);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(242, 98, 7, 0.22);
}

#badgeText {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

/* GRID HERO */

.grid-icon {
  width: 16px;
  height: 16px;
}

.grid-square {
  transition: fill 0.2s ease, transform 0.2s ease;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .sidebar {
    width: 48%;
  }

  .main-content {
    width: 52%;
  }
}

@media (max-width: 900px) {
  body {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* Opción 1: hero primero */
  .main-content {
    order: 1;
    width: 100%;
    min-height: 40vh;
    height: 40vh;
  }

  .sidebar {
    order: 2;
    width: 100%;
    max-width: none;
    min-width: 100%;
    padding-top: 0;
    overflow: visible;
    border-right: none;
  }

.sidebar-top-logo {
  margin-bottom: 4px;
  padding-top: 8px;
}

.top-centralis-logo {
  height: 68px;
  width: auto;
  display: block;
  margin-bottom: 0;
}

  .sidebar-content {
    justify-content: flex-start;
    padding: 4px 20px 28px;
  }

  .sidebar-header {
    margin-bottom: 18px;
    gap: 6px;
  }

  .hub-title {
    font-size: 24px;
  }

  .hub-version {
    font-size: 5px;
    top: 0.45em;
  }

  .hub-subtitle {
    font-size: 13px;
  }

  .sidebar-nav {
    width: 100%;
    align-items: center;
    gap: 12px;
  }

  .sidebar-nav a {
    width: 90%;
    max-width: 360px;
    min-height: 52px;
    font-size: 15px;
  }

  .sidebar-nav a .menu-inner {
    min-height: 52px;
    gap: 10px;
  }

  .sidebar-nav a .icon {
    width: 18px;
    flex: 0 0 18px;
  }

  .nav-logo {
    height: 22px;
    opacity: 0.9;
  }

  .demo-cta-wrapper {
    margin-top: 18px;
    width: 90%;
    max-width: 360px;
  }

  .demo-cta {
    min-height: 48px;
  }

  .demo-cta-text {
    font-size: 14px;
    letter-spacing: 0.07em;
  }

  .demo-cta-circle {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .demo-cta-arrow {
    font-size: 14px;
  }

  .hero-overlay {
    flex-direction: column;
    text-align: center;
    white-space: normal;
    width: calc(100% - 32px);
    gap: 10px;
  }

  #heroText {
    font-size: 18px;
    line-height: 1.35;
  }

  .company-badge {
    padding: 8px 12px;
  }

  /* ticker fuera en móvil */
  .sidebar-bottom-scroll {
    display: none;
  }
}