/* ─────────────────────────────────────────────────────────────────────────
   HubPal — Landing page (app.hubpal.cloud)
   Paleta corporativa HubPal: navy / orange / lilac
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --navy:        #0d3c6e;
  --navy-dark:   #082a52;
  --navy-deep:   #051a36;
  --navy-light:  #1a5598;
  --orange:      #f07a1f;
  --orange-dark: #d96710;
  --orange-soft: #fde2cc;
  --lilac:       #6e3c9c;
  --lilac-light: #9166bf;
  --lilac-soft:  #ece3f7;

  --bg:        #f4f6fa;
  --surface:   #ffffff;
  --border:    #e3e8ef;
  --text:      #1a2231;
  --text-soft: #5a6478;
  --text-mute: #8a93a6;
  --ok:        #21a36b;

  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 1px 2px rgba(13, 60, 110, 0.06), 0 4px 12px rgba(13, 60, 110, 0.06);
  --shadow-lg: 0 8px 24px rgba(13, 60, 110, 0.12);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }

/* ── Botones ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; transition: all .18s ease;
  white-space: nowrap;
}
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.btn-accent {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(240, 122, 31, .35);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(240, 122, 31, .45); }

.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--bg); }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { border-radius: 9px; box-shadow: 0 2px 6px rgba(13,60,110,.25); }
.brand-word {
  font-weight: 800; font-size: 20px; letter-spacing: -.3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 35%, var(--orange) 70%, var(--lilac) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.brand.small .brand-word { font-size: 17px; }

.main-nav { display: flex; gap: 26px; }
.main-nav a {
  color: var(--text-soft); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: color .15s;
}
.main-nav a:hover { color: var(--navy); }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 55%, var(--navy-deep) 100%);
  color: #fff;
  padding: 84px 0 110px;
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(240,122,31,.16) 0, transparent 42%),
    radial-gradient(circle at 85% 20%, rgba(145,102,191,.2) 0, transparent 45%),
    radial-gradient(circle at 70% 90%, rgba(26,85,152,.35) 0, transparent 50%);
}
.hero-inner {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px;
}
.eyebrow.light { color: #f6a05e; }
.hero h1 {
  font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 800; letter-spacing: -1px;
}
.brand-gradient {
  background: linear-gradient(90deg, #6fa8ff 0%, var(--orange) 45%, var(--lilac-light) 90%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: 220% center; } }

.hero-sub {
  margin: 20px 0 30px; font-size: 17px; color: #c7d4e6; max-width: 54ch;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-ctas.center { justify-content: center; }

.hero-trust {
  display: flex; gap: 22px; flex-wrap: wrap;
  list-style: none; padding: 0; margin: 30px 0 0;
  font-size: 13.5px; color: #9db4d1;
}
.hero-trust li { display: flex; align-items: center; gap: 7px; }
.hero-trust li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); flex-shrink: 0;
}

.hero-visual { position: relative; }
.mockup { width: 100%; height: auto; display: block; }

.chip {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: #fff; color: var(--text);
  font-size: 12.5px; font-weight: 600;
  padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 12px 30px rgba(4, 18, 42, .35);
  animation: float 5s ease-in-out infinite;
}
.chip-a { top: 6%; right: -2%; }
.chip-b { bottom: 4%; left: -3%; animation-delay: 2.2s; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot.ok { background: var(--ok); }
.dot.orange { background: var(--orange); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ── Secciones ───────────────────────────────────────────────────────── */
.section { padding: 96px 0; }
.section-alt { background: var(--bg); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.6px; }
.section-head p { margin-top: 14px; color: var(--text-soft); font-size: 16px; }

.grid { display: grid; gap: 22px; }
.features { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 16.5px; font-weight: 700; margin: 16px 0 8px; }
.card p { font-size: 14px; color: var(--text-soft); }

.card-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
}
.card-icon svg { width: 23px; height: 23px; }
.icon-navy   { background: #e5edf7; color: var(--navy); }
.icon-orange { background: var(--orange-soft); color: var(--orange-dark); }
.icon-lilac  { background: var(--lilac-soft); color: var(--lilac); }

/* ── Split (conectores / espacios) ───────────────────────────────────── */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.split-copy h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.6px; }
.split-copy p { margin: 16px 0 8px; color: var(--text-soft); font-size: 16px; }
.split-copy .btn { margin-top: 22px; }
.split-reverse .split-copy { order: 1; }
.split-reverse .split-visual { order: 0; }

.check-list { list-style: none; padding: 0; margin: 20px 0 0; }
.check-list li {
  position: relative; padding: 8px 0 8px 34px;
  font-size: 15px; color: var(--text);
}
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--orange-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d96710' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}

