(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-MDT2N8J’);
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version=’2.0′;n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,’script’,’https://connect.facebook.net/en_US/fbevents.js’);
fbq(‘init’, ‘921312641617845’);
fbq(‘track’, ‘PageView’);
/* ============================================================
RESET + BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
–blue-light: #0078BB;
–blue-dark: #00598D;
–blue-deeper: #003D6B;
–gray: #A8A7A9;
–text: #4A4A4A;
–text-light: #6B6B6B;
–bg-light: #F8F8F8;
–bg-white: #FFFFFF;
–gold: #C9A84C;
–gold-light: #E8D48B;
–success: #2ECC71;
–error: #E74C3C;
–shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
–shadow-md: 0 4px 20px rgba(0,0,0,0.08);
–shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
–shadow-card: 0 2px 12px rgba(0,0,0,0.06);
–radius: 12px;
–radius-sm: 8px;
–radius-pill: 50px;
–transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
–font-heading: ‘Montserrat’, sans-serif;
–font-body: ‘Roboto’, sans-serif;
}
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
font-family: var(–font-body);
color: var(–text);
line-height: 1.6;
background: var(–bg-white);
overflow-x: hidden;
}
h1, h2, h3, h4 {
font-family: var(–font-heading);
font-weight: 700;
line-height: 1.25;
color: var(–blue-dark);
}
a { color: var(–blue-light); text-decoration: none; transition: color var(–transition); }
a:hover { color: var(–blue-dark); }
img { max-width: 100%; height: auto; }
.container {
max-width: 1140px;
margin: 0 auto;
padding: 0 20px;
}
/* ============================================================
SCROLL REVEAL ANIMATIONS
============================================================ */
.reveal {
opacity: 0;
transform: translateY(40px);
transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
opacity: 1;
transform: translateY(0);
}
.reveal-left {
opacity: 0;
transform: translateX(-40px);
transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.visible {
opacity: 1;
transform: translateX(0);
}
.reveal-right {
opacity: 0;
transform: translateX(40px);
transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.visible {
opacity: 1;
transform: translateX(0);
}
/* stagger children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 120ms; }
.stagger > *:nth-child(3) { transition-delay: 240ms; }
.stagger > *:nth-child(4) { transition-delay: 360ms; }
/* ============================================================
SECTION 1: HERO
============================================================ */
.hero {
position: relative;
min-height: 92vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
overflow: hidden;
background: linear-gradient(135deg, var(–blue-deeper) 0%, var(–blue-dark) 40%, var(–blue-light) 100%);
}
.hero::before {
content: ”;
position: absolute;
inset: 0;
background:
radial-gradient(ellipse at 20% 80%, rgba(0,120,187,0.3) 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, rgba(0,89,141,0.4) 0%, transparent 50%),
radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 70%);
z-index: 1;
}
/* Geometric floating shapes */
.hero-shape {
position: absolute;
border-radius: 50%;
opacity: 0.06;
background: white;
z-index: 1;
animation: float 20s ease-in-out infinite;
}
.hero-shape:nth-child(1) { width: 300px; height: 300px; top: -80px; right: -60px; animation-delay: 0s; }
.hero-shape:nth-child(2) { width: 200px; height: 200px; bottom: -40px; left: -40px; animation-delay: -7s; }
.hero-shape:nth-child(3) { width: 120px; height: 120px; top: 30%; left: 10%; animation-delay: -14s; }
@keyframes float {
0%, 100% { transform: translateY(0) rotate(0deg); }
33% { transform: translateY(-20px) rotate(2deg); }
66% { transform: translateY(10px) rotate(-1deg); }
}
.hero-content {
position: relative;
z-index: 2;
padding: 40px 20px;
max-width: 800px;
}
.hero h1 {
font-size: clamp(1.8rem, 5vw, 3rem);
font-weight: 800;
color: #FFFFFF;
margin-bottom: 20px;
letter-spacing: -0.02em;
opacity: 0;
animation: fadeUp 0.8s 0.2s forwards;
}
.hero-subtitle {
font-size: clamp(1rem, 2.5vw, 1.25rem);
color: rgba(255,255,255,0.92);
margin-bottom: 10px;
font-weight: 300;
max-width: 600px;
margin-left: auto;
margin-right: auto;
opacity: 0;
animation: fadeUp 0.8s 0.4s forwards;
}
.hero-subtitle strong {
font-weight: 500;
color: #FFFFFF;
}
.hero-micro-subtitle {
font-size: clamp(0.9rem, 2vw, 1.05rem);
color: rgba(255,255,255,0.78);
margin-bottom: 28px;
font-weight: 300;
opacity: 0;
animation: fadeUp 0.8s 0.5s forwards;
}
@keyframes fadeUp {
from { opacity: 0; transform: translateY(24px); }
to { opacity: 1; transform: translateY(0); }
}
/* Badge premium */
.badge-premium {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 28px;
margin-bottom: 32px;
border-radius: var(–radius-pill);
background: linear-gradient(135deg, rgba(201,168,76,0.15) 0%, rgba(232,212,139,0.1) 100%);
border: 1.5px solid var(–gold);
box-shadow: 0 0 20px rgba(201,168,76,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
opacity: 0;
animation: fadeUp 0.8s 0.6s forwards;
}
.badge-premium .badge-value {
font-family: var(–font-heading);
font-size: 0.85rem;
font-weight: 600;
color: var(–gold-light);
text-decoration: line-through;
text-decoration-thickness: 1.5px;
}
.badge-premium .badge-separator {
width: 1px;
height: 18px;
background: rgba(201,168,76,0.4);
}
.badge-premium .badge-free {
font-family: var(–font-heading);
font-size: 0.9rem;
font-weight: 700;
color: #FFFFFF;
letter-spacing: 0.08em;
text-transform: uppercase;
}
/* CTA Button */
.btn-cta {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 16px 40px;
font-family: var(–font-heading);
font-size: 1.05rem;
font-weight: 700;
color: var(–blue-dark);
background: #FFFFFF;
border: none;
border-radius: var(–radius-sm);
cursor: pointer;
text-decoration: none;
transition: all var(–transition);
box-shadow: 0 4px 16px rgba(0,0,0,0.15);
opacity: 0;
animation: fadeUp 0.8s 0.7s forwards;
}
.btn-cta:hover {
transform: translateY(-2px);
box-shadow: 0 8px 30px rgba(0,0,0,0.2);
background: #F0F4F8;
color: var(–blue-dark);
}
.btn-cta:active {
transform: translateY(0);
}
.btn-cta-arrow {
display: inline-block;
transition: transform var(–transition);
font-size: 1.2rem;
}
.btn-cta:hover .btn-cta-arrow {
transform: translateX(4px);
}
.hero-trust-line {
margin-top: 20px;
font-size: 0.85rem;
color: rgba(255,255,255,0.55);
opacity: 0;
animation: fadeUp 0.8s 0.9s forwards;
}
/* ============================================================
SECTION 2: PROBLEMA + SOLUCION
============================================================ */
.problem-solution {
padding: 80px 0;
background: var(–bg-white);
}
.ps-grid {
display: grid;
grid-template-columns: 1fr;
gap: 48px;
}
.ps-column {
padding: 0;
}
.ps-icon {
width: 64px;
height: 64px;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
font-size: 28px;
}
.ps-icon-problem {
background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
color: #E65100;
}
.ps-icon-solution {
background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
color: var(–blue-light);
}
.ps-column h2 {
font-size: clamp(1.25rem, 3vw, 1.5rem);
margin-bottom: 16px;
color: var(–blue-dark);
}
.ps-column p {
font-size: 1rem;
line-height: 1.7;
color: var(–text);
margin-bottom: 14px;
}
.ps-column p:last-child {
margin-bottom: 0;
}
.ps-column p strong {
color: var(–blue-dark);
font-weight: 600;
}
.ps-highlight {
display: inline-block;
background: linear-gradient(to bottom, transparent 60%, rgba(0,120,187,0.12) 60%);
padding: 0 2px;
font-weight: 500;
}
/* ============================================================
SECTION 3: QUE INCLUYE
============================================================ */
.includes {
padding: 80px 0;
background: var(–bg-light);
}
.section-header {
text-align: center;
margin-bottom: 56px;
}
.section-header h2 {
font-size: clamp(1.5rem, 3.5vw, 2rem);
margin-bottom: 12px;
}
.section-header p {
font-size: 1.05rem;
color: var(–text-light);
}
.cards-grid {
display: grid;
grid-template-columns: 1fr;
gap: 24px;
}
.card {
background: var(–bg-white);
border-radius: var(–radius);
padding: 36px 28px;
box-shadow: var(–shadow-sm);
border: 1px solid rgba(0,0,0,0.04);
transition: all var(–transition);
position: relative;
overflow: hidden;
}
.card::before {
content: ”;
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(–blue-light), var(–blue-dark));
transform: scaleX(0);
transition: transform var(–transition);
transform-origin: left;
}
.card:hover {
transform: translateY(-6px);
box-shadow: var(–shadow-lg);
border-color: transparent;
}
.card:hover::before {
transform: scaleX(1);
}
.card-icon {
width: 56px;
height: 56px;
border-radius: 14px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
font-size: 24px;
background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
color: var(–blue-light);
}
.card h3 {
font-size: 1.15rem;
margin-bottom: 10px;
color: var(–blue-dark);
}
.card p {
font-size: 0.95rem;
color: var(–text-light);
line-height: 1.6;
}
/* ============================================================
SECTION 4: COMO FUNCIONA (Timeline)
============================================================ */
.how-it-works {
padding: 80px 0;
background: var(–bg-white);
}
.timeline {
display: grid;
grid-template-columns: 1fr;
gap: 40px;
max-width: 700px;
margin: 0 auto;
position: relative;
}
.timeline::before {
content: ”;
position: absolute;
left: 24px;
top: 0;
bottom: 0;
width: 2px;
background: linear-gradient(180deg, var(–blue-light) 0%, rgba(0,120,187,0.15) 100%);
}
.timeline-step {
display: flex;
gap: 24px;
align-items: flex-start;
position: relative;
}
.step-number {
flex-shrink: 0;
width: 48px;
height: 48px;
border-radius: 50%;
background: linear-gradient(135deg, var(–blue-light), var(–blue-dark));
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
font-family: var(–font-heading);
font-size: 1.1rem;
font-weight: 700;
position: relative;
z-index: 2;
box-shadow: 0 4px 12px rgba(0,120,187,0.25);
}
.step-content h3 {
font-size: 1.1rem;
margin-bottom: 6px;
color: var(–blue-dark);
}
.step-content p {
font-size: 0.95rem;
color: var(–text-light);
line-height: 1.6;
}
/* ============================================================
SECTION 5: CREDIBILIDAD / SOCIAL PROOF
============================================================ */
.credibility {
padding: 80px 0;
background: linear-gradient(135deg, var(–blue-deeper) 0%, var(–blue-dark) 100%);
color: #FFFFFF;
overflow: hidden;
position: relative;
}
.credibility::before {
content: ”;
position: absolute;
top: -50%;
right: -20%;
width: 500px;
height: 500px;
border-radius: 50%;
background: rgba(0,120,187,0.1);
}
.credibility .section-header h2 {
color: #FFFFFF;
position: relative;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
margin-bottom: 48px;
position: relative;
}
.stat-item {
text-align: center;
padding: 20px 8px;
}
.stat-number {
font-family: var(–font-heading);
font-size: clamp(2.5rem, 6vw, 3.5rem);
font-weight: 800;
color: #FFFFFF;
line-height: 1;
margin-bottom: 8px;
display: block;
}
.stat-label {
font-size: 0.85rem;
color: rgba(255,255,255,0.65);
line-height: 1.4;
}
.quote-block {
max-width: 700px;
margin: 0 auto;
text-align: center;
padding-top: 40px;
border-top: 1px solid rgba(255,255,255,0.15);
position: relative;
}
.quote-block::before {
content: ‘201C’;
font-family: Georgia, serif;
font-size: 5rem;
color: rgba(255,255,255,0.1);
position: absolute;
top: 10px;
left: 50%;
transform: translateX(-50%);
line-height: 1;
}
.quote-text {
font-size: clamp(1rem, 2.5vw, 1.15rem);
font-style: italic;
color: rgba(255,255,255,0.9);
line-height: 1.7;
margin-bottom: 16px;
position: relative;
}
.quote-author {
font-family: var(–font-heading);
font-size: 0.9rem;
font-weight: 600;
color: rgba(255,255,255,0.6);
}
/* ============================================================
SECTION 6: FORMULARIO MULTI-STEP
============================================================ */
.form-section {
padding: 80px 0;
background: var(–bg-light);
}
.form-wrapper {
max-width: 620px;
margin: 0 auto;
background: var(–bg-white);
border-radius: var(–radius);
box-shadow: var(–shadow-lg);
overflow: hidden;
border: 1px solid rgba(0,0,0,0.04);
}
/* Progress bar */
.progress-bar-container {
padding: 28px 32px 0;
}
.progress-steps-labels {
display: flex;
justify-content: space-between;
margin-bottom: 12px;
}
.progress-step-label {
font-family: var(–font-heading);
font-size: 0.75rem;
font-weight: 600;
color: var(–gray);
transition: color var(–transition);
text-align: center;
flex: 1;
}
.progress-step-label.active {
color: var(–blue-light);
}
.progress-step-label.completed {
color: var(–success);
}
.progress-track {
height: 4px;
background: #E8E8E8;
border-radius: 2px;
overflow: hidden;
position: relative;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(–blue-light), var(–blue-dark));
border-radius: 2px;
transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
width: 33.33%;
}
/* Form body */
.form-body {
padding: 32px;
position: relative;
overflow: hidden;
min-height: 380px;
}
.form-step {
display: none;
animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-step.active {
display: block;
}
@keyframes slideIn {
from { opacity: 0; transform: translateX(30px); }
to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
from { opacity: 1; transform: translateX(0); }
to { opacity: 0; transform: translateX(-30px); }
}
.form-step-title {
font-family: var(–font-heading);
font-size: 1.2rem;
font-weight: 700;
color: var(–blue-dark);
margin-bottom: 24px;
}
/* Input fields */
.field-group {
margin-bottom: 20px;
}
.field-label {
display: block;
font-family: var(–font-heading);
font-size: 0.85rem;
font-weight: 600;
color: var(–text);
margin-bottom: 8px;
}
.field-label .required {
color: var(–error);
margin-left: 2px;
}
.field-label .field-hint {
font-weight: 400;
font-size: 0.75rem;
color: var(–text-muted);
}
.field-input {
width: 100%;
padding: 12px 16px;
font-family: var(–font-body);
font-size: 0.95rem;
color: var(–text);
background: var(–bg-light);
border: 2px solid transparent;
border-radius: var(–radius-sm);
outline: none;
transition: all var(–transition);
}
.field-input:focus {
background: var(–bg-white);
border-color: var(–blue-light);
box-shadow: 0 0 0 4px rgba(0,120,187,0.1);
}
.field-input::placeholder {
color: var(–gray);
}
.field-input.error {
border-color: var(–error);
background: #FFF5F5;
}
.field-error {
font-size: 0.8rem;
color: var(–error);
margin-top: 4px;
display: none;
}
.field-input.error + .field-error {
display: block;
}
/* Custom Radio Buttons (pill style) */
.pill-group {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.pill-option {
position: relative;
}
.pill-option input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.pill-option label {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 10px 20px;
font-family: var(–font-body);
font-size: 0.9rem;
font-weight: 500;
color: var(–text);
background: var(–bg-light);
border: 2px solid #E0E0E0;
border-radius: var(–radius-pill);
cursor: pointer;
transition: all var(–transition);
user-select: none;
}
.pill-option label:hover {
border-color: var(–blue-light);
background: #E3F2FD;
}
.pill-option input:checked + label {
background: linear-gradient(135deg, var(–blue-light), var(–blue-dark));
color: #FFFFFF;
border-color: transparent;
box-shadow: 0 2px 8px rgba(0,120,187,0.25);
}
.pill-option input:focus-visible + label {
outline: 2px solid var(–blue-light);
outline-offset: 2px;
}
/* Custom Checkbox Cards (zones) */
.checkbox-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.check-card {
position: relative;
}
.check-card input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.check-card label {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 16px;
font-family: var(–font-body);
font-size: 0.88rem;
font-weight: 500;
color: var(–text);
background: var(–bg-light);
border: 2px solid #E0E0E0;
border-radius: var(–radius-sm);
cursor: pointer;
transition: all var(–transition);
user-select: none;
}
.check-card label::before {
content: ”;
flex-shrink: 0;
width: 20px;
height: 20px;
border-radius: 5px;
border: 2px solid #CCCCCC;
background: var(–bg-white);
transition: all var(–transition);
display: flex;
align-items: center;
justify-content: center;
}
.check-card label:hover {
border-color: var(–blue-light);
background: #E3F2FD;
}
.check-card input:checked + label {
border-color: var(–blue-light);
background: #E3F2FD;
}
.check-card input:checked + label::before {
background: var(–blue-light);
border-color: var(–blue-light);
box-shadow: inset 0 0 0 3px #FFFFFF;
}
.check-card input:focus-visible + label {
outline: 2px solid var(–blue-light);
outline-offset: 2px;
}
/* Number selectors (dormitoris, banos) */
.number-selector {
display: flex;
gap: 8px;
}
.num-option {
position: relative;
}
.num-option input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.num-option label {
display: flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
font-family: var(–font-heading);
font-size: 0.95rem;
font-weight: 600;
color: var(–text);
background: var(–bg-light);
border: 2px solid #E0E0E0;
border-radius: var(–radius-sm);
cursor: pointer;
transition: all var(–transition);
}
.num-option label:hover {
border-color: var(–blue-light);
background: #E3F2FD;
}
.num-option input:checked + label {
background: linear-gradient(135deg, var(–blue-light), var(–blue-dark));
color: #FFFFFF;
border-color: transparent;
box-shadow: 0 2px 8px rgba(0,120,187,0.25);
}
.num-option input:focus-visible + label {
outline: 2px solid var(–blue-light);
outline-offset: 2px;
}
/* Select dropdown */
.field-select {
width: 100%;
padding: 12px 16px;
font-family: var(–font-body);
font-size: 0.95rem;
color: var(–text);
background: var(–bg-light);
border: 2px solid transparent;
border-radius: var(–radius-sm);
outline: none;
appearance: none;
background-image: url(“data:image/svg+xml,%3Csvg width=’12’ height=’8′ viewBox=’0 0 12 8′ xmlns=’http://www.w3.org/2000/svg’%3E%3Cpath d=’M1 1l5 5 5-5′ stroke=’%234A4A4A’ stroke-width=’2′ fill=’none’ stroke-linecap=’round’/%3E%3C/svg%3E”);
background-repeat: no-repeat;
background-position: right 16px center;
padding-right: 44px;
cursor: pointer;
transition: all var(–transition);
}
.field-select:focus {
background-color: var(–bg-white);
border-color: var(–blue-light);
box-shadow: 0 0 0 4px rgba(0,120,187,0.1);
}
.field-select.error {
border-color: var(–error);
}
/* Textarea */
.field-textarea {
width: 100%;
padding: 12px 16px;
font-family: var(–font-body);
font-size: 0.95rem;
color: var(–text);
background: var(–bg-light);
border: 2px solid transparent;
border-radius: var(–radius-sm);
outline: none;
resize: vertical;
min-height: 90px;
transition: all var(–transition);
}
.field-textarea:focus {
background: var(–bg-white);
border-color: var(–blue-light);
box-shadow: 0 0 0 4px rgba(0,120,187,0.1);
}
/* Privacy checkbox */
.privacy-check {
display: flex;
align-items: flex-start;
gap: 12px;
margin-top: 4px;
}
.privacy-check input[type=”checkbox”] {
appearance: none;
-webkit-appearance: none;
flex-shrink: 0;
width: 22px;
height: 22px;
border: 2px solid #CCCCCC;
border-radius: 5px;
background: var(–bg-white);
cursor: pointer;
transition: all var(–transition);
position: relative;
margin-top: 2px;
}
.privacy-check input[type=”checkbox”]:checked {
background: var(–blue-light);
border-color: var(–blue-light);
}
.privacy-check input[type=”checkbox”]:checked::after {
content: ”;
position: absolute;
left: 6px;
top: 2px;
width: 6px;
height: 11px;
border: solid white;
border-width: 0 2.5px 2.5px 0;
transform: rotate(45deg);
}
.privacy-check input[type=”checkbox”]:focus-visible {
outline: 2px solid var(–blue-light);
outline-offset: 2px;
}
.privacy-check label {
font-size: 0.85rem;
color: var(–text-light);
line-height: 1.5;
cursor: pointer;
}
.privacy-check label a {
color: var(–blue-light);
text-decoration: underline;
}
/* Form buttons */
.form-nav {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 28px;
gap: 12px;
}
.btn-form-back {
padding: 12px 24px;
font-family: var(–font-heading);
font-size: 0.9rem;
font-weight: 600;
color: var(–text-light);
background: transparent;
border: 2px solid #E0E0E0;
border-radius: var(–radius-sm);
cursor: pointer;
transition: all var(–transition);
}
.btn-form-back:hover {
border-color: var(–blue-light);
color: var(–blue-light);
}
.btn-form-next {
padding: 14px 32px;
font-family: var(–font-heading);
font-size: 0.95rem;
font-weight: 700;
color: #FFFFFF;
background: linear-gradient(135deg, var(–blue-light), var(–blue-dark));
border: none;
border-radius: var(–radius-sm);
cursor: pointer;
transition: all var(–transition);
box-shadow: 0 4px 12px rgba(0,120,187,0.25);
margin-left: auto;
}
.btn-form-next:hover {
transform: translateY(-1px);
box-shadow: 0 6px 20px rgba(0,120,187,0.35);
}
.btn-form-next:active {
transform: translateY(0);
}
.btn-submit {
width: 100%;
padding: 16px 32px;
font-family: var(–font-heading);
font-size: 1.05rem;
font-weight: 700;
color: #FFFFFF;
background: linear-gradient(135deg, var(–blue-light), var(–blue-dark));
border: none;
border-radius: var(–radius-sm);
cursor: pointer;
transition: all var(–transition);
box-shadow: 0 4px 16px rgba(0,120,187,0.3);
position: relative;
overflow: hidden;
}
.btn-submit::before {
content: ”;
position: absolute;
inset: 0;
background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
transform: translateX(-100%);
transition: transform 0.6s;
}
.btn-submit:hover::before {
transform: translateX(100%);
}
.btn-submit:hover {
transform: translateY(-2px);
box-shadow: 0 8px 30px rgba(0,120,187,0.4);
}
/* Form footer micro */
.form-trust-note {
text-align: center;
padding: 20px 32px 28px;
font-size: 0.8rem;
color: var(–gray);
line-height: 1.5;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.form-trust-note .lock-icon {
font-size: 1rem;
}
/* Success state */
.form-success {
display: none;
text-align: center;
padding: 60px 32px;
}
.form-success.active {
display: block;
animation: fadeUp 0.6s forwards;
}
.success-icon {
width: 72px;
height: 72px;
border-radius: 50%;
background: linear-gradient(135deg, #2ECC71, #27AE60);
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
margin: 0 auto 20px;
box-shadow: 0 4px 16px rgba(46,204,113,0.3);
}
.form-success h3 {
font-size: 1.3rem;
color: var(–blue-dark);
margin-bottom: 12px;
}
.form-success p {
font-size: 0.95rem;
color: var(–text-light);
max-width: 400px;
margin: 0 auto;
}
/* ============================================================
SECTION 7: FOOTER CTA
============================================================ */
.footer-cta {
padding: 60px 0 50px;
background: #F2F2F2;
}
.footer-cta .section-header h2 {
font-size: clamp(1.25rem, 3vw, 1.6rem);
}
.footer-cta .section-header p {
max-width: 560px;
margin-left: auto;
margin-right: auto;
}
.offices-grid {
display: grid;
grid-template-columns: 1fr;
gap: 24px;
margin-bottom: 40px;
}
.office-card {
text-align: center;
padding: 24px 20px;
background: var(–bg-white);
border-radius: var(–radius-sm);
box-shadow: var(–shadow-sm);
transition: all var(–transition);
}
.office-card:hover {
transform: translateY(-3px);
box-shadow: var(–shadow-md);
}
.office-name {
font-family: var(–font-heading);
font-size: 1rem;
font-weight: 700;
color: var(–blue-dark);
margin-bottom: 8px;
}
.office-address {
font-size: 0.9rem;
color: var(–text-light);
margin-bottom: 10px;
}
.office-phone {
display: inline-flex;
align-items: center;
gap: 6px;
font-family: var(–font-heading);
font-size: 1rem;
font-weight: 600;
color: var(–blue-light);
text-decoration: none;
transition: color var(–transition);
}
.office-phone:hover {
color: var(–blue-dark);
}
/* Trust badges */
.trust-badges {
display: flex;
align-items: center;
justify-content: center;
gap: 24px;
flex-wrap: wrap;
padding-top: 28px;
border-top: 1px solid #E0E0E0;
}
.trust-badge {
font-family: var(–font-heading);
font-size: 0.8rem;
font-weight: 600;
color: var(–gray);
display: flex;
align-items: center;
gap: 6px;
}
.trust-badge .stars {
color: #F4B400;
font-size: 0.9rem;
}
/* ============================================================
RESPONSIVE – TABLET + DESKTOP
============================================================ */
@media (min-width: 768px) {
.ps-grid {
grid-template-columns: 1fr 1fr;
gap: 64px;
}
.cards-grid {
grid-template-columns: repeat(3, 1fr);
gap: 28px;
}
.timeline::before {
left: 50%;
top: 24px;
bottom: 24px;
transform: translateX(-50%);
width: 2px;
height: auto;
}
.timeline {
grid-template-columns: 1fr;
gap: 0;
}
.timeline-step {
width: 50%;
padding: 0 40px 48px 0;
justify-self: end;
flex-direction: row-reverse;
text-align: right;
}
.timeline-step:nth-child(even) {
justify-self: start;
margin-left: 50%;
flex-direction: row;
text-align: left;
padding: 0 0 48px 40px;
}
.step-number {
position: relative;
}
.timeline-step .step-number::after {
content: ”;
position: absolute;
top: 50%;
width: 20px;
height: 2px;
background: rgba(0,120,187,0.3);
}
.timeline-step:nth-child(odd) .step-number::after {
left: 100%;
margin-left: 0;
}
.timeline-step:nth-child(even) .step-number::after {
right: 100%;
margin-right: 0;
}
.offices-grid {
grid-template-columns: repeat(3, 1fr);
}
.checkbox-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (min-width: 1024px) {
.hero h1 {
font-size: 3rem;
}
.section-header h2 {
font-size: 2rem;
}
.ps-column h2 {
font-size: 1.5rem;
}
.problem-solution, .includes, .how-it-works, .form-section {
padding: 100px 0;
}
.credibility {
padding: 100px 0;
}
}
/* ============================================================
FOCUS VISIBLE for A11y
============================================================ */
:focus-visible {
outline: 2px solid var(–blue-light);
outline-offset: 2px;
}
button:focus-visible {
outline: 2px solid var(–blue-light);
outline-offset: 2px;
}
/* ============================================================
SMOOTH SCROLLBAR (subtle)
============================================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F0F0F0; }
::-webkit-scrollbar-thumb { background: #CCCCCC; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(–gray); }
/* ============================================================
REDUCED MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
html { scroll-behavior: auto; }
.reveal, .reveal-left, .reveal-right {
opacity: 1;
transform: none;
}
}
Normal. El problema no eres tú. Es que estás buscant on busca todo el mundo. Y ningú te ha contado lo que pasa de verdad con els preus.
Descobreix qué pasa realment en el Vallès Oriental. Gratuït. Sense compromís.
Quiero mi Radar de Compra gratuït
→
2 minuts rellenar el formulari. Tu assessor te llama en menys de 24 hores.
Mira, voy a ser directo amb tu.
Si llevas semanas o mesos buscant habitatge per el Vallès Oriental, ya sabes de qué hablo: abres Idealista, abres Fotocasa, i sempre veus els mismos pisos.
Els mismos que viste la semana pasada. Y la anterior.
«No te molestes en enseñarme lo que hay publicado, ya lo he visto todo.»
Eso nos lo dicen a diario. Compradores que llevan mesos mirando, frustrados, convencidos de que no hay nada.
Pero la realidad es otra.
Muchas habitatges nunca llegan a publicarse. Se venen antes. Entre immobiliàrias. Entre conocidos. Porque en aquest mercado pasa algo curioso: hay propietaris que NO ponen su piso a la venda porque tienen miedo de no encontrar nada para ellos. Es una especie de psicosis circular: «no vendo porque no encuentro nada para comprar.»
¿Y qué pasa? Que hay pisos que sí están disponibles, pero tú no els ves. Porque no están en ningún portal. Están en la carpeta de una immobiliària de la zona. O en la cabeza de un agente que conoce al propietari.
Y hay otro problema más gordo aún.
Els preus que ves en els portales son mentira.
Bueno, no mentira exactament. Son preus de OFERTA. Lo que el vendedor pide. No lo que se paga al final. La diferencia media en el Vallès Oriental: entre 15.000 i 30.000 €.
Lee eso otra vez. Quince mil a treinta mil euros.
Eso significa que estás descartando habitatges que sí están en tu rang. Ves un pis a 285.000 i dices «se sale de mi presupuesto». Pero ese piso probablemente se cierra en 260.000 o menys. Solo que tú no lo sabes. Porque no tienes acceso a els datos de escritura.
Nosotros sí.
Cuando tú busques piso per tu cuenta, estás solo.
Vas a una immobiliària i te enseñan lo que ELLOS tienen. Si no encaja, te dicen que te llamarán. (Spoiler: no te llaman.)
Vas a otra. Lo mismo. Y a otra. Y a otra.
Cada immobiliària te enseña SU cartera. Nadie te enseña TODO lo que hay. Porque ningú trabaja para ti. Todos trabajan para el vendedor.
Y aquí es on nosaltres cambiamos les reglas del juego.
Cuando activas tu Radar de Compra, primero te damos un informe con preus reales de cierre a la teva zona. Dades de escritura, no estimaciones de un algoritmo.
¿Y qué? Pues que con esos datos, tú ya sabes cuánto vale REALMENTE un piso. Ya no te la cuelan con preus inflados. Ya pots tomar decisions con números reales.
Pero eso es solo el principio.
Lo realment potente es lo que viene después: con un mandato de búsqueda, tu assessor de Fincas León puede entrar en CUALQUIER immobiliària de la zona — sí, incluida la competencia — i decirle al agente: «Déjame fer una visita con mi cliente. A ti no te cuesta nada, porque a mí me paga él.»
Para la otra immobiliària es una venda fácil. Para ti es acceso a pisos que de otra forma no verías.
Tú solo no pots fer eso.
Tú solo eres un particular más, mirando Idealista desde el sofá. Con nosaltres tienes un profesional que conoce cada calle, cada edificio i cada comunidad del Vallès Oriental abriendo puertas per ti. En TODAS les immobiliàrias. No solo en la nostra.
35 años haciendo esto. Más de 5.000 operacions cerradas.
Cuando te decimos un preu real, es porque lo hemos visto en escritura. Muchas veces.
Esto es lo que reps. Sense compromís. Sin letra pequeña.
¿Y qué significa eso? Que sabrás exactament cuánto se está pagando DE VERDAD per pisos com el que busques. No cuánto piden. Cuánto se paga. Con datos de escrituras de els últimos 12 mesos i previsión a corto plazo.
¿Y qué significa eso? Que dejarás de cercar a ciegas. Sabrás cuántos pisos encajan con lo que necesitas, en qué zonas están, i cuáles merecen tu tiempo. Con nostra recomendación directa, sin rodeos.
¿Y qué significa eso? Que no es un PDF que reps i te les apañas. Te sientas con algú que conoce tu zona calle a calle i te cuenta lo que no sale en ningún portal. En oficina, per videollamada o teléfono. Tú eliges.
Sin trámites, sin complicaciones, sense compromís de ningún tipus.
Nos cuentas qué busques, per dónde i cuál es tu situación. Nada más. No pedimos DNI ni documentos. Solo lo justo para preparar un informe que te sirva de verdad.
Te llama o te escribe per WhatsApp para confirmar tus datos i agendar la reunión. Tú eliges día, hora i formato: en la oficina más cercana, per videollamada o per teléfono. Lo que te venga mejor.
En la reunión o per email en 48 hores. Preus reales de cierre, tendència del mercat a la teva zona i una recomendación honesta de algú que lleva 35 años viendo cómo se compran i venen pisos a el Vallès.
«La majoría de compradors llegan a nosaltres después de mesos buscant solos, frustrados, convencidos de que no hay nada. Cuando les enseñamos els datos reales i les abrimos les puertas de todas les immobiliàrias de la zona, la cara les cambia. Eso es lo que hacemos.»
Cuéntanos qué busques i dónde. En 2 minuts lo tienes hecho.
Tu assessor te contacta en menys de 24 hores. Sense compromís de ningún tipus.
Paso 1 de 3 — Tus datos
Por favor, introduce tu nombre
Introduce un teléfono válido
Introduce un email válido
Paso 2 de 3 — Tu búsqueda
Paso 3 de 3 — Tu situación
Selecciona un rang
Menos de 150.000 €
150.000 – 200.000 €
200.000 – 250.000 €
250.000 – 300.000 €
300.000 – 400.000 €
400.000 – 500.000 €
Más de 500.000 €
Debes aceptar la política de privacidad
Tu assessor personal te contactará en les próximas 24 hores per teléfono o WhatsApp.
(function() {
‘use strict’;
/* ==========================================================
1. SCROLL REVEAL (IntersectionObserver)
========================================================== */
var revealElements = document.querySelectorAll(‘.reveal, .reveal-left, .reveal-right’);
if (‘IntersectionObserver’ in window) {
var revealObserver = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
entry.target.classList.add(‘visible’);
revealObserver.unobserve(entry.target);
}
});
}, { threshold: 0.15, rootMargin: ‘0px 0px -40px 0px’ });
revealElements.forEach(function(el) {
revealObserver.observe(el);
});
} else {
// Fallback: show all
revealElements.forEach(function(el) { el.classList.add(‘visible’); });
}
/* ==========================================================
2. ANIMATED COUNTERS
========================================================== */
var counters = document.querySelectorAll(‘.stat-number[data-target]’);
var countersAnimated = false;
function animateCounters() {
if (countersAnimated) return;
countersAnimated = true;
counters.forEach(function(counter) {
var target = parseInt(counter.getAttribute(‘data-target’), 10);
var duration = 2000; // ms
var startTime = null;
var prefix = ”;
var suffix = ”;
if (target === 5000) {
prefix = ‘+’;
suffix = ”;
} else if (target === 35) {
suffix = ‘+’;
}
function step(timestamp) {
if (!startTime) startTime = timestamp;
var progress = Math.min((timestamp – startTime) / duration, 1);
// Ease out cubic
var ease = 1 – Math.pow(1 – progress, 3);
var current = Math.floor(ease * target);
if (target >= 1000) {
counter.textContent = prefix + current.toLocaleString(‘es-ES’) + suffix;
} else {
counter.textContent = prefix + current + suffix;
}
if (progress = 1000) {
counter.textContent = prefix + target.toLocaleString(‘es-ES’) + suffix;
} else {
counter.textContent = prefix + target + suffix;
}
}
}
requestAnimationFrame(step);
});
}
if (‘IntersectionObserver’ in window && counters.length) {
var counterObserver = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
animateCounters();
counterObserver.unobserve(entry.target);
}
});
}, { threshold: 0.3 });
counterObserver.observe(document.querySelector(‘.stats-grid’));
}
/* ==========================================================
3. MULTI-STEP FORM
========================================================== */
var currentStep = 1;
var totalSteps = 3;
function updateProgress(step) {
var fill = document.getElementById(‘progressFill’);
fill.style.width = (step / totalSteps * 100) + ‘%’;
var labels = document.querySelectorAll(‘.progress-step-label’);
labels.forEach(function(label) {
var labelStep = parseInt(label.getAttribute(‘data-step’), 10);
label.classList.remove(‘active’, ‘completed’);
if (labelStep === step) {
label.classList.add(‘active’);
} else if (labelStep < step) {
label.classList.add('completed');
}
});
}
function showStep(step) {
var steps = document.querySelectorAll('.form-step');
steps.forEach(function(s) {
s.classList.remove('active');
});
var target = document.querySelector('.form-step[data-step="' + step + '"]');
if (target) {
target.classList.add('active');
}
updateProgress(step);
currentStep = step;
// Scroll form into view smoothly
var formEl = document.getElementById('formulari');
if (formEl) {
setTimeout(function() {
formEl.scrollIntoView({ behavior: 'smooth', block: 'start' });
}, 100);
}
}
// Validation functions
function validateStep1() {
var valid = true;
var nombre = document.getElementById('nombre');
if (!nombre.value.trim()) {
nombre.classList.add('error');
valid = false;
} else {
nombre.classList.remove('error');
}
var telefono = document.getElementById('telefono');
var telPattern = /^[0-9s+-]{6,15}$/;
if (!telPattern.test(telefono.value.trim())) {
telefono.classList.add('error');
valid = false;
} else {
telefono.classList.remove('error');
}
var email = document.getElementById('email');
var emailPattern = /^[^s@]+@[^s@]+.[^s@]+$/;
if (!emailPattern.test(email.value.trim())) {
email.classList.add('error');
valid = false;
} else {
email.classList.remove('error');
}
var tipusChecked = document.querySelectorAll('input[name="tipus_vivienda"]:checked');
if (tipusChecked.length === 0) {
valid = false;
// Subtle flash on pill group
var pillGroup = document.querySelector('.form-step[data-step="1"] .pill-group');
pillGroup.style.outline = '2px solid var(–error)';
pillGroup.style.outlineOffset = '4px';
pillGroup.style.borderRadius = '8px';
setTimeout(function() {
pillGroup.style.outline = '';
pillGroup.style.outlineOffset = '';
}, 2000);
}
return valid;
}
function validateStep2() {
var valid = true;
var zonaChecked = document.querySelectorAll('input[name="zona"]:checked');
if (zonaChecked.length === 0) {
valid = false;
var grid = document.querySelector('.checkbox-grid');
grid.style.outline = '2px solid var(–error)';
grid.style.outlineOffset = '4px';
grid.style.borderRadius = '8px';
setTimeout(function() {
grid.style.outline = '';
grid.style.outlineOffset = '';
}, 2000);
}
var dormChecked = document.querySelector('input[name="dormitoris"]:checked');
if (!dormChecked) {
valid = false;
var numSel = document.querySelectorAll('.form-step[data-step="2"] .number-selector')[0];
if (numSel) {
numSel.style.outline = '2px solid var(–error)';
numSel.style.outlineOffset = '4px';
numSel.style.borderRadius = '8px';
setTimeout(function() {
numSel.style.outline = '';
numSel.style.outlineOffset = '';
}, 2000);
}
}
var banoChecked = document.querySelector('input[name="banos"]:checked');
if (!banoChecked) {
valid = false;
var numSel2 = document.querySelectorAll('.form-step[data-step="2"] .number-selector')[1];
if (numSel2) {
numSel2.style.outline = '2px solid var(–error)';
numSel2.style.outlineOffset = '4px';
numSel2.style.borderRadius = '8px';
setTimeout(function() {
numSel2.style.outline = '';
numSel2.style.outlineOffset = '';
}, 2000);
}
}
return valid;
}
function validateStep3() {
var valid = true;
var presupuesto = document.getElementById('presupuesto');
if (!presupuesto.value) {
presupuesto.classList.add('error');
valid = false;
} else {
presupuesto.classList.remove('error');
}
var hipoChecked = document.querySelector('input[name="hipoteca"]:checked');
if (!hipoChecked) {
valid = false;
var pillGroups = document.querySelectorAll('.form-step[data-step="3"] .pill-group');
if (pillGroups[0]) {
pillGroups[0].style.outline = '2px solid var(–error)';
pillGroups[0].style.outlineOffset = '4px';
pillGroups[0].style.borderRadius = '8px';
setTimeout(function() {
pillGroups[0].style.outline = '';
pillGroups[0].style.outlineOffset = '';
}, 2000);
}
}
var venderChecked = document.querySelector('input[name="vendre"]:checked');
if (!venderChecked) {
valid = false;
var pillGroups2 = document.querySelectorAll('.form-step[data-step="3"] .pill-group');
if (pillGroups2[1]) {
pillGroups2[1].style.outline = '2px solid var(–error)';
pillGroups2[1].style.outlineOffset = '4px';
pillGroups2[1].style.borderRadius = '8px';
setTimeout(function() {
pillGroups2[1].style.outline = '';
pillGroups2[1].style.outlineOffset = '';
}, 2000);
}
}
var plazoChecked = document.querySelector('input[name="plazo"]:checked');
if (!plazoChecked) {
valid = false;
var pillGroups3 = document.querySelectorAll('.form-step[data-step="3"] .pill-group');
if (pillGroups3[2]) {
pillGroups3[2].style.outline = '2px solid var(–error)';
pillGroups3[2].style.outlineOffset = '4px';
pillGroups3[2].style.borderRadius = '8px';
setTimeout(function() {
pillGroups3[2].style.outline = '';
pillGroups3[2].style.outlineOffset = '';
}, 2000);
}
}
var privacidad = document.getElementById('privacidad');
var privError = document.getElementById('privacidad-error');
if (!privacidad.checked) {
valid = false;
privError.style.display = 'block';
} else {
privError.style.display = 'none';
}
return valid;
}
// Expose navigation functions globally
window.nextStep = function(fromStep) {
var valid = false;
if (fromStep === 1) valid = validateStep1();
else if (fromStep === 2) valid = validateStep2();
if (valid) {
showStep(fromStep + 1);
}
};
window.prevStep = function(fromStep) {
showStep(fromStep – 1);
};
// Clear error state on input
document.querySelectorAll('.field-input, .field-select').forEach(function(input) {
input.addEventListener('input', function() {
this.classList.remove('error');
});
input.addEventListener('change', function() {
this.classList.remove('error');
});
});
// Form submit
var RADAR_API_URL = 'https://prospeccion.dpozo.com/api/v1/radar/lead';
var form = document.getElementById('radarForm');
form.addEventListener('submit', function(e) {
e.preventDefault();
if (!validateStep3()) return;
// Disable submit button
var submitBtn = form.querySelector('.btn-submit');
var originalText = submitBtn.textContent;
submitBtn.disabled = true;
submitBtn.textContent = 'Enviando…';
submitBtn.style.opacity = '0.7';
// Collect form data
var zonas = [];
document.querySelectorAll('input[name="zona"]:checked').forEach(function(cb) {
zonas.push(cb.value);
});
// Get UTM params from URL
var urlParams = new URLSearchParams(window.location.search);
var payload = {
nombre: document.getElementById('nombre').value.trim(),
telefono: document.getElementById('telefono').value.trim(),
email: document.getElementById('email').value.trim(),
tipus_vivienda: Array.from(document.querySelectorAll('input[name="tipus_vivienda"]:checked')).map(function(el) { return el.value; }),
zonas: zonas,
dormitoris: (document.querySelector('input[name="dormitoris"]:checked') || {}).value || '',
banos: (document.querySelector('input[name="banos"]:checked') || {}).value || '',
presupuesto: document.getElementById('presupuesto').value,
hipoteca: (document.querySelector('input[name="hipoteca"]:checked') || {}).value || '',
vendre: (document.querySelector('input[name="vendre"]:checked') || {}).value || '',
plazo: (document.querySelector('input[name="plazo"]:checked') || {}).value || '',
comentarios: document.getElementById('comentarios').value.trim(),
utm_source: urlParams.get('utm_source') || '',
utm_medium: urlParams.get('utm_medium') || '',
utm_campaign: urlParams.get('utm_campaign') || '',
website: document.getElementById('website').value // honeypot
};
fetch(RADAR_API_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
})
.then(function(response) {
if (!response.ok) throw new Error('Error ' + response.status);
return response.json();
})
.then(function(data) {
if (data.success) {
// Conversion tracking
if (typeof fbq === 'function') {
fbq('track', 'Lead', { content_name: 'Radar de Compra', value: 0, currency: 'EUR' });
}
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ 'event': 'generate_lead', 'event_category': 'radar_de_compra', 'event_label': 'form_completed', 'value': 0 });
// Redirect to thank-you page
window.location.href = '/radar-gràcies/';
} else {
throw new Error(data.message || 'Error desconocido');
}
})
.catch(function(err) {
console.error('Error enviando formulari:', err);
// Re-enable button
submitBtn.disabled = false;
submitBtn.textContent = originalText;
submitBtn.style.opacity = '1';
// Show inline error
var errorDiv = document.createElement('p');
errorDiv.style.color = 'var(–error)';
errorDiv.style.textAlign = 'center';
errorDiv.style.marginTop = '12px';
errorDiv.style.fontSize = '0.9rem';
errorDiv.textContent = 'Ha habido un error. Intentalo de nuevo o llamanos al 93 579 33 33.';
var existingError = form.querySelector('.submit-error');
if (existingError) existingError.remove();
errorDiv.className = 'submit-error';
submitBtn.parentNode.appendChild(errorDiv);
});
});
/* ==========================================================
4. SMOOTH SCROLL for anchor links
========================================================== */
document.querySelectorAll('a[href^="#"]').forEach(function(link) {
link.addEventListener('click', function(e) {
var target = document.querySelector(this.getAttribute('href'));
if (target) {
e.preventDefault();
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
});
});
})();