/* ══ TOKENS ══════════════════════════════════════════════════ */
:root {
  --teal:        #00A8C0;
  --teal-dark:   #007A8C;
  --teal-deep:   #005F70;
  --teal-light:  #4DC9DC;
  --teal-mist:   #E8F7FA;
  --navy:        #0D2535;

  --bg:          #FFFFFF;
  --bg-alt:      #F5FAFB;
  --surface:     #FFFFFF;
  --text:        #0D1F2A;
  --text-muted:  #4A6877;
  --border:      rgba(0, 168, 192, .14);

  --nav-h:       64px;
  --ease:        cubic-bezier(.4, 0, .2, 1);
  --ff-alt:      'Montserrat Alternates', 'Montserrat', system-ui, sans-serif;
  --ff:          'Montserrat', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:         #08161E;
    --bg-alt:     #0D2535;
    --surface:    #102030;
    --text:       #E6F2F5;
    --text-muted: #7AAAB8;
    --border:     rgba(0, 168, 192, .18);
    --teal-mist:  rgba(0, 168, 192, .08);
  }
}
:root[data-theme="dark"] {
  --bg:         #08161E;
  --bg-alt:     #0D2535;
  --surface:    #102030;
  --text:       #E6F2F5;
  --text-muted: #7AAAB8;
  --border:     rgba(0, 168, 192, .18);
  --teal-mist:  rgba(0, 168, 192, .08);
}

/* ══ RESET ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ══ NAV ═════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  gap: 2rem;
  box-shadow: 0 1px 12px rgba(0, 168, 192, .08);
}

.nav-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav-links a {
  font-family: var(--ff-alt);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color .2s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--teal); }

@media (max-width: 580px) { .nav-links { display: none; } }

/* ══ HERO ════════════════════════════════════════════════════ */
.hero {
  background: var(--navy);
  background: linear-gradient(140deg, #081E2D 0%, #0D3548 45%, #0A4A5A 100%);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 10vh, 8rem) clamp(1.25rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  width: 65vmin; height: 65vmin;
  border-radius: 50%;
  border: 1px solid rgba(0, 168, 192, .12);
  right: -12vmin; bottom: -18vmin;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 40vmin; height: 40vmin;
  border-radius: 50%;
  border: 1px solid rgba(0, 168, 192, .08);
  left: -6vmin; top: -6vmin;
  pointer-events: none;
}

/* Canvas de partículas */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  width: 50vmin; height: 50vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 192, .18) 0%, transparent 65%);
  bottom: 5%; right: 8%;
  pointer-events: none;
}

.hero-logo {
  margin: 0 auto 2rem;
  height: 110px;
  width: auto;
  /* Convierte el logo a blanco para fondos oscuros */
  filter: brightness(0) invert(1);
  opacity: .92;
  animation: fadeUp .5s .05s var(--ease) both;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--ff-alt);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 1.25rem;
  animation: fadeUp .5s .15s var(--ease) both;
}

.hero-title {
  font-family: var(--ff-alt);
  font-weight: 900;
  font-size: clamp(2.8rem, 8.5vw, 6.5rem);
  line-height: 1.0;
  letter-spacing: -.015em;
  text-wrap: balance;
  color: #fff;
  margin-bottom: 1.5rem;
  animation: fadeUp .7s .3s var(--ease) both;
}
.hero-title em {
  font-style: normal;
  color: var(--teal-light);
  display: block;
}

.hero-sub {
  font-size: clamp(.95rem, 2vw, 1.1rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, .5);
  max-width: 520px;
  margin: 0 auto 2.75rem;
  animation: fadeUp .6s .5s var(--ease) both;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp .5s .65s var(--ease) both;
}

/* ══ SCROLL CUE ══════════════════════════════════════════════ */
.scroll-cue {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  animation: fadeUp .5s .9s var(--ease) both;
}
.scroll-cue span {
  font-family: var(--ff-alt);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .25);
}
.scroll-arrow {
  width: 18px; height: 18px;
  animation: arrowBounce 1.8s ease-in-out infinite;
}

/* ══ BUTTONS ═════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-alt);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .82rem 2.2rem;
  border-radius: 2px;
  border: 1.5px solid transparent;
  transition: background .2s var(--ease), transform .18s, border-color .2s, color .2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.btn-teal {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn-teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.btn-ghost:hover { border-color: var(--teal-light); color: var(--teal-light); }

.btn-teal-outline {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}
.btn-teal-outline:hover { background: var(--teal); color: #fff; }

.btn-navy {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-navy:hover { background: #0D3040; }

/* ══ SECTION BASE ════════════════════════════════════════════ */
.section { padding: clamp(4rem, 9vh, 7rem) clamp(1.25rem, 5vw, 4rem); }
.section-inner { max-width: 1080px; margin: 0 auto; }

