/* =========================================================================
   Puente OS · sitio v2 — sistema visual del video «Boom» (v1, español) y de
   la presentación PuenteOS-2026 (1-dic-2026).
   Fondo carbón con grilla fina y cruces; secciones violeta con degradé y
   grano; titulares Inter liviano en blanco; etiquetas mono con anillo;
   tarjetas oscuras de vidrio con hairline; píldoras mono; isotipo blanco.
   La versión clara anterior quedó en css/_archivo/base-v1-claro.css.
   ========================================================================= */

:root {
  /* Superficies oscuras (video y presentación) */
  --bg: #161515;
  --bg-2: #1b1a1a;
  --surface: #211f1f;          /* tarjeta oscura */
  --surface-2: #2a2828;        /* tarjeta elevada / hover */
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --grid: rgba(255, 255, 255, 0.05);

  /* Texto */
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.82);
  --muted: rgba(255, 255, 255, 0.6);
  --muted-2: rgba(255, 255, 255, 0.42);

  /* Paleta del video */
  --violeta: #6b5fb8;
  --violeta-claro: #a99bd8;
  --azul: #363090;
  --azul-profundo: #1d1a5c;
  --lila: #9f8ec3;
  --lila-claro: #c9bde6;
  --celeste: #b3e1ef;
  --ok: #3ecf8e;

  /* Compatibilidad con nombres anteriores */
  --card: var(--surface);
  --rule: var(--line);
  --rule-strong: var(--line-2);

  /* Tipografía: Inter liviano para titulares, Inter para cuerpo, Geist Mono para etiquetas */
  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  --t-hero: clamp(42px, 6.4vw, 92px);
  --t-h2: clamp(30px, 3.4vw, 48px);
  --t-h3: clamp(20px, 1.7vw, 24px);
  --t-lead: clamp(16px, 1.3vw, 20px);
  --t-body: 15px;
  --t-small: 13px;
  --t-eyebrow: 11.5px;

  --container: 1240px;
  --gutter: clamp(16px, 3vw, 32px);
  --section-y: clamp(80px, 10vw, 150px);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 9999px;

  --shadow-card: 0 0 0 1px var(--line), 0 24px 60px -30px rgba(0, 0, 0, 0.6);
  --shadow-ring: 0 0 0 1px var(--line-2);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Grano (ruido SVG), como en el video */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--violeta-claro); color: #0e0d0c; }

/* ---------- Grilla con cruces (video Boom) ---------- */
.frame {
  position: relative;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--grid);
  pointer-events: none;
}
.frame::before { left: var(--gutter); }
.frame::after { right: var(--gutter); }
/* En las secciones, las reglas cruzan también el padding: la grilla corre
   continua de una sección a otra (sin cortes en cada borde). */
.section > .frame::before,
.section > .frame::after {
  top: calc(-1 * var(--section-y));
  bottom: calc(-1 * var(--section-y));
}

.section {
  position: relative;
  padding: var(--section-y) 0;
  border-top: 1px solid var(--grid);
  isolation: isolate;
}
/* Cruces «+» en las esquinas superiores del marco */
.section > .frame > .cross,
.section .cross {
  position: absolute;
  width: 11px; height: 11px;
  pointer-events: none;
  opacity: 0.55;
}
.cross::before, .cross::after {
  content: ""; position: absolute; background: rgba(255, 255, 255, 0.5);
}
.cross::before { left: 5px; top: 0; width: 1px; height: 11px; }
.cross::after { top: 5px; left: 0; width: 11px; height: 1px; }
.cross--tl { top: -6px; left: calc(var(--gutter) - 5px); }
.cross--tr { top: -6px; right: calc(var(--gutter) - 5px); }
/* En una sección, la cruz cae sobre su borde superior: el cruce de la regla
   horizontal con las verticales, como en la presentación. */
.section > .frame > .cross--tl,
.section > .frame > .cross--tr { top: calc(-1 * var(--section-y) - 6px); }

/* Resplandor violeta al pie (como el hero del video y de la presentación) */
.glow-bottom::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 60%;
  background: radial-gradient(70% 100% at 50% 100%, rgba(78, 66, 170, 0.45), rgba(29, 26, 92, 0) 70%);
  pointer-events: none; z-index: -1;
}

