:root {
  --brand-navy: #143557;
  --brand-navy-2: #1d4583;
  --brand-red: #a7191c;
  --brand-red-2: #c42126;
  --sky: #67b3ff;
  --ink: #101a2a;
  --ink-soft: #445267;
  --line: #d8dfeb;
  --surface: #ffffff;
  --surface-soft: #f5f7fb;
  --shadow: 0 16px 40px rgba(11, 26, 47, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #e8eef8;
  background: #0a0a0a;
  overflow-x: hidden;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .72;
}

.landing-network {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.bg-blob {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.bg-blob-1 {
  width: 720px;
  height: 720px;
  top: -220px;
  left: -260px;
  background: radial-gradient(circle, rgba(255,255,255,.045) 0%, transparent 68%);
}

.bg-blob-2 {
  width: 940px;
  height: 940px;
  right: -320px;
  bottom: -380px;
  background: radial-gradient(circle, rgba(255,255,255,.03) 0%, transparent 65%);
}

#mascot-wrap {
  position: fixed;
  z-index: 90;
  pointer-events: all;
  cursor: pointer;
  will-change: transform;
  user-select: none;
}

#mascot-wrap:hover #mascot-body {
  filter: drop-shadow(0 0 18px rgba(255,255,255,0.28));
}

#mascot-body {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
  transition: filter 0.3s ease;
}

#mascot-bubble {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%) scale(0.85) translateY(4px);
  max-width: 300px;
  padding: 7px 12px;
  border-radius: 12px;
  border: .5px solid rgba(255,255,255,.18);
  background: rgba(18,18,18,.82);
  color: rgba(255,255,255,.62);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity .22s ease, transform .28s cubic-bezier(.34,1.56,.64,1);
}

#mascot-bubble.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1) translateY(0);
}

#mascot-bubble::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: rgba(18,18,18,.82);
  border-right: .5px solid rgba(255,255,255,.18);
  border-bottom: .5px solid rgba(255,255,255,.18);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  transform: translateX(-50%) rotate(-45deg);
}

.landing-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 78px 0 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  gap: 22px;
  position: relative;
  z-index: 3;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  min-height: 66px;
  padding: 0 max(20px, calc((100vw - 1160px) / 2)) 0 max(20px, calc((100vw - 1160px) / 2));
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(22, 22, 24, 0.88), rgba(11, 11, 13, 0.72));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  overflow: hidden;
}

.landing-header-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(29,69,131,.42), rgba(196,33,38,.48), transparent);
  background-size: 200% 100%;
  animation: navGlow 5s ease-in-out infinite alternate;
}

@keyframes navGlow {
  from { background-position: 0% 0%; opacity: .70; }
  to { background-position: 100% 0%; opacity: 1; }
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

.landing-brand .brand-avanzar {
  height: 42px;
  width: auto;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

.brand-powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  opacity: .74;
}

.brand-powered span {
  color: rgba(255, 255, 255, .54);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.brand-powered img {
  height: 11px;
  width: auto;
  filter: brightness(0) invert(1);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.landing-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, color .16s ease;
}

.landing-theme-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.theme-icon-moon {
  display: none;
}

.landing-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid rgba(196, 33, 38, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  padding: 0 18px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.16), transparent 38%),
    linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-2) 44%, var(--brand-red-2) 100%);
  box-shadow: 0 12px 24px rgba(167, 25, 28, .24), inset 0 1px 0 rgba(255,255,255,.24);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.landing-login-link:hover {
  transform: translateY(-2px);
  filter: saturate(1.06);
  box-shadow: 0 16px 30px rgba(167, 25, 28, .32), inset 0 1px 0 rgba(255,255,255,.28);
}

.landing-main {
  display: grid;
  align-items: center;
  min-height: 38vh;
}

.landing-main-centered {
  place-items: center;
}

.hero-text {
  width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
  color: #fff;
}

.hero-text h1 {
  margin: 0;
  color: rgba(255,255,255,.94);
  font-size: 58px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-text h1 span {
  display: inline-block;
  color: transparent;
  background: linear-gradient(90deg, var(--brand-navy) 0%, var(--brand-navy-2) 48%, var(--brand-red-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-text p {
  width: min(760px, 100%);
  margin: 18px auto 0;
  color: rgba(255,255,255,.58);
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
}

.value-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 8px 0 24px;
}

.value-card {
  position: relative;
  min-height: 440px;
  padding: 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18,18,21,.94), rgba(10,10,12,.86)) padding-box,
    linear-gradient(135deg, rgba(29,69,131,.78), rgba(196,33,38,.68)) border-box;
  box-shadow: 0 18px 42px rgba(0,0,0,.30);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.value-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .52;
  background:
    radial-gradient(320px 180px at 20% 0%, rgba(29,69,131,.18), transparent 62%),
    radial-gradient(280px 180px at 100% 100%, rgba(196,33,38,.14), transparent 64%);
}

.value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 70px rgba(0,0,0,.42), 0 0 32px rgba(29,69,131,.12);
}

.value-card > * {
  position: relative;
  z-index: 1;
}

