:root {
  --bg: #0a0e14;
  --bg-soft: #161a1f;
  --panel: #171f24;
  --white: #ffffff;
  --muted: #9ea9b5;
  --muted-2: #7e8996;
  --line: rgba(255, 255, 255, 0.08);
  --blue: #4A90E2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --max: 1380px;

  --lh-body: 1.58;
  --lh-heading: 1.06;
  --lh-compact: 1.42;
}

/* =========================================================
   RESET / BASE
========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: var(--lh-body);
  color: var(--white);
  background:
    radial-gradient(circle at 20% 0%, rgba(74, 144, 226, 0.12), transparent 22%),
    radial-gradient(circle at 85% 10%, rgba(74, 144, 226, 0.09), transparent 18%),
    linear-gradient(180deg, #0a0e14 0%, #121820 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 85%);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
canvas {
  display: block;
}

/* =========================================================
   LAYOUT GENERAL
========================================================= */
.container {
  width: min(var(--max), calc(100% - 72px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero .container {
  width: min(1380px, calc(100% - 96px));
}

/* =========================================================
   TOPBAR / NAV
========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 0.96rem;
}

.nav a:hover {
  color: var(--white);
}

/* =========================================================
   BOTONES
========================================================= */
.cta-nav,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cta-nav,
.btn-primary {
  background: linear-gradient(180deg, #ffffff, #dce9f7);
  color: #0a0e14;
  box-shadow: 0 20px 50px rgba(255, 255, 255, 0.10);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--white);
}

.cta-nav:hover,
.btn:hover {
  transform: translateY(-1px);
}

/* =========================================================
   HERO
========================================================= */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 96px);
  padding: 34px 0 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: 18px;
  align-items: stretch;
  width: 100%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(74, 144, 226, 0.20);
  background: rgba(74, 144, 226, 0.08);
  color: #dcecff;
  font-size: 0.9rem;
}

h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -3px;
}

.hero-kicker {
  margin: 0 0 22px;
  color: #dcecff;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.hero p {
  margin: 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: var(--lh-body);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.meta-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

/* =========================================================
   HERO VISUAL / VIEWER PRINCIPAL
========================================================= */
.hero-visual {
  position: relative;
  min-height: 620px;
}

.glow {
  position: absolute;
  inset: 2% 8% auto 8%;
  height: 520px;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.24), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.viewer-window {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.window-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  min-height: 40px;
  padding: 8px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.dots {
  display: flex;
  gap: 8px;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.window-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(74, 144, 226, 0.10), transparent 24%),
    linear-gradient(180deg, #101720 0%, #101720 100%);
}

#viewer3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.viewer-note,
.floating-card {
  position: absolute;
  z-index: 2;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(10, 14, 20, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.viewer-note {
  top: 18px;
  left: 18px;
  max-width: 250px;
}

.floating-card {
  width: 230px;
}

.fc-1 {
  top: 18px;
  right: 18px;
}

.fc-2 {
  left: 18px;
  bottom: 88px;
}

.mobile-3d-trigger {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.86);
  color: var(--white);
  font-weight: 700;
  font-size: 0.92rem;
  backdrop-filter: blur(12px);
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

body.mobile-3d-mode .mobile-3d-trigger {
  display: inline-flex;
}

/* =========================================================
   MODAL 3D
========================================================= */
.viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.viewer-modal.is-open {
  display: block;
}

.viewer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.82);
  backdrop-filter: blur(8px);
}

.viewer-modal-content {
  position: relative;
  z-index: 2;
  width: min(89vw, 1140px);
  height: min(81vh, 780px);
  margin: 9vh auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 32%, rgba(74, 144, 226, 0.14), transparent 22%),
    linear-gradient(180deg, #121920, #0f151d);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.48);
}

.viewer-modal-stage {
  position: absolute;
  inset: 0;
}

#viewer3dModal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.viewer-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  background: rgba(10, 14, 20, 0.88);
  color: var(--white);
  font-size: 1.45rem;
  cursor: pointer;
}

/* =========================================================
   TIPOGRAFÍA COMPARTIDA
========================================================= */
.viewer-note h3,
.floating-card h3,
.feature h3,
.panel h3,
.stat-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.viewer-note p,
.floating-card p,
.feature p,
.panel p,
.stat-card p {
  margin: 0;
  color: var(--muted);
  line-height: var(--lh-body);
}

.section-lead,
.history-copy p,
.history-context-copy p,
.mini-line {
  line-height: var(--lh-body);
}

/* =========================================================
   SECCIONES GENERALES
========================================================= */
.section {
  padding: 64px 0;
}

.section-head {
  margin-bottom: 22px;
}

#producto {
  scroll-margin-top: 64px;
}

#experiencia {
  scroll-margin-top: 75px;
}

#inicio {
  scroll-margin-top: 100px;
}

#vision {
  scroll-margin-top: 65px;
}

#apoyo {
  scroll-margin-top: 65px;
}

.eyebrow-2 {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -1px;
}

.section-lead {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 1.02rem;
}

