:root {
  --bg: #0e0e10;
  --fg: #f5f5f7;
  --muted: #9a9aa3;
  --accent: #ff5b1f;
  --panel: #18181c;
  --bubble-user: #2a2a31;
  --bubble-bot: #1f1f25;
  --border: #2a2a31;
  --border-strong: #3a3a45;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav superior ─── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-logo {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
}

.site-nav nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav nav a:hover,
.site-nav nav a.active {
  color: var(--fg);
}

/* ─── Layout común ─── */
.hero,
.section,
.service {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section,
.service {
  padding-top: 5rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 2rem;
}

/* ─── Bloques de servicio ─── */
.service-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  max-width: 720px;
}

.service-lede {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 2.5rem;
  max-width: 680px;
}

.service-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 0 0 2.5rem;
}

@media (max-width: 720px) {
  .service-cols { grid-template-columns: 1fr; gap: 1.5rem; }
}

.service-cols h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.service-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-cols li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--fg);
}

.service-cols li::before {
  content: "·";
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}

/* ─── Modos de implementación ─── */
.modes-lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: -1rem 0 2.5rem;
  max-width: 680px;
}

.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 720px) {
  .modes-grid { grid-template-columns: 1fr; }
}

.mode {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--panel);
}

.mode-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.mode h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.6rem 0 0.85rem;
}

.mode p {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.mode-link {
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}

/* ─── Botón secundario (sutil) ─── */
.cta-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.cta-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Hero ─── */
.hero {
  padding-top: 4rem;
  padding-bottom: 6rem;
}

/* ─── Decoraciones SVG ─── */
.deco {
  display: block;
  color: var(--muted);
  width: auto;
  height: auto;
}

.deco-hero {
  width: 56px;
  margin: 0 0 1.5rem;
}

.deco-hero-img {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 0 1.75rem;
  opacity: 0.95;
}

@media (max-width: 640px) {
  .deco-hero-img { width: 130px; }
}

.deco-closing {
  width: 130px;
  margin: 0 0 1.5rem;
}

@media (max-width: 640px) {
  .deco-closing { width: 110px; }
}

.hero-eyebrow {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 2.5rem;
}

.hero-pitch {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero-privacy {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  opacity: 0.8;
}

/* ─── CTAs segmentadores ─── */
.ctas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

@media (max-width: 640px) {
  .ctas { grid-template-columns: 1fr; }
}

.cta {
  text-align: left;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cta:hover {
  border-color: var(--accent);
  background: rgba(255, 91, 31, 0.05);
  transform: translateY(-1px);
}

.cta-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.cta-text {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--fg);
}

.hero-foot {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover { color: #ff7a4a; }

/* ─── Cómo trabajamos ─── */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
}

.steps li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--panel);
}

.step-num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.steps h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0 0.5rem;
}

.steps p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ─── Quiénes somos ─── */
.about p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 600px;
  margin: 0;
}

/* ─── Eyebrow (etiqueta sobre título de sección) ─── */
.section-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

/* ─── Coste ─── */
.pricing-claim {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2.5rem;
  max-width: 760px;
  color: var(--fg);
}

.pricing-body {
  max-width: 720px;
}

.pricing-body p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.pricing-body p strong { color: var(--fg); }

.pricing-principles {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pricing-principles li {
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  line-height: 1.55;
}

.pricing-principles li strong {
  display: block;
  color: var(--fg);
  margin-bottom: 0.2rem;
}

/* ─── CTA final ─── */
.closing h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.closing-lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 660px;
}

.closing-lede strong { color: var(--fg); }

.closing-foot {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 1.5rem 0 0;
  max-width: 600px;
  opacity: 0.8;
}

.cta-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.cta-primary:hover { transform: translateY(-1px); }

.closing-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── Footer ─── */
.foot {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.foot-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.foot-legal {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

.foot a:hover { color: var(--accent); }

/* ─── Páginas legales ─── */
.legal-doc .page-section h2 { font-size: 1.2rem; }
.legal-doc .page-section h3 { font-size: 1rem; margin-top: 1.5rem; }
.legal-doc .page-section p { font-size: 0.95rem; }
.legal-doc .bullets li { font-size: 0.95rem; }

/* ─── Botón flotante ─── */
.chat-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: transform 0.15s ease;
}

.chat-toggle:hover { transform: scale(1.05); }

/* ─── Panel de chat ─── */
.chat-panel[hidden] { display: none; }

.chat-panel {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  width: 400px;
  max-width: calc(100vw - 3rem);
  height: 600px;
  max-height: calc(100vh - 8rem);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  z-index: 11;
}

/* Móvil y tablets pequeñas: el chat ocupa toda la pantalla (modal). */
@media (max-width: 768px) {
  .chat-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border: none;
    border-radius: 0;
  }
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.chat-header button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
}
.chat-header button:hover { color: var(--fg); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.msg {
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  line-height: 1.45;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.bot {
  align-self: flex-start;
  background: var(--bubble-bot);
  border: 1px solid var(--border);
}
.msg.user {
  align-self: flex-end;
  background: var(--bubble-user);
}
.msg.typing {
  color: var(--muted);
  font-style: italic;
}

.msg.system {
  align-self: center;
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
  text-align: center;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.chat-form input {
  flex: 1;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  outline: none;
}
.chat-form input:focus { border-color: var(--accent); }

.chat-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 1rem;
  cursor: pointer;
  font-size: 1.1rem;
}
.chat-form button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Páginas de detalle (nosotros, contacto, servicios/...) ─── */
.page-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.page-head {
  margin-bottom: 3.5rem;
}

.page-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.page-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.page-section {
  margin-bottom: 3rem;
}

.page-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.page-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.page-section p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg);
  margin: 0 0 1rem;
}

.page-section p:last-child { margin-bottom: 0; }

/* Listas dentro de páginas */
.bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bullets li {
  position: relative;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.bullets li::before {
  content: "·";
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}

.ordered {
  padding-left: 1.2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ordered li {
  line-height: 1.6;
}

.ordered li::marker {
  color: var(--accent);
  font-weight: 700;
}

/* FAQ */
.faq {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}

.faq:first-of-type { border-top: none; padding-top: 0; }

.faq h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.faq p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.page-cta {
  margin-top: 3rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.last-updated {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 3.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  opacity: 0.65;
}

/* ─── Formulario de contacto ─── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-form label small {
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.7;
}

.contact-form input,
.contact-form textarea {
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }

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

.contact-form button {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  opacity: 0.8;
}

.contact-options {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-options a { color: var(--accent); }
.contact-options strong { color: var(--fg); }

/* ─── Acciones múltiples dentro de un service ─── */
.service-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
