/* ============================================================
   SRUXUI · LINK IN BIO
   Mobile First · HTML5 + CSS3
   Composición basada en patrón de 2 vistas deslizantes.
   Paleta y tipografía extraídas del logo SRUXUI (azul→morado,
   Orbitron para marca, Rajdhani para texto/UI).
   ============================================================ */

/* ---------------- VARIABLES ---------------- */
:root {
  --bg-base: #0A0918;
  --bg-mid: #150F2E;
  --surface: #11102A;
  --blue: #3DA9FB;
  --purple: #9B3DF0;
  --gradient-brand: linear-gradient(135deg, var(--blue), var(--purple));
  --white: #F4F5FA;
  --gray: #B6BACD;

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --app-max: 460px;
  --ease: cubic-bezier(0.65, 0.05, 0.36, 1);
  --slide-duration: 450ms;

  --shadow-btn: 0 6px 18px rgba(91, 33, 182, 0.35);
  --shadow-card: 0 8px 22px rgba(0, 0, 0, 0.4);
}

/* ---------------- RESET ---------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; }
body {
  height: 100%; overflow: hidden;
  font-family: "Rajdhani", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.5; font-weight: 500;
  color: var(--white); background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
sup { font-size: 0.5em; vertical-align: super; line-height: 0; }

/* ---------------- FONDO ---------------- */
/* Carrusel de 3 fotos reales en crossfade cada 4s (ver js/bg-carousel.js) +
   overlay degradado en tonos de marca encima para garantizar contraste del
   texto -- mismo patrón que la referencia (.bg + .bg::after). */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity 1200ms ease;
}
.bg__slide.is-active { opacity: 1; }
.bg__slide--1 { background-image: url("../assets/bg-1.webp"); }
.bg__slide--2 { background-image: url("../assets/bg-2.webp"); }
.bg__slide--3 { background-image: url("../assets/bg-3.webp"); }
.bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 10% 15%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.2px 1.2px at 75% 8%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.6px 1.6px at 40% 60%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.2px 1.2px at 85% 45%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.4px 1.4px at 20% 80%, rgba(255,255,255,0.7), transparent),
    radial-gradient(ellipse 60% 45% at 20% 15%, rgba(61, 169, 251, 0.22), transparent 70%),
    radial-gradient(ellipse 65% 50% at 85% 85%, rgba(155, 61, 240, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(10, 9, 24, 0.20) 0%, rgba(21, 15, 46, 0.22) 50%, rgba(10, 9, 24, 0.24) 100%);
}

/* ============================================================
   APP · CONTENEDOR TIPO MÓVIL
   ============================================================ */
.app {
  position: fixed; top: 0; left: 0; right: 0;
  height: 100vh; height: 100dvh;
  max-width: var(--app-max); margin: 0 auto;
  overflow: hidden; z-index: 1;
}

/* ---------------- VISTAS (SLIDER) ---------------- */
.view {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  transition: transform var(--slide-duration) var(--ease);
  will-change: transform; scrollbar-width: none;
}
.view::-webkit-scrollbar { width: 0; height: 0; }
.home-view { transform: translateX(0); z-index: 2; }
.catalog-view {
  transform: translateX(100%); z-index: 3;
  background: rgba(10, 9, 24, 0.55);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.app.is-catalog .home-view { transform: translateX(-100%); }
.app.is-catalog .catalog-view { transform: translateX(0); }

.view__inner {
  display: flex; flex-direction: column; min-height: 100%;
  padding: calc(38px + env(safe-area-inset-top, 0px)) 20px calc(30px + env(safe-area-inset-bottom, 0px));
}

/* ============================================================
   PERFIL
   ============================================================ */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; animation: fadeUp 600ms var(--ease) both; }
