/* =========================================================
   P2R · People to Robotics
   Paleta oficial del Brandbook 2026 (no agregar otros colores)
   ========================================================= */
:root {
  --negro: #000000;        /* Negro Circuito (texto) */
  --circuito: #0B1622;     /* Negro Circuito en superficies, como en el brandbook */
  --azul: #008FC0;         /* Azul P2R */
  --petroleo: #006485;     /* Petróleo */
  --cian: #2CB7DE;         /* Cian Señal */
  --brillo: #5FE6F5;       /* Cian Brillo: solo ojos de Craibot / luces */
  --blanco: #FFFFFF;
  --nube: #F3F5F8;         /* Gris Nube */
  --amarillo: #FAAB29;     /* Chispa: un solo acento pequeño */

  --movimiento: linear-gradient(60deg, var(--petroleo), var(--azul) 50%, var(--cian));
  --texto-suave: rgba(0, 0, 0, .68);
  --linea: rgba(11, 22, 34, .10);

  --font: "Tektur", system-ui, sans-serif;
  --wrap: 1180px;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--negro);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -.01em; }
p { margin: 0; }
strong { font-weight: 700; color: var(--petroleo); }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 15px 26px;
  font: 700 15px/1 var(--font);
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; border-radius: 4px;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cian); outline-offset: 3px;
}
.btn-dark { background: var(--circuito); color: var(--blanco); }
.btn-dark:hover { background: var(--petroleo); }
.btn-ghost { border-color: var(--circuito); color: var(--circuito); background: transparent; }
.btn-ghost:hover { background: var(--circuito); color: var(--blanco); }
.btn-light { background: var(--blanco); color: var(--circuito); }
.btn-light:hover { background: var(--brillo); }
.btn-blue { background: var(--azul); color: var(--blanco); }
.btn-blue:hover { background: var(--petroleo); }
.btn-sm { padding: 11px 18px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--linea); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) {
  font-weight: 600; font-size: 15px; text-decoration: none; position: relative; padding: 6px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--movimiento); transition: width .25s ease;
}
.nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--circuito); margin: 6px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Detalles gráficos del brandbook ---------- */
.crop { position: absolute; width: 34px; height: 34px; pointer-events: none; }
.crop-tl { top: 28px; left: 28px; border-top: 2px solid var(--circuito); border-left: 2px solid var(--circuito); }
.crop-br { bottom: 28px; right: 28px; border-bottom: 2px solid var(--circuito); border-right: 2px solid var(--circuito); }
.crop.light { border-color: var(--cian); }

.dots {
  width: 92px; height: 92px; margin-top: 48px;
  background-image: radial-gradient(circle, rgba(11, 22, 34, .28) 3.5px, transparent 4px);
  background-size: 24px 24px;
}

.eyebrow, .kicker {
  font-size: 13px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--petroleo);
}
.kicker-light { color: var(--cian); }

.tag {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--circuito); color: var(--blanco);
  font-weight: 800; font-style: italic; font-size: 18px;
  padding: 6px 16px 6px 12px; border-radius: 6px;
}
.tag i { width: 3px; height: 16px; background: var(--cian); border-radius: 2px; }
.tag-light { background: var(--blanco); color: var(--circuito); }

.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }

.hl {
  background: var(--movimiento);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 48px 0 72px;
  background:
    linear-gradient(rgba(44, 183, 222, .07) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(44, 183, 222, .07) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--blanco);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; }
