/* Manrope variable (SIL OFL), autoalojada: subconjunto latino */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* Marca Rasorbit (kit v1) */
  --rb-ink: #0C1220;
  --rb-orange: #FF5B1F;   /* solo acentos y botones, nunca texto largo */
  --rb-bg: #F3F4F6;
  --rb-white: #FFFFFF;

  /* Neutros derivados (sin verde) */
  --rb-bg-2: #E5E7EB;
  --rb-muted: #4B5563;
  --rb-line: #D1D5DB;

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rb-bg);
  color: var(--rb-ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--rb-ink); text-decoration-color: var(--rb-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--rb-ink); }
:focus-visible { outline: 3px solid var(--rb-ink); outline-offset: 3px; border-radius: 2px; }

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

/* Header */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* Logo: alto fijo, ancho automático (sin estirar); padding = margen libre ≈ diámetro del satélite */
.brand { display: inline-flex; padding: 8px 0; text-decoration: none; }
.brand img, .brand svg.logo { display: block; height: 32px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--rb-ink); text-decoration: none; font-size: 0.97rem; font-weight: 600; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--rb-orange); }
.nav a.lang { border: 1.5px solid var(--rb-ink); border-radius: 999px; padding: 2px 10px; font-size: 0.85rem; letter-spacing: 0.04em; }
.nav a.lang:hover { background: var(--rb-ink); color: var(--rb-white); text-decoration: none; }

/* Hero */
.hero { padding: 56px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.hero h1 {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
}
.hero p.lede { font-size: 1.2rem; color: var(--rb-muted); max-width: 34em; margin: 0 0 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  border: 1.5px solid var(--rb-ink);
}
.btn-primary { background: var(--rb-orange); border-color: var(--rb-orange); color: var(--rb-ink); }
.btn-primary:hover { background: var(--rb-ink); border-color: var(--rb-ink); color: var(--rb-white); }
.btn-ghost { color: var(--rb-ink); }
.btn:focus-visible { outline-color: var(--rb-ink); }
.contact-actions { margin-top: 32px; }
.btn-ghost:hover { background: var(--rb-bg-2); color: var(--rb-ink); }

.orbit { width: 100%; height: auto; display: block; }
.orbit .ring { fill: none; stroke: var(--rb-line); stroke-width: 1.2; }
.orbit .ring-dash { fill: none; stroke: var(--rb-line); stroke-width: 1.2; stroke-dasharray: 3 7; }
.orbit .core { fill: var(--rb-ink); }
.orbit .core-text { fill: var(--rb-white); font-family: var(--font); font-weight: 600; font-size: 15px; }
.orbit .node { fill: var(--rb-bg); stroke: var(--rb-ink); stroke-width: 1.5; }
.orbit .node-text { fill: var(--rb-ink); font-family: var(--font); font-size: 13px; font-weight: 600; }
.orbit .comet { fill: var(--rb-orange); }
.hero-visual { position: relative; }
.orbit .node-link { cursor: pointer; }
.orbit .node-link:hover .node, .orbit .node-link:focus-visible .node { fill: var(--rb-white); stroke: var(--rb-orange); stroke-width: 2; }
.orbit .node-link:focus { outline: none; }
.orbit-tip {
  position: absolute; z-index: 2; transform: translate(-50%, -100%);
  background: var(--rb-ink); color: var(--rb-white); border-radius: 10px;
  padding: 8px 12px; font-size: 0.85rem; line-height: 1.35; width: max-content; max-width: 240px; text-align: center;
  pointer-events: none;
}
.orbit-tip strong { display: block; font-weight: 600; }
.orbit-tip span { display: block; color: var(--rb-orange); font-weight: 600; font-size: 0.8rem; margin-top: 2px; }
.orbit-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px;
  background: var(--rb-ink); transform: translateX(-50%) rotate(45deg);
}
.orbit .spoke { stroke: var(--rb-orange); stroke-width: 1.2; opacity: 0.55; }

/* Sections */
section { padding: 88px 0; }
.section-head { max-width: 40em; margin-bottom: 48px; }
h2 {
  font-family: var(--font); font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.08;
  letter-spacing: -0.025em; margin: 0 0 16px;
}
h3 { font-family: var(--font); font-weight: 600; font-size: 1.4rem; letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 10px; }
.section-head p { color: var(--rb-muted); margin: 0; font-size: 1.1rem; }

