/* =========================================================
   Madoberia — Landing Page Principal
   Paleta: deep navy + cyan/violet gradient + warm white
   Fuente: Outfit (display) + Manrope (body)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Manrope:wght@300;400;500;600;700&display=swap');

/* ── Reset y variables ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #07080f;
  --bg-2:       #0d0e1a;
  --bg-card:    #111225;
  --border:     rgba(255,255,255,0.07);
  --border-h:   rgba(255,255,255,0.14);
  --cyan:       #22d3ee;
  --violet:     #8b5cf6;
  --white:      #f0f2ff;
  --muted:      #8891b4;
  --radius:     18px;
  --radius-sm:  10px;
  --shadow:     0 20px 60px rgba(0,0,0,0.5);
  --glow:       0 0 40px rgba(34,211,238,0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Fondo animado ─────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(34,211,238,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139,92,246,0.10) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Utilidades ────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.gradient-text {
  display: inline-block;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--cyan); text-transform: uppercase;
}

/* ── Barra de navegación ───────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(7,8,15,0.85);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white);
}
.nav-logo img { height: 40px; }
.nav-logo span { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 18px; }
.nav-links {
  display: flex; gap: 6px; list-style: none;
}
.nav-links a {
  display: block; padding: 7px 14px; border-radius: 8px;
  text-decoration: none; font-size: 14px; font-weight: 500;
  color: var(--muted); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-cta {
  padding: 9px 20px; border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #07080f !important; font-weight: 700 !important; font-size: 13px !important;
  transition: opacity .2s, transform .2s !important;
}
.nav-cta:hover { opacity: .9; transform: translateY(-1px); background: none !important; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: transparent; border: none; padding: 0; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: .3s; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative; z-index: 1;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden; /* evita que el H1 grande desborde el viewport en móvil */
}
.hero-eyebrow { margin-bottom: 24px; }
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 9vw, 80px);
  font-weight: 800; line-height: 1.35;
  letter-spacing: -0.03em; margin-bottom: 24px;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 20px); color: var(--muted);
  max-width: 560px; margin: 0 auto 40px; font-weight: 400;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 32px; border-radius: 14px; font-size: 16px;
  font-weight: 700; text-decoration: none; cursor: pointer; border: none;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  color: #07080f; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 0 0 rgba(34,211,238,0);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(34,211,238,0.35); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 28px; border-radius: 14px; font-size: 15px;
  font-weight: 600; text-decoration: none;
  border: 1px solid var(--border-h); color: var(--white);
  background: transparent; transition: border-color .2s, background .2s;
}
.btn-secondary:hover { border-color: var(--cyan); background: rgba(34,211,238,0.06); }

/* Estadísticas hero */
.hero-stats {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 64px; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Outfit', sans-serif; font-size: 36px;
  font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 500; }

/* ── Divider decorativo ────────────────────────────────── */
.section-divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border-h), transparent);
  margin: 0 auto; max-width: 800px;
}

/* ── Sección herramientas ──────────────────────────────── */
.tools-section {
  position: relative; z-index: 1;
  padding: 80px 0 100px;
}
.section-header {
  text-align: center; margin-bottom: 60px;
}
.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-header p { color: var(--muted); font-size: 17px; max-width: 480px; margin: 0 auto; }

/* Grid de tarjetas */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Tarjeta herramienta */
.tool-card {
  position: relative; overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  text-decoration: none; color: inherit;
}
.tool-card:hover {
  border-color: var(--border-h);
  transform: translateY(-6px);
  box-shadow: var(--shadow), var(--glow);
}
.tool-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(34,211,238,0.04), rgba(139,92,246,0.04));
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.tool-card:hover::after { opacity: 1; }

/* Imagen preview */
.tool-img-wrap {
  width: 100%;
  height: 192px;          /* altura fija → ninguna imagen se recorta */
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;    /* muestra la imagen completa, sin cortes */
  transition: transform .4s ease;
}
.tool-card:hover .tool-img-wrap img { transform: scale(1.03); }

/* Contenido tarjeta */
.tool-body {
  padding: 20px 22px 22px; flex: 1;
  display: flex; flex-direction: column;
}
.tool-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; font-size: 20px;
  border: 1px solid var(--border);
}
.tool-name {
  font-family: 'Outfit', sans-serif;
  font-size: 18px; font-weight: 700;
  margin-bottom: 8px; color: var(--white);
  transition: color .3s;
}

