/* Cloudnet IA — tokens */
:root {
  --noche: #0b1530;        /* fondo del hero */
  --noche-2: #101d42;
  --tinta: #121a2e;        /* texto sobre claro */
  --tinta-suave: #4b5670;
  --azul: #1f6bff;         /* azul eléctrico */
  --cian: #22c3f5;
  --violeta: #8b6cf6;
  --niebla: #f3f6fb;
  --linea: #dbe3ef;
  --blanco: #ffffff;
  --grad: linear-gradient(90deg, var(--cian), var(--azul) 45%, var(--violeta));

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.6rem);
  --step-4: clamp(2.6rem, 5.6vw, 4.9rem);

  --radius-s: 8px;
  --radius-l: 22px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: var(--step-0); line-height: 1.6;
  color: var(--tinta); background: var(--niebla); -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, dt { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
a { color: var(--azul); }
:focus-visible { outline: 3px solid var(--cian); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--blanco); color: var(--tinta); padding: .6rem 1rem; border-radius: var(--radius-s); z-index: 10; }
.skip:focus { top: 1rem; }

/* Escenario: hero oscuro con la cordillera */
.stage {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--noche); color: var(--blanco);
}
.stage::before {
  content: ""; position: absolute; inset: 0 0 0 auto; width: min(62%, 980px); z-index: -2;
  background: url("hero-cordillera.svg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
}
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--noche) 30%, rgb(11 21 48 / .75) 48%, rgb(11 21 48 / 0) 75%),
    linear-gradient(0deg, var(--noche) 0%, rgb(11 21 48 / 0) 30%);
}

/* Header */
.top { padding-block: 1.5rem; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand-name { font-weight: 700; font-size: 1.85rem; letter-spacing: -0.02em; }
.nav { display: flex; gap: 2.25rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a {
  color: var(--blanco); text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; min-height: 44px;
  transition-property: color, background-color, border-color; transition-duration: .15s;
}
.nav a:hover { color: var(--cian); }
.nav .nav-cta { padding: 0 1.4rem; border: 1.5px solid rgb(255 255 255 / .7); border-radius: 999px; }
.nav .nav-cta:hover { border-color: var(--cian); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; }
.eyebrow {
  display: flex; align-items: center; gap: 1.25rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: rgb(255 255 255 / .7);
}
.eyebrow::before { content: ""; width: 64px; height: 2px; background: var(--cian); }
.hero h1 {
  margin-top: 1.75rem; font-size: var(--step-4); font-weight: 700; line-height: 1.04;
  letter-spacing: -0.03em; max-width: 17ch;
}
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 1.5rem; font-size: var(--step-1); color: rgb(255 255 255 / .82); max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.25rem; }

.btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 1.6rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: var(--step-0); border: 1.5px solid transparent;
  transition-property: background-color, color, border-color, scale, filter;
  transition-duration: .15s; transition-timing-function: ease-out;
}
.btn:active { scale: .97; }
.btn-primary { background: linear-gradient(90deg, var(--azul), var(--cian)); color: var(--blanco); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--blanco); border-color: rgb(255 255 255 / .55); }
.btn-ghost:hover { border-color: var(--cian); color: var(--cian); }
.btn-light { background: var(--blanco); color: var(--noche); }
.btn-light:hover { background: var(--niebla); }

