/* ============================================================
   Inmo Gran Canaria IA · Landing Page Styles
   Colores: Blanco (#FFFFFF), Azul bandera (#0066CC), Amarillo bandera (#FFD700)
   Tipografía: Inter (system-ui fallback)
   ============================================================ */

:root {
  --color-white: #FFFFFF;
  --color-blue: #0066CC;
  --color-blue-dark: #004499;
  --color-blue-light: #E6F0FA;
  --color-yellow: #FFD700;
  --color-yellow-dark: #E6C200;
  --color-yellow-light: #FFF9E6;
  --color-text: #1A2A3A;
  --color-text-light: #4A5A6A;
  --color-border: #D0DCE8;
  --color-error: #DC2626;
  --color-success: #16A34A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,102,204,0.1);
  --shadow-lg: 0 12px 32px rgba(0,102,204,0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
  --container-max: 1200px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-blue-dark); }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-border); z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo img { height: 48px; width: auto; }
.nav { display: flex; align-items: center; gap: 16px; }
.nav-cta { padding: 10px 20px; background: var(--color-yellow); color: var(--color-blue-dark); font-weight: 700; border-radius: var(--radius-md); font-size: 0.9rem; transition: background var(--transition), transform var(--transition); }
.nav-cta:hover { background: var(--color-yellow-dark); color: var(--color-blue-dark); transform: translateY(-1px); }
.nav-whatsapp { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--color-blue); color: var(--color-white); border-radius: var(--radius-md); font-weight: 600; font-size: 0.85rem; transition: background var(--transition); }
.nav-whatsapp:hover { background: var(--color-blue-dark); color: var(--color-white); }

/* ===== HERO ===== */
.hero { padding: calc(var(--header-h) + 60px) 0 80px; background: linear-gradient(180deg, var(--color-blue-light) 0%, var(--color-white) 100%); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }
.hero-badge { display: inline-block; padding: 6px 14px; background: var(--color-yellow); color: var(--color-blue-dark); font-weight: 700; font-size: 0.8rem; border-radius: 100px; margin-bottom: 16px; animation: pulse-badge 2s ease-in-out infinite; }
@keyframes pulse-badge { 0%,100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.4); } 50% { box-shadow: 0 0 0 8px rgba(255,215,0,0); } }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; color: var(--color-text); margin-bottom: 16px; letter-spacing: -0.02em; }
.hero-sub { font-size: clamp(1.1rem, 2.5vw, 1.3rem); color: var(--color-text-light); margin-bottom: 12px; line-height: 1.5; }
.hero-proof { font-size: 0.95rem; color: var(--color-blue); font-weight: 600; margin-bottom: 28px; }

/* Formulario */
.lead-form { background: var(--color-white); padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); }
.field { margin-bottom: 20px; }
.field:last-of-type { margin-bottom: 24px; }
.lead-form label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--color-text); margin-bottom: 6px; }
.lead-form input, .lead-form select { width: 100%; padding: 14px 16px; border: 2px solid var(--color-border); border-radius: var(--radius-md); font-size: 1rem; font-family: inherit; color: var(--color-text); background: var(--color-white); transition: border-color var(--transition), box-shadow var(--transition); }
.lead-form input::placeholder { color: #9AA8B8; }
.lead-form input:focus, .lead-form select:focus { outline: none; border-color: var(--color-blue); box-shadow: 0 0 0 3px var(--color-blue-light); }
.lead-form .field.invalid input, .lead-form .field.invalid select { border-color: var(--color-error); }
.lead-form .field.invalid input:focus, .lead-form .field.invalid select:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }

