/* ============================================================
   JJDevSolutions — hoja de estilos principal
   Tema: oscuro/claro por tokens (r115); el degradado magenta → violeta → cyan queda en la marca
   ============================================================ */

:root {
  /* r115 · Tema oscuro (por defecto). Superficies cálidas, hairlines y UN acento. */
  --bg: #0b0b10;
  --bg-alt: #0f0f15;
  --surface: #14141b;
  --surface-2: #1b1b24;
  --raised: #202029;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f3f8;
  --text-2: #a2a2b5;
  --muted: #9a9aad;
  --accent: #8b5cf6;
  --accent-text: #b39cff;
  --accent-fg: #ffffff;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --ok: #3ccf7a;
  --warn: #f0b429;
  --danger: #ff6b7a;
  --danger-text: #ff8aa4;
  --info: #38bdf8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  /* Marca JJDevSolutions: el degradado vive SOLO en la marca y el hero del sitio */
  --pink: #ef2f9f;
  --violet: var(--accent);
  --cyan: #2dd6f5;
  --grad: linear-gradient(100deg, var(--pink), #8b5cf6 52%, var(--cyan));
  --glow-pink: rgba(239, 47, 159, 0.35);
  --glow-cyan: rgba(45, 214, 245, 0.3);
  --glow-violet: rgba(139, 92, 246, 0.35);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1140px;
  --radius: 10px;
  --radius-lg: 14px;
  color-scheme: dark;
}

/* r115 · Tema claro: el mismo juego de tokens, resuelto para papel blanco.
   Solo entra en la app (html.app); el sitio de marketing sigue oscuro. */
html.app[data-theme="light"] {
  --bg: #f6f6fa; --bg-alt: #efeff5; --surface: #ffffff; --surface-2: #f0f0f6; --raised: #ffffff;
  --line: #e3e3ec; --line-strong: #cfcfdd;
  --text: #15151d; --text-2: #565668; --muted: #6e6e82;
  --accent: #6d4fd6; --accent-text: #5b3fc4; --accent-fg: #ffffff; --accent-soft: rgba(109, 79, 214, 0.10);
  --ok: #1a9e55; --warn: #b7791f; --danger: #d0333f; --danger-text: #b42332; --info: #0b7fb0;
  --shadow: 0 1px 2px rgba(20, 20, 40, 0.06);
  --cyan: #0b7fb0; --pink: #c2257f;
  --glow-pink: transparent; --glow-cyan: transparent; --glow-violet: transparent;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  html.app:not([data-theme="dark"]) {
    --bg: #f6f6fa; --bg-alt: #efeff5; --surface: #ffffff; --surface-2: #f0f0f6; --raised: #ffffff;
    --line: #e3e3ec; --line-strong: #cfcfdd;
    --text: #15151d; --text-2: #565668; --muted: #6e6e82;
    --accent: #6d4fd6; --accent-text: #5b3fc4; --accent-fg: #ffffff; --accent-soft: rgba(109, 79, 214, 0.10);
    --ok: #1a9e55; --warn: #b7791f; --danger: #d0333f; --danger-text: #b42332; --info: #0b7fb0;
    --shadow: 0 1px 2px rgba(20, 20, 40, 0.06);
    --cyan: #0b7fb0; --pink: #c2257f;
    --glow-pink: transparent; --glow-cyan: transparent; --glow-violet: transparent;
    color-scheme: light;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-fg); }

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

.wrap-narrow { max-width: 780px; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }

/* Texto con degradado (palabras destacadas en titulares) */
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- decoraciones (puntos y destellos) ---------- */

.deco { position: absolute; pointer-events: none; }

.deco-dots {
  width: 120px;
  height: 88px;
  background-image: radial-gradient(var(--cyan) 1.6px, transparent 1.6px);
  background-size: 15px 15px;
  opacity: 0.75;
}

.deco-spark {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--pink);
  text-shadow: 0 0 18px var(--glow-pink);
  animation: spark 3.2s ease-in-out infinite;
}

.deco-spark-cyan {
  color: var(--cyan);
  text-shadow: 0 0 18px var(--glow-cyan);
  animation-delay: 1.4s;
}

