/* ════════════════════════════════════════════════
   hugsa Aplicaciones Informáticas — Stylesheet
   (Bootstrap 5 carga antes; aquí sobreescribimos
    sólo lo que necesitamos)
   ════════════════════════════════════════════════ */

/* ─── Variables ──────────────────────────────── */
:root {
  --c-blue:       #2d4fa3;
  --c-blue-dark:  #1a3070;
  --c-orange:     #f5a020;
  --c-dark:       #0c1220;
  --c-dark-mid:   #141a2e;
  --c-white:      #ffffff;
  --c-off-white:  #f4f4f0;
  --c-text:       #1a1a2e;
  --c-text-muted: #6b6b80;
  --c-border:     rgba(0, 0, 0, 0.08);

  --nav-h: 72px;
  --font:  'Inter', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reset / Base ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* Bootstrap resets list-style; extra safety */
ul { list-style: none; padding-left: 0; margin-bottom: 0; }

/* Italic accent = orange */
em { font-style: normal; color: var(--c-orange); }

/* ─── Label ──────────────────────────────────── */
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}
.label--light { color: rgba(255,255,255,0.5); }
.label--light::before { background: rgba(255,255,255,0.5); }

/* ─── Buttons ────────────────────────────────── */
/* Override Bootstrap .btn */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
  line-height: 1;
}
.btn__arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--outline {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: var(--c-white);
  background: transparent;
}
.btn--outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
  color: var(--c-white);
}

.btn--orange {
  background: var(--c-orange);
  color: var(--c-dark);
  border: 1.5px solid var(--c-orange);
}
.btn--orange:hover {
  background: transparent;
  color: var(--c-orange);
}

/* ─── Logo image ─────────────────────────────── */
.logo-img {
  height: 42px;
  width: auto;
  display: block;
  object-fit: contain;
  background: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  transition: opacity 0.3s ease;
}
.logo-img:hover { opacity: 0.85; }

.logo-img--footer {
  height: 46px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1050; /* encima de Bootstrap modals */
  height: var(--nav-h);
  transition: transform 0.4s var(--ease-out), background 0.3s ease, box-shadow 0.3s ease;
}
.nav.nav--hidden { transform: translateY(-100%); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 clamp(20px, 4vw, 64px);
}

.nav.nav--scrolled {
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}

.nav__link {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text);
  border-radius: 100px;
  transition: all 0.2s ease;
  border: none;
}
.nav__link:hover { background: rgba(0,0,0,0.05); color: var(--c-text); }

.nav__link--cta {
  background: var(--c-blue);
  color: var(--c-white) !important;
  font-weight: 600;
}
.nav__link--cta:hover { background: var(--c-blue-dark); }

/* On dark sections (hero visible) */
.nav--dark-section .nav__link:not(.nav__link--cta) { color: var(--c-white); }
.nav--dark-section .nav__link:hover:not(.nav__link--cta) { background: rgba(255,255,255,0.1); }
.nav--dark-section.nav--scrolled .nav__link:not(.nav__link--cta) { color: var(--c-text); }
.nav--dark-section.nav--scrolled .nav__link:hover:not(.nav__link--cta) { background: rgba(0,0,0,0.05); }

/* Burger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger__line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--c-text);
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}
.nav--dark-section:not(.nav--scrolled) .burger__line { background: var(--c-white); }

.nav__burger.is-open .burger__line:first-child {
  transform: translateY(3.75px) rotate(45deg);
  background: var(--c-orange);
}
.nav__burger.is-open .burger__line:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
  background: var(--c-orange);
}

/* ══════════════════════════════════════════════
   MOBILE MENU
═══════════════════════════════════════════════ */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--c-dark);
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.mobile-menu.is-open { opacity: 1; pointer-events: all; }

.mobile-menu__links { display: flex; flex-direction: column; gap: 8px; text-align: center; padding: 0; }