.btn-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px 24px; background: var(--color-blue); color: var(--color-white); font-size: 1.05rem; font-weight: 700; font-family: inherit; border: none; border-radius: var(--radius-md); cursor: pointer; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); }
.btn-cta:hover:not(:disabled) { background: var(--color-blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-cta:active:not(:disabled) { transform: translateY(0); }
.btn-cta:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-cta .btn-label { display: inline-block; transition: opacity var(--transition); }
.btn-large { padding: 18px 32px; font-size: 1.1rem; }

.microcopy { margin-top: 16px; font-size: 0.85rem; color: var(--color-text-light); text-align: center; }
.privacy-note { margin-top: 8px; font-size: 0.75rem; color: #8A9BAE; text-align: center; }

/* Panel de demo */
.demo-panel { text-align: center; padding: 32px; }
.demo-panel .check-circle { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: var(--color-yellow-light); border-radius: 50%; margin: 0 auto 16px; color: var(--color-yellow-dark); }
.demo-panel h3 { font-size: 1.5rem; margin-bottom: 8px; color: var(--color-text); }
.demo-panel > p { color: var(--color-text-light); margin-bottom: 24px; }
.demo-btn { width: 100%; }
.demo-status { margin: 16px 0; padding: 12px; border-radius: var(--radius-md); font-weight: 500; font-size: 0.95rem; transition: all var(--transition); }
.demo-status.calling { background: var(--color-blue-light); color: var(--color-blue); }
.demo-status.live { background: var(--color-yellow-light); color: var(--color-yellow-dark); animation: pulse-status 1.5s ease-in-out infinite; }
.demo-status.error { background: #FEF2F2; color: var(--color-error); }
@keyframes pulse-status { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
.btn-hangup { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 24px; background: transparent; color: var(--color-error); font-weight: 600; border: 2px solid var(--color-error); border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition); }
.btn-hangup:hover { background: var(--color-error); color: var(--color-white); }
.demo-note { margin-top: 16px; font-size: 0.85rem; color: var(--color-text-light); }
.demo-note a { font-weight: 600; }

/* Hero visual */
.hero-visual { display: none; }
@media (min-width: 900px) { .hero-visual { display: block; } }
.phone-mockup { perspective: 1000px; }
.phone-screen { width: 280px; height: 560px; margin: 0 auto; background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%); border-radius: 36px; padding: 40px 24px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1); position: relative; }
.phone-screen::before { content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 120px; height: 6px; background: #1E293B; border-radius: 3px; }
.call-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #94A3B8; text-align: center; }
.call-state svg { margin-bottom: 16px; color: var(--color-blue); }
.call-state p { font-size: 1rem; font-weight: 500; }
.pulse-ring { position: absolute; width: 120px; height: 120px; border: 3px solid var(--color-blue); border-radius: 50%; opacity: 0; animation: pulse-ring 2s ease-out infinite; }
.pulse-ring:nth-child(2) { animation-delay: 1s; width: 160px; height: 160px; }
@keyframes pulse-ring { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }

/* ===== SECCIONES COMUNES ===== */
section { padding: 80px 0; }
section.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
section.reveal.visible { opacity: 1; transform: translateY(0); }

h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; text-align: center; color: var(--color-text); margin-bottom: 12px; letter-spacing: -0.01em; }
.section-lead { font-size: 1.1rem; color: var(--color-text-light); text-align: center; max-width: 700px; margin: 0 auto 48px; }

/* ===== PAIN ===== */
.pain { background: var(--color-white); }
.pain-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .pain-grid { grid-template-columns: repeat(3, 1fr); } }
.pain-card { padding: 32px; background: var(--color-blue-light); border-radius: var(--radius-lg); border: 1px solid var(--color-border); transition: transform var(--transition), box-shadow var(--transition); }
.pain-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pain-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--color-white); border-radius: var(--radius-md); color: var(--color-blue); margin-bottom: 16px; }
.pain-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--color-text); }
.pain-card p { font-size: 0.95rem; color: var(--color-text-light); line-height: 1.6; }

/* ===== SOLUTION ===== */
.solution { background: var(--color-blue-light); }
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding: 32px; background: var(--color-white); border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.step-number { position: absolute; top: -12px; left: 24px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--color-yellow); color: var(--color-blue-dark); font-weight: 800; font-size: 0.9rem; border-radius: 50%; box-shadow: var(--shadow-md); }
.step-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: var(--color-blue-light); border-radius: var(--radius-md); color: var(--color-blue); margin-bottom: 16px; }
.step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--color-text); }
.step p { font-size: 0.95rem; color: var(--color-text-light); line-height: 1.6; }

/* ===== SECTORS ===== */
.sectors { background: var(--color-white); }
.sectors-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .sectors-grid { grid-template-columns: repeat(3, 1fr); } }
.sector-card { padding: 32px; background: var(--color-white); border: 2px solid var(--color-border); border-radius: var(--radius-lg); transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition); }
.sector-card:hover { border-color: var(--color-blue); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.sector-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--color-blue-light); border-radius: var(--radius-md); color: var(--color-blue); margin-bottom: 16px; }
.sector-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--color-text); }
.sector-card p { font-size: 0.95rem; color: var(--color-text-light); line-height: 1.6; }