.problem { background: var(--rb-ink); color: var(--rb-white); }
.problem h2 { color: var(--rb-white); max-width: 18em; }
.problem-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.problem-list p { margin: 0; color: #c3ccd3; }
.problem-list strong { display: block; color: var(--rb-white); font-family: var(--font); font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; line-height: 1.25; }

.services { border-top: 1.5px solid var(--rb-ink); }
.service {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px;
  padding: 36px 0; border-bottom: 1px solid var(--rb-line);
}
.service p { margin: 0 0 14px; color: var(--rb-muted); }
.service ul { margin: 0; padding-left: 1.1em; }
.service li { margin-bottom: 6px; }
.service .tag { display: inline-block; font-size: 0.85rem; color: var(--rb-ink); font-weight: 600; margin-top: 6px; padding-left: 10px; border-left: 3px solid var(--rb-orange); }

/* Al llegar desde la órbita, el servicio destaca un momento */
.service:target { animation: svc-flash 1.8s ease-out; }
@keyframes svc-flash { 0%, 30% { background: rgba(255, 91, 31, 0.10); } 100% { background: transparent; } }

/* Demo de chat */
.demo .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.demo-text p { color: var(--rb-muted); font-size: 1.1rem; max-width: 30em; }
.demo-list { list-style: none; padding: 0; margin: 24px 0; }
.demo-list li { padding: 10px 0 10px 22px; border-top: 1px solid var(--rb-line); position: relative; }
.demo-list li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--rb-orange); }
.demo-text p.demo-note { font-size: 0.9rem; }
.phone {
  margin: 0 0 0 auto; width: 100%; max-width: 340px;
  border: 10px solid var(--rb-ink); border-radius: 36px; overflow: hidden;
  background: var(--rb-ink); box-shadow: 0 24px 48px -24px rgba(12, 18, 32, 0.45);
}
.phone-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--rb-ink); color: var(--rb-white); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--rb-orange); color: var(--rb-ink); font-weight: 700; font-size: 0.8rem; flex: none; }
.phone-who { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.phone-who strong { font-weight: 600; font-size: 0.95rem; }
.phone-who span { font-size: 0.75rem; color: #C3CCD3; }
.demo-tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid #C3CCD3; color: #C3CCD3; border-radius: 999px; padding: 2px 8px; }
.chat {
  list-style: none; margin: 0; padding: 14px 12px; height: 470px; background: var(--rb-bg-2);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden;
  transition: opacity 0.5s ease;
}
.chat.is-fading { opacity: 0; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 0.92rem; line-height: 1.4; animation: msg-in 0.3s ease-out; }
.msg.is-hidden { display: none; }
.msg-in { align-self: flex-start; background: var(--rb-white); border-bottom-left-radius: 4px; }
.msg-out { align-self: flex-end; background: #FFE3D6; border-bottom-right-radius: 4px; }
.msg-event { align-self: center; display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; color: var(--rb-muted); background: rgba(12, 18, 32, 0.06); border-radius: 999px; padding: 4px 12px; }
.ev-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rb-orange); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 1.5px solid var(--rb-ink); border-radius: 999px; padding: 2px 10px; font-size: 0.82rem; font-weight: 600; transition: background 0.2s, border-color 0.2s; }
.chip.is-picked { background: var(--rb-orange); border-color: var(--rb-orange); }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--rb-white); border-radius: 14px; border-bottom-left-radius: 4px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--rb-muted); animation: typing 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--rb-orange); padding-top: 18px; }
.steps li::before {
  content: counter(step);
  display: block; font-family: var(--font); font-weight: 700; font-size: 2.2rem;
  color: var(--rb-ink); line-height: 1; margin-bottom: 14px;
}
.steps p { margin: 0; color: var(--rb-muted); font-size: 0.98rem; }

.principles { background: var(--rb-bg-2); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.principle-grid p { margin: 0; color: var(--rb-muted); }

.contact { padding: 112px 0; }
.contact h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 14em; }
.contact p { color: var(--rb-muted); max-width: 36em; font-size: 1.12rem; }
.mail {
  display: inline-block; margin-top: 18px;
  font-family: var(--font); font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); letter-spacing: -0.02em;
  color: var(--rb-ink); text-decoration: none; border-bottom: 3px solid var(--rb-orange);
}
.mail:hover { border-bottom-color: var(--rb-ink); }

.site-footer { border-top: 1px solid var(--rb-line); padding: 28px 0 40px; font-size: 0.92rem; color: var(--rb-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.footer-brand { display: inline-flex; padding: 6px 0; flex-basis: 100%; }
.footer-brand img { display: block; height: 24px; width: auto; }
.site-footer a { color: var(--rb-muted); }

/* Legal page */
.legal { padding: 48px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-family: var(--font); font-weight: 700; font-size: clamp(2.2rem, 4.5vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 12px; }
.legal .meta { color: var(--rb-muted); margin: 0 0 48px; }
.legal h2 { font-size: 1.55rem; margin: 48px 0 12px; }
.legal h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 8px; }
.legal .note { background: var(--rb-bg-2); border-left: 3px solid var(--rb-orange); padding: 16px 20px; margin: 24px 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
.legal .table-wrap { overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rb-line); }
.legal th { font-weight: 600; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; }
  .demo .wrap { grid-template-columns: 1fr; gap: 32px; }
  .phone { margin: 0 auto; }
  .problem-list, .principle-grid { grid-template-columns: 1fr; gap: 28px; }
  .service { grid-template-columns: 1fr; gap: 12px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .nav { gap: 14px; }
  .brand img, .brand svg.logo { height: 28px; }
  .nav a.hide-sm { display: none; }
  .steps { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { padding: 28px 0 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit animateMotion { display: none; }
  .msg, .service:target { animation: none; }
}