@keyframes spark {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.7) rotate(20deg); opacity: 0.65; }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  margin-right: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  position: relative;
  color: var(--text) !important;
  padding: 8px 18px;
  border-radius: 999px;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.nav-cta:hover {
  background:
    linear-gradient(var(--accent-soft), var(--accent-soft)) padding-box,
    var(--grad) border-box;
}

.lang-switch {
  font-family: var(--mono);
  font-size: 0.8rem !important;
  color: var(--muted) !important;
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.lang-switch:hover { color: var(--text) !important; border-color: var(--muted); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 104px 0 116px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Nebulosa magenta→violeta→cyan al estilo Luminex */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 480px at 88% 8%, rgba(239, 47, 159, 0.22), transparent 62%),
    radial-gradient(640px 420px at 104% 62%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 60%),
    radial-gradient(560px 420px at 70% 110%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%);
  filter: blur(6px);
  pointer-events: none;
}

.hero .deco-dots { top: 72px; right: 6%; }
.hero .deco-spark { bottom: 120px; left: 4%; }
.hero .deco-spark-cyan { top: 130px; right: 40%; bottom: auto; left: auto; }

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    var(--grad) border-box;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 47, 159, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(239, 47, 159, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 47, 159, 0); }
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  color: var(--text);
}

.hero-lead {
  margin-top: 24px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- terminal ---------- */

.terminal {
  position: relative;
  background: #0a0a12;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.83rem;
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.75),
    0 0 60px -18px var(--glow-violet),
    0 0 90px -40px var(--glow-pink);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #0e0e16;
}

.terminal-bar > span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.terminal-bar > span:nth-child(1) { background: var(--pink); }
.terminal-bar > span:nth-child(2) { background: var(--violet); }
.terminal-bar > span:nth-child(3) { background: var(--cyan); }

.terminal-title {
  margin-left: 10px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-body {
  padding: 20px 20px 24px;
  display: grid;
  gap: 9px;
}

.t-cmd { color: var(--text); }
.t-cmd::before { content: "$ "; color: var(--cyan); }
.t-out { color: var(--muted); padding-left: 17px; }
.t-ok { color: var(--cyan); }

.cursor {
  display: inline-block;
  width: 9px;
  height: 15px;
  background: var(--pink);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- botones ---------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, black);
  border-color: color-mix(in srgb, var(--accent) 86%, black);
}
.btn-primary:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }

/* ---------- secciones ---------- */

.section { position: relative; padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 54px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  position: relative;
}

/* Subrayado degradado bajo el encabezado de sección */
.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 120px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

.section-num {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }

/* ---------- servicios ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  padding: 30px 28px 34px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--violet);
  box-shadow:
    0 22px 44px -22px rgba(0, 0, 0, 0.65),
    0 0 40px -14px var(--glow-violet);
}
.service-card:hover::before { opacity: 1; }

.service-num {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

.service-card h3 { font-size: 1.25rem; margin-bottom: 12px; }

.service-desc {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 22px;
}

.service-list {
  list-style: none;
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.service-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
}
.service-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.7rem;
  color: var(--cyan);
}

/* ---------- proceso ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.steps li {
  counter-increment: step;
  background: var(--bg-alt);
  padding: 30px 24px 34px;
  transition: background 0.2s ease;
}
.steps li:hover { background: var(--surface-2); }

.steps li::before {
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 500;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-bottom: 16px;
}

.steps h3 { font-size: 1.05rem; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 0.92rem; }

/* ---------- sobre / tech ---------- */

.about { display: grid; gap: 48px; }

