/* ===== RESET ================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #07060b;
  --bg-alt:    #0e0d14;
  --bg-card:   #13121a;
  --bg-card-2: #1a1825;
  --text:      #f0eef5;
  --text-2:    #a8a4b4;
  --muted:     #6b6780;
  --accent:    #2563eb;
  --accent-2:  #10b981;
  --accent-3:  #0ea5e9;
  --border:    #1f1d2b;
  --border-2:  #2a2838;
  --radius:    12px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

html  { scroll-behavior: smooth; }
body  {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
}

/* ===== TYPOGRAPHY ============================================================ */
h1, h2, h3 { line-height: 1.15; font-weight: 800; color: var(--text); }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.025em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { color: var(--text-2); }

/* ===== LAYOUT ================================================================ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
section    { padding: 100px 0; }
.bg-alt    { background: var(--bg-alt); }

/* ===== NAV =================================================================== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0; transition: all 0.3s ease;
  background: rgba(7,6,11,0.7); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
nav.scrolled {
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  background: rgba(7,6,11,0.92);
}
nav .inner { display: flex; align-items: center; justify-content: space-between; }

.logo {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px;
  text-decoration: none; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.logo-icon { flex-shrink: 0; }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .88rem;
  font-weight: 500; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent); color: #fff;
  padding: 9px 22px; border-radius: 8px; font-size: .85rem;
  font-weight: 600; text-decoration: none; transition: all .2s;
}
.nav-cta:hover { background: #1d4ed8; transform: translateY(-1px); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; border: none; background: none; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; display: block; transition: .3s; }

.mobile-menu {
  display: none; flex-direction: column; gap: 16px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 24px 28px; position: fixed; top: 52px; left: 0; right: 0; z-index: 99;
}
.mobile-menu a { color: var(--text-2); text-decoration: none; font-size: .95rem; font-weight: 500; }
.mobile-menu.open { display: flex; }
.nav-cta-mobile {
  background: var(--accent); color: #fff; text-align: center;
  padding: 12px; border-radius: 8px; font-weight: 600;
}

/* ===== HERO ================================================================== */
#hero {
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; top: -250px; right: -150px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, rgba(37,99,235,0.04) 40%, transparent 70%);
  pointer-events: none;
  animation: float 12s ease-in-out infinite;
}
#hero::after {
  content: '';
  position: absolute; top: 80px; left: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(16,185,129,0.10) 0%, rgba(16,185,129,0.03) 40%, transparent 70%);
  pointer-events: none;
  animation: float-reverse 14s ease-in-out infinite;
}
.hero-orb-3 {
  position: absolute; bottom: -100px; right: 20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(14,165,233,0.08) 0%, transparent 70%);
  pointer-events: none; border-radius: 50%;
  animation: pulse-glow 10s ease-in-out infinite;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
}

.hero-content { max-width: 720px; position: relative; z-index: 1; }
.hero-kicker {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content h1 {
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--text) 60%, var(--text-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; line-height: 1.8; margin-bottom: 40px; max-width: 580px;
  color: var(--text-2);
}

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

.btn-primary {
  background: var(--accent); color: #fff;
  padding: 14px 30px; border-radius: 10px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: all .25s ease;
  display: inline-block;
  box-shadow: 0 0 24px rgba(37,99,235,0.25);
}
.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 32px rgba(37,99,235,0.35);
}

.btn-ghost {
  background: transparent; color: var(--text-2);
  padding: 14px 30px; border-radius: 10px;
  border: 1px solid var(--border-2);
  font-weight: 500; font-size: .95rem; text-decoration: none;
  transition: all .25s ease;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }

/* ===== SECTION INTRO ========================================================= */
.section-intro { max-width: 600px; margin-bottom: 52px; }
.section-intro h2 { margin-bottom: 14px; }
.section-intro p { font-size: 1.05rem; }

/* ===== QUÉ HACEMOS (two col) ================================================ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.col-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px;
  transition: border-color .4s ease, box-shadow .4s ease, transform .4s ease;
  position: relative;
}
.col-card:hover {
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 20px rgba(37,99,235,0.05);
  transform: translateY(-3px);
}

.col-label {
  display: inline-block; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.col-card h3 { margin-bottom: 14px; font-size: 1.2rem; }
.col-card p  { font-size: .92rem; margin-bottom: 24px; line-height: 1.7; }

.check-list {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.check-list li {
  font-size: .88rem; color: var(--text-2); padding-left: 24px;
  position: relative;
}
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 12px; height: 6px; border-left: 2px solid var(--accent-2);
  border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg);
}

/* ===== PROCESO (merged with problems) ======================================= */
.process-steps { max-width: 660px; position: relative; }
.process-steps::before {
  content: '';
  position: absolute; left: 15px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
  opacity: 0.3;
}

