/* Villar.do — EaaS: Estructura como Servicio
   CSS pro: scroll suave, responsive total, animaciones, dark mode.
*/

/* === Preferencias globales === */
:root {
  --header-height: 84px;

  /* Tema claro (default) */
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #eb4d2f;     /* naranja del logo */
  --brand-700: #c53f26;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.12);
}

body.theme-dark {
  --bg: #0f1115;
  --bg-soft: #151821;
  --text: #e5e7eb;
  --muted: #a5adba;
  --brand: #ff623f;
  --brand-700: #ff3b1a;
  --card: #0f1220;
  --border: #23283b;
  --shadow: 0 10px 30px rgba(0,0,0,.30);
  --shadow-lg: 0 18px 48px rgba(0,0,0,.40);
}

/* === Scroll suave y compensación por header sticky === */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}
section[id] { scroll-margin-top: var(--header-height); }

/* Resalta la sección destino al navegar con #ancla */
:target {
  animation: targetFlash 1.2s ease;
}
@keyframes targetFlash {
  0%   { box-shadow: 0 0 0 0 rgba(235,77,47,0); }
  20%  { box-shadow: 0 0 0 8px rgba(235,77,47,.18); }
  100% { box-shadow: 0 0 0 0 rgba(235,77,47,0); }
}

/* === Reset/estructura base === */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; height: auto; display: block; }

/* Tipografía fluida */
h1 { 
  font-size: clamp(2rem, 3.6vw, 3.2rem); 
  line-height: 1.15; 
  margin: .4rem 0 1rem; 
}

.section-title { 
  font-size: clamp(1.6rem, 2.3vw, 2rem); 
  margin-bottom: .8rem; 
}

.lead { 
  font-size: clamp(1rem, 1.4vw, 1.25rem); 
  color: var(--muted); 
  max-width: 60ch;
}

.lead_ {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: var(--muted);
  max-width: 60ch;
  text-align: center;         /* Centra el texto */
  margin-left: auto;          /* Centra el bloque */
  margin-right: auto;         /* Centra el bloque */
}



/* === Utilidades responsive === */
.container { width: min(1200px, 92vw); margin: 0 auto; }
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Helpers */
.hidden{display:none!important}
.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:1rem}.mt-4{margin-top:1.5rem}.mt-5{margin-top:2rem}
.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:1rem}.mb-4{margin-bottom:1.5rem}.mb-5{margin-bottom:2rem}
.py-1{padding-block:.25rem}.py-2{padding-block:.5rem}.py-3{padding-block:1rem}.py-4{padding-block:1.5rem}.py-5{padding-block:2rem}
.round{border-radius:.9rem}.center{text-align:center}

/* === Botones y micro-interacciones === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* Centra el texto horizontalmente */
  gap: .5rem;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: .75rem;
  padding: .9rem 1.25rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
  box-shadow: 0 6px 16px rgba(235,77,47,.25);
}

.btn:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
  filter: saturate(1.1);
}

.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(235,77,47,.08);
}


/* === Header / Nav === */
header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(4px);
}
.navbar { display:flex; align-items:center; justify-content:space-between; padding:.8rem 0; min-height: var(--header-height); }
.brand { display:flex; align-items:center; gap:.75rem; text-decoration:none; color:var(--text); }
.brand img { height:36px; width:auto; border-radius:.35rem; }
.brand .title { font-weight:800; letter-spacing:.2px; }
nav a { color:var(--muted); text-decoration:none; font-weight:600; padding:.5rem .75rem; border-radius:.5rem; transition: color .2s ease, background .2s ease; }
nav a:hover { color:var(--text); background:var(--bg-soft); }
.nav-actions { display:flex; align-items:center; gap:.5rem; }
#mobileToggle { display:none; }
@media (max-width: 960px){
  nav { display:none; }
  #mobileToggle { display:flex; }
}
.mobile-menu {
  display:none; border-top:1px solid var(--border); padding:.5rem 0 1rem;
}
.mobile-menu a { display:block; padding:.6rem .2rem; text-decoration:none; color:var(--muted); border-radius:.5rem; }
.mobile-menu a:hover { background:var(--bg-soft); color:var(--text); }

/* === Secciones === */
section { padding: 3.5rem 0; }
.kicker { color:var(--brand); font-weight:800; letter-spacing:.12em; text-transform:uppercase; font-size:.9rem; }