.mobile-item { overflow: hidden; }
.mobile-link {
  display: inline-block;
  font-size: clamp(2rem, 9vw, 4.5rem);
  font-weight: 800;
  color: var(--c-white);
  letter-spacing: -0.03em;
  line-height: 1.15;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out), color 0.2s ease;
}
.mobile-menu.is-open .mobile-link           { transform: translateY(0); }
.mobile-menu.is-open .mobile-item:nth-child(1) .mobile-link { transition-delay: 0.05s; }
.mobile-menu.is-open .mobile-item:nth-child(2) .mobile-link { transition-delay: 0.10s; }
.mobile-menu.is-open .mobile-item:nth-child(3) .mobile-link { transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-item:nth-child(4) .mobile-link { transition-delay: 0.20s; }
.mobile-link:hover { color: var(--c-orange); }

/* ══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--c-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 48px) clamp(20px, 6vw, 96px) 100px;
}

.hero__bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.hero__bg-glow--orange {
  width: clamp(300px, 50vw, 600px);
  height: clamp(300px, 50vw, 600px);
  background: rgba(245, 160, 32, 0.12);
  bottom: -80px; right: -80px;
}
.hero__bg-glow--blue {
  width: clamp(250px, 40vw, 500px);
  height: clamp(250px, 40vw, 500px);
  background: rgba(45, 79, 163, 0.15);
  top: -60px; left: -60px;
}

.hero__inner { position: relative; z-index: 1; }

.hero__label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 40px;
  overflow: hidden;
}
.hero__label-line {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--c-orange);
  flex-shrink: 0;
}

.hero__title {
  font-size: clamp(48px, 9vw, 128px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--c-white);
  margin-bottom: 48px;
}

/* FIX: overflow:hidden recortaba descendentes (g, j...).
   padding-bottom da espacio; margin-bottom compensa. */
.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.hero__line span {
  display: block;
  transform: translateY(110%);
  will-change: transform;
}

.hero__bottom {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero__desc {
  max-width: 460px;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  margin: 0;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 40px;
  right: clamp(20px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.hero__scroll-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  writing-mode: vertical-rl;
}
.hero__scroll-track {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.hero__scroll-dot {
  position: absolute;
  top: -8px; left: -3px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-orange);
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0%  { top: -8px; opacity: 1; }
  80% { top: 60px; opacity: 0; }
  100%{ top: -8px; opacity: 0; }
}

/* ══════════════════════════════════════════════
   SERVICES — Horizontal scroll
═══════════════════════════════════════════════ */
.services { background: var(--c-off-white); overflow: hidden; }

.services__header {
  padding: 72px 0 48px;
}
.services__heading {
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 14px 0 0;
}
.services__sub {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--c-text-muted);
  max-width: 320px;
  margin: 0;
}

/* Viewport + track */
.services__viewport {
  overflow: hidden;
  padding: 0 clamp(20px, 4vw, 80px) 56px;
}
.services__track {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
  /* Padding derecho: deja respirar el último card */
  padding-right: clamp(20px, 4vw, 80px);
}

/* Cards */
.service-card {
  width: clamp(280px, 30vw, 400px);
  flex-shrink: 0;
  background: var(--c-white);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.3s ease;
  cursor: default;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.10);
  border-color: var(--c-blue);
}

.service-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}
.service-card__num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
}
.service-card__icon {
  width: 36px; height: 36px;
  color: var(--c-blue);
  opacity: 0.7;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.service-card:hover .service-card__icon { opacity: 1; color: var(--c-orange); }
.service-card__icon svg { width: 100%; height: 100%; }

.service-card__title {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  flex-grow: 1;
}

.service-card__desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--c-text-muted);
  margin-bottom: 28px;
}

.service-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,0.07);
}
.service-card__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-blue);
}
.service-card__arrow {
  width: 18px; height: 18px;
  color: var(--c-text-muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
}
.service-card:hover .service-card__arrow { opacity: 1; transform: translateX(0); }

/* Progress bar */
.services__progress {
  height: 2px;
  background: rgba(0,0,0,0.08);
  margin: 0 clamp(20px, 4vw, 80px);
}
.services__progress-bar {
  height: 100%;
  background: var(--c-orange);
  width: 0%;
}

/* ══════════════════════════════════════════════
   PRODUCT — Multitarificador
═══════════════════════════════════════════════ */
.product {
  background: var(--c-dark);
  padding: 100px 0;
}

.product__header {
  max-width: 680px;
  margin-bottom: 64px;
}
.product__title {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--c-white);
  margin-top: 18px;
  margin-bottom: 28px;
}
.product__intro {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
}

/* Features — Bootstrap col-12 col-md-6 en el HTML */
.product__features-row { margin-bottom: 56px; }

.product__feature {
  padding: 44px 36px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s ease, border-color 0.3s ease;
  cursor: default;
}
.product__feature:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(245,160,32,0.3);
}
.product__feature-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-orange);
  margin-bottom: 24px;
}
.product__feature-title {
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-white);
  margin-bottom: 14px;
}
.product__feature-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.product__cta { padding-top: 8px; }