/* ===== RESULTS ===== */
.results { background: var(--color-blue-light); }
.metrics-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; align-items: stretch; }
@media (min-width: 768px) { .metrics-grid { grid-template-columns: repeat(3, 1fr); } }
.metric { text-align: center; padding: 24px; background: var(--color-white); border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.metric-value { display: block; font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; color: var(--color-blue); line-height: 1; }
.metric-label { display: block; margin-top: 8px; font-size: 1rem; color: var(--color-text-light); font-weight: 500; }

.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial { padding: 28px; background: var(--color-white); border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.testimonial-text { font-size: 0.95rem; line-height: 1.6; color: var(--color-text); margin-bottom: 16px; font-style: italic; }
.testimonial-author { font-size: 0.85rem; color: var(--color-text-light); }
.testimonial-author strong { display: block; color: var(--color-text); margin-bottom: 2px; }

/* ===== FAQ ===== */
.faq { background: var(--color-white); }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 12px; background: var(--color-white); overflow: hidden; transition: border-color var(--transition); }
.faq-item:hover { border-color: var(--color-blue); }
.faq-item summary { padding: 20px 24px; font-weight: 600; font-size: 1rem; color: var(--color-text); cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: var(--color-blue-light); color: var(--color-blue); border-radius: 50%; font-size: 1.2rem; font-weight: 700; transition: transform var(--transition); flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); background: var(--color-yellow); color: var(--color-blue-dark); }
.faq-item p { padding: 0 24px 20px; color: var(--color-text-light); line-height: 1.7; font-size: 0.95rem; }

/* ===== CTA FINAL ===== */
.cta-final { background: linear-gradient(180deg, var(--color-white) 0%, var(--color-blue-light) 100%); }
.cta-card { max-width: 600px; margin: 0 auto; text-align: center; }
.cta-card h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: 12px; }
.cta-sub { font-size: 1.1rem; color: var(--color-text-light); margin-bottom: 32px; }
.cta-card .lead-form { box-shadow: var(--shadow-lg); }

/* ===== FOOTER ===== */
.footer { background: var(--color-text); color: #CBD5E1; padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand p { font-size: 0.9rem; color: #94A3B8; margin: 16px 0 20px; line-height: 1.6; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: rgba(255,255,255,0.1); border-radius: 50%; color: var(--color-white); transition: all var(--transition); }
.footer-social a:hover { background: var(--color-blue); color: var(--color-white); transform: translateY(-2px); }
.footer-nav h4, .footer-contact h4 { font-size: 0.95rem; font-weight: 700; color: var(--color-white); margin-bottom: 16px; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: #94A3B8; font-size: 0.9rem; transition: color var(--transition); }
.footer-nav a:hover { color: var(--color-yellow); }
.footer-contact address { font-style: normal; font-size: 0.9rem; line-height: 1.8; color: #94A3B8; }
.footer-contact a { color: #94A3B8; transition: color var(--transition); }
.footer-contact a:hover { color: var(--color-yellow); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 24px; text-align: center; font-size: 0.8rem; color: #64748B; }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float { position: fixed; bottom: 24px; right: 24px; width: 64px; height: 64px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: 999; animation: bounce-in 0.6s ease-out; transition: transform var(--transition), box-shadow var(--transition); }
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 8px 24px rgba(37,211,102,0.4); }
.whatsapp-tooltip { position: absolute; right: 80px; top: 50%; transform: translateY(-50%); background: var(--color-text); color: var(--color-white); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.8rem; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transition: all var(--transition); }
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; visibility: visible; right: 72px; }
@keyframes bounce-in { 0% { transform: scale(0) translateY(20px); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }

/* ===== UTILIDADES ===== */
.reveal { will-change: opacity, transform; }
.reveal:not(.visible) { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Safety fallback: if JS fails, make content visible after 2s */
@keyframes force-visible { to { opacity: 1; transform: translateY(0); } }
.reveal:not(.visible) { animation: force-visible 2s ease forwards; }

@media (max-width: 599px) {
  .lead-form { padding: 24px; }
  .btn-cta { padding: 14px 20px; }
  section { padding: 60px 0; }
}