/* =================================================================
   Jiveal — main.css
   Cero dependencias. Mobile-first. CSS variables.
   ================================================================= */

:root {
  --bg: #ffffff;
  --surface: #fafafb;
  --surface-2: #f3f4f8;
  --text: #0a0a0e;
  --text-muted: #555562;
  --text-soft: #82828e;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --success: #059669;
  --border: #e8e8ee;
  --border-strong: #d1d1d8;
  --max-w: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 14, .04);
  --shadow: 0 6px 24px rgba(10, 10, 14, .06);
  --shadow-lg: 0 18px 48px rgba(10, 10, 14, .10);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; }
ul, ol { list-style: none; }
strong { font-weight: 600; }

/* Typography */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.4rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; letter-spacing: 0; }
p { color: var(--text-muted); }

/* Layout */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section-lg { padding: 6rem 0; }
.section-tight { padding: 2.5rem 0; }
@media (min-width: 768px) {
  .section { padding: 6rem 0; }
  .section-lg { padding: 8rem 0; }
}

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; }
.center { display: flex; align-items: center; justify-content: center; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.75rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-muted); line-height: 1.6; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1;
  transition: transform .15s, background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #1c1c24; color: var(--bg); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { background: #e8e8ee; color: var(--text); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: 1.05rem 1.7rem; font-size: 1rem; }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-soft { background: var(--surface); border-color: transparent; }
.card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { margin-bottom: 1rem; }
.card-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-weight: 600; color: var(--accent);
  font-size: 0.92rem;
}
.card-link::after { content: '→'; transition: transform .15s; }
.card-link:hover::after { transform: translateX(3px); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}
.badge-success { background: #ecfdf5; color: var(--success); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

/* Header / Nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0;
}
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text); display: inline-flex; align-items: center; }
.logo span { color: var(--accent); }
.site-header .logo-img { height: 44px !important; width: auto !important; display: block; }
.site-footer .logo-img { height: 56px; width: auto; display: block; }
@media (min-width: 768px) {
  .site-header .logo-img { height: 52px !important; }
  .site-footer .logo-img { height: 64px; }
}
.nav-links { display: none; gap: 1.7rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: none; }
.nav-toggle { display: flex; flex-direction: column; gap: 4px; padding: 0.5rem; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.nav-mobile {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
}
.nav-mobile.is-open { display: block; }
.nav-mobile a { display: block; padding: 0.7rem 0; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--border); }
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile .btn { width: 100%; margin-top: 1rem; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.hero h1 { margin-bottom: 1.25rem; }
.hero .lead { max-width: 640px; margin-bottom: 2rem; }
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}
.hero-visual {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}
.hero-collage {
  aspect-ratio: 4/3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  position: relative;
}
.hero-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(10, 10, 14, 0.12);
  display: block;
  transition: transform .3s ease;
}
.hero-collage img:hover { transform: translateY(-3px); }
@media (min-width: 900px) {
  .hero { padding: 7rem 0 5rem; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
}

/* Trust bar */
.trust {
  padding: 1.5rem 0 0;
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  font-size: 0.85rem; color: var(--text-soft);
  align-items: center;
}
.trust > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.trust-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* Sections common */
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head h2 { margin-bottom: 0.8rem; }

/* Process steps */
.steps { counter-reset: step; }
.step {
  display: flex; gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.step:first-child { border-top: 0; }
.step-num {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.step h4 { margin-bottom: 0.3rem; }

/* Pricing table */
.pricing {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}
.pricing th, .pricing td {
  padding: 1rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.pricing th { font-weight: 600; color: var(--text); background: var(--surface); }
.pricing td:last-child, .pricing th:last-child { text-align: right; font-weight: 600; }

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; color: var(--text-soft); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { margin-top: 0.8rem; }

/* Cases grid */
.case-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.case-card-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  display: grid; place-items: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.4rem;
  overflow: hidden;
}
.case-card-img.with-photo { padding: 0; background: var(--surface-2); }
.case-card-img.with-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .4s ease;
}
.case-card:hover .case-card-img.with-photo img { transform: scale(1.03); }
.case-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.case-card-meta { font-size: 0.82rem; color: var(--text-soft); margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.case-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.case-card p { font-size: 0.95rem; flex: 1; }

/* Stats row */
.stats {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
  padding: 2.5rem 0;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-num { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; color: var(--text); letter-spacing: -0.02em; line-height: 1; }
.stat-label { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.4rem; }

/* CTA section */
.cta-block {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 3rem 1.75rem;
  text-align: center;
}
.cta-block h2 { color: #fff; margin-bottom: 0.8rem; }
.cta-block p { color: rgba(255,255,255,.75); max-width: 560px; margin: 0 auto 1.75rem; }
.cta-block .btn-primary { background: #fff; color: var(--text); }
.cta-block .btn-primary:hover { background: #f0f0f5; color: var(--text); }
.cta-block .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.cta-block .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
@media (min-width: 768px) { .cta-block { padding: 4.5rem 3rem; } }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-grid h5 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); margin-bottom: 0.8rem; }
.footer-grid ul li { margin-bottom: 0.5rem; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* Forms */
.form { max-width: 520px; margin: 0 auto; }
.form-row { margin-bottom: 1.1rem; }
.form-row label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  font-size: 0.93rem;
  color: var(--text);
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row textarea { min-height: 130px; resize: vertical; }
.form-row .checkbox { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.88rem; color: var(--text-muted); }
.form-row .checkbox input { width: auto; }
.form-row .hint { font-size: 0.82rem; color: var(--text-soft); margin-top: 0.3rem; }
.form .btn { width: 100%; }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-error {
  display: none;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin: 0 auto 1.5rem;
  max-width: 520px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}
.form-error.is-visible { display: block; }

/* WhatsApp floating */
.fab-whatsapp {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 60;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.35);
  transition: transform .15s;
}
.fab-whatsapp:hover { transform: scale(1.05); color: #fff; }
.fab-whatsapp svg { width: 30px; height: 30px; }

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  z-index: 70;
  display: none;
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p { color: rgba(255,255,255,.85); margin-bottom: 1rem; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cookie-banner button {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}
.cookie-banner .btn-accept { background: #fff; color: var(--text); }
.cookie-banner .btn-reject { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25); }
@media (min-width: 768px) {
  .cookie-banner { left: auto; right: 1.5rem; bottom: 1.5rem; max-width: 420px; }
}

/* Page hero (interior pages) */
.page-hero {
  padding: 5rem 0 3rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.page-hero h1 { max-width: 780px; margin-bottom: 1.25rem; }
.page-hero .lead { max-width: 640px; }

/* Utilities */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.bg-soft { background: var(--surface); }
.divider { height: 1px; background: var(--border); border: 0; margin: 3rem 0; }

/* Pain list */
.pain-list { display: grid; gap: 0.6rem; margin: 1.5rem 0; }
.pain-list li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--text-muted);
}
.pain-list li::before {
  content: '✕';
  position: absolute; left: 0; top: 0;
  color: #d04545;
  font-weight: 700;
}
.win-list { display: grid; gap: 0.6rem; margin: 1.5rem 0; }
.win-list li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--text-muted);
}
.win-list li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  color: var(--success);
  font-weight: 700;
}

/* Print / accessibility */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
::selection { background: var(--accent-soft); color: var(--accent); }