.hero { padding: 4.5rem 0 2.5rem; }
.hero-card {
  margin-top:2rem; padding:1.5rem; background:var(--card);
  border:1px solid var(--border); box-shadow:var(--shadow); border-radius:1.25rem;
  display:grid; grid-template-columns:1.3fr 1fr; gap:1rem;
}
.hero-list { margin:0; padding-left:1rem; }
.hero-list li { margin:.35rem 0; }
@media (max-width: 960px){ .hero-card { grid-template-columns:1fr; } }

/* Tarjetas y badges */
.card {
  background:var(--card); border:1px solid var(--border); box-shadow:var(--shadow);
  border-radius:1rem; padding:1.25rem;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(235,77,47,.35); }


.card label {
  display: block;       /* asegura que ocupe todo el ancho */
  text-align: left;     /* alinea el texto a la izquierda */
  margin-bottom: .25rem;/* pequeño espacio opcional debajo del label */
}
.badge {
  display:inline-block; font-size:.78rem; padding:.25rem .55rem; border-radius:.4rem;
  background:var(--bg-soft); border:1px solid var(--border); color:var(--muted); font-weight:700;
}

/* Features y precios */
.feature { display:flex; gap:.9rem; align-items:flex-start; }
.feature .dot { width:10px; height:10px; border-radius:50%; background:var(--brand); margin-top:.5rem; flex-shrink:0; }

.pricing { align-items:stretch; }
.price { font-weight:900; font-size:2.2rem; }
.price small { font-size:.9rem; color:var(--muted); font-weight:600; }

/* FAQ */
.faq-item { border-bottom:1px solid var(--border); padding:1rem 0; }
.faq-q { cursor:pointer; display:flex; justify-content:space-between; align-items:center; font-weight:700; }
.faq-a { display:none; padding:.5rem 0 1rem; color:var(--muted); }

/* Footer */
footer { border-top:1px solid var(--border); padding:2rem 0; }
.footer-col a { display:block; color:var(--muted); text-decoration:none; padding:.25rem 0; transition: color .2s ease; }
.footer-col a:hover { color:var(--text); }

/* === Animaciones de entrada reutilizables (sin JS) === */
/* Úsalas agregando las clases a tus elementos: .reveal, .reveal-up, .reveal-delay-1..3 */
.reveal      { animation: fadeIn .6s ease .05s both; }
.reveal-up   { animation: fadeInUp .7s cubic-bezier(.2,.7,.2,1) .05s both; }
.reveal-pop  { animation: pop .5s cubic-bezier(.2,.7,.2,1) .05s both; }
.reveal-delay-1 { animation-delay: .15s; }
.reveal-delay-2 { animation-delay: .3s; }
.reveal-delay-3 { animation-delay: .45s; }

@keyframes fadeIn {
  from { opacity:0; filter: blur(6px); }
  to   { opacity:1; filter: blur(0); }
}
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(18px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes pop {
  0%   { opacity:0; transform: scale(.96); }
  100% { opacity:1; transform: scale(1); }
}

/* Desactiva animaciones si el usuario prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* === Extras de accesibilidad y focus === */
a, button { outline: none; }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(235,77,47,.35);
  transition: box-shadow .2s ease;
}
/* --- Ajustes para el bloque de usuario en la navbar --- */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.4rem 0.8rem;
  height: 40px;
}

.user-info i {
  font-size: 1.1rem;
  color: var(--brand);
}

.user-email {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
}

.logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--brand);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  transition: background 0.2s ease, color 0.2s ease;
}

.logout-link i {
  color: currentColor;
  transition: color 0.2s ease;
}

.logout-link:hover {
  background: var(--brand);
  color: #fff;
}


/* tarjetas pie de pagina */
/* === Footer === */
.grid-4 {
  display: grid;
  /* más proporción para que “pagos” ocupe menos espacio */
  grid-template-columns: 1.2fr 1fr 0.8fr auto;
  gap: 1.5rem; /* reducimos la separación */
  align-items: start;
}

.footer-col strong {
  display: block;
  margin-bottom: .5rem;
  font-weight: 600;
}

/* === Métodos de pago === */
.pagos {
  text-align: right;
  justify-self: end; /* empuja la columna hacia la derecha */
}

.payments {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: .25rem 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.payments li {
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 40px;
}

.payments img {
  height: 24px;
  width: auto;
  display: block;
}

.currency-note {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  color: #555;
  line-height: 1.2;
  text-align: right;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;
  }
  .pagos {
    justify-self: center;
    text-align: center;
  }
  .payments {
    justify-content: center;
  }
  .currency-note {
    text-align: center;
  }
}