.eyebrow {
  font-family: var(--ff-alt);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .875rem;
}

.section-title {
  font-family: var(--ff-alt);
  font-weight: 900;
  font-size: clamp(1.75rem, 3.8vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin-bottom: 1rem;
}

.rule {
  width: 36px; height: 3px;
  background: var(--teal);
  border-radius: 2px;
  margin: 1.25rem 0;
}

.section-desc {
  font-size: .97rem;
  line-height: 1.78;
  max-width: 52ch;
}

/* ══ FEATURES LIST ═══════════════════════════════════════════ */
.features {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin: 1.75rem 0 2.25rem;
}
.feat {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.feat.vis { opacity: 1; transform: none; }
.feat-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px; }
.feat-text { font-size: .92rem; font-weight: 500; line-height: 1.5; }

/* ══ IMAGE PLACEHOLDER ═══════════════════════════════════════ */
.ph {
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  padding: 2rem;
  text-align: center;
}
.ph-icon { width: 40px; height: 40px; opacity: .28; }
.ph-name {
  font-family: var(--ff-alt);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .45;
}
.ph-spec { font-size: .68rem; line-height: 1.6; opacity: .28; }

/* ══ IMÁGENES DE PRODUCTO ════════════════════════════════════ */
.product-img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 24px rgba(0, 168, 192, .12);
}
/* Crédito Virtual — ratio 4:3 */
.product-img:not(.portrait):not(.landscape):not(.s-img) {
  aspect-ratio: 4/3;
}
/* App Visionamos — se recorta a 4:3 mostrando la parte superior del teléfono */
.product-img.portrait {
  aspect-ratio: 4/3;
  max-height: none;
  object-position: center 15%;
  margin-bottom: .6rem;
}
/* Portal Natural — mismo ratio para que las cards queden iguales */
.product-img.landscape {
  aspect-ratio: 4/3;
  object-position: center center;
  margin-bottom: .6rem;
}
/* Sucursal Virtual y LINREC — dentro de s-card */
.product-img.s-img {
  aspect-ratio: 16/9;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 1.75rem;
  display: block;
  box-shadow: 0 2px 12px rgba(0,168,192,.1);
}

/* ══ CRÉDITO VIRTUAL ═════════════════════════════════════════ */
.credito { background: var(--bg); }
.credito .section-title { color: var(--text); }
.credito .section-desc  { color: var(--text-muted); }
.credito .feat-text     { color: var(--text); }
.credito .feat-icon .chk-ring { fill: var(--teal-mist); }
.credito .feat-icon .chk-mark { stroke: var(--teal); }

.credito-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}
@media (max-width: 740px) { .credito-grid { grid-template-columns: 1fr; } }

.credito .ph {
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  border: 1.5px dashed var(--border);
  color: var(--text-muted);
}

/* ══ APP VISIONAMOS ══════════════════════════════════════════ */
.app-section { background: var(--bg-alt); }
.app-section .eyebrow       { color: var(--teal-dark); }
.app-section .section-title { color: var(--text); }
.app-section .section-desc  { color: var(--text-muted); }
.app-section .feat-text     { color: var(--text); }
.app-section .feat-icon .chk-ring { fill: var(--teal-mist); }
.app-section .feat-icon .chk-mark { stroke: var(--teal); }

.app-intro { max-width: 600px; margin-bottom: 3rem; }
.app-intro .features { margin-bottom: 0; }

.app-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  align-items: start;
}
@media (max-width: 580px) { .app-cards { grid-template-columns: 1fr; } }

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 2px 20px rgba(0, 168, 192, .06);
  display: flex;
  flex-direction: column;
}
.app-card-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--ff-alt);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: .6rem;
}
.app-card-head svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--teal); }
.app-card .ph {
  background: var(--bg-alt);
  border: 1.5px dashed var(--border);
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.app-card .ph.portrait  { aspect-ratio: 9/16; max-height: 340px; }
.app-card .ph.landscape { aspect-ratio: 16/9; }
.app-card p {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: .875rem;
}

/* ══ STORE BADGES ════════════════════════════════════════════ */
.store-badges {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.store-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: #000;
  color: #fff;
  border-radius: 10px;
  padding: .55rem 1.1rem;
  border: 1px solid rgba(255,255,255,.18);
  transition: background .2s var(--ease), transform .18s;
  text-decoration: none;
  flex: 1;
  min-width: 130px;
}
.store-badge-btn:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
}
.store-badge-btn svg { flex-shrink: 0; opacity: .9; }
.badge-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.badge-top {
  font-size: .58rem;
  letter-spacing: .04em;
  opacity: .75;
  font-family: var(--ff);
}
.badge-store {
  font-family: var(--ff-alt);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .01em;
}
/* Si usan imágenes oficiales de las tiendas */
.store-badge-img {
  height: 40px;
  width: auto;
  display: block;
}

