/* Página provisional de appulso.com. Colores y fuentes solo desde /tokens.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 1.0625rem/1.65 var(--font-sans);
  background: var(--color-bg); color: var(--color-fg); overflow-x: hidden;
}
a { color: var(--color-accent); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }
.wrap { position: relative; z-index: 1; width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

/* ── Fondo: papel milimetrado y una traza de pulso que se recorre (decorativo) ── */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 60%, transparent);
  opacity: .55;
}
/* La traza va en su propia franja, entre el contenido y el pie: nunca cruza texto. */
.pulse { position: relative; z-index: 0; height: clamp(90px, 10vw, 140px); overflow: hidden; pointer-events: none; }
.trace { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: max(100%, 1100px); height: 100%; }
.trace path { fill: none; stroke: var(--brand-cyan); vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.trace .base { stroke-width: 1.25; opacity: .13; }
.trace .sweep { stroke-width: 2; opacity: .6; stroke-dasharray: 220 3200; stroke-dashoffset: 220; animation: sweep 8s linear infinite; }
@keyframes sweep { to { stroke-dashoffset: -3200; } }

/* ── Sugerencia de idioma: franja fina arriba; nunca redirige (site.js) ── */
.lang-strip { position: relative; z-index: 2; border-bottom: 1px solid var(--color-border); background: var(--color-surface); font-size: .9375rem; }
.lang-strip[hidden] { display: none; }
.lang-strip .wrap { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-top: .55rem; padding-bottom: .55rem; }
.lang-strip p { margin: 0; color: var(--color-muted); }
.lang-strip a { font-weight: 600; margin-left: .35rem; }
.lang-strip button {
  margin-left: auto; padding: .15rem .45rem; border: 0; background: none; cursor: pointer;
  font: 400 1.25rem/1 var(--font-sans); color: var(--color-muted);
}
.lang-strip button:hover { color: var(--color-fg); }

/* ── Cabecera ── */
.top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--color-fg); text-decoration: none; font-weight: 600; font-size: 1.1875rem; letter-spacing: -.01em; }
.logo img { width: 2rem; height: 2rem; }
.langs { display: flex; gap: .15rem; font: 500 .8125rem/1 var(--font-mono); letter-spacing: .06em; }
.langs a, .langs span { padding: .45rem .55rem; text-decoration: none; }
.langs span { color: var(--color-fg); box-shadow: inset 0 -2px 0 var(--color-pulse); }
.langs a { color: var(--color-muted); }
.langs a:hover { color: var(--color-fg); }

/* ── Portada ── */
main { display: flex; align-items: center; }
body > main { flex: 1; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-top: clamp(1rem, 4vh, 3rem); padding-bottom: clamp(2rem, 6vh, 4rem); }
.kicker { margin: 0 0 1.1rem; font: 500 .8125rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--color-pulse); }
h1 { margin: 0 0 1.25rem; font-weight: 600; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.04; letter-spacing: -.035em; max-width: 16ch; text-wrap: balance; }
.lead { margin: 0 0 2.5rem; max-width: 34rem; font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); color: var(--color-muted); }

.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 0; max-width: 40rem; }
.points div { padding-top: .85rem; border-top: 1px solid var(--color-border); }
.points dt { font-weight: 600; font-size: .9375rem; margin-bottom: .2rem; }
.points dd { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--color-muted); }

/* ── Consola de ejemplo (datos inventados, decorativa) ── */
.console {
  margin: 0; background: var(--console-bg); color: var(--console-fg); border: 1px solid var(--console-line);
  border-radius: 10px; font: 400 .8125rem/1.4 var(--font-mono); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgb(2 6 23 / .55);
}
.c-head, .c-foot { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; color: var(--console-muted); }
.c-head { border-bottom: 1px solid var(--console-line); }
.c-head strong { color: var(--console-fg); font-weight: 500; }
.c-live { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; }
.c-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--console-ok); animation: blink 2s ease-in-out infinite; }
.c-rows { list-style: none; margin: 0; padding: .35rem 0; }
.c-rows li { display: grid; grid-template-columns: 7.6rem minmax(0, 1fr) 3.4rem 4.2rem; align-items: center; gap: .75rem; padding: .5rem 1rem; }
.c-rows li + li { border-top: 1px dashed var(--console-line); }
.c-name { color: var(--console-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-name small { display: block; font-size: .6875rem; color: var(--console-muted); overflow: hidden; text-overflow: ellipsis; }
.c-rows .c-cols { padding-top: .25rem; padding-bottom: .35rem; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--console-muted); }
.c-rows .c-cols + li { border-top: 0; }
.c-rows .c-cols span { white-space: nowrap; }
.c-rows .c-cols span:last-child { grid-column: 2 / -1; }
.c-val { text-align: right; color: var(--console-fg); font-variant-numeric: tabular-nums; }
.c-st { display: inline-flex; align-items: center; gap: .4rem; justify-self: end; color: var(--console-ok); }
.c-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.spark { width: 100%; height: 26px; display: block; }
.spark path { fill: none; stroke: var(--brand-cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark .move { animation: scroll 9s linear infinite; }
.c-rows li:nth-child(3) .move { animation-duration: 12s; }
.c-rows li:nth-child(4) .move { animation-duration: 7s; }
.c-rows li:nth-child(5) .move { animation-duration: 10s; }
@keyframes scroll { to { transform: translateX(-100px); } }
.down .c-name, .down .c-val, .down .c-st { color: var(--console-down); }
.down .c-st::before { animation: blink 1s steps(1) infinite; }
.down .spark path { stroke: var(--console-down); stroke-dasharray: 3 4; opacity: .8; }
.c-foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; border-top: 1px solid var(--console-line); color: var(--console-warn); }
.c-foot::before { content: ""; flex: none; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid currentColor; }
.c-foot time { color: var(--console-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes blink { 50% { opacity: .25; } }

footer .wrap { padding-top: 1.25rem; padding-bottom: 1.75rem; display: flex; justify-content: space-between; gap: 1rem; font: 400 .8125rem/1.5 var(--font-mono); color: var(--color-muted); }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  h1 { max-width: 15ch; }
}
@media (max-width: 560px) {
  .points { grid-template-columns: 1fr; gap: 1rem; }
  .c-rows li { grid-template-columns: 6.6rem minmax(0, 1fr) 3rem 1.1rem; gap: .6rem; }
  .c-st span { display: none; }
  .c-count { display: none; }
  .c-head > * { white-space: nowrap; }
  .c-foot { grid-template-columns: auto minmax(0, 1fr); row-gap: .25rem; }
  .c-foot time { grid-column: 2; }
  main { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .trace .sweep { stroke-dasharray: none; opacity: .25; }
}