.p-step { display: flex; gap: 28px; margin-bottom: 44px; position: relative; }
.p-step:last-child { margin-bottom: 0; }
.p-num {
  flex-shrink: 0; font-size: .82rem; font-weight: 800;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(16,185,129,0.1));
  border: 1px solid rgba(37,99,235,0.2);
  color: var(--accent);
  transition: all .3s ease;
}
.p-step:hover .p-num {
  background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(16,185,129,0.2));
  border-color: rgba(37,99,235,0.4);
  box-shadow: 0 0 16px rgba(37,99,235,0.15);
}
.p-body h3 { margin-bottom: 8px; }
.p-body p  { font-size: .92rem; line-height: 1.7; }

/* Pain points inline (in proceso section) ------------------------------------ */
.pain-points-block {
  margin-bottom: 64px;
}
.pain-points-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--muted);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.pain-points-label::before {
  content: '';
  display: inline-block; width: 20px; height: 1px;
  background: var(--muted);
}
.pain-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pain-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.14);
  color: #fca5a5;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .8rem;
  transition: background .3s ease, border-color .3s ease;
}
.pain-tag:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.25);
}
.pain-tag svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ===== FAQ =================================================================== */
.faq-list {
  max-width: 660px; display: flex; flex-direction: column; gap: 10px;
}
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all .3s ease;
  background: var(--bg-card);
}
.faq-item:hover { border-color: var(--border-2); }
.faq-item[open] {
  border-color: rgba(37,99,235,0.3);
  box-shadow: 0 0 16px rgba(37,99,235,0.06);
}
.faq-item summary {
  padding: 18px 22px; cursor: pointer; font-weight: 600;
  font-size: .92rem; color: var(--text); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 1.2rem; font-weight: 400; color: var(--muted);
  transition: transform .2s, color .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-item p { padding: 0 22px 18px; font-size: .9rem; line-height: 1.65; }

/* ===== CONTACT =============================================================== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start;
}
.contact-info h2 { margin-bottom: 16px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.contact-info > p { margin-bottom: 36px; font-size: .98rem; line-height: 1.75; }
.contact-points { display: flex; flex-direction: column; gap: 20px; }
.cp {
  padding-left: 16px;
  border-left: 2px solid var(--border-2);
  transition: border-color .2s;
}
.cp:hover { border-left-color: var(--accent-2); }
.cp strong { display: block; font-size: .9rem; color: var(--text); font-weight: 600; }
.cp span   { font-size: .84rem; color: var(--muted); }

.form-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }

.field label {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.field label .req { color: var(--accent); }
.field label .optional { font-weight: 400; text-transform: none; letter-spacing: 0; }

.field input,
.field select,
.field textarea {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: var(--font); font-size: .92rem;
  padding: 12px 16px; outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%236b6780'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field textarea { resize: vertical; min-height: 100px; }

.btn-submit {
  width: 100%; margin-top: 8px;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 14px; font-size: .95rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .25s ease;
  box-shadow: 0 0 20px rgba(37,99,235,0.2);
}
.btn-submit:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 4px 28px rgba(37,99,235,0.3);
  transform: translateY(-1px);
}
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }

.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-message { border-radius: 10px; padding: 18px 22px; font-size: .92rem; }
.form-message.success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }
.form-message.error   { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #fca5a5; }
.form-message p:first-child { font-weight: 700; margin-bottom: 4px; color: inherit; }
.form-message p:last-child  { font-size: .86rem; color: inherit; opacity: .8; }

/* ===== ANIMATION ============================================================= */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s cubic-bezier(0.16, 1, 0.3, 1), transform .7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.process-steps .p-step {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s cubic-bezier(0.16, 1, 0.3, 1), transform .6s cubic-bezier(0.16, 1, 0.3, 1);
}
.process-steps.visible .p-step { opacity: 1; transform: translateY(0); }
.process-steps.visible .p-step:nth-child(1) { transition-delay: 0s; }
.process-steps.visible .p-step:nth-child(2) { transition-delay: .1s; }
.process-steps.visible .p-step:nth-child(3) { transition-delay: .2s; }
.process-steps.visible .p-step:nth-child(4) { transition-delay: .3s; }

.pain-tags .pain-tag {
  opacity: 0; transform: translateY(8px) scale(0.95);
  transition: opacity .4s ease, transform .4s ease, background .3s ease, border-color .3s ease;
}
.pain-tags.visible .pain-tag { opacity: 1; transform: translateY(0) scale(1); }
.pain-tags.visible .pain-tag:nth-child(1) { transition-delay: .05s; }
.pain-tags.visible .pain-tag:nth-child(2) { transition-delay: .10s; }
.pain-tags.visible .pain-tag:nth-child(3) { transition-delay: .15s; }
.pain-tags.visible .pain-tag:nth-child(4) { transition-delay: .20s; }
.pain-tags.visible .pain-tag:nth-child(5) { transition-delay: .25s; }
.pain-tags.visible .pain-tag:nth-child(6) { transition-delay: .30s; }

/* floating keyframes */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}
@keyframes float-reverse {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(15px) rotate(-2deg); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.05); }
}


