/* ==========================================================================
   Konekta — Estilo principal (clon de konektamex.com)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Colores de marca */
  --c-primary:      #5b39c9;   /* púrpura tema */
  --c-primary-dark: #432a9c;
  --c-accent:       #f77ade;   /* rosa-violeta */
  --c-orange:       #ffa21d;   /* naranja acento */

  /* Texto */
  --c-ink:   #36324a;
  --c-body:  #6f6c7f;
  --c-muted: #979caf;

  /* Superficies */
  --c-bg:      #ffffff;
  --c-bg-soft: #f7f6f9;
  --c-border:  #e2e6fb;
  --c-footer:  #211b45;
  --c-footer-2:#1a1538;

  /* Tipografía */
  --ff: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radios / sombras */
  --radius:      14px;
  --radius-pill: 50px;
  --shadow-sm: 0 6px 24px rgba(54, 50, 74, .06);
  --shadow-md: 0 18px 50px rgba(91, 57, 201, .10);

  /* Layout */
  --container: 1200px;
  --section-y: 96px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-body);
  background: var(--c-bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--c-accent); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h5 { color: var(--c-ink); font-weight: 600; line-height: 1.2; margin: 0; }
p { margin: 0 0 1rem; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-y) 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 16px; }
.section-head p { font-size: 1.02rem; color: var(--c-body); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff); font-size: .98rem; font-weight: 500;
  padding: 14px 32px; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: all .25s ease; white-space: nowrap;
}
.btn-primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.btn-outline { background: transparent; border-color: var(--c-primary); color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-white { background: #fff; color: var(--c-primary); }
.btn-white:hover { background: var(--c-ink); color: #fff; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0);
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 24px rgba(54, 50, 74, .08);
  padding: 12px 0;
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 24px; }
.logo { flex-shrink: 0; }
.logo img { height: 44px; width: auto; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 14px; }
.main-nav a {
  color: var(--c-ink); font-size: .9rem; font-weight: 500; position: relative; padding: 4px 0;
  white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--c-accent); transition: width .25s ease;
}
.main-nav a:hover { color: var(--c-accent); }
.main-nav a:hover::after { width: 100%; }

.header-cta { margin-left: 8px; padding: 11px 26px; }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  background: transparent; border: 0; cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; width: 22px; height: 2px; background: var(--c-ink);
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  padding: 160px 0 90px;
  background:
    radial-gradient(1100px 600px at 85% 0%, rgba(247, 122, 222, .14), transparent 60%),
    radial-gradient(900px 500px at 10% 20%, rgba(91, 57, 201, .10), transparent 55%),
    var(--c-bg);
}
.hero-inner { position: relative; z-index: 2; display: flex; align-items: center; gap: 40px; }
.hero-text { flex: 1 1 52%; }
.hero-title {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  font-weight: 600; line-height: 1.18; margin-bottom: 22px; color: var(--c-ink);
}
.hero-desc { font-size: 1.05rem; margin-bottom: 22px; max-width: 540px; }

.aviso {
  background: #fff7ed; border: 1px solid #fde4c6;
  border-left: 4px solid var(--c-orange);
  padding: 14px 18px; border-radius: 10px; margin-bottom: 28px;
  font-size: .94rem; color: #8a5a16; max-width: 560px;
}
.aviso strong { color: #b45309; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-image { flex: 1 1 42%; display: flex; justify-content: center; position: relative; }
.hero-phone {
  width: 100%; max-width: 380px; height: auto;
  filter: drop-shadow(0 30px 50px rgba(91, 57, 201, .25));
  animation: floaty 2.4s ease-in-out infinite alternate;
}
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-18px); } }

