/* ============================================================
   KETSALE — main.css
   Variables globales, reset, navbar, footer, componentes
   compartidos en todas las páginas.
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Paleta principal */
  --bg:            #06060f;
  --bg-alt:        #0a0a18;
  --surface:       #0e0e1f;
  --surface-2:     #14142a;
  --primary:       #7c3aed;
  --primary-dim:   #6d28d9;
  --primary-glow:  rgba(124, 58, 237, 0.25);
  --accent:        #10ffb1;
  --accent-dim:    #00d991;
  --accent-glow:   rgba(16, 255, 177, 0.2);
  --text:          #f0f0ff;
  --text-gray:     #8b8ba7;
  --text-muted:    #5a5a78;
  --border:        rgba(124, 58, 237, 0.18);
  --border-light:  rgba(255, 255, 255, 0.06);
  --shadow:        0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow:   0 20px 60px rgba(124, 58, 237, 0.2);
  --radius:        10px;
  --radius-lg:     18px;
  --radius-xl:     28px;
  --transition:    0.25s ease;
}

/* Light mode override */
[data-theme="light"] {
  --bg:           #f4f3ff;
  --bg-alt:       #ede9fe;
  --surface:      #ffffff;
  --surface-2:    #f8f7ff;
  --text:         #1a0a3d;
  --text-gray:    #6b7280;
  --text-muted:   #9ca3af;
  --border:       rgba(124, 58, 237, 0.15);
  --border-light: rgba(0, 0, 0, 0.06);
  --shadow:       0 20px 60px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

::selection { background: var(--primary); color: #fff; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* ── Utilidades globales ───────────────────────────────────── */
.container {
  width: min(92%, 1200px);
  margin-inline: auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary-dim);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--primary-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid var(--border-light);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #06060f;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }

/* ── Glassmorphism card ─────────────────────────────────────── */
.glass-card {
  background: rgba(14, 14, 31, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.glass-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.85);
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--transition), box-shadow var(--transition),
              padding var(--transition), transform var(--transition);
}

.navbar.scrolled {
  background: rgba(6, 6, 15, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 var(--border);
  padding: 12px 0;
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(244, 243, 255, 0.92);
}

.navbar.hidden {
  transform: translateY(-100%);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  font-weight: 900;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-gray);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(124, 58, 237, 0.1);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-gray);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition);
}

.nav-theme-btn:hover { color: var(--text); border-color: var(--border); }

.nav-cta {
  padding: 9px 22px;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--transition);
}

.nav-toggle:hover { background: var(--surface); }

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: left;
}

.nav-toggle span:nth-child(2) { width: 70%; }

.nav-toggle.open span:nth-child(1) { transform: rotate(40deg) translateY(-1px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-40deg) translateY(1px); }

/* Mobile nav */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100dvh;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 28px 40px;
    gap: 4px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
    z-index: 999;
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    width: 100%;
    font-size: 1rem;
    padding: 12px 16px;
  }

  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* Nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.nav-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── PAGE HERO ──────────────────────────────────────────────── */
.page-hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-content { text-align: center; }

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 24px;
}

.breadcrumb a { color: var(--text-gray); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text); }

.page-hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-hero-desc {
  font-size: 1.1rem;
  color: var(--text-gray);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  padding: 80px 0 32px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand .nav-logo { margin-bottom: 20px; font-size: 1.2rem; }

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.8;
  margin-bottom: 24px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  font-size: 0.9rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.footer-social-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.footer-col h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--text-gray);
  transition: color var(--transition), padding-left var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text-gray);
}

.footer-contact-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom a { color: var(--accent); }

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-bottom-links a:hover { color: var(--text); }

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── WHATSAPP FLOAT ─────────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 990;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  padding: 12px 20px 12px 14px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.55);
}

.whatsapp-icon { width: 24px; height: 24px; flex-shrink: 0; }

@media (max-width: 480px) {
  .whatsapp-float { bottom: 20px; right: 20px; }
  .whatsapp-btn span { display: none; }
  .whatsapp-btn { padding: 13px; border-radius: 50%; }
}

/* ── BACK TO TOP ────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 980;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), border-color var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 480px) {
  .back-to-top { bottom: 84px; right: 20px; }
}

/* ── COOKIE BANNER ──────────────────────────────────────────── */
#cookieBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(14, 14, 31, 0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 9999;
  animation: cookieUp 0.4s ease 1.5s both;
}

@keyframes cookieUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

#cookieBanner.hiding {
  animation: cookieDown 0.35s ease forwards;
}

@keyframes cookieDown {
  to { transform: translateY(100%); }
}

.cookie-text {
  color: var(--text-gray);
  font-size: 0.875rem;
  margin: 0;
  flex: 1;
}

.cookie-text a { color: var(--accent); text-decoration: underline; }

.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-btn {
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
}

.cookie-btn:hover { opacity: 0.85; }
.cookie-btn-accept { background: var(--primary); color: #fff; }
.cookie-btn-reject {
  background: transparent;
  color: var(--text-gray);
  border: 1px solid var(--border);
}

@media (max-width: 600px) {
  #cookieBanner { flex-direction: column; text-align: center; }
  .cookie-actions { width: 100%; justify-content: center; }
}

/* ── TOAST ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-light);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  pointer-events: all;
  white-space: nowrap;
}

.toast.success { border-left: 4px solid #22c55e; }
.toast.error   { border-left: 4px solid #ef4444; }
.toast.info    { border-left: 4px solid var(--primary); }
.toast.hiding  { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateY(12px); } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(12px); } }

/* ── SCROLL PROGRESS ────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9998;
  transition: width 0.08s linear;
}

/* ── SECTION padding ────────────────────────────────────────── */
.section { padding-block: clamp(60px, 10vw, 100px); }
.section-sm { padding-block: clamp(40px, 6vw, 60px); }

/* ── CTA BAND ───────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dim) 0%, #4c1d95 50%, var(--bg-alt) 100%);
  border-radius: var(--radius-xl);
  padding: 70px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.cta-band-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.cta-band-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 36px;
  max-width: 500px;
  margin-inline: auto;
}

.cta-band-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 600px) {
  .cta-band { padding: 50px 28px; }
}