.about-text { max-width: 70ch; }
.about-text p { margin-bottom: 18px; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.testimonials { display: grid; gap: 20px; }

.testimonial {
  border-left: 2px solid var(--pink);
  padding: 6px 0 6px 22px;
  color: var(--muted);
}
.testimonial cite { display: block; margin-top: 10px; font-style: normal; font-size: 0.9rem; color: var(--text); }

.tech-title {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 22px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.tech-grid > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tech-grid > div:hover {
  border-color: var(--violet);
  box-shadow: 0 0 32px -16px var(--glow-violet);
}

.tech-grid dt { font-weight: 600; font-size: 0.95rem; margin-bottom: 14px; }

.tech-grid dd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 4px 11px;
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px -6px var(--glow-cyan);
}

/* ---------- faq ---------- */

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover, .faq-item[open] {
  border-color: var(--violet);
  box-shadow: 0 0 26px -14px var(--glow-violet);
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.2rem;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- contacto ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
}

.contact-lead { font-size: 1.1rem; max-width: 40ch; }

/* Sin formulario (SMTP no configurado): info + botón de correo */
.contact-simple { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
.contact-cta { justify-self: start; }

.contact-data { margin-top: 34px; display: grid; gap: 20px; }
.contact-data dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 3px;
}
.contact-data dd { font-size: 0.98rem; }

/* ---------- formulario ---------- */

.contact-form { display: grid; gap: 18px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
}

.contact-form .opt { color: var(--muted); font-weight: 400; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-form textarea { resize: vertical; min-height: 120px; }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.contact-form button { justify-self: start; margin-top: 6px; }
.contact-form button:disabled { opacity: 0.6; cursor: wait; }

/* Honeypot anti-spam: invisible para personas, visible para bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status {
  font-size: 0.9rem;
  font-family: var(--mono);
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--muted);
}
.form-status.ok { border-color: var(--cyan); color: var(--cyan); background: color-mix(in srgb, var(--cyan) 7%, transparent); }
.form-status.err { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger-text); background: rgba(239, 47, 159, 0.08); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 30px;
}

.footer-brand { font-weight: 700; margin-bottom: 6px; }
.footer-inner p a { color: var(--muted); }
.footer-inner p a:hover { color: var(--cyan); }

.footer-nav { display: flex; gap: 24px; }
.footer-nav a { color: var(--muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--text); }

.footer-copy {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  padding-bottom: 18px;
}
.footer-copy p { font-size: 0.82rem; color: var(--muted); font-family: var(--mono); }

/* ---------- páginas legales ---------- */

.legal-page h2 { margin: 38px 0 14px; font-size: 1.3rem; }
.legal-page h2:first-child { margin-top: 0; font-size: 1.8rem; }
.legal-page p, .legal-page ul { color: var(--muted); margin-bottom: 14px; }
.legal-page ul { padding-left: 22px; }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

.services-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.steps .reveal:nth-child(2) { transition-delay: 0.07s; }
.steps .reveal:nth-child(3) { transition-delay: 0.14s; }
.steps .reveal:nth-child(4) { transition-delay: 0.21s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge-dot, .cursor, .deco-spark { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .terminal { max-width: 520px; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .hero .deco-spark-cyan { display: none; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; width: 100%; }
  .nav-cta { border: 0; padding: 12px 0; background: none; }
  .nav-cta:hover { background: none; box-shadow: none; }
  .lang-switch { width: auto !important; margin-top: 6px; }

  .hero { padding: 64px 0 72px; }
  .section { padding: 64px 0; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero .deco-dots { display: none; }
}

/* ---------- página 404 ---------- */

.nf-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.nf-code { font-family: var(--mono); font-size: clamp(4rem, 12vw, 7rem); font-weight: 700; line-height: 1; }
.nf-title { font-size: 1.4rem; margin: 14px 0 8px; }
.nf-text { color: var(--muted); margin-bottom: 26px; }
.nf-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- productos (portada) y página Domain Watch ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--violet);
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.65), 0 0 40px -14px var(--glow-violet);
}
.product-card.soon { opacity: 0.65; border-style: dashed; }
.product-card.soon:hover { transform: none; box-shadow: none; border-color: var(--line); }

.product-card h3 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.soon-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  border: 1px solid color-mix(in srgb, var(--cyan) 45%, transparent);
  border-radius: 999px;
  padding: 3px 10px;
}

.product-desc { color: var(--muted); font-size: 0.95rem; flex: 1; }

.product-card .btn { align-self: flex-start; }

.dw-hero { padding: 96px 0 90px; }
.dw-hero-copy { max-width: 720px; }
.dw-hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; }

.dw-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.dw-feature { padding: 24px 24px 26px; }
.dw-feature h3 { font-size: 1.02rem; margin-bottom: 8px; }
.dw-feature .service-desc { margin-bottom: 0; }

/* ---------- analizador público de dominios ---------- */

.analyze-band {
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 64px 0;
}

.analyze-box {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.analyze-box h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }

.analyze-lead { color: var(--muted); margin-bottom: 26px; }