.avatar {
  width: 104px; height: 104px; padding: 3px; border-radius: 50%;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--bg-base), var(--bg-base)) padding-box,
    var(--gradient-brand) border-box;
  box-shadow: 0 0 0 6px rgba(155, 61, 240, 0.12), 0 12px 30px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.avatar img, .avatar svg { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.brand {
  margin-top: 18px;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.3rem, 5.6vw, 1.55rem);
  font-weight: 800; letter-spacing: 0.04em; line-height: 1.2;
  color: var(--white);
  text-shadow: 0 2px 16px rgba(91, 33, 182, 0.55);
}
.brand .reg { font-size: 0.42em; color: var(--white); font-weight: 700; margin-left: 1px; }
.tagline { margin-top: 8px; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em; color: var(--white); }
.divider {
  display: block; width: 62px; height: 3px; margin-top: 18px; border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

/* ============================================================
   DESCRIPCIÓN
   ============================================================ */
.desc { margin-top: 20px; text-align: center; font-size: 0.95rem; font-weight: 600; color: var(--white); opacity: 0.95; animation: fadeUp 600ms var(--ease) 60ms both; }
.desc-small {
  margin-top: 6px; text-align: center; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.01em;
  line-height: 1.6; color: var(--white); opacity: 0.9;
  animation: fadeUp 600ms var(--ease) 100ms both;
}
.desc-small span { color: var(--white); opacity: 0.85; }

/* ---------------- ETIQUETAS DE SECCIÓN ---------------- */
.section-label {
  margin-top: 22px; margin-bottom: 2px;
  text-align: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--white); opacity: 0.6;
}

/* ============================================================
   BOTONES
   ============================================================ */
.links { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; animation: fadeUp 600ms var(--ease) 150ms both; }

.btn {
  position: relative; display: flex; align-items: center; gap: 13px;
  width: 100%; min-height: 60px; padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(155, 61, 240, 0.45);
  background: rgba(17, 16, 42, 0.82);
  color: var(--white); font-family: inherit; font-size: 0.95rem; font-weight: 600;
  text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  overflow: hidden;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 180ms ease, background-color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.btn__icon {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(155, 61, 240, 0.16); color: var(--blue);
  transition: background-color 250ms ease, color 250ms ease;
}
.btn__icon svg { width: 20px; height: 20px; }
.btn__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.btn__title { font-size: 0.94rem; font-weight: 700; line-height: 1.2; letter-spacing: 0.005em; }
.btn__sub { font-size: 0.7rem; font-weight: 500; line-height: 1.25; color: var(--white); opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn__arrow { flex: 0 0 auto; display: grid; place-items: center; color: var(--gray); opacity: 0.55; transition: transform 250ms ease, opacity 250ms ease, color 250ms ease; }
.btn__arrow svg { width: 18px; height: 18px; }

.btn:active { transform: scale(0.975); }
@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
    background: rgba(17, 16, 42, 0.95);
    border-color: var(--purple);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(155, 61, 240, 0.28);
  }
  .btn:hover .btn__icon { background: var(--gradient-brand); color: var(--white); }
  .btn:hover .btn__arrow { opacity: 1; color: var(--purple); transform: translateX(2px); }
}
.btn:focus-visible, .btn-back:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }

/* ============================================================
   BOTÓN WHATSAPP · CTA PRINCIPAL
   ============================================================ */