.tool-desc {
  font-size: 15px; color: var(--muted); line-height: 1.65;
  flex: 1; margin-bottom: 16px;
}
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tool-tag {
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  border: 1px solid var(--border); color: var(--muted);
  background: rgba(255,255,255,0.03);
}
.tool-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--cyan);
  text-decoration: none; transition: gap .2s;
  margin-top: auto;
}
.tool-card:hover .tool-link { gap: 10px; }
.tool-link svg { width: 14px; height: 14px; }

/* Stretched link utility - hace que toda la tarjeta sea clickable */
.stretched-link::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 10;
  pointer-events: auto;
  background-color: rgba(0,0,0,0);
}


/* Colores por herramienta */
.card-seo    .tool-icon { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.2);  color: #4ade80; }
.card-iva    .tool-icon { background: rgba(34,211,238,0.1); border-color: rgba(34,211,238,0.2); color: var(--cyan); }
.card-img    .tool-icon { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); color: #60a5fa; }
.card-mail   .tool-icon { background: rgba(236,72,153,0.1); border-color: rgba(236,72,153,0.2); color: #f472b6; }
.card-pass   .tool-icon { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); color: #fbbf24; }
.card-qr     .tool-icon { background: rgba(139,92,246,0.1); border-color: rgba(139,92,246,0.2); color: #a78bfa; }
.card-pct    .tool-icon { background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.2);  color: #fb923c; }

/* Link colors */
.card-seo  .tool-link { color: #4ade80; }
.card-seo:hover .tool-name { color: #4ade80; }

.card-iva  .tool-link { color: var(--cyan); }
.card-iva:hover .tool-name { color: var(--cyan); }

.card-img  .tool-link { color: #60a5fa; }
.card-img:hover .tool-name { color: #60a5fa; }

.card-mail .tool-link { color: #f472b6; }
.card-mail:hover .tool-name { color: #f472b6; }

.card-pass .tool-link { color: #fbbf24; }
.card-pass:hover .tool-name { color: #fbbf24; }

.card-qr   .tool-link { color: #a78bfa; }
.card-qr:hover .tool-name { color: #a78bfa; }

.card-pct  .tool-link { color: #fb923c; }
.card-pct:hover .tool-name { color: #fb923c; }

/* Centrar el 7º item cuando queda solo en su fila */
.tools-grid .tool-card:nth-child(7):last-child {
  grid-column: 2;
}


/* ── Sección "Por qué Madoberia" ───────────────────────── */
.why-section {
  position: relative; z-index: 1;
  padding: 80px 0;
  background: linear-gradient(180deg, transparent, rgba(13,14,26,0.6), transparent);
}
.why-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.why-card {
  padding: 32px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.why-icon { font-size: 32px; margin-bottom: 16px; }
.why-title {
  font-family: 'Outfit', sans-serif; font-size: 18px;
  font-weight: 700; margin-bottom: 10px;
}
.why-text { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ── FAQ ───────────────────────────────────────────────── */
.faq-section {
  position: relative; z-index: 1;
  padding: 80px 0 100px;
}
.faq-list { max-width: 740px; margin: 0 auto; }
details {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 12px; overflow: hidden;
  transition: border-color .2s;
}
details[open] { border-color: var(--border-h); }
summary {
  list-style: none; cursor: pointer;
  padding: 20px 24px; font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary .faq-icon {
  flex-shrink: 0; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: transform .3s, background .3s;
}
details[open] summary .faq-icon {
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border: none; color: #07080f;
}
.faq-answer { padding: 0 24px 20px; color: var(--muted); font-size: 15.5px; line-height: 1.75; }

/* ── CTA final ─────────────────────────────────────────── */
.cta-section {
  position: relative; z-index: 1;
  padding: 80px 0 100px;
}
.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px; padding: 72px 48px;
  text-align: center; position: relative; overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.cta-box h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 4vw, 48px); font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.cta-box p { color: var(--muted); font-size: 17px; max-width: 420px; margin: 0 auto 36px; }
.cta-tools-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 36px;
}
.cta-tool-pill {
  padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-decoration: none; transition: border-color .2s, color .2s;
}
.cta-tool-pill:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Footer ────────────────────────────────────────────── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-logo img { height: 28px; }
.footer-logo span {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 15px;
  color: var(--white);
}
.footer-links { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-links a {
  padding: 5px 12px; border-radius: 6px;
  font-size: 13px; color: var(--muted); text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 12px; color: var(--muted); }

/* ── Banner de cookies ─────────────────────────────────── */
#cookie-banner {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 999; width: calc(100% - 40px); max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
}
#cookie-banner p {
  font-size: 14px; color: var(--muted); line-height: 1.55; flex: 1; min-width: 200px; margin: 0;
}
#cookie-banner a { color: var(--cyan); text-decoration: none; }
#cookie-banner a:hover { text-decoration: underline; }
.cookie-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  padding: 9px 18px; border-radius: 10px; font-size: 13px;
  font-weight: 700; cursor: pointer; border: none; transition: opacity .2s, transform .2s;
}
.cookie-btn--accept {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #07080f;
}
.cookie-btn--reject {
  background: transparent;
  border: 1px solid var(--border-h);
  color: var(--muted);
}
.cookie-btn:hover { opacity: .85; transform: translateY(-1px); }

/* ── Páginas legales ───────────────────────────────────── */
.legal-article {
  position: relative; z-index: 1;
  max-width: 760px; margin: 64px auto 100px;
  padding: 0 24px;
}
.legal-article h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.legal-article .legal-meta {
  color: var(--muted); font-size: 13px; margin-bottom: 40px;
}
.legal-article h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px; font-weight: 700;
  margin: 36px 0 10px; color: var(--white);
}
.legal-article h3 {
  font-size: 16px; font-weight: 700;
  margin: 24px 0 8px; color: var(--white);
}
.legal-article p { color: var(--muted); line-height: 1.75; margin-bottom: 14px; }
.legal-article ul, .legal-article ol {
  color: var(--muted); line-height: 1.75; margin: 0 0 14px 20px;
}
.legal-article li { margin-bottom: 6px; }
.legal-article a { color: var(--cyan); text-decoration: none; }
.legal-article a:hover { text-decoration: underline; }
.legal-article code {
  font-family: monospace; font-size: 13px;
  background: rgba(255,255,255,0.07); border-radius: 4px;
  padding: 1px 5px; color: var(--white);
}
.legal-article strong { color: var(--white); font-weight: 600; }

/* ── Animaciones de entrada ────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero > * { animation: fadeUp .6s ease both; }
.hero > *:nth-child(1) { animation-delay: .0s; }
.hero > *:nth-child(2) { animation-delay: .1s; }
.hero > *:nth-child(3) { animation-delay: .2s; }
.hero > *:nth-child(4) { animation-delay: .3s; }
.hero > *:nth-child(5) { animation-delay: .4s; }

.tool-card {
  opacity: 0;
  animation: fadeUp .5s ease both;
}
.tool-card:nth-child(1) { animation-delay: .05s; }
.tool-card:nth-child(2) { animation-delay: .10s; }
.tool-card:nth-child(3) { animation-delay: .15s; }
.tool-card:nth-child(4) { animation-delay: .20s; }
.tool-card:nth-child(5) { animation-delay: .25s; }
.tool-card:nth-child(6) { animation-delay: .30s; }
.tool-card:nth-child(7) { animation-delay: .35s; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .tools-grid { grid-template-columns: 1fr; }
  .why-grid   { grid-template-columns: 1fr; }
  .nav-hamburger { display: flex; }
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: clamp(24px, 8vw, 42px); letter-spacing: -0.02em; }
  .hero-stats { gap: 28px; }
  .cta-box { padding: 48px 24px; }
  .footer-inner { flex-direction: column; text-align: center; }

  /* Menú móvil — oculto por defecto, visible con .nav-open */
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: 68px; left: 0; right: 0;
    width: 100vw;
    background: rgba(7,8,15,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 16px;
    z-index: 99;
    box-sizing: border-box;
  }

  /* Cuando el JS añade .nav-open, se muestra */
  .nav-links.nav-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    white-space: nowrap;   /* evita que el texto se parta en mitad de la palabra */
    overflow: visible;     /* nunca recorta letras */
    box-sizing: border-box;
  }
}