/* ══════════════════════════════════════════════
   ABOUT — Bootstrap grid en el HTML
═══════════════════════════════════════════════ */
.about { background: var(--c-white); padding: 100px 0; }

.about__container { /* container-xl override si es necesario */ }

.about__title {
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-top: 18px;
  margin-bottom: 48px;
}

.about__stats {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 36px;
  border-top: 1px solid var(--c-border);
}
.about__stat-num {
  display: block;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--c-blue);
}
.about__stat-num sup { font-size: 0.4em; vertical-align: super; color: var(--c-orange); }
.about__stat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 4px;
}

.about__right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 48px;
}
.about__text {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--c-text-muted);
  margin: 0;
}
.about__text--large {
  font-size: 1.1rem;
  color: var(--c-text);
  font-weight: 400;
}

/* ══════════════════════════════════════════════
   MARQUEE
═══════════════════════════════════════════════ */
.marquee {
  background: var(--c-blue);
  overflow: hidden;
  padding: 18px 0;
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  gap: 28px;
  animation: marqueeScroll 28s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
.marquee__dot { color: var(--c-orange) !important; }

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════
   FOOTER — Bootstrap grid en el HTML
═══════════════════════════════════════════════ */
.footer {
  background: var(--c-dark);
  padding: 72px 0 36px;
}

.footer__top {
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 28px;
}
.footer__tagline {
  margin-top: 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.35);
}
.footer__col-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 20px;
}
.footer__list { display: flex; flex-direction: column; gap: 10px; }
.footer__list li,
.footer__list a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  transition: color 0.2s ease;
}
.footer__list a:hover { color: var(--c-orange); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__copy { font-size: 0.78rem; color: rgba(255,255,255,0.22); margin: 0; }
.footer__legal-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
}
.footer__legal-btn:hover { color: var(--c-orange); }

/* ══════════════════════════════════════════════
   MODAL — Aviso Legal
═══════════════════════════════════════════════ */
/* Usamos nuestra propia clase .modal, no la de Bootstrap */
div.modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
div.modal.is-open { pointer-events: all; opacity: 1; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  background: var(--c-white);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out);
}
div.modal.is-open .modal__panel { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  background: rgba(0,0,0,0.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  color: var(--c-text);
  z-index: 1;
}
.modal__close:hover { background: rgba(0,0,0,0.12); }
.modal__close svg { width: 15px; height: 15px; }

.modal__body {
  padding: 36px 44px 44px;
  overflow-y: auto;
  max-height: 85vh;
}
.modal__title {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--c-blue);
  margin-bottom: 28px;
}
.modal__body h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-top: 24px;
  margin-bottom: 10px;
}
.modal__body p { font-size: 0.88rem; line-height: 1.75; color: var(--c-text-muted); margin-bottom: 0; }
.modal__body ul { list-style: disc; padding-left: 18px; margin-top: 8px; }
.modal__body li { font-size: 0.88rem; line-height: 1.75; color: var(--c-text-muted); margin-bottom: 4px; }

/* ══════════════════════════════════════════════
   RESPONSIVE (lo que Bootstrap no cubre)
═══════════════════════════════════════════════ */

/* ── ≤ 991px ── */
@media (max-width: 991px) {
  .about__right { padding-top: 0; }
  .about__stats { flex-direction: row; gap: 32px; }
}

/* ── ≤ 767px ── */
@media (max-width: 767px) {
  /* Nav */
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  /* Hero */
  .hero__bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero__desc   { max-width: 100%; }
  .hero__scroll { display: none; }

  /* Services: sin scroll horizontal → stack vertical */
  .services__viewport { padding: 0 20px 40px; }
  .services__track    { flex-direction: column; width: 100%; }
  .service-card       { width: 100%; }

  /* About stats */
  .about__stats { flex-direction: column; gap: 20px; }

  /* Product */
  .product { padding: 72px 0; }
  .product__feature { padding: 32px 24px; }

  /* About */
  .about { padding: 72px 0; }
  .about__right { padding-top: 0; }

  /* Modal */
  .modal__body  { padding: 28px 20px 36px; }
  .modal__title { font-size: 1.4rem; }
}

/* ── ≤ 479px ── */
@media (max-width: 479px) {
  .hero__title { letter-spacing: -0.03em; }
  .services__header { padding: 56px 0 36px; }
  .footer__top { row-gap: 32px; }
}

/* ─── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-blue); border-radius: 3px; }