.btn--whatsapp {
  min-height: 68px; padding: 13px 15px;
  border-color: transparent;
  background: var(--gradient-brand);
  box-shadow: 0 10px 28px rgba(91, 33, 182, 0.45);
}
.btn--whatsapp .btn__icon { width: 42px; height: 42px; background: rgba(255, 255, 255, 0.2); color: var(--white); }
.btn--whatsapp .btn__icon svg { width: 22px; height: 22px; }
.btn--whatsapp .btn__title { font-size: 1.02rem; font-weight: 700; }
.btn--whatsapp .btn__sub { color: rgba(255, 255, 255, 0.92); opacity: 1; font-weight: 500; }
.btn--whatsapp .btn__arrow { color: var(--white); opacity: 0.9; }
@media (hover: hover) {
  .btn--whatsapp:hover { background: linear-gradient(135deg, #58b9fc, #ad5bf5); box-shadow: 0 14px 34px rgba(91, 33, 182, 0.55); }
  .btn--whatsapp:hover .btn__icon { background: rgba(255, 255, 255, 0.3); color: var(--white); }
  .btn--whatsapp:hover .btn__arrow { color: var(--white); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { margin-top: auto; padding-top: 34px; text-align: center; }
.footer__line { display: block; width: 100%; height: 1px; margin-bottom: 20px; background: linear-gradient(90deg, transparent, rgba(155, 61, 240, 0.5), transparent); }
.footer__brand { font-family: "Orbitron", sans-serif; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; color: var(--white); opacity: 0.92; }
.footer__brand .reg { color: var(--white); font-size: 0.75em; }
.footer__tag { margin-top: 5px; font-size: 0.72rem; font-weight: 500; color: var(--white); opacity: 0.8; }
.site-footer--compact { padding-top: 26px; }
.site-footer--compact .footer__brand { font-size: 0.72rem; }

/* ============================================================
   VISTA CATÁLOGO
   ============================================================ */
.catalog-head { display: flex; align-items: center; margin-bottom: 22px; }
.btn-back {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 16px 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(155, 61, 240, 0.5);
  background: rgba(17, 16, 42, 0.85); color: var(--white);
  font-size: 0.84rem; font-weight: 700; letter-spacing: 0.02em; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-btn);
  transition: transform 180ms ease, background-color 250ms ease, border-color 250ms ease;
}
.btn-back__icon { display: grid; place-items: center; color: var(--purple); transition: transform 250ms ease; }
.btn-back__icon svg { width: 18px; height: 18px; }
.btn-back:active { transform: scale(0.96); }
@media (hover: hover) {
  .btn-back:hover { background: rgba(17, 16, 42, 0.98); border-color: var(--purple); }
  .btn-back:hover .btn-back__icon { transform: translateX(-3px); }
}

.catalog-header { text-align: center; margin-bottom: 26px; }
.catalog-title { font-family: "Orbitron", sans-serif; font-size: clamp(1.05rem, 5vw, 1.25rem); font-weight: 800; letter-spacing: 0.06em; color: var(--white); line-height: 1.3; }
.catalog-rule { display: block; width: 54px; height: 3px; margin: 12px auto 0; border-radius: 99px; background: var(--gradient-brand); box-shadow: 0 0 14px rgba(155, 61, 240, 0.55); }
.catalog-sub { margin-top: 12px; font-size: 0.8rem; font-weight: 500; color: var(--white); opacity: 0.9; }

.cards { display: flex; flex-direction: column; gap: 13px; }
.card {
  position: relative; padding: 16px 16px 16px 19px;
  border-radius: var(--radius);
  border: 1px solid rgba(155, 61, 240, 0.28);
  background: rgba(17, 16, 42, 0.8);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 3px; background: var(--gradient-brand); opacity: 0.95; }
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.card__icon {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: rgba(155, 61, 240, 0.16); color: var(--blue);
  transition: background-color 250ms ease, color 250ms ease;
}
.card__icon svg { width: 22px; height: 22px; }
.card__title { font-family: "Orbitron", sans-serif; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--white); line-height: 1.3; }
.card__text { font-size: 0.85rem; font-weight: 500; line-height: 1.55; color: var(--white); opacity: 0.92; margin-bottom: 8px; }
.card__list { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; }
.card__list li {
  padding: 6px 11px; border-radius: 99px;
  border: 1px solid rgba(182, 186, 205, 0.16);
  background: rgba(155, 61, 240, 0.1);
  font-size: 0.76rem; font-weight: 600; color: var(--white); line-height: 1.2;
  transition: border-color 250ms ease, color 250ms ease, background-color 250ms ease;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); border-color: rgba(155, 61, 240, 0.8); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45); }
  .card:hover .card__icon { background: var(--gradient-brand); color: var(--white); }
  .card:hover .card__list li { border-color: rgba(155, 61, 240, 0.4); color: var(--white); }
}

.btn--cta-final { margin-top: 22px; }

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 374px) {
  .view__inner { padding-left: 16px; padding-right: 16px; }
  .avatar { width: 92px; height: 92px; }
  .btn { min-height: 56px; padding: 10px 12px; gap: 11px; }
  .btn--whatsapp { min-height: 64px; }
  .btn__title { font-size: 0.88rem; }
  .btn__sub { font-size: 0.66rem; }
}
@media (min-width: 414px) {
  .view__inner { padding-left: 24px; padding-right: 24px; }
  .btn { min-height: 62px; }
}
@media (min-width: 768px) {
  .app { max-width: 480px; }
  .view__inner { padding-top: calc(48px + env(safe-area-inset-top, 0px)); padding-bottom: calc(38px + env(safe-area-inset-bottom, 0px)); }
  .avatar { width: 112px; height: 112px; }
  .brand { font-size: 1.65rem; }
  .tagline { font-size: 0.98rem; }
  .btn { min-height: 64px; }
  .btn--whatsapp { min-height: 72px; }
}
@media (min-width: 1024px) {
  body { background-color: #050410; }
  .app {
    top: 50%; bottom: auto; height: min(880px, 92vh); transform: translateY(-50%);
    border-radius: 26px; overflow: hidden;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(155, 61, 240, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}
@media (min-width: 1440px) { .app { height: min(920px, 92vh); } }

/* ============================================================
   ACCESIBILIDAD · MOVIMIENTO REDUCIDO
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
