/* =============================================================
   Grupo Bande · Centro de sistemas
   Editorial de alto contraste. Papel cálido vs navy casi-negro
   (contraste por temperatura, no gris plano). Tipografía con
   carácter: Bricolage Grotesque (display) + Hanken Grotesk (texto).
   Tarjetas planas que se INVIERTEN al enfocar — sin barritas de acento.
   ============================================================= */

:root {
  --paper:      #f4f3ef;   /* fondo cálido */
  --card:       #ffffff;
  --ink:        #0d131f;   /* navy casi-negro: texto + bordes */
  --ink-soft:   #545c68;
  --line:       rgba(13,19,31,.14);
  --card-border: rgba(13,19,31,.92);
  --art-bg:     rgba(13,19,31,.045);
  --invert-bg:  #0d131f;
  --invert-fg:  #f4f3ef;
  --invert-soft:#9aa3b1;
  --shape-line: rgba(13,19,31,.10);
  --dot:        rgba(13,19,31,.07);
  --focus:      #2f5fe0;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-text:    "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
}

html[data-theme="dark"] {
  --paper:      #0b0e14;
  --card:       #11161f;
  --ink:        #f1f0ea;
  --ink-soft:   #9aa3b1;
  --line:       rgba(241,240,234,.16);
  --card-border: rgba(241,240,234,.20);
  --art-bg:     rgba(241,240,234,.05);
  --invert-bg:  #f1f0ea;
  --invert-fg:  #0b0e14;
  --invert-soft:#5c636f;
  --shape-line: rgba(241,240,234,.10);
  --dot:        rgba(241,240,234,.06);
  --focus:      #7aa2f0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}

/* ── Parallax de fondo (arquitectónico, hairline) ─────────── */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-fx .grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.5px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 82% 60% at 50% 8%, #000 38%, transparent 82%);
          mask-image: radial-gradient(ellipse 82% 60% at 50% 8%, #000 38%, transparent 82%);
  opacity: .7;
}
.shape {
  position: absolute; aspect-ratio: 1;
  border: 1.5px solid var(--shape-line);
  border-radius: 22%;
  transform: translate3d(var(--px,0), var(--py,0), 0) rotate(var(--rot,0deg));
  will-change: transform;
}
.shape::before {
  content: ""; position: absolute; inset: 16%;
  border: 1.5px solid var(--shape-line); border-radius: 22%;
}
.s1 { width: min(52vw, 560px); top: -12vh; left: -9vw;  --rot: 22deg; }
.s2 { width: min(34vw, 380px); top: 40%;  right: -8vw;  --rot: -15deg; }
.s3 { width: min(24vw, 280px); bottom: -9vh; left: 24%; --rot: 10deg; }

/* ── Header píldora flotante ──────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: center;
  padding: 18px clamp(14px, 4vw, 28px) 6px;
}
.nav-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; max-width: 760px;
  padding: 9px 9px 9px 16px;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(13,19,31,.08);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo {
  flex: none; display: grid; place-items: center;
  height: 34px; padding: 4px 9px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px;
}
.brand-logo img { height: 22px; width: auto; object-fit: contain; display: block; }
.brand-sep { width: 1px; height: 20px; background: var(--line); flex: none; }
.brand-sub { font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; flex: none;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-text); font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); opacity: .9; }
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .ic-moon { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: inline; }

/* ── Contenido ────────────────────────────────────────────── */
.page {
  position: relative; z-index: 1;
  flex: 1; width: 100%; max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 5vw, 44px) clamp(40px, 5vw, 60px);
  display: grid; gap: clamp(32px, 5vw, 52px);
}

.intro { max-width: 34ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 20px;
}
.eyebrow .tick { width: 22px; height: 2px; background: var(--ink); display: inline-block; }
.intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.intro h1 .dot { color: var(--focus); }
.intro p {
  margin: 26px 0 0; max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--ink-soft); line-height: 1.6;
}

/* ── Tarjetas (protagonistas): nombre + boton + icono a la derecha ── */
.systems {
  display: grid; gap: clamp(14px, 1.6vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 24px 26px; min-height: 150px;
  background: var(--card);
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  text-decoration: none; color: var(--ink);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), color .3s ease, border-color .3s ease;
}
/* Relleno que sube desde abajo al enfocar: la tarjeta se invierte */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--invert-bg);
  transform: translateY(101%);
  transition: transform .42s cubic-bezier(.19,1,.22,1);
}

.card-main { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; }

.card-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  letter-spacing: -.02em; line-height: 1.02;
}
.card-title span { color: var(--ink-soft); font-weight: 600; transition: color .3s ease; }

.card-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 13.5px; font-weight: 700;
  transition: background .3s ease, color .3s ease, transform .3s ease;
}
.card-btn svg { width: 17px; height: 17px; transition: transform .3s cubic-bezier(.2,.7,.3,1); }

.card-note {
  font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
}

.card-art {
  flex: none; width: 96px; height: 96px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--art-bg); color: var(--ink);
  border: 1px solid var(--line);
  transition: color .3s ease, background .3s ease, border-color .3s ease;
}
.card-art svg { width: 48px; height: 48px; }

/* Estado invertido (hover / foco por teclado) */
.card:hover, .card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--invert-bg);
  color: var(--invert-fg);
  outline: none;
}
.card:hover::before, .card:focus-visible::before { transform: translateY(0); }
.card:hover .card-title span, .card:focus-visible .card-title span { color: var(--invert-soft); }
.card:hover .card-btn, .card:focus-visible .card-btn { background: var(--invert-fg); color: var(--invert-bg); }
.card:hover .card-btn svg, .card:focus-visible .card-btn svg { transform: translateX(4px); }
.card:hover .card-art, .card:focus-visible .card-art { color: var(--invert-fg); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.card:focus-visible { box-shadow: 0 0 0 3px var(--focus); }

/* Tarjeta "en integración" — no invierte, se mantiene tenue */
.card--soon { border-style: dashed; background: transparent; cursor: default; }
.card--soon::before { display: none; }
.card--soon:hover { transform: none; color: var(--ink); border-color: var(--line); }
.card--soon .card-art { color: var(--ink-soft); }

/* ── Pie ──────────────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 44px) 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-soft);
}

/* ── Animaciones de entrada ───────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); }
body.is-ready .reveal { animation: reveal .8s cubic-bezier(.19,1,.22,1) forwards; animation-delay: var(--d, 0s); }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ── Dos columnas en escritorio: hero | tarjetas (llena el espacio) ── */
@media (min-width: 900px) {
  .page {
    grid-template-columns: 1.02fr 1fr;
    align-items: center;
    gap: clamp(40px, 5vw, 72px);
    min-height: calc(100vh - 152px);
    padding-top: clamp(20px, 3vh, 40px);
    padding-bottom: clamp(20px, 3vh, 40px);
  }
  .intro { margin: 0; }
  .systems { grid-template-columns: 1fr; }
}

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 620px) {
  .systems { grid-template-columns: 1fr; }
  .brand-sep, .brand-sub { display: none; }
  .theme-toggle-label { display: none; }
  .theme-toggle { padding: 9px; }
  .nav-pill { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .shape { transform: rotate(var(--rot,0deg)) !important; }
}
