/* ============================================================
   KTOWA — Estilos base compartidos por todas las páginas
   ============================================================ */

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

:root {
  /* Paleta */
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --teal-pale: #e6faf8;
  --teal-dark: #0f766e;
  --green: #10b981;
  --dark: #0f1923;
  --dark2: #1a2634;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;

  /* WhatsApp */
  --wa-green: #25D366;
  --wa-dark: #128C7E;
  --wa-bg: #ECE5DD;
  --wa-bubble: #DCF8C6;

  /* Tipografía */
  --font-display: 'Roboto', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;

  /* Layout */
  --wrap: 1100px;
  --radius: 14px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); letter-spacing: -0.02em; }

/* ---------- NAV ---------- */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; background: var(--white); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  color: var(--teal-dark); text-decoration: none;
}
.logo-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; gap: 1.75rem; font-size: 0.9rem; }
.nav-links a {
  text-decoration: none; color: var(--muted); transition: color 0.2s; cursor: pointer;
}
.nav-links a:hover, .nav-links a.active { color: var(--teal); }
.nav-right { display: flex; align-items: center; gap: 1rem; }

.nav-cta {
  background: var(--teal); color: var(--white); border: none;
  padding: 0.55rem 1.25rem; border-radius: 9px;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); text-decoration: none;
  display: inline-block; transition: background 0.2s;
}
.nav-cta:hover { background: var(--teal-dark); }

.lang-toggle { display: flex; background: #f1f5f9; border-radius: 6px; overflow: hidden; font-size: 0.75rem; }
.lang-btn {
  padding: 5px 11px; cursor: pointer; border: none; background: transparent;
  font-family: var(--font-body); font-weight: 600; color: var(--muted); transition: all 0.2s;
}
.lang-btn.active { background: var(--teal); color: var(--white); }

/* ---------- BOTONES ---------- */
.btn-primary {
  background: var(--teal); color: var(--white);
  padding: 0.8rem 1.75rem; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer;
  font-family: var(--font-body); text-decoration: none; display: inline-block;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--teal); border: 1.5px solid var(--teal);
  padding: 0.75rem 1.5rem; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  font-family: var(--font-body); text-decoration: none; display: inline-block;
  transition: background 0.2s;
}
.btn-ghost:hover { background: var(--teal-pale); }

/* ---------- SECCIONES ---------- */
.section { padding: 6rem 2rem; max-width: var(--wrap); margin: 0 auto; }
.section-label {
  text-align: center; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--teal); text-transform: uppercase; margin-bottom: 0.85rem;
}
.section-title {
  text-align: center; font-size: 2.1rem; font-weight: 700;
  color: var(--dark); margin-bottom: 0.9rem; line-height: 1.2;
}
.section-sub {
  text-align: center; color: var(--muted); font-size: 1.02rem;
  max-width: 560px; margin: 0 auto 3.5rem; line-height: 1.7;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.75rem; border: 1px solid var(--border);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: 0 8px 30px rgba(13,148,136,0.10); border-color: #cbe9e4; }
.card h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--dark); }
.card p { font-size: 0.9rem; color: var(--muted); line-height: 1.65; }

/* Icono cuadrado teal para cards y features */
.icon-box {
  width: 42px; height: 42px; min-width: 42px; border-radius: 10px;
  background: var(--teal-pale); display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.icon-box svg { width: 21px; height: 21px; stroke: var(--teal); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Iconos de marca que van rellenos, no en trazo (el CSS de arriba gana
   sobre los atributos fill/stroke del propio SVG, así que hace falta esto) */
.icon-box.brand svg { fill: currentColor; stroke: none; }
.icon-box.wa { background: #dcfce7; color: var(--wa-green); }

/* ---------- FOOTER ---------- */
footer { background: var(--dark2); padding: 3rem 2rem 2rem; color: rgba(255,255,255,0.55); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
}
/* Marca + Legal, sin la columna de Producto: se usa desde que
   producto.html, precios.html y contacto.html dejaron de existir. */
.footer-inner.two-col { grid-template-columns: 1.4fr 1fr; }
.footer-brand .logo { color: var(--white); margin-bottom: 0.85rem; }
.footer-brand p { font-size: 0.87rem; line-height: 1.7; max-width: 300px; }
.footer-col h5 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--white); margin-bottom: 1rem; font-weight: 600;
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.55); text-decoration: none;
  font-size: 0.88rem; margin-bottom: 0.6rem; transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  max-width: var(--wrap); margin: 2.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem; text-align: center; color: rgba(255,255,255,0.4);
}

/* ---------- ANIMACIÓN ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up:nth-child(2) { animation-delay: 0.08s; }
.fade-up:nth-child(3) { animation-delay: 0.16s; }
.fade-up:nth-child(4) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- IDIOMA ---------- */
/* Por defecto se muestra inglés; la clase .es en <html> invierte la visibilidad.
   Se usa display:revert (no block) para no romper spans inline ni flex/grid. */
[data-lang="es"] { display: none; }
.es [data-lang="es"] { display: revert; }
.es [data-lang="en"] { display: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  .section { padding: 4rem 1.25rem; }
  .section-title { font-size: 1.7rem; }
}