/* =========================================================
   CARDS / FEATURES / STATS
========================================================= */
.feature-grid,
.stats {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.stats {
  grid-template-columns: repeat(4, 1fr);
}

.feature,
.panel,
.stat-card,
.cta-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.feature {
  position: relative;
  min-height: 230px;
  padding: 22px;
  overflow: hidden;
}

.feature::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.20), transparent 68%);
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-bottom: 16px;
  padding: 0 14px;
  border: 1px solid rgba(74, 144, 226, 0.20);
  border-radius: 999px;
  background: rgba(74, 144, 226, 0.10);
  color: #dbeeff;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.stat-card {
  padding: 20px;
}

.stat-number {
  margin-bottom: 8px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
}

/* =========================================================
   LAYOUTS SECUNDARIOS
========================================================= */
.split {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 18px;
  align-items: stretch;
}

/* =========================================================
   HISTORIA
========================================================= */
.history-grid {
  display: grid;
  grid-template-columns: 0.81fr 1.30fr;
  gap: 16px;
  align-items: start;
}

.history-copy {
  min-height: 100%;
  padding: 22px 22px 20px;
}

.history-copy h2 {
  margin-bottom: 12px;
  max-width: 500px;
}

.history-copy p {
  margin: 0;
  color: var(--muted);
}

.history-visual {
  display: grid;
  gap: 10px;
  align-content: start;
  transform: translateY(-25px);
}

.history-showcase {
  position: relative;
  width: calc(100% + 48px);
  min-height: 0;
  padding: 0;
  overflow: visible;
  transform: translateX(-24px);
  background: transparent;
  border: none;
  box-shadow: none;
}

.history-showcase::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 0;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.18), transparent 72%);
  filter: blur(42px);
  pointer-events: none;
}

.history-main-image {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.history-main-image img {
  width: 100%;
  height: auto;
  border-radius: 28px;
}

.history-zoom-trigger {
  position: relative;
  cursor: pointer;
}

.history-context-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: -2px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.history-context-image {
  min-height: 120px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.history-context-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.history-context-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.history-context-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.history-context-copy p {
  margin: 0;
  color: var(--muted);
}

.history-location-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #dcecff;
  font-size: 0.94rem;
  font-weight: 600;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.history-location-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.history-location-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(74, 144, 226, 0.20);
  border-radius: 50%;
  background: rgba(74, 144, 226, 0.12);
  color: #dcecff;
  font-size: 0.9rem;
}

/* =========================================================
   MODAL DE IMAGEN
========================================================= */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.image-modal.is-open {
  display: block;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.78);
  backdrop-filter: blur(8px);
}

.image-modal-content {
  position: relative;
  z-index: 2;
  width: min(92vw, 1400px);
  max-height: 88vh;
  margin: 5vh auto;
  overflow: visible;
  border: none;
  border-radius: 32px;
  background: transparent;
  box-shadow: none;
}

.image-modal-content::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 0;
  border-radius: 36px;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.18), transparent 72%);
  filter: blur(42px);
  pointer-events: none;
}

.image-modal-img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 88vh;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.image-modal-close {
  position: absolute;
  top: 0;
  right: -70px;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(10, 14, 20, 0.94);
  color: var(--white);
  font-size: 1.45rem;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   PANEL / STACK / CTA / FOOTER
========================================================= */
.panel {
  min-height: 300px;
  padding: 24px;
}

.stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mini-line {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.cta-section {
  padding: 64px 0;
}

.cta-box {
  padding: 32px;
  background:
    radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.cta-box h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -1px;
}

.cta-box p {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  line-height: var(--lh-body);
  font-size: 1.08rem;
}

.cta-box h2 + p {
  margin-top: 18px;
}

.cta-paragraph,
.cta-closing {
  margin-top: 18px;
}

footer {
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.94rem;
}

/* =========================================================
   RESPONSIVE <= 1200px
========================================================= */
@media (max-width: 1200px) {
  .hero-grid,
  .feature-grid,
  .split,
  .stats,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 680px;
  }
}

/* =========================================================
   RESPONSIVE <= 860px
========================================================= */
@media (max-width: 860px) {
  .topbar {
    top: 0;
    width: 100%;
    margin: 0;
    border-radius: 0 0 20px 20px;
  }

  .history-zoom-trigger {
  cursor: default;
  }

  .topbar-inner {
    padding: 12px 18px;
  }

  .nav {
    display: none;
  }

  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .hero .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .hero {
    min-height: auto;
    padding-top: 26px;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 4.2rem);
    letter-spacing: -2px;
  }

  .viewer-stage {
    min-height: 560px;
  }

  .viewer-note,
  .floating-card {
    display: none;
  }

  .viewer-modal-content {
    width: min(96vw, 1200px);
    height: min(82vh, 760px);
    margin: 9vh auto;
    border-radius: 24px;
  }

  .viewer-modal-close {
    top: 12px;
    right: 12px;
  }

  .history-visual {
    transform: none;
  }

  .history-showcase {
    width: 100%;
    transform: none;
  }

  .history-context-card {
    grid-template-columns: 1fr;
  }

  .image-modal-close {
    top: -16px;
    right: -16px;
  }

  .history-showcase {
    width: 100%;
    min-height: 0;
    padding: 0;
    transform: none;
  }

  .history-main-image {
    width: 100%;
    min-height: 360px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
  }

  .history-main-image img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    border-radius: 20px;
  }

}