/* ══ BOTÓN PORTAL NATURAL ════════════════════════════════════ */
.btn-portal {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.25rem;
  font-family: var(--ff-alt);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  border-radius: 4px;
  padding: .7rem 1.4rem;
  transition: background .2s var(--ease), color .2s, transform .18s;
  text-decoration: none;
  width: 100%;
  justify-content: center;
}
.btn-portal:hover {
  background: var(--teal);
  color: #fff;
  transform: translateY(-2px);
}
.btn-portal svg { flex-shrink: 0; }

/* ══ BOTÓN ACCESO SUCURSAL (único, centrado bajo las dos tarjetas) ═══ */
.sucursal-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
.btn-sucursal-access {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  background: var(--teal);
  color: #fff;
  font-family: var(--ff-alt);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .9rem 2.5rem;
  border-radius: 4px;
  border: 2px solid var(--teal);
  transition: background .2s var(--ease), color .2s, transform .18s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(0,168,192,.25);
}
.btn-sucursal-access:hover {
  background: transparent;
  color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 6px 28px rgba(0,168,192,.35);
}
.btn-sucursal-access svg { flex-shrink: 0; }

/* ══ SUCURSAL VIRTUAL + LINREC ═══════════════════════════════ */
.sucursal { background: var(--bg); }

.sucursal-intro {
  text-align: center;
  margin-bottom: 3.5rem;
}
.sucursal-intro .rule         { margin: 1.25rem auto; }
.sucursal-intro .section-title { color: var(--text); }
.sucursal-intro .section-desc  { color: var(--text-muted); margin: 0 auto; }

.sucursal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 720px) { .sucursal-grid { grid-template-columns: 1fr; } }

.s-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.25rem;
  box-shadow: 0 2px 20px rgba(0, 168, 192, .06);
}
.s-card::before {
  content: '';
  display: block;
  width: 36px; height: 3px;
  background: var(--teal);
  border-radius: 2px;
  margin-bottom: 1.25rem;
}
.s-card-tag {
  font-family: var(--ff-alt);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: .5rem;
}
.s-card-title {
  font-family: var(--ff-alt);
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: .6rem;
}
.s-card-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.sucursal .feat-text               { color: var(--text); }
.sucursal .feat-icon .chk-ring     { fill: var(--teal-mist); }
.sucursal .feat-icon .chk-mark     { stroke: var(--teal); }
.s-card .ph {
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  border: 1.5px dashed var(--border);
  color: var(--text-muted);
  margin-top: 1.75rem;
}
.s-card .features { margin-bottom: 0; }

/* ══ CTA BAND ════════════════════════════════════════════════ */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: 0;
  text-align: center;
  /* Fallback color mientras carga el video */
  background: var(--teal-deep);
}
/* Video de fondo */
.cta-band-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}
/* Overlay teal semitransparente para legibilidad del texto */
.cta-band-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(0,95,112,.82) 0%,
    rgba(0,122,140,.78) 50%,
    rgba(0,168,192,.70) 100%);
  z-index: 1;
}
/* Contenido sobre el video */
.cta-band-content {
  position: relative;
  z-index: 2;
  padding: clamp(4rem, 8vh, 6rem) clamp(1.25rem, 5vw, 4rem);
}
@media (prefers-reduced-motion: reduce) {
  .cta-band-video { display: none; }
  .cta-band { background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-dark) 50%, var(--teal) 100%); }
}
.cta-band-title {
  font-family: var(--ff-alt);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
  line-height: 1.08;
  text-wrap: balance;
  margin-bottom: .9rem;
}
.cta-band-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, .65);
  margin-bottom: 2.25rem;
}

/* ══ FOOTER ══════════════════════════════════════════════════ */
footer {
  background: var(--navy);
  padding: 3rem clamp(1.25rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  border-top: 1px solid rgba(0, 168, 192, .1);
}
.footer-logo-img {
  height: 72px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .85;
}
.footer-tag { font-size: .72rem; color: rgba(255, 255, 255, .3); letter-spacing: .06em; }

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-family: var(--ff-alt);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .3);
  transition: color .2s;
}
.footer-links a:hover { color: var(--teal-light); }
.footer-copy { font-size: .65rem; color: rgba(255, 255, 255, .2); letter-spacing: .04em; }

/* ══ SCROLL REVEAL ═══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.vis { opacity: 1; transform: none; }

/* ══ KEYFRAMES ═══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ══ REDUCED MOTION ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .feat { opacity: 1; transform: none; transition: none; }
  .hero-logo, .hero-eyebrow, .hero-title, .hero-sub, .hero-ctas, .scroll-cue {
    animation: none; opacity: 1; transform: none;
  }
  .scroll-arrow { animation: none; }
}