/* ===== HERO IMAGE ============================================================ */
.hero-visual {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 460px; max-width: 40vw;
  pointer-events: none;
  opacity: 0; animation: hero-visual-in 1.2s .3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes hero-visual-in {
  from { opacity: 0; transform: translateY(-50%) translateX(40px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ===== SECTION DECORATORS ==================================================== */
.section-glow {
  position: absolute; width: 350px; height: 350px;
  border-radius: 50%; pointer-events: none;
  filter: blur(80px); opacity: .5;
}
.section-glow--blue    { background: rgba(37,99,235,0.06); }
.section-glow--emerald { background: rgba(16,185,129,0.06); }
.section-glow--cyan    { background: rgba(14,165,233,0.06); }

/* ===== GRADIENT DIVIDER ====================================================== */
.gradient-divider {
  height: 1px; border: none;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.3), rgba(16,185,129,0.3), transparent);
}

/* ===== BADGE ================================================================= */
.section-badge {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: 20px;
}
/* Short rule that draws in when section enters viewport */
.section-badge::before {
  content: '';
  display: block;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 1px;
  flex-shrink: 0;
  transition: width .55s cubic-bezier(0.4, 0, 0.2, 1);
}
.section-intro.visible .section-badge::before {
  width: 28px;
}

/* ===== FOOTER ================================================================ */
footer {
  border-top: 1px solid var(--border); padding: 48px 0;
  background: var(--bg);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-left p { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.footer-logo {
  font-size: 1.15rem; font-weight: 800; text-decoration: none;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .84rem; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted); font-size: .78rem; width: 100%; text-align: center; margin-top: 20px; }
.footer-legal { display: flex; gap: 16px; justify-content: center; margin-top: 10px; }
.footer-legal a { color: var(--muted); font-size: .75rem; text-decoration: none; transition: color .2s; }
.footer-legal a:hover { color: var(--text-2); }

/* ===== COOKIE BANNER ========================================================= */
.cookie-banner {
  position: fixed; bottom: 24px; left: 24px; z-index: 999;
  width: 340px; max-width: calc(100vw - 48px);
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(37,99,235,0.08);
  transform: translateY(0);
  animation: cookie-in .5s .8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.cookie-banner.hidden {
  animation: cookie-out .35s cubic-bezier(0.4, 0, 1, 1) forwards;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cookie-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(20px); pointer-events: none; }
}
.cookie-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 14px;
}
.cookie-title {
  font-size: .9rem; font-weight: 700; color: var(--text);
  margin-bottom: 6px;
}
.cookie-text {
  font-size: .8rem; line-height: 1.55; color: var(--muted);
  margin-bottom: 18px;
}
.cookie-text a {
  color: var(--accent-3); text-decoration: none;
  border-bottom: 1px solid rgba(14,165,233,0.3);
  transition: border-color .2s;
}
.cookie-text a:hover { border-color: var(--accent-3); }
.cookie-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.cookie-btn {
  border: none; border-radius: 8px; padding: 9px 14px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: all .2s ease; font-family: var(--font);
}
.cookie-btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-2);
  color: var(--text-2);
}
.cookie-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.cookie-btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 14px rgba(37,99,235,0.25);
}
.cookie-btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 0 20px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}

/* ===== RESPONSIVE ============================================================ */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { display: none; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  section { padding: 72px 0; }
  #hero { padding: 130px 0 72px; }
  .two-col { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .col-card { padding: 28px; }
  .form-card { padding: 28px; }
  .process-steps::before { display: none; }
  .cookie-banner { bottom: 16px; left: 16px; right: 16px; width: auto; }
}