.hub-svg { width: 100%; height: auto; }
.pulse { transform-origin: 240px 200px; animation: pulse 3.5s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Tenant cards */
.tenant-stack { display: flex; flex-direction: column; gap: 18px; padding: 12px; }
.tenant-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 24px;
  box-shadow: var(--shadow-lg);
  font-size: 15px;
}
.tenant-card.t1 { transform: translateX(-16px) rotate(-1deg); }
.tenant-card.t2 { transform: translateX(22px) rotate(1deg); }
.tenant-card.t3 {
  transform: translateX(-6px);
  border: 2px solid var(--orange);
  box-shadow: 0 14px 36px rgba(240, 122, 31, .22);
}
.tenant-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.tenant-url { font-weight: 700; color: var(--navy); font-family: 'SF Mono', Menlo, monospace; font-size: 13.5px; }
.tenant-badge {
  margin-left: auto; font-size: 11.5px; font-weight: 600;
  color: var(--text-mute); background: var(--bg);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}

/* ── Seguridad ───────────────────────────────────────────────────────── */
.section-dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 60%, var(--navy-deep) 100%);
  color: #fff;
}
.section-dark .section-head h2 { color: #fff; }
.security-grid { grid-template-columns: repeat(4, 1fr); }
.sec-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg); padding: 26px 24px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .2s ease, transform .2s ease;
}
.sec-card:hover { background: rgba(255,255,255,.1); transform: translateY(-4px); }
.sec-card svg { width: 30px; height: 30px; color: var(--orange); }
.sec-card h3 { font-size: 16px; font-weight: 700; margin: 14px 0 8px; }
.sec-card p { font-size: 13.5px; color: #b6c6dc; }

/* ── CTA ─────────────────────────────────────────────────────────────── */
.cta { text-align: center; background: var(--bg); }
.cta h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.6px; }
.cta p { margin: 14px auto 30px; color: var(--text-soft); font-size: 16.5px; max-width: 52ch; }
.cta .btn-outline { color: var(--navy); border-color: var(--navy); }
.cta .btn-outline:hover { background: var(--navy); color: #fff; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.site-footer p { font-size: 13px; color: var(--text-mute); }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(5, 26, 54, .65);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 420px;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 36px 36px 28px; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  animation: modal-in .25s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  border: none; background: none; cursor: pointer;
  font-size: 15px; color: var(--text-mute);
  padding: 6px 9px; border-radius: 8px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.login-brand { display: flex; justify-content: center; margin-bottom: 14px; }
.login-brand svg { border-radius: 11px; box-shadow: 0 4px 12px rgba(13,60,110,.3); }
.modal h3 { font-size: 20px; font-weight: 800; color: var(--navy); }
.modal p { font-size: 14px; color: var(--text-soft); margin: 8px 0 20px; }

.ws-input {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.ws-input:focus-within {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26, 85, 152, .15);
}
.ws-input input {
  flex: 1; min-width: 0; border: none; outline: none;
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 4px 12px 16px; color: var(--navy);
}
.ws-suffix {
  font-size: 14px; color: var(--text-mute); font-weight: 500;
  padding: 12px 16px 12px 2px; background: #fff;
}
.modal-foot { font-size: 12.5px !important; margin: 16px 0 0 !important; }
.modal-foot a { color: var(--navy); font-weight: 600; }

/* ── Formulario de contacto ──────────────────────────────────────────── */
.modal-wide { max-width: 560px; text-align: left; }
.modal-wide h3 { text-align: center; }
.modal-wide > div > p { text-align: center; }

.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cf-field label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-mute);
}
.cf-field input, .cf-field textarea {
  font: inherit; font-size: 15px;
  padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.cf-field input:focus, .cf-field textarea:focus {
  outline: none; border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26, 85, 152, .15);
}

/* Honeypot: fuera de pantalla, invisible para humanos */
.cf-hp { position: absolute; left: -9999px; top: -9999px; }

.cf-consent {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12.5px; color: var(--text-soft);
  margin: 4px 0 16px; cursor: pointer;
}
.cf-consent input { margin-top: 2px; accent-color: var(--navy); }

.cf-error {
  background: #fdeaea; color: #a32626;
  border: 1px solid #f3c2c2; border-radius: 10px;
  font-size: 13.5px; padding: 10px 14px; margin-bottom: 14px;
}
.cf-error a { color: #a32626; font-weight: 700; }

#contact-success { text-align: center; padding: 12px 0 4px; }
#contact-success p { margin: 8px 0 22px; }
.cf-success-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%; display: grid; place-items: center;
  background: #e2f5ec; color: var(--ok);
}
.cf-success-icon svg { width: 32px; height: 32px; }

.link-btn {
  border: none; background: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--navy); font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
}

@media (max-width: 560px) {
  .cf-row { grid-template-columns: 1fr; gap: 0; }
}

/* ── Animaciones de scroll ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .15s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .chip, .pulse, .brand-gradient { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features, .security-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .split { grid-template-columns: 1fr; gap: 48px; }
  .split-reverse .split-copy { order: 0; }
  .split-reverse .split-visual { order: 1; }
  .main-nav { display: none; }
}
@media (max-width: 560px) {
  .features, .security-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 72px; }
  .section { padding: 64px 0; }
  .chip-a { right: 0; } .chip-b { left: 0; }
  .hide-sm { display: none; }
  .modal { padding: 28px 22px 22px; }
}