.value-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.value-icon img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}

.value-icon-fallback {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255,255,255,.88);
  font-size: 18px;
  font-weight: 800;
}

.value-eyebrow {
  margin: 18px 0 8px;
  color: rgba(255,255,255,.38);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.value-card h2 {
  margin: 0;
  color: rgba(255,255,255,.92);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.value-card p:not(.value-eyebrow) {
  margin: 18px 0 0;
  color: rgba(255,255,255,.55);
  font-size: 14px;
  line-height: 1.62;
}

.value-counter {
  margin-top: 22px;
  padding: 20px 16px;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(29,69,131,.92), rgba(104,70,185,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 14px 28px rgba(29,69,131,.18);
}

.value-counter span {
  display: block;
  font-size: 48px;
  line-height: .95;
}

.bank-scan {
  position: relative;
  margin-top: 20px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.03) 1px, transparent 1px),
    rgba(255,255,255,.035);
  background-size: 24px 24px;
  overflow: hidden;
}

.bank-scan::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 34%;
  left: -42%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  transform: skewX(-14deg);
  animation: scanPass 2.6s ease-in-out infinite;
}

@keyframes scanPass {
  0% { left: -42%; }
  58%, 100% { left: 112%; }
}

.bank-scan span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  color: rgba(255,255,255,.70);
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.bank-scan span:last-child {
  border-bottom: 0;
}

.bank-scan strong {
  color: rgba(110,230,154,.92);
  font-size: 12px;
}

.scale-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.scale-compare div {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.scale-compare div:last-child {
  border-color: rgba(196,33,38,.28);
  background:
    linear-gradient(135deg, rgba(29,69,131,.16), rgba(196,33,38,.10)),
    rgba(255,255,255,.045);
}

.scale-compare span,
.scale-compare small {
  display: block;
  color: rgba(255,255,255,.42);
  font-size: 11px;
}

.scale-compare strong {
  display: block;
  margin: 8px 0 6px;
  color: rgba(255,255,255,.90);
  font-size: 15px;
  line-height: 1.2;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}

.metrics-strip article {
  padding: 18px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
  text-align: center;
  backdrop-filter: blur(12px);
}

.metrics-strip strong {
  display: block;
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.metrics-strip span {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,.48);
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  min-height: 46px;
  padding: 0 22px;
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, color .16s ease, background .16s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 1px auto 1px 1px;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,.22), transparent);
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-icon {
  position: relative;
  z-index: 1;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-2) 52%, var(--brand-red-2) 100%);
  box-shadow: 0 15px 30px rgba(20, 53, 87, .22), 0 8px 18px rgba(167, 25, 28, .18);
}

.btn-primary:hover {
  box-shadow: 0 18px 36px rgba(20, 53, 87, .28), 0 10px 22px rgba(167, 25, 28, .22);
}

.btn-ghost {
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  border-color: rgba(20, 53, 87, .16);
  color: var(--brand-navy);
  box-shadow: 0 12px 26px rgba(20, 53, 87, .10);
}

.btn-ghost:hover {
  border-color: rgba(196, 33, 38, .24);
  color: var(--brand-red);
  box-shadow: 0 16px 30px rgba(20, 53, 87, .14);
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(227, 236, 248, 0.82);
  text-shadow: 0 1px 0 rgba(0,0,0,0.28);
}

[data-theme="light"] body {
  color: #e8eef8;
  background: #0a0a0a;
}

[data-theme="light"] #particle-canvas {
  opacity: .72;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-icon-moon {
  display: block;
}

[data-theme="light"] .landing-footer {
  color: rgba(227,236,248,.82);
  text-shadow: 0 1px 0 rgba(0,0,0,.28);
}

@media (max-width: 1020px) {
  .hero-text h1 {
    font-size: 46px;
  }

  .hero-text p {
    font-size: 17px;
  }

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

  .value-card {
    min-height: auto;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .landing-shell {
    width: min(1160px, calc(100% - 28px));
    padding: 78px 0 20px;
  }

  .landing-header {
    min-height: auto;
    padding: 12px 14px;
    gap: 10px;
  }

  .landing-brand {
    gap: 9px;
  }

  .landing-brand .brand-avanzar {
    height: 34px;
  }

  .brand-powered {
    gap: 4px;
    padding-left: 9px;
  }

  .brand-powered span {
    font-size: 7px;
  }

  .brand-powered img {
    height: 9px;
  }

  .landing-nav-actions {
    gap: 8px;
  }

  .landing-theme-toggle {
    width: 36px;
    height: 36px;
  }

  .landing-login-link {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }

  .landing-login-link svg {
    width: 16px;
    height: 16px;
  }

  .landing-main {
    min-height: 38vh;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .hero-text p {
    font-size: 14px;
    line-height: 1.65;
  }

  .value-card {
    padding: 20px;
  }

  .value-card h2 {
    font-size: 21px;
  }

  .scale-compare,
  .metrics-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .landing-header {
    align-items: flex-start;
  }

  .landing-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .brand-powered {
    border-left: 0;
    padding-left: 0;
  }
}
