/* Teselium — estilos compartidos por index.html y encuora/index.html */
:root {
  --white:   #fdfaf5;
  --warm:    #f5ede0;
  --ink:     #1a1612;
  --ink2:    #2c2620;
  --muted:   #7a6f65;
  --subtle:  #a89f96;
  --border:  #e8ddd0;

  /* Paleta canónica Teselium (identidad-teselium-light, jul 2026).
     Un tono, dos luces: base = tesela del logo · *2 = variante dark (elevada) */
  --azu:   #29539E;   /* Encuora · azul */
  --azu2:  #5A88D8;
  --ter:   #BB3F23;   /* Archive · terracota */
  --ter2:  #DD725A;
  --ver:   #2C7142;   /* Tabular · verde */
  --ver2:  #5CC17C;
  --sol:   #C8850F;   /* Colmena · ámbar (tesela del logo; #B0760C si fuera texto sobre papel) */
  --sol2:  #E8A530;
  --lil:   #6F3C9F;   /* Compositia · violeta */
  --lil2:  #A772DA;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════
   TRENCADÍS SVG FRAGMENTS
═══════════════════════════════════════════════ */
.trencadis-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.t-frag {
  position: absolute;
  opacity: 0;
  animation: fragIn 1.2s ease forwards;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.18));
}

@keyframes fragIn {
  from { opacity: 0; transform: scale(0.7) rotate(var(--r, 0deg)); }
  to   { opacity: var(--op, 0.82); transform: scale(1) rotate(var(--r, 0deg)); }
}

.t-frag svg { display: block; }


/* ═══════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(253,250,245,0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 60px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

/* Mini trencadís logo mark */
.logo-mark {
  width: 30px;
  height: 30px;
  position: relative;
  flex-shrink: 0;
}
.logo-mark svg { width: 30px; height: 30px; }

.logo-text {
  font-family: 'Bodoni Moda', serif;
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a { font-size: 0.83rem; font-weight: 400; color: var(--muted); text-decoration: none; transition: color 0.2s; letter-spacing: 0.01em; }
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-toggle { display: flex; gap: 2px; background: var(--warm); border-radius: 6px; padding: 3px; border: 1px solid var(--border); }
.lang-btn { font-size: 0.7rem; font-weight: 500; font-family: 'DM Sans', sans-serif; padding: 4px 10px; border-radius: 4px; border: none; background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s; letter-spacing: 0.08em; }
.lang-btn.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

.nav-cta {
  background: var(--azu);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 9px 22px;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.2s;
  letter-spacing: 0.01em;
}
.nav-cta:hover { background: var(--azu2); }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero-section {
  position: relative;
  padding-top: 66px;
  overflow: hidden;
  background: var(--white);
}

/* Grout texture */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(200,180,155,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 10;
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 60px 96px;
  text-align: center;
  container-type: inline-size;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ter);
  margin-bottom: 28px;
  opacity: 0;
  animation: slideUp 0.9s ease forwards 0.2s;
  justify-content: center;
}
.kicker-frags {
  display: flex;
  gap: 3px;
}
.kicker-frag {
  width: 8px; height: 8px;
  border-radius: 2px;
  transform: rotate(var(--r));
}

.hero h1 {
  font-family: 'Bodoni Moda', serif;
  font-weight: 400;
  font-size: 5rem;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 32px;
  opacity: 0;
  animation: slideUp 0.9s ease forwards 0.4s;
}
.hero h1 .plain {
  background: linear-gradient(135deg, var(--ink) 40%, #3d4a5c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--ter), var(--sol2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.9;
  max-width: 540px;
  margin: 0 auto 48px;
  opacity: 0;
  animation: slideUp 0.9s ease forwards 0.6s;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: slideUp 0.9s ease forwards 0.8s;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--azu);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.22s;
  box-shadow: 0 4px 16px rgba(41,83,158,0.3);
}
.btn-primary:hover { background: var(--azu2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(41,83,158,0.35); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--ink2);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  text-decoration: none;
  transition: all 0.22s;
}
.btn-outline:hover { border-color: var(--azu); color: var(--azu); }

