/* ============================= */
/* RESET */
/* ============================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #F7F7F2;
  color: #111827;
  overflow-x: hidden;
}

.portal-screen {
  min-height: 100vh;
}

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

.hero {
  position: relative;
  overflow: hidden;
}

/* ============================= */
/* GRID BACKGROUND */
/* ============================= */

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(226, 217, 204, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 217, 204, 0.34) 1px, transparent 1px);
  background-size: 28px 28px;
  animation: drift 40s linear infinite;
  z-index: 0;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-50px, -50px); }
}

/* ============================= */
/* CANVAS */
/* ============================= */

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.75;
  pointer-events: none;
}

canvas {
  width: 100%;
  height: 100%;
}

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

.hero-content {
  position: relative;
  z-index: 12;
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #A87952;
}

.hero h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #123A4A;
}

.sub {
  margin: 0 0 4px;
  font-size: 19px;
  color: #344054;
}

.micro {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #A87952;
}

.intro {
  margin: 0 0 14px;
  font-size: 14px;
  color: #5F6673;
}

/* ============================= */
/* BUTTON */
/* ============================= */

.hero-actions {
  display: flex;
}

.btn.secondary {
  border: 1px solid #CBBBA8;
  color: #5F6673;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.btn.secondary:hover {
  background: #EAF2F5;
  border-color: #2F6F7E;
  color: #123A4A;
  transform: translateY(-1px);
}

/* ============================= */
/* INDEX2 DEMO PANEL BASE */
/* ============================= */

.demo-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

.demo-card {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(216,206,192,0.9);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: #111827;
  transition: all 0.25s ease;
}

.demo-card span {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #A87952;
}

.demo-card h3 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 26px;
  color: #123A4A;
}

.demo-card p {
  font-size: 13px;
  color: #5F6673;
}

.demo-card:hover {
  transform: translateY(-4px);
  border-color: #2F6F7E;
  background: rgba(234,242,245,0.9);
}

/* ============================= */
/* HERO IMAGE BASE */
/* ============================= */

.hero-image {
  position: absolute;
  top: 500px;
  left: 17vw;
  width: 400px;
  z-index: 0;
  opacity: 0.78;
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================= */
/* ENTERPRISE PAGE */
/* ============================= */

.enterprise-page {
  min-height: 100vh;
}

.enterprise-hero {
  display: block;
  position: relative;
  padding: 52px 7vw 80px;
  overflow: hidden;
}

.enterprise-hero .hero-content {
  max-width: 480px;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 12;
}

.enterprise-hero h1 {
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.04;
}

/* GILA: más grande, doble de tamaño aprox */
.enterprise-hero .hero-image {
  position: absolute;
  left: 46vw;
  top: 20px;
  width: 580px;
  transform: none;
  z-index: 2;
  opacity: 0.85;
  pointer-events: none;
}

/* SOLUCIONES: centradas más a la derecha */
.enterprise-solutions {
  position: relative;
  z-index: 14;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

/* GRID: ancho fijo, pegado a la derecha */
.enterprise-grid {
  display: grid;
  grid-template-columns: repeat(2, 380px);
  gap: 16px;
}

/* Módulos blancos sólidos */
.enterprise-module {
  width: 380px;
  min-height: 260px;
  border-radius: 20px;
  border: 1px solid rgba(216, 206, 192, 0.9);
  background: #ffffff;
  overflow: hidden;
  text-decoration: none;
  color: #111827;
  transition: all 0.25s ease;
}

.enterprise-module:hover {
  transform: translateY(-4px);
  border-color: #2F6F7E;
  background: #f5fafb;
}

.enterprise-module-header {
  padding: 20px 22px 6px;
}

.enterprise-module-header span {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #A87952;
}

.enterprise-module-header h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 20px;
  color: #123A4A;
}

.enterprise-module-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 190px;
}

.enterprise-module.reverse .enterprise-module-body {
  grid-template-columns: 0.9fr 1.1fr;
}

.enterprise-copy {
  padding: 14px 18px 22px;
  font-size: 12px;
  line-height: 1.45;
  color: #5F6673;
}

.enterprise-copy p {
  margin: 0 0 10px;
}

.enterprise-copy ul {
  margin: 0;
  padding-left: 16px;
}

.enterprise-copy li {
  margin-bottom: 5px;
}

/* ÁREA VISUAL: dimensiones explícitas para que los SVG rendericen */
.enterprise-visual {
  width: 100%;
  height: 190px;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F7F3EE;
  overflow: hidden;
  flex-shrink: 0;
}

.enterprise-visual svg {
  display: block;
  width: 130px;
  height: 160px;
  flex-shrink: 0;
}

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

.footer {
  position: fixed;
  bottom: 18px;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 20;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(168,121,82,0.7);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.footer-logo {
  height: 14px;
  width: auto;
  display: block;
  transform: translateY(1px);
}

.alis {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 800;
  text-transform: lowercase;
  color: #111827;
  font-size: 1.1em;
}

.footer-text {
  opacity: 0.8;
}

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

@media (max-width: 1200px) {
  .enterprise-grid {
    grid-template-columns: repeat(2, 320px);
  }
  .enterprise-module {
    width: 320px;
  }
  .enterprise-hero .hero-image {
    width: 460px;
    left: 44vw;
  }
}

@media (max-width: 1024px) {
  .enterprise-hero {
    padding: 28px 6vw 64px;
  }
  .enterprise-hero .hero-image {
    width: 380px;
    left: 42vw;
    top: 20px;
  }
  .enterprise-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .enterprise-module {
    width: auto;
  }
  .enterprise-solutions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .enterprise-hero .hero-image {
    position: relative;
    left: auto;
    top: auto;
    width: 580px;
    margin: 18px auto 10px;
  }

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

  .enterprise-solutions {
    justify-content: flex-start;
  }

  .enterprise-module-body,
  .enterprise-module.reverse .enterprise-module-body {
    grid-template-columns: 1fr;
  }

  .enterprise-visual {
    height: 140px;
    min-height: 140px;
  }
}

@media (max-width: 680px) {
  .grid-bg {
    background-image:
      linear-gradient(rgba(226, 217, 204, 0.16) 1px, transparent 1px),
      linear-gradient(90deg, rgba(226, 217, 204, 0.16) 1px, transparent 1px);
    background-size: 56px 56px;
    animation-duration: 70s;
  }

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

  .hero h1 {
    font-size: 46px;
  }

  .enterprise-hero {
    padding: 24px 6vw 56px;
  }
}