#analyze-form { display: flex; gap: 12px; max-width: 520px; margin: 0 auto; }
#analyze-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

#analyze-input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-family: var(--mono);
  font-size: 0.95rem;
}
#analyze-input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--glow-violet);
}

.analyze-status { margin-top: 18px; color: var(--muted); font-family: var(--mono); font-size: 0.88rem; }
.analyze-status.err { color: var(--danger-text); }

.analyze-result {
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: left;
}

.a-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }

.a-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
}
.a-grade-A { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.a-grade-B { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); }
.a-grade-C { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.a-grade-D { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.a-grade-F { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }

.a-domain { font-family: var(--mono); font-weight: 600; font-size: 1.05rem; }
.a-score { color: var(--muted); font-family: var(--mono); font-size: 0.9rem; margin-top: 3px; }

.a-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.a-cat {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
}
.a-cat-name { color: var(--muted); font-size: 0.78rem; }
.a-cat-score { font-family: var(--mono); font-weight: 600; margin-top: 4px; }

.a-extras { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.a-chip {
  font-family: var(--mono);
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 5px 12px;
}
.a-good { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.a-bad { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.a-fail-title { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.a-fails { list-style: none; display: grid; gap: 6px; font-size: 0.88rem; margin-bottom: 20px; }
.a-fails li { color: var(--danger-text); }

.a-cta {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.a-cta-text { color: var(--muted); font-size: 0.92rem; max-width: 380px; }

@media (max-width: 560px) {
  #analyze-form { flex-direction: column; }
  .a-cats { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* ---------- precios (Domain Watch) ---------- */

.pricing-lead {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
  max-width: 760px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-card.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad) border-box;
  box-shadow: 0 0 40px -18px var(--glow-violet);
}

.price-card h3 { font-size: 1.05rem; }

.price { display: flex; align-items: baseline; gap: 4px; }

.price-amount {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.price-card.featured .price-amount {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.price-period { color: var(--muted); font-size: 0.95rem; }

.price-note { color: var(--muted); font-size: 0.92rem; min-height: 2.6em; }

.price-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  flex: 1;
}

.price-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
}

.price-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-family: var(--mono);
}

.price-card .btn { justify-content: center; text-align: center; }

/* ============================================================
   Upgrade visual: aurora, cifras, glow, scrollspy, progreso
   ============================================================ */

/* Aurora del hero en movimiento suave */
@media (prefers-reduced-motion: no-preference) {
  .hero::before {
    animation: aurora 16s ease-in-out infinite alternate;
  }
  @keyframes aurora {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-34px, 22px, 0) scale(1.07); }
  }
}

/* Barra de progreso de scroll */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--grad);
  z-index: 60;
  box-shadow: 0 0 14px var(--glow-violet);
  pointer-events: none;
}

/* Banda de cifras destacadas */
.stats-band {
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 26px;
  text-align: center;
}

.stat-num {
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-lab {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* Glow que sigue el cursor en las tarjetas */
.service-card,
.price-card { overflow: hidden; }

.service-card::after,
.price-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.service-card:hover::after,
.price-card:hover::after { opacity: 1; }

.price-card { position: relative; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.price-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.65), 0 0 44px -16px var(--glow-violet);
}

/* Scrollspy: sección activa resaltada en el menú */
.site-nav a.active {
  color: var(--text);
  text-shadow: 0 0 16px var(--glow-violet);
}

/* Terminal: líneas que aparecen al teclear */
.t-fade { animation: tfade 0.35s ease both; }
@keyframes tfade {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: none; }
}

/* Botón volver arriba */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 55;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad) border-box;
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { box-shadow: 0 0 26px -6px var(--glow-violet); }

/* r115 · conmutador de tema (cabecera) */
.theme-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px; background: var(--surface); margin-left: 6px; }
.theme-seg button { border: 0; background: transparent; color: var(--muted); width: 30px; height: 26px; border-radius: 5px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme-seg button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.theme-seg button:hover { color: var(--text); }
.theme-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* r115/r117 · iconos de trazo (sprite views/app/_icons.ejs), compartidos por app, sitio y admin */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* r146 · tres paquetes en la portada */
#precios .pricing-grid { max-width: none; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
#precios .price-list { align-content: start; }
.pricing-foot { margin-top: 22px; color: var(--muted); max-width: 720px; }