/* Formas decorativas */
.hero-shape { position: absolute; z-index: 1; opacity: .9; pointer-events: none; }
.shape-1 { top: 18%;  left: 4%;  width: 46px; animation: spin 16s linear infinite; }
.shape-2 { top: 26%;  right: 8%; width: 50px; animation: floaty 3s ease-in-out infinite alternate; }
.shape-3 { top: 60%;  left: 8%;  width: 40px; animation: floaty 3.4s ease-in-out infinite alternate; }
.shape-4 { bottom: 14%; right: 14%; width: 44px; animation: spin 20s linear infinite reverse; }
.shape-5 { top: 12%;  right: 30%; width: 38px; opacity: .7; animation: floaty 4s ease-in-out infinite alternate; }
.shape-6 { bottom: 24%; left: 26%; width: 42px; opacity: .75; animation: spin 22s linear infinite; }
.shape-7 { top: 44%;  right: 4%;  width: 40px; opacity: .8; animation: floaty 3.6s ease-in-out infinite alternate; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { background: var(--c-bg); }
.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.about-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 38px 26px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.about-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.about-card__icon {
  width: 86px; height: 86px; margin: 0 auto 22px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(91,57,201,.12), rgba(247,122,222,.14));
  border-radius: 50%;
}
.about-card__icon img { width: 44px; height: 44px; }
.about-card__title { font-size: 1.06rem; margin-bottom: 12px; }
.about-card__text { font-size: .92rem; color: var(--c-body); margin: 0; }

/* ==========================================================================
   FEATURE rows
   ========================================================================== */
.feature { background: var(--c-bg); }
.feature--soft { background: var(--c-bg-soft); }
.feature-inner { display: flex; align-items: center; gap: 60px; }
.feature-media { flex: 1 1 48%; }
.feature-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.feature-content { flex: 1 1 48%; }
.feature-content__icon {
  width: 70px; height: 70px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(91,57,201,.12), rgba(247,122,222,.14)); border-radius: 18px;
}
.feature-content__icon img { width: 40px; height: 40px; }
.feature-content__title {
  font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 16px; line-height: 1.25;
}
.feature-content__text { font-size: 1rem; }

.feature--reverse .feature-media { order: 2; }
.feature--reverse .feature-content { order: 1; }

/* ==========================================================================
   SCREENSHOTS / carousel
   ========================================================================== */
.screenshots { background: var(--c-bg); }
.carousel { position: relative; margin-top: 10px; }
.carousel-viewport { overflow: hidden; padding: 14px 6px; }
.carousel-track { display: flex; transition: transform .5s cubic-bezier(.22,.61,.36,1); }
.carousel-slide {
  flex: 0 0 33.3333%; padding: 0 12px; cursor: pointer;
}
.carousel-slide img {
  width: 100%; border-radius: 18px;
  box-shadow: 0 18px 40px rgba(54, 50, 74, .14);
  transition: transform .3s ease;
}
.carousel-slide:hover img { transform: scale(1.02); }

.carousel-btn {
  position: absolute; top: 42%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: #fff; border: 1px solid var(--c-border); color: var(--c-primary);
  font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 5;
  box-shadow: var(--shadow-sm); transition: all .2s ease;
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.carousel-btn:disabled { opacity: .35; cursor: not-allowed; }
.carousel-btn--prev { left: -18px; }
.carousel-btn--next { right: -18px; }

.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%; padding: 0;
  background: #d8d3ea; border: 0; cursor: pointer; transition: all .25s ease;
}
.carousel-dot.active { background: var(--c-primary); width: 26px; border-radius: 50px; }

/* ==========================================================================
   DOWNLOAD
   ========================================================================== */