/* Hero con titular largo (home y /encuora/): misma tipografía, menos cuerpo */
.hero-long .hero-inner { max-width: 860px; }
.hero-long h1 { font-size: 3.6rem; }

.hero-note {
  font-size: 0.9rem;
  color: var(--subtle);
  margin: -28px auto 48px;
  opacity: 0;
  animation: slideUp 0.9s ease forwards 0.7s;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ═══════════════════════════════════════════════
   STRIP
═══════════════════════════════════════════════ */
.strip {
  background: var(--ink);
  padding: 20px 60px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  position: relative;
}
.strip::before, .strip::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
}
.strip::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.strip::after  { right: 0; background: linear-gradient(-90deg, var(--ink), transparent); }

.strip-track {
  display: flex;
  gap: 56px;
  animation: marquee 28s linear infinite;
  white-space: nowrap;
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.strip-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.strip-dot {
  width: 6px; height: 6px;
  border-radius: 1px;
  flex-shrink: 0;
  transform: rotate(45deg);
}

/* ═══════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════ */
.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 60px;
}

.section-full {
  padding: 100px 0;
}
.section-full .section-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 60px;
}

.section-dark {
  background: var(--ink);
  padding: 100px 0;
}
.section-dark .section-inner { max-width: 1240px; margin: 0 auto; padding: 0 60px; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.eyebrow-light { color: var(--ter); }
.eyebrow-dark  { color: var(--sol2); }

.eyebrow-frags { display: flex; gap: 3px; }
.eyebrow-frag { border-radius: 2px; }

.h2 {
  font-family: 'Bodoni Moda', serif;
  font-weight: 400;
  font-size: 2.8rem;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 20px;
}
.h2 em { font-style: italic; }
.h2-light { color: var(--ink); }
.h2-light em { background: linear-gradient(135deg, var(--ver), var(--azu)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.h2-dark  { color: white; }
.h2-dark em  { background: linear-gradient(135deg, var(--sol2), var(--ter2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.sub {
  font-size: 0.97rem;
  line-height: 1.88;
  margin-bottom: 64px;
  max-width: 540px;
}
.sub-light { color: var(--muted); }
.sub-dark  { color: rgba(255,255,255,0.45); }

/* ═══════════════════════════════════════════════
   PHILOSOPHY GRID
═══════════════════════════════════════════════ */
.phil-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.phil-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.phil-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(26,22,18,0.1); }

.phil-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.phil-num {
  font-family: 'Bodoni Moda', serif;
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 20px;
  opacity: 0.15;
  letter-spacing: -0.04em;
}
.h2 + .phil-grid { margin-top: 48px; }
.phil-title { font-size: 0.95rem; font-weight: 500; color: var(--ink); margin-bottom: 12px; }
.phil-text  { font-size: 0.875rem; color: var(--muted); line-height: 1.82; }

/* ═══════════════════════════════════════════════
   PRODUCTS
═══════════════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.product-card {
  position: relative;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 44px;
  overflow: hidden;
  transition: background 0.25s, transform 0.25s;
}
.product-card:hover { background: rgba(255,255,255,0.09); transform: translateY(-3px); }

.product-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.product-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.badge-live { background: rgba(44,113,66,0.22); color: #5CC17C; border: 1px solid rgba(44,113,66,0.35); }
.badge-beta { background: rgba(200,133,15,0.2); color: #E8A530; border: 1px solid rgba(200,133,15,0.32); }
.badge-mcp { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.14); }
.badge-mcp .mcp-icon { width: 11px; height: 11px; vertical-align: -1px; margin-right: 5px; opacity: 0.8; }

/* "Built on MCP": uso referencial del logo oficial (Model Context Protocol, Linux Foundation), sin alterar */
.mcp-note { display: flex; align-items: center; gap: 14px; margin: -28px 0 44px; font-size: 0.9rem; color: rgba(255,255,255,0.62); line-height: 1.6; }
.mcp-note .mcp-icon { width: 26px; height: 26px; flex: none; }
.mcp-note strong { font-weight: 500; color: rgba(255,255,255,0.88); }
.product-badge + .product-badge { margin-left: 6px; }
.badge-soon { background: rgba(90,136,216,0.16); color: #5A88D8; border: 1px solid rgba(90,136,216,0.32); }

.product-name {
  font-family: 'Bodoni Moda', serif;
  font-weight: 400;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  color: white;
  margin-bottom: 16px;
  line-height: 1;
}
.product-name em { font-style: italic; }

.product-desc { font-size: 0.9rem; color: rgba(255,255,255,0.5); line-height: 1.84; margin-bottom: 32px; }

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.product-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 0.65rem; font-weight: 500; color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); padding: 3px 10px; border-radius: 4px; letter-spacing: 0.04em; }
.product-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: gap 0.2s; }
.product-link:hover { gap: 10px; }
.product-footer-link { justify-content: flex-end; }

/* Beneficios (copy de Strategic Growth Lab, sept 2026): titular + apoyo, viñeta = tesela funcional en el acento del producto */
.product-card .product-tagline { margin-bottom: 28px; color: rgba(255,255,255,0.62); }
.product-benefits { list-style: none; display: grid; gap: 18px; margin-bottom: 32px; }
.product-benefits li { display: grid; grid-template-columns: 12px 1fr; gap: 14px; align-items: start; }
.product-benefits .tesela { width: 12px; height: 12px; border-radius: 3px; margin-top: 4px; }
.product-benefits strong { display: block; font-weight: 500; font-size: 0.92rem; color: rgba(255,255,255,0.88); margin-bottom: 3px; line-height: 1.4; }
.product-benefits .support { font-size: 0.84rem; color: rgba(255,255,255,0.45); line-height: 1.7; }

/* Icono de producto (identidad: contenedor neutro + pill acento; sin dot a este tamaño) */
.product-icon { position: absolute; top: 38px; right: 40px; width: 48px; height: 48px; }
.product-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.product-icon .neu { fill: none; stroke: #5E646E; }
.product-icon .ghost { fill: #5E646E; opacity: 0.45; }

/* Tarjeta fantasma (identidad: lo que aún no existe va en línea discontinua). Ocupa la fila entera. */
.product-card-ghost {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.03);
  border: 1.5px dashed rgba(255,255,255,0.22);
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: center;
}
.product-card-ghost:hover { background: rgba(255,255,255,0.05); }
.product-card-ghost .product-name { color: rgba(255,255,255,0.88); }
.product-card-ghost .product-footer { border-top-style: dashed; }
.badge-wip { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.62); border: 1px dashed rgba(255,255,255,0.3); }

/* La cadena de pasos (identidad: ilustración de Colmena): las cuatro teselas en contorno neutro, un solo acento */
.product-chain svg { display: block; width: 100%; height: auto; overflow: visible; }
.product-chain .neu { fill: none; stroke: #5E646E; }
.product-chain .ghost { fill: #5E646E; opacity: 0.45; }
.product-chain .link { stroke: #5E646E; opacity: 0.4; stroke-width: 2; stroke-linecap: round; }
.product-chain .dot { fill: #5E646E; opacity: 0.5; }

.product-feature {
  position: relative;
  background: linear-gradient(140deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035));
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 20px;
  padding: 48px 52px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: center;
}
.product-feature .product-card-accent { height: 4px; }
.product-feature .product-name { font-size: 2.8rem; margin-bottom: 20px; }
.product-feature .product-desc {
  max-width: 720px;
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
}
.product-feature .product-link { margin-top: 24px; }
.product-feature + .products-grid { margin-top: 24px; }

/* ── El latido (identidad Teselium · movimiento) ──
   5 escenas + logo, 18s por bucle. Generado por latido_gen.py: los tiempos van en segundos. */
.latido {
  --neutral: #5E646E;
  --verde: #5CC17C;
  --terracota: #DD725A;
  --miel: #E8A530;
  --azul: #5A88D8;
  --morado: #A772DA;
  --tile-azul: #29539E;
  --tile-rojo: #BB3F23;
  --tile-ambar: #C8850F;
  --tile-verde: #2C7142;
  --tile-morado: #6F3C9F;
  --dur: 18s;
  width: 220px;
}
.latido svg { width: 100%; height: auto; display: block; overflow: visible; }

/* contenedores: cada tesela ocupa su ventana del bucle */
.latido .contenedor { opacity: 0; transform-box: fill-box; transform-origin: center; animation: var(--dur) infinite ease-in-out; }
.latido #c-tabular { animation-name: esc-tabular; }
.latido #c-archive { animation-name: esc-archive; }
.latido #c-colmena { animation-name: esc-colmena; }
.latido #c-encuora { animation-name: esc-encuora; }
.latido #c-compositia { animation-name: esc-compositia; }
@keyframes esc-tabular {
  0% { opacity: 0; transform: scale(.96); }
  1.67%, 11.11% { opacity: 1; transform: scale(1); }
  13.33%, 100% { opacity: 0; transform: scale(.96); }
}
@keyframes esc-archive {
  0%, 13.33% { opacity: 0; transform: scale(.96); }
  15%, 27.78% { opacity: 1; transform: scale(1); }
  30%, 100% { opacity: 0; transform: scale(.96); }
}
@keyframes esc-colmena {
  0%, 30% { opacity: 0; transform: scale(.96); }
  31.67%, 44.44% { opacity: 1; transform: scale(1); }
  46.67%, 100% { opacity: 0; transform: scale(.96); }
}
@keyframes esc-encuora {
  0%, 46.67% { opacity: 0; transform: scale(.96); }
  48.33%, 61.11% { opacity: 1; transform: scale(1); }
  63.33%, 100% { opacity: 0; transform: scale(.96); }
}
@keyframes esc-compositia {
  0%, 63.33% { opacity: 0; transform: scale(.96); }
  65%, 78.89% { opacity: 1; transform: scale(1); }
  81.11%, 100% { opacity: 0; transform: scale(.96); }
}

/* el pill: un solo elemento, todo el viaje */
.latido #pill { transform-box: fill-box; transform-origin: center; animation: pill-viaje var(--dur) infinite ease-in-out, pill-giro var(--dur) infinite ease-in-out; }
@keyframes pill-viaje {
  0% { x: 108px; y: 127px; width: 54px; height: 24px; rx: 12px; fill: var(--verde); opacity: 0; }
  1.67% { opacity: 1; }
  5% { x: 104px; }
  8.33% { x: 110px; }
  11.11% { x: 108px; y: 127px; width: 54px; height: 24px; rx: 12px; fill: var(--verde); }
  13.33% { x: 93px; y: 141px; width: 44px; height: 15px; rx: 7.5px; fill: var(--terracota); }
  16.11% { y: 136px; }
  27.78% { x: 93px; y: 136px; width: 44px; height: 15px; rx: 7.5px; fill: var(--terracota); }
  30% { x: 100px; y: 118px; width: 39px; height: 14px; rx: 7px; fill: var(--miel); }
  33.89% { x: 98px; y: 116.5px; width: 43px; height: 17px; rx: 8.5px; }
  36.67% { x: 100px; y: 118px; width: 39px; height: 14px; rx: 7px; fill: var(--miel); }
  40.56% { x: 98px; y: 116.5px; width: 43px; height: 17px; rx: 8.5px; }
  44.44% { x: 100px; y: 118px; width: 39px; height: 14px; rx: 7px; fill: var(--miel); }
  46.67% { x: 132px; y: 129px; width: 40px; height: 14px; rx: 7px; fill: var(--azul); }
  48.89% { x: 128px; }
  61.11% { x: 128px; y: 129px; width: 40px; height: 14px; rx: 7px; fill: var(--azul); opacity: 1; }
  63.89% { x: 157.64px; y: 83.46px; width: 11px; height: 11px; rx: 5.5px; fill: var(--azul); opacity: 1; }
  66.67% { x: 157.64px; y: 83.46px; width: 11px; height: 11px; rx: 5.5px; fill: var(--morado); opacity: 1; }
  68.33% { opacity: 1; }
  70.56% { x: 157.64px; y: 83.46px; width: 11px; height: 11px; rx: 5.5px; fill: var(--morado); opacity: 0; }
  81.11% { x: 120px; y: 158px; width: 16px; height: 16px; rx: 5px; fill: var(--tile-morado); opacity: 0; }
  83.33% { opacity: 1; }
  86.67%, 96.67% { x: 108px; y: 146px; width: 40px; height: 40px; rx: 9px; fill: var(--tile-morado); opacity: 1; }
  99.17% { opacity: 0; }
  100% { x: 108px; y: 127px; width: 54px; height: 24px; rx: 12px; fill: var(--verde); opacity: 0; }
}
@keyframes pill-giro {
  0%, 83.33% { transform: rotate(0deg); }
  88.33%, 97.78% { transform: rotate(-4deg); }
  100% { transform: rotate(0deg); }
}

/* bloque-arco de Compositia: se dibuja desde el punto donde llega el pill */
.latido #bloque-arco { opacity: 0; stroke-dasharray: 44; stroke-dashoffset: 44; animation: arco var(--dur) infinite ease-in-out; }
@keyframes arco {
  0%, 66.11% { opacity: 0; stroke-dashoffset: 44; }
  66.67% { opacity: 1; stroke-dashoffset: 44; }
  70.56% { stroke-dashoffset: 0; }
  78.89% { opacity: 1; stroke-dashoffset: 0; }
  81.11%, 100% { opacity: 0; stroke-dashoffset: 0; }
}

/* final: las teselas del logo llegan rotando a su sitio (contexto de marca: ±3–5°) */
.latido .tesela-logo { opacity: 0; transform-box: fill-box; transform-origin: center; animation: var(--dur) infinite ease-out; }
.latido #t-azul  { animation-name: tesela-1; }
.latido #t-rojo  { animation-name: tesela-2; }
.latido #t-ambar { animation-name: tesela-3; }
.latido #t-verde { animation-name: tesela-4; }
@keyframes tesela-1 {
  0%, 82.22% { opacity: 0; transform: scale(.5) rotate(-16deg); }
  85%, 96.67% { opacity: 1; transform: scale(1) rotate(-5deg); }
  99.17%, 100% { opacity: 0; transform: scale(1) rotate(-5deg); }
}
@keyframes tesela-2 {
  0%, 83.89% { opacity: 0; transform: scale(.5) rotate(14deg); }
  86.67%, 96.67% { opacity: 1; transform: scale(1) rotate(3deg); }
  99.17%, 100% { opacity: 0; transform: scale(1) rotate(3deg); }
}
@keyframes tesela-3 {
  0%, 85.56% { opacity: 0; transform: scale(.5) rotate(-14deg); }
  88.33%, 96.67% { opacity: 1; transform: scale(1) rotate(-3deg); }
  99.17%, 100% { opacity: 0; transform: scale(1) rotate(-3deg); }
}
@keyframes tesela-4 {
  0%, 87.22% { opacity: 0; transform: scale(.5) rotate(15deg); }
  90%, 96.67% { opacity: 1; transform: scale(1) rotate(4deg); }
  99.17%, 100% { opacity: 0; transform: scale(1) rotate(4deg); }
}

/* accesibilidad: sin movimiento, el logo quieto */
@media (prefers-reduced-motion: reduce) {
  .latido .contenedor, .latido #pill, .latido #bloque-arco { animation: none; opacity: 0; }
  .latido .tesela-logo { animation: none; opacity: 1; }
  .latido #t-azul  { transform: rotate(-5deg); }
  .latido #t-rojo  { transform: rotate(3deg); }
  .latido #t-ambar { transform: rotate(-3deg); }
  .latido #t-verde { transform: rotate(4deg); }
  .latido #pill { animation: none; opacity: 1; x: 108px; y: 146px; width: 40px; height: 40px; rx: 9px; fill: var(--tile-morado); transform: rotate(-4deg); }
}

/* Variante sin logo (página de Encuora): mismo viaje del pill por las cinco escenas, el bucle
   termina en Compositia (81.11 % del original → 100 %) y no se recompone la T de Teselium. */
.latido-sin-logo { --dur: 14.6s; }
.latido-sin-logo #c-tabular { animation-name: esc-tabular-corto; }
.latido-sin-logo #c-archive { animation-name: esc-archive-corto; }
.latido-sin-logo #c-colmena { animation-name: esc-colmena-corto; }
.latido-sin-logo #c-encuora { animation-name: esc-encuora-corto; }
.latido-sin-logo #c-compositia { animation-name: esc-compositia-corto; }
.latido-sin-logo #pill { animation: pill-viaje-corto var(--dur) infinite ease-in-out; }
.latido-sin-logo #bloque-arco { animation-name: arco-corto; }
.latido-sin-logo .tesela-logo { animation: none; opacity: 0; }
@keyframes esc-tabular-corto {
  0% { opacity: 0; transform: scale(.96); }
  2.06%, 13.7% { opacity: 1; transform: scale(1); }
  16.43% { opacity: 0; transform: scale(.96); }
}
@keyframes esc-archive-corto {
  0%, 16.43% { opacity: 0; transform: scale(.96); }
  18.49%, 34.25% { opacity: 1; transform: scale(1); }
  36.99% { opacity: 0; transform: scale(.96); }
}
@keyframes esc-colmena-corto {
  0%, 36.99% { opacity: 0; transform: scale(.96); }
  39.05%, 54.79% { opacity: 1; transform: scale(1); }
  57.54% { opacity: 0; transform: scale(.96); }
}
@keyframes esc-encuora-corto {
  0%, 57.54% { opacity: 0; transform: scale(.96); }
  59.59%, 75.34% { opacity: 1; transform: scale(1); }
  78.08% { opacity: 0; transform: scale(.96); }
}
@keyframes esc-compositia-corto {
  0%, 78.08% { opacity: 0; transform: scale(.96); }
  80.14%, 97.26% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.96); }
}
@keyframes pill-viaje-corto {
  0% { x: 108px; y: 127px; width: 54px; height: 24px; rx: 12px; fill: var(--verde); opacity: 0; }
  2.06% { opacity: 1; }
  6.16% { x: 104px; }
  10.27% { x: 110px; }
  13.7% { x: 108px; y: 127px; width: 54px; height: 24px; rx: 12px; fill: var(--verde); }
  16.43% { x: 93px; y: 141px; width: 44px; height: 15px; rx: 7.5px; fill: var(--terracota); }
  19.86% { y: 136px; }
  34.25% { x: 93px; y: 136px; width: 44px; height: 15px; rx: 7.5px; fill: var(--terracota); }
  36.99% { x: 100px; y: 118px; width: 39px; height: 14px; rx: 7px; fill: var(--miel); }
  41.78% { x: 98px; y: 116.5px; width: 43px; height: 17px; rx: 8.5px; }
  45.21% { x: 100px; y: 118px; width: 39px; height: 14px; rx: 7px; fill: var(--miel); }
  50.01% { x: 98px; y: 116.5px; width: 43px; height: 17px; rx: 8.5px; }
  54.79% { x: 100px; y: 118px; width: 39px; height: 14px; rx: 7px; fill: var(--miel); }
  57.54% { x: 132px; y: 129px; width: 40px; height: 14px; rx: 7px; fill: var(--azul); }
  60.28% { x: 128px; }
  75.34% { x: 128px; y: 129px; width: 40px; height: 14px; rx: 7px; fill: var(--azul); opacity: 1; }
  78.77% { x: 157.64px; y: 83.46px; width: 11px; height: 11px; rx: 5.5px; fill: var(--azul); opacity: 1; }
  82.2% { x: 157.64px; y: 83.46px; width: 11px; height: 11px; rx: 5.5px; fill: var(--morado); opacity: 1; }
  84.24% { opacity: 1; }
  86.99% { x: 157.64px; y: 83.46px; width: 11px; height: 11px; rx: 5.5px; fill: var(--morado); opacity: 0; }
  100% { x: 120px; y: 158px; width: 16px; height: 16px; rx: 5px; fill: var(--tile-morado); opacity: 0; }
}
@keyframes arco-corto {
  0%, 81.51% { opacity: 0; stroke-dashoffset: 44; }
  82.2% { opacity: 1; stroke-dashoffset: 44; }
  86.99% { stroke-dashoffset: 0; }
  97.26% { opacity: 1; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .latido-sin-logo #c-tabular { opacity: 1; }
  .latido-sin-logo #pill { opacity: 1; x: 108px; y: 127px; width: 54px; height: 24px; rx: 12px; fill: var(--verde); transform: none; }
}

/* ═══════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 72px;
  align-items: start;
}

.about-text p { font-size: 0.95rem; color: var(--muted); line-height: 1.92; margin-bottom: 22px; }

.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 44px;
}

.pillar {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
.pillar-accent { position: absolute; top: 0; left: 0; width: 3px; bottom: 0; }
.pillar-title { font-size: 0.82rem; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.pillar-text { font-size: 0.78rem; color: var(--muted); line-height: 1.7; }


/* ═══════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════ */
.contact-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--ink);
  padding: 80px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

.contact-wrap h2 {
  font-family: 'Bodoni Moda', serif;
  font-weight: 400;
  font-size: clamp(2rem, 3.5vw, 3rem);
  letter-spacing: -0.02em;
  color: white;
  margin-bottom: 16px;
  line-height: 1.12;
}
.contact-wrap h2 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--sol2), var(--ter2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.contact-wrap p { font-size: 0.9rem; color: rgba(255,255,255,0.45); line-height: 1.82; max-width: 400px; }

.contact-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; position: relative; z-index: 1; }

.btn-bright {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.22s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.btn-bright:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }

.contact-email { font-size: 0.78rem; color: rgba(255,255,255,0.3); text-decoration: none; transition: color 0.2s; }
.contact-email:hover { color: rgba(255,255,255,0.65); }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
footer {
  background: var(--ink2);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 28px 60px;
}
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(255,255,255,0.65);
  font-family: 'Bodoni Moda', serif;
  font-size: 1.1rem;
}
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.22); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.72rem; color: rgba(255,255,255,0.3); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.65); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-mosaic { display: none; }
  .phil-grid { grid-template-columns: 1fr; gap: 16px; }
  .products-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; padding: 48px; }
  .contact-actions { align-items: flex-start; }
}
@media (max-width: 768px) {
  nav { padding: 0 24px; }
  .nav-links, .nav-cta { display: none; }
  .hero-inner { padding: 64px 24px; }
  .hero-long h1 { font-size: 2.6rem; }
  .section { padding: 72px 24px; }
  .section-dark .section-inner, .section-full .section-inner { padding: 0 24px; }
  .section-dark { padding: 72px 0; }
  .section-full { padding: 72px 0; }
  .strip { padding: 16px 24px; }
  .about-pillars { grid-template-columns: 1fr; }
  .contact-wrap { padding: 36px 28px; }
  .product-feature { padding: 40px 28px; grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .product-feature .product-name { font-size: 2.2rem; }
  .product-feature .product-desc { margin: 0 auto; }
  .latido { width: 180px; margin: 0 auto; }
  .product-icon { top: 40px; right: 32px; width: 36px; height: 36px; }
  .mcp-note { align-items: flex-start; margin-top: -16px; }
  .product-card-ghost { grid-template-columns: 1fr; gap: 28px; }
  .product-chain { max-width: 340px; }
  footer { padding: 24px; }
}

/* ═══════════════════════════════════════════════
   BILINGUAL
═══════════════════════════════════════════════ */
[data-lang] { display: none; }
[data-lang].active { display: block; }
span[data-lang].active { display: inline; }
.inline-lang { display: inline; }
.inline-lang[data-lang] { display: none; }
.inline-lang[data-lang].active { display: inline; }