.hero h1 {
  margin-top: 18px;
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 900; text-transform: uppercase;
}
.slogan { margin-top: 18px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; }
.lead { margin-top: 18px; font-size: 18px; color: var(--texto-suave); max-width: 520px; }
.lead.light { color: rgba(255, 255, 255, .82); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-art { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 600px; justify-self: end; }
.hero-art .stripes { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .craibot {
  position: absolute; left: 14%; right: 14%; bottom: 2%; width: 72%;
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 24px 30px rgba(11, 22, 34, .18));
}
.arm-wave { transform-box: view-box; transform-origin: 0 0; animation: wave 2.6s ease-in-out infinite; }
.eyes { transform-box: view-box; transform-origin: 200px 148px; animation: blink 5.5s infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes wave {
  0%, 100% { transform: translate(300px, 282px) rotate(-138deg); }
  50% { transform: translate(300px, 282px) rotate(-120deg); }
}
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* ---------- Secciones ---------- */
.section { position: relative; padding: 110px 0; }
.section-nube { background: var(--nube); }
.section h2 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 900; text-transform: uppercase; }
.h2-wide { max-width: 900px; margin-bottom: 56px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; margin-bottom: 64px; }
.about-text p { color: var(--texto-suave); font-size: 18px; }
.about-text p + p { margin-top: 16px; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; padding: 36px 32px 40px;
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radius);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card::after {
  content: ""; position: absolute; top: 18px; right: 18px; width: 20px; height: 20px;
  border-top: 2px solid var(--linea); border-right: 2px solid var(--linea);
}
.card::before {
  content: ""; position: absolute; top: 26px; right: 30px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cian);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -20px rgba(0, 100, 133, .35); }
.card-line { display: block; width: 64px; height: 4px; border-radius: 2px; background: var(--movimiento); margin-bottom: 26px; }
.card h3 { font-size: 30px; font-weight: 800; margin-bottom: 14px; }
.card p { color: var(--texto-suave); }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service {
  background: var(--blanco); border-radius: var(--radius); padding: 30px 26px 34px;
  border: 1px solid transparent;
  transition: border-color .25s, transform .25s;
}
.service:hover { border-color: var(--cian); transform: translateY(-4px); }
.service-icon {
  width: 60px; height: 60px; border-radius: 14px; background: var(--movimiento);
  display: grid; place-items: center; margin-bottom: 24px;
}
.service-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--blanco); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 21px; font-weight: 800; margin-bottom: 10px; line-height: 1.15; }
.service p { color: var(--texto-suave); font-size: 16px; }

.steps {
  list-style: none; margin: 64px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 2px solid var(--circuito);
}
.steps li { padding: 26px 22px 0 0; position: relative; }
.steps li::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--blanco); border: 3px solid var(--azul);
}
.steps span { display: block; font-size: 40px; font-weight: 900; color: var(--azul); line-height: 1; margin-bottom: 10px; }
.steps strong { display: block; font-size: 19px; color: var(--negro); margin-bottom: 4px; }
.steps p { color: var(--texto-suave); font-size: 15px; }

/* Valores */
.values-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.values-intro p { margin-top: 20px; color: var(--texto-suave); font-size: 18px; }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  background: var(--circuito); color: var(--blanco);
  padding: 10px 18px; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.chips li:last-child { background: var(--azul); }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.value {
  padding: 28px; border-radius: var(--radius); background: var(--nube);
  border-left: 4px solid var(--cian);
}
.value h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.value p { color: var(--texto-suave); }