.pillars {
  list-style: none; margin: clamp(2.5rem, 5vw, 3.75rem) 0 0; padding: 1.5rem 0 .75rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgb(255 255 255 / .14);
}
.pillars li {
  display: flex; align-items: center; gap: 1rem; padding: .25rem 1.5rem; font-weight: 500; line-height: 1.35;
}
.pillars li + li { border-left: 1px solid rgb(255 255 255 / .22); }
.pillars li:first-child { padding-left: 0; }
.pillars svg {
  flex: none; width: 40px; height: 40px; fill: none; stroke: var(--cian);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Secciones */
.section { padding-block: clamp(4rem, 9vw, 6.5rem); }
.section h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.section-lead { margin-top: .9rem; color: var(--tinta-suave); max-width: 54ch; font-size: var(--step-1); }

.services { margin: 2.75rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.service {
  background: var(--blanco); border-radius: var(--radius-l); padding: 1.8rem 2rem;
  box-shadow: 0 0 0 1px rgb(18 26 46 / .06), 0 12px 32px -18px rgb(31 107 255 / .35);
}
.service dt { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.015em; }
.service dt::after { content: ""; display: block; width: 40px; height: 3px; margin-top: .7rem; border-radius: 3px; background: var(--grad); }
.service dd { margin: .9rem 0 0; color: var(--tinta-suave); }

.section-dark { background: var(--noche-2); color: var(--blanco); }
.section-dark .section-lead { color: rgb(255 255 255 / .78); }
.agent { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

.chat {
  margin: 0; background: var(--blanco); color: var(--tinta); border-radius: var(--radius-l); padding: 1.1rem;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 30px 60px -20px rgb(0 0 0 / .6);
}
.chat-head { display: flex; gap: .75rem; align-items: center; padding-bottom: .9rem; border-bottom: 1px solid var(--linea); }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); }
.chat-title { font-weight: 700; }
.chat-sub { font-size: var(--step--1); color: var(--tinta-suave); }
.chat-log { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .6rem; }
.msg { position: relative; max-width: 86%; padding: .65rem .85rem 1.35rem; border-radius: 16px; font-size: .97rem; line-height: 1.45; }
.msg time { position: absolute; right: .75rem; bottom: .35rem; font-size: .72rem; opacity: .65; font-variant-numeric: tabular-nums; }
.msg.in { min-width: 7.5rem; background: var(--niebla); border-bottom-left-radius: 4px; justify-self: start; }
.msg.out { background: var(--azul); color: var(--blanco); border-bottom-right-radius: 4px; justify-self: end; }
.event { justify-self: center; font-size: var(--step--1); font-weight: 600; color: #0b4a6b; background: #dff6fe; padding: .35rem .8rem; border-radius: 999px; margin-top: .25rem; }
.chat figcaption { margin-top: 1rem; font-size: var(--step--1); color: var(--tinta-suave); }

.steps { list-style: none; counter-reset: paso; margin: 2.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.steps li { counter-increment: paso; padding-top: 1.1rem; border-top: 2px solid var(--linea); }
.steps li::before {
  content: counter(paso); display: block; font-size: var(--step-3); font-weight: 800; line-height: 1; margin-bottom: .8rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content;
}
.steps h3 { font-size: var(--step-1); font-weight: 700; }
.steps p { margin-top: .4rem; color: var(--tinta-suave); font-size: .98rem; }

.contact {
  color: var(--blanco); padding-block: clamp(4rem, 9vw, 7rem);
  background: radial-gradient(80% 140% at 85% 0%, rgb(139 108 246 / .55), transparent 60%), linear-gradient(120deg, var(--azul), #1238a8);
}
.contact h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; max-width: 22ch; }
.contact p { margin-top: 1rem; font-size: var(--step-1); max-width: 46ch; opacity: .9; }
.contact .btn { margin-top: 2rem; }
.contact :focus-visible { outline-color: var(--blanco); }

.foot { padding-block: 2.25rem; background: var(--noche); color: rgb(255 255 255 / .7); }
.foot-inner { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; align-items: baseline; font-size: var(--step--1); }
.foot .brand-name { color: var(--blanco); font-size: 1.2rem; }

@media (max-width: 960px) {
  .stage::before { width: 100%; opacity: .45; -webkit-mask-image: none; mask-image: none; }
  .stage::after { background: linear-gradient(0deg, var(--noche) 10%, rgb(11 21 48 / .55)); }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.25rem; }
  .pillars li:nth-child(3) { border-left: 0; padding-left: 0; }
  .agent { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav li:not(:last-child) { display: none; }
  .brand-name { font-size: 1.5rem; }
  .pillars, .services, .steps { grid-template-columns: 1fr; }
  .pillars li, .pillars li + li { border-left: 0; padding-left: 0; }
  .msg { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