/* Sección violeta (las láminas claras de la presentación) */
.section--violeta {
  background:
    var(--noise),
    radial-gradient(80% 70% at 85% 0%, rgba(201, 189, 230, 0.55), rgba(201, 189, 230, 0) 60%),
    radial-gradient(70% 80% at 0% 100%, rgba(29, 26, 92, 0.9), rgba(29, 26, 92, 0) 70%),
    linear-gradient(160deg, #3b3290 0%, #5a4fb0 40%, #8577c8 72%, #a99bd8 100%);
  background-size: 200px 200px, auto, auto, auto;
  background-blend-mode: overlay, normal, normal, normal;
  border-top-color: transparent;
}
.section--violeta .card,
.section--violeta .glass {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 30px 60px -30px rgba(20, 16, 70, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section--flush { padding: 0; }
.inner { padding: 0 clamp(0px, 2.5vw, 40px); }

/* ---------- Tipografía ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* El anillo «○» de las etiquetas de la presentación */
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid currentColor;
  flex: none;
}
.eyebrow.no-ring::before { display: none; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.18); }

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--t-hero);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--t-h2);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h3);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}
.soft { color: var(--muted); }
.section--violeta .soft { color: rgba(255, 255, 255, 0.72); }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 60ch; font-weight: 300; }
.small { font-size: var(--t-small); color: var(--muted); line-height: 1.5; }
.mono { font-family: var(--font-mono); }
/* Línea de terminal del video: «> describe lo que necesitas…» */
.terminal { font-family: var(--font-mono); font-size: 14px; color: var(--muted); letter-spacing: 0.01em; }
.terminal::before { content: "> "; color: var(--ink-2); }

/* ---------- Botones (píldoras) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  border: 0; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: #fff; color: #0e0d0c; }
.btn--primary:hover { background: var(--lila-claro); }
.btn--secondary { background: var(--glass); color: var(--ink); box-shadow: var(--shadow-ring); }
.btn--secondary:hover { background: var(--glass-2); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }
:focus-visible { outline: 2px solid var(--lila-claro); outline-offset: 3px; }

/* ---------- Captura de correo ---------- */
.email-capture {
  display: flex; align-items: center; gap: 6px; padding: 5px;
  background: var(--glass); border-radius: var(--r-pill);
  box-shadow: var(--shadow-ring);
  max-width: 460px; width: 100%;
}
.email-capture input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 14px; font-size: 15px; color: var(--ink); }
.email-capture input::placeholder { color: var(--muted-2); }

/* ---------- Tarjetas ---------- */
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card--pad { padding: clamp(20px, 2.4vw, 30px); }
.card--white { background: var(--surface-2); }
.card__arrow {
  position: absolute; top: 16px; right: 16px; width: 30px; height: 30px;
  border-radius: var(--r-sm); background: var(--glass); box-shadow: var(--shadow-ring);
  display: grid; place-items: center; font-size: 14px;
}
.glass { background: var(--glass); box-shadow: 0 0 0 1px var(--line-2); border-radius: var(--r-md); }

.chip, .pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: var(--shadow-ring);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2);
}
.pill--solid { background: #fff; color: #0e0d0c; box-shadow: none; }

/* Bandeja / lienzo de animaciones */
.tray {
  position: relative;
  background: var(--bg-2);
  border-radius: var(--r-lg);
  box-shadow: 0 0 0 1px var(--line);
  padding: clamp(10px, 1.6vw, 18px);
  overflow: hidden;
}
/* Bandeja violeta: el fondo de las escenas del video (degradé + grano) */
.tray--violeta {
  background:
    var(--noise),
    radial-gradient(90% 80% at 30% 0%, rgba(201, 189, 230, 0.45), rgba(201, 189, 230, 0) 60%),
    linear-gradient(170deg, #2e2780 0%, #4a3f9e 45%, #6b5fb8 100%);
  background-size: 200px 200px, auto, auto;
  background-blend-mode: overlay, normal, normal;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
/* Tarjetas de UI dentro de las animaciones (como las del video) */
.ui-card {
  background: rgba(24, 22, 40, 0.72);
  border-radius: var(--r-md);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
}
.ui-card--light { background: rgba(255, 255, 255, 0.9); color: #141414; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6); }

.media {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background: #0e0d0c; aspect-ratio: 16 / 9;
  box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }

/* Isotipo blanco en la esquina (sello de la presentación) */
.iso-mark { width: 18px; height: 18px; opacity: 0.85; }

/* ---------- Entrada ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Barra de anuncio + navegación ---------- */
.announce { background: #0e0d0c; color: var(--ink-2); font-size: 13px; text-align: center; padding: 9px var(--gutter); border-bottom: 1px solid var(--line); }
.announce a { text-decoration: underline; text-underline-offset: 3px; margin-left: 8px; color: var(--ink); }
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 21, 21, 0.72);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__row { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav__logo { flex-shrink: 0; }
.nav__logo img { height: 20px; width: auto; max-width: none; }
.nav__links { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.nav__links a { white-space: nowrap; }
.nav__links a:hover { color: var(--ink); }
.nav__links .caret::after { content: "▾"; font-size: 9px; margin-left: 5px; color: var(--muted-2); }
.nav__cta { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav__signin { font-size: 14px; margin-right: 6px; color: var(--ink-2); }
@media (max-width: 1180px) { .nav__links { display: none; } }
@media (max-width: 900px) { .nav__signin, .nav__cta .btn--secondary { display: none; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 72px 0 40px; font-size: 14px; background: #121111; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer h4 { font-family: var(--font-mono); font-size: var(--t-eyebrow); font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--muted); }
.footer ul a:hover { color: var(--ink); }
.footer__brand img { height: 22px; width: auto; margin-bottom: 14px; }
.footer__legal { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px 28px; color: var(--muted-2); font-size: 13px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ---------- Utilidades ---------- */
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