.download {
  position: relative;
  background:
    radial-gradient(800px 400px at 80% 120%, rgba(247, 122, 222, .35), transparent 60%),
    linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff; padding: 90px 0; text-align: center; overflow: hidden;
}
.download-inner { position: relative; z-index: 2; }
.download-content { max-width: 720px; margin: 0 auto; }
.download-title { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 18px; }
.download-desc { color: rgba(255, 255, 255, .9); font-size: 1.05rem; margin-bottom: 30px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { position: relative; background: var(--c-footer); color: #cfd0e6; }
.footer-bg {
  width: 100%; height: auto; display: block;
  margin-top: -1px; /* une con la sección anterior */
  background: var(--c-footer);
}
.footer-inner { padding: 70px 24px 30px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.footer-logo { height: 50px; margin-bottom: 20px; }
.footer-brand .footer-desc { font-size: .94rem; color: #b6b8d4; max-width: 380px; }

.footer-col h5 { color: #fff; font-size: 1rem; margin-bottom: 22px; font-weight: 600; }
.footer-contact li, .footer-links li { margin-bottom: 12px; font-size: .92rem; }
.footer-contact a { color: #cfd0e6; }
.footer-contact a:hover, .footer-links a:hover { color: var(--c-accent); }
.footer-links a { color: #cfd0e6; }
.fc-label { color: #9a9cc0; }

.footer-legal { padding: 30px 0; font-size: .8rem; color: #8e90b3; line-height: 1.7; }
.footer-legal p { margin-bottom: 12px; }
.footer-legal a { color: #b6b8d4; text-decoration: underline; }

.footer-copy {
  padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .85rem; color: #8e90b3; text-align: center;
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 16, 40, .92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-img { max-width: 80vw; max-height: 84vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255, 255, 255, .12); color: #fff;
  border: 0; border-radius: 50%; cursor: pointer; transition: background .2s ease;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close { top: 26px; right: 26px; width: 48px; height: 48px; font-size: 1.8rem; }
.lightbox-nav  { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 2.2rem; }
.lightbox-prev { left: 26px; }
.lightbox-next { right: 26px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--c-accent); }

/* ==========================================================================
   SECURITY ALERT BANNER
   ========================================================================== */
.sec-alert {
  position: relative; z-index: 3;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  color: #fff; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(229, 57, 53, .28);
  animation: alertIn .5s ease both;
}
@keyframes alertIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.sec-alert__inner { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.sec-alert__icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.sec-alert__text { margin: 0; flex: 1; font-size: .92rem; line-height: 1.5; color: #fff; }
.sec-alert__text strong { color: #fff; }
.sec-alert__link {
  flex-shrink: 0; color: #fff; font-weight: 600; font-size: .9rem;
  text-decoration: underline; white-space: nowrap;
}
.sec-alert__link:hover { color: #ffe082; }
.sec-alert__close {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .2); border: 0; color: #fff;
  font-size: 1.2rem; line-height: 1; cursor: pointer; transition: background .2s ease;
}
.sec-alert__close:hover { background: rgba(255, 255, 255, .35); }
.sec-alert.closed { display: none; }

.main-nav a.nav-alert { color: #e53935; font-weight: 600; }
.main-nav a.nav-alert:hover { color: #c62828; }
.main-nav a.nav-alert::after { background: #e53935; }

@media (max-width: 600px) {
  .sec-alert__inner { flex-wrap: wrap; padding: 12px 14px; }
  .sec-alert__icon { order: 1; }
  .sec-alert__close { order: 2; margin-left: auto; }
  .sec-alert__text { flex: 1 1 100%; order: 3; font-size: .88rem; }
  .sec-alert__link { order: 4; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1199px) {
  /* Menú en cajón: con 6 elementos largos en español el menú horizontal no
     cabe por debajo de 1200px, así que pasamos al cajón hamburguesa. */
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .main-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78%, 320px);
    background: #fff; box-shadow: -10px 0 40px rgba(54,50,74,.16);
    padding: 90px 28px 28px; transform: translateX(100%);
    transition: transform .32s ease; margin-left: 0;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--c-border); }
  .main-nav a { display: block; padding: 16px 4px; font-size: 1.05rem; }
  .main-nav a::after { display: none; }
}

@media (max-width: 991px) {
  :root { --section-y: 72px; }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-inner { gap: 36px; }
  .carousel-slide { flex: 0 0 50%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  :root { --section-y: 60px; }

  /* Hero apilado */
  .hero { padding: 130px 0 60px; text-align: center; }
  .hero-inner { flex-direction: column-reverse; gap: 30px; }
  .hero-desc, .aviso { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-phone { max-width: 260px; }

  /* About 1 col */
  .about-grid { grid-template-columns: 1fr; }
  .about-card { padding: 30px 22px; }

  /* Feature apilado */
  .feature-inner { flex-direction: column; gap: 28px; }
  .feature--reverse .feature-media,
  .feature--reverse .feature-content { order: initial; }
  .feature-content { text-align: center; }
  .feature-content__icon { margin-left: auto; margin-right: auto; }

  /* Carousel 1 a la vez */
  .carousel-slide { flex: 0 0 78%; }
  .carousel-btn--prev { left: 4px; }
  .carousel-btn--next { right: 4px; }

  .download { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { grid-column: auto; }
  .footer-inner { padding: 50px 24px 26px; }

  .lightbox-close { top: 14px; right: 14px; width: 40px; height: 40px; }
  .lightbox-nav { width: 44px; height: 44px; font-size: 1.8rem; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

@media (max-width: 380px) {
  .hero-actions .btn { width: 100%; }
}
