/* ==========================================================
   Romaco Labs — estilos
   ========================================================== */
:root {
  --ink: #0b0b10;
  --ink-2: #2a2a33;
  --muted: #6b6b76;
  --line: #e7e7ea;
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --accent: #3d5afe;
  --accent-ink: #2c45d6;
  --accent-soft: #eef1ff;
  --green: #12b76a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 11, 16, .04), 0 8px 24px rgba(11, 11, 16, .06);
  --shadow-lg: 0 2px 4px rgba(11, 11, 16, .04), 0 24px 60px rgba(11, 11, 16, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.025em; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font: 500 15px/1 var(--font); letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:active { transform: scale(.98); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(61, 90, 254, .28); }
.btn--accent:hover { background: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(61, 90, 254, .34); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost span { transition: transform .2s var(--ease); }
.btn--ghost:hover span { transform: translateX(3px); }

.link { font-weight: 500; color: var(--accent); display: inline-block; transition: transform .2s var(--ease); }
.link:hover { transform: translateX(3px); }
.link--muted { color: var(--muted); }
.link--muted:hover { transform: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.eyebrow--light { color: rgba(255, 255, 255, .6); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(18, 183, 106, .15); }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, .86); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.brand b { font-weight: 600; color: var(--accent); margin-left: 1px; }
.brand--small { font-size: 15px; }
.nav__links { display: flex; align-items: center; gap: 30px; font-size: 14.5px; color: var(--ink-2); }
.nav__links a:not(.btn) { position: relative; transition: color .2s; }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav__links a:not(.btn):hover { color: var(--ink); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(61, 90, 254, .14), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .45;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6.2vw, 76px); font-weight: 600; letter-spacing: -.045em; line-height: 1.02; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), #7b61ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 540px; }
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__proof { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--ink-2); }
.hero__proof span, .contact__list span { color: var(--green); font-weight: 600; margin-right: 4px; }

/* Teléfono demo */
.hero__demo { position: relative; display: flex; justify-content: center; }
.phone {
  width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--line);
  border-radius: 28px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.phone__top { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.phone__top strong { display: block; font-size: 14.5px; font-weight: 600; }
.phone__top small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.online { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.phone__avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font: 600 13px/1 var(--font);
}
.chat {
  height: 380px; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-soft); overflow: hidden; justify-content: flex-end;
}
.msg {
  max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45;
  animation: pop .35s var(--ease) both;
}
.msg--in { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg--out { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg--chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; background: none; border: 0; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--accent); color: var(--accent); font-size: 13px; font-weight: 500; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #b3b3bb; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.float-card {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 16px; box-shadow: var(--shadow); animation: float 6s ease-in-out infinite;
}
.float-card small { display: block; font: 500 11px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.float-card strong { font-size: 20px; letter-spacing: -.02em; }
.float-card--a { left: -6px; top: 22%; }
.float-card--b { right: -10px; bottom: 16%; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Stack */
.stack {
  position: relative; z-index: 1; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.stack > span { font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stack ul { display: flex; flex-wrap: wrap; gap: 10px 30px; color: var(--ink-2); font-weight: 500; font-size: 15px; }

/* ---------- Secciones ---------- */
.section { padding: 112px 0; }
.section--tight { padding: 0 0 24px; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark .muted { color: rgba(255, 255, 255, .6); }
.section__head { max-width: 680px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(32px, 4.2vw, 50px); letter-spacing: -.035em; }
.section__head p.muted { margin-top: 16px; font-size: 18px; }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service {
  position: relative; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service--featured { background: linear-gradient(180deg, var(--accent-soft), #fff 60%); border-color: #d9dfff; }
.service__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--ink); color: #fff; margin-bottom: 22px;
}
.service--featured .service__icon { background: var(--accent); }
.service__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 22px; margin-bottom: 10px; }
.service > p { color: var(--muted); }
.service ul { margin: 20px 0 24px; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.service li { display: flex; gap: 10px; }
.service li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 10px; }
.tag {
  position: absolute; top: 30px; right: 30px; padding: 5px 10px; border-radius: 999px;
  background: var(--accent); color: #fff; font: 500 11.5px/1 var(--mono); letter-spacing: .03em; text-transform: uppercase;
}

/* Industrias */
.industries { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.industries .eyebrow { margin: 0; }
.industries ul { display: flex; flex-wrap: wrap; gap: 10px; }
.industries li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14.5px; color: var(--ink-2); transition: border-color .2s, color .2s; }
.industries li:hover { border-color: var(--ink); color: var(--ink); }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { padding: 28px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); transition: background .3s, border-color .3s; }
.step:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .2); }
.step__n { display: block; font: 500 13px/1 var(--mono); color: #8fa0ff; margin-bottom: 40px; }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { color: rgba(255, 255, 255, .62); font-size: 15px; }

/* Apps */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.app {
  display: flex; flex-direction: column; gap: 22px; padding: 30px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
a.app:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.app img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; box-shadow: var(--shadow); }
.app__meta { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.app h3 { font-size: 21px; margin-bottom: 8px; }
.app p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.pill { padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); font: 500 11.5px/1.3 var(--mono); letter-spacing: .02em; color: var(--ink-2); }
.pill--live { background: #e7f8ef; color: #0a7a47; }
.pill--soon { background: #fff4e0; color: #9a5b00; }
.app--next { border-style: dashed; background: var(--bg-soft); }
.app__plus {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  border: 1.5px dashed #c4c4cc; font-size: 28px; font-weight: 300; color: var(--muted);
}

/* Por qué */
.why { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.why .section__head { margin: 0; position: sticky; top: 110px; }
.why__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.why__item { background: #fff; padding: 32px; }
.why__item h3 { font-size: 19px; margin-bottom: 10px; }
.why__item p { color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
.faq .section__head { margin: 0; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font-size: 18px; font-weight: 500; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 10px no-repeat;
  transition: transform .3s var(--ease), background-color .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--bg-soft); }
.faq details p { padding: 0 48px 24px 0; color: var(--muted); }

/* Contacto */
.section--cta { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.section--cta::before {
  content: ""; position: absolute; left: -10%; bottom: -40%; width: 700px; height: 700px;
  background: radial-gradient(closest-side, rgba(61, 90, 254, .35), transparent 70%); pointer-events: none;
}
.contact { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact h2 { font-size: clamp(36px, 5vw, 60px); letter-spacing: -.04em; }
.contact__copy > p { margin-top: 18px; color: rgba(255, 255, 255, .65); font-size: 18px; max-width: 440px; }
.contact__list { margin-top: 28px; display: grid; gap: 10px; color: rgba(255, 255, 255, .85); }
.form { background: #fff; color: var(--ink); border-radius: 22px; padding: 32px; display: grid; gap: 16px; box-shadow: var(--shadow-lg); }
.field { display: grid; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 15px/1.4 var(--font); color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236b6b76' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(61, 90, 254, .14); }
.field.is-invalid input { border-color: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .12); }
.form__note { font-size: 13.5px; color: var(--muted); min-height: 1em; text-align: center; }

/* Footer */
.footer { background: var(--ink); color: rgba(255, 255, 255, .6); border-top: 1px solid rgba(255, 255, 255, .08); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 24px; flex-wrap: wrap; font-size: 14px; }
.footer .brand { color: #fff; }
.footer .brand img { filter: invert(1) hue-rotate(180deg); }
.footer nav { display: flex; gap: 24px; }
.footer nav a:hover { color: #fff; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .4); transition: transform .25s var(--ease), opacity .3s;
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
}
.wa-float.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

/* Animaciones de aparición */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__demo { max-width: 420px; margin: 0 auto; width: 100%; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .apps { grid-template-columns: 1fr 1fr; }
  .why, .faq, .contact { grid-template-columns: 1fr; gap: 40px; }
  .why .section__head { position: static; }
}

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; box-shadow: var(--shadow-lg); }
  .nav__links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__cta { margin-top: 16px; height: 48px; }

  .hero { padding: 40px 0 24px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .float-card { display: none; }
  .chat { height: 340px; }
  .stack { margin-top: 48px; gap: 14px; }
  .stack ul { gap: 8px 18px; font-size: 14px; }

  .section { padding: 80px 0; }
  .section__head { margin-bottom: 36px; }
  .services, .apps, .steps, .why__grid { grid-template-columns: 1fr; }
  .service, .app { padding: 26px; }
  .tag { top: 26px; right: 26px; }
  .step__n { margin-bottom: 20px; }
  .faq summary { font-size: 16.5px; }
  .faq details p { padding-right: 0; }
  .form { padding: 24px; }
  .footer__inner { flex-direction: column; align-items: flex-start; padding: 28px 16px 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