/* Craibot (oscuro) */
.section-dark {
  background:
    linear-gradient(rgba(44, 183, 222, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(44, 183, 222, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--circuito);
  color: var(--blanco); overflow: hidden;
}
.dark-stripes { position: absolute; right: 0; bottom: 0; width: 62%; height: 100%; opacity: .95; }
.craibot-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.section-dark h2 { color: var(--blanco); }
.facts { list-style: none; padding: 0; margin: 34px 0 38px; display: grid; gap: 14px; max-width: 540px; }
.facts li {
  display: flex; gap: 16px; align-items: baseline;
  padding: 16px 18px; border: 1px solid rgba(44, 183, 222, .28); border-radius: 10px;
  background: rgba(11, 22, 34, .7);
}
.facts span { font-weight: 900; color: var(--cian); font-size: 18px; }
.craibot-badge {
  justify-self: center; text-align: center;
  padding: 44px 40px; border-radius: 24px;
  background: rgba(11, 22, 34, .82); border: 1px solid rgba(44, 183, 222, .35);
  backdrop-filter: blur(4px);
}
.craibot-badge img { margin: 0 auto 22px; width: 150px; height: auto; }
.craibot-badge p { font-size: 30px; font-weight: 900; text-transform: uppercase; }
.craibot-badge p span { color: var(--brillo); margin: 0 8px; }
.craibot-badge small { display: block; margin-top: 8px; color: rgba(255, 255, 255, .72); font-size: 15px; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.channels { display: grid; gap: 14px; margin-top: 36px; max-width: 440px; }
.channel {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px; border-radius: 14px; text-decoration: none;
  background: var(--nube); border: 1px solid transparent;
  font-weight: 700; font-size: 18px;
  transition: border-color .2s, transform .2s;
}
.channel:hover { border-color: var(--azul); transform: translateX(4px); }
.channel small { display: block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--petroleo); font-weight: 700; }
.channel-icon {
  flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--circuito);
  display: grid; place-items: center;
}
.channel-icon svg { width: 24px; height: 24px; fill: var(--blanco); }
.channel.is-soon { opacity: .55; pointer-events: none; }

.contact-form {
  position: relative; padding: 48px 40px 40px; border-radius: 6px;
  background: var(--blanco); border: 1px solid var(--linea);
  box-shadow: 0 30px 60px -30px rgba(0, 100, 133, .35);
}
.contact-form .crop { width: 24px; height: 24px; }
.contact-form .crop-tl { top: 14px; left: 14px; }
.contact-form .crop-br { bottom: 14px; right: 14px; }
.form-title { font-size: 28px; font-weight: 900; text-transform: uppercase; margin-bottom: 22px; }
.contact-form label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 8px; }
.opt { color: var(--texto-suave); font-weight: 400; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 14px 16px;
  font: 400 16px/1.4 var(--font); color: var(--negro);
  background: var(--nube); border: 2px solid transparent; border-radius: 8px;
  transition: border-color .2s, background-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--azul); background: var(--blanco); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .btn { margin-top: 24px; }
.form-error { margin-top: 14px; color: var(--petroleo); font-weight: 700; font-size: 14px; }
.form-note { margin-top: 12px; font-size: 13px; color: var(--texto-suave); text-align: center; }

/* Pie */
.site-footer { background: var(--circuito); color: var(--blanco); padding: 72px 0 28px; position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--movimiento);
}
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 40px; align-items: start; }
.footer-brand img { width: 150px; height: auto; }
.footer-brand p { margin-top: 18px; font-weight: 600; font-size: 18px; }
.footer-nav, .footer-social { display: grid; gap: 12px; }
.footer-nav a, .footer-social a { text-decoration: none; color: rgba(255, 255, 255, .8); transition: color .2s; }
.footer-nav a:hover, .footer-social a:hover { color: var(--cian); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 14px; color: rgba(255, 255, 255, .6);
}
.footer-bottom a { text-decoration: none; color: rgba(255, 255, 255, .6); }
.footer-bottom a:hover { color: var(--cian); }

/* Botón flotante */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--movimiento); box-shadow: 0 12px 28px -8px rgba(0, 100, 133, .6);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: var(--blanco); }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--blanco); border-bottom: 1px solid var(--linea);
    padding: 8px 24px 24px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--linea); }
  .nav .btn { margin-top: 18px; }

  .hero { padding: 24px 0 56px; }
  .hero-grid, .about-grid, .values-grid, .craibot-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { justify-self: center; max-width: 460px; }
  .dots { display: none; }
  .crop-tl, .crop-br { display: none; }
  .contact-form .crop { display: block; }
  .section { padding: 80px 0; }
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; border-top: 0; }
  .steps li { border-top: 2px solid var(--circuito); }
  .dark-stripes { width: 100%; opacity: .35; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .brand img { height: 38px; }
  .services, .values { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .contact-form { padding: 40px 22px 28px; }
  .footer-inner { grid-template-columns: 1fr; }
  .channel { font-size: 16px; }
}

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