/* Kodexa 2.0: solo Hero y puertas editoriales. */
.hero.hero-cinema {
  position: relative;
  isolation: isolate;
  max-width: none;
  min-height: 660px;
  min-height: min(820px, 88svh);
  margin: 0;
  padding: clamp(4rem, 8vw, 8rem) var(--page-gutter);
  display: flex;
  align-items: center;
  background: #101110;
  color: #fafaf6;
}
.hero-cinema .hero-code, .hero-cinema .hero-shade {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.hero-cinema .hero-code { z-index: -2; overflow: hidden; contain: paint; }
.hero-cinema .hero-shade {
  z-index: -1;
  background: radial-gradient(ellipse at 50% 48%, rgb(10 11 10 / 94%) 0%, rgb(10 11 10 / 82%) 30%, rgb(10 11 10 / 28%) 76%, rgb(10 11 10 / 42%) 100%);
}
.hero-cinema .hero-code-fragment {
  position: absolute; margin: 0; color: #d6d6d0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 400; line-height: 1.8; white-space: pre; user-select: none;
}
.hero-cinema .hero-code-back { font-size: clamp(2rem, 4vw, 4rem); opacity: .065; filter: blur(1.2px); }
.hero-cinema .hero-code-back-left { left: -12%; top: -12%; }
.hero-cinema .hero-code-back-right { right: -14%; bottom: -20%; }
.hero-cinema .hero-code-mid { font-size: clamp(.7rem, 1.1vw, 1rem); opacity: .18; }
.hero-cinema .hero-code-mid-left { left: -3%; top: 38%; }
.hero-cinema .hero-code-mid-right { right: -7%; top: 14%; filter: blur(.3px); }
.hero-cinema .hero-code-detail { font-size: .62rem; opacity: .12; }
.hero-cinema .hero-code-detail-top { left: 12%; top: 9%; }
.hero-cinema .hero-code-detail-bottom { right: 9%; bottom: 8%; }
.hero-cinema .hero-code-detail-side { left: 5%; bottom: 9%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-cinema .hero-code-back-left { animation: hero-code-drift 60s ease-in-out infinite alternate; }
  .hero-cinema .hero-code-back-right { animation: hero-code-drift 54s ease-in-out -20s infinite alternate-reverse; }
  .hero-cinema .hero-code-mid-left { animation: hero-code-rise 48s ease-in-out -12s infinite alternate; }
  .hero-cinema .hero-code-mid-right { animation: hero-code-rise 56s ease-in-out -25s infinite alternate-reverse; }
  .hero-cinema .hero-code-detail { animation: hero-code-breathe 38s ease-in-out infinite alternate; }
  .hero-cinema .hero-code-detail-bottom { animation-delay: -18s; }
  .hero-cinema .hero-code-detail-side { animation-delay: -9s; }
}
@keyframes hero-code-drift { from { transform: translate(0, 0); } to { transform: translate(12px, -30px); } }
@keyframes hero-code-rise { from { transform: translateY(0); } to { transform: translateY(-24px); } }
@keyframes hero-code-breathe { from { opacity: .055; } to { opacity: .14; } }
/* Mayor presencia en desktop; tablet y móvil conservan su densidad anterior. */
@media (min-width: 64.001rem) {
  .hero-cinema .hero-shade {
    background: radial-gradient(ellipse at 50% 48%, rgb(10 11 10 / 96%) 0%, rgb(10 11 10 / 86%) 28%, rgb(10 11 10 / 32%) 52%, rgb(10 11 10 / 6%) 78%, transparent 100%);
  }
  .hero-cinema .hero-code-back { font-size: clamp(3rem, 5.5vw, 5.5rem); opacity: .12; filter: blur(.6px); }
  .hero-cinema .hero-code-mid { opacity: .22; }
  .hero-cinema .hero-code-mid-right { filter: none; }
  .hero-cinema .hero-code-detail { font-size: .7rem; opacity: .25; }
}
@media (min-width: 64.001rem) and (prefers-reduced-motion: no-preference) {
  .hero-cinema .hero-code-detail { animation-name: hero-code-breathe-desktop; }
}
@keyframes hero-code-breathe-desktop { from { opacity: .18; } to { opacity: .28; } }
@media (max-width: 64rem) {
  .hero-cinema .hero-code-back-right, .hero-cinema .hero-code-detail-side { display: none; }
  .hero-cinema .hero-code-mid { opacity: .13; }
}
@media (max-width: 48rem) {
  .hero-cinema .hero-code-mid-right, .hero-cinema .hero-code-detail-top, .hero-cinema .hero-code-detail-bottom { display: none; }
  .hero-cinema .hero-code-back-left { opacity: .045; font-size: 2rem; left: -45%; }
  .hero-cinema .hero-code-mid-left { opacity: .09; font-size: .65rem; left: -28%; top: 60%; }
}
.hero-cinema .hero-cinema-content { width: 100%; max-width: 1440px; margin-inline: auto; text-align: center; }
.hero-cinema .hero-cinema-eyebrow { font-size: .68rem; line-height: 1.6; letter-spacing: .18em; margin-bottom: 2rem; }
.hero.hero-cinema h1 { max-width: 17ch; margin-inline: auto; font-size: clamp(3rem, 5.7vw, 6rem); line-height: 1.06; letter-spacing: -.05em; animation: none; }
.hero-cinema h1 em { color: #d2d1c7; letter-spacing: -.05em; }
.hero-cinema .hero-cinema-copy { max-width: 43ch; margin-inline: auto; margin-top: 2rem; color: #e0e0d9; line-height: 1.7; font-size: clamp(1rem, 1.3vw, 1.125rem); }
.hero-cinema .hero-cinema-cta { margin-top: 2rem; background: #f4f3ee; color: #20201e; border: 1px solid #f4f3ee; font-size: .7rem; letter-spacing: .08em; min-height: 48px; white-space: normal; text-align: left; }
.hero-cinema .hero-cinema-cta:hover { background: #dcdcd3; }
.hero-cinema button:focus-visible { outline: 2px solid white; outline-offset: 6px; }
.home-gateways { padding: clamp(3rem, 6vw, 6rem) var(--page-gutter); max-width: var(--content-max); margin-inline: auto; }
.home-gateways h2 { font-size: .75rem; font-weight: normal; letter-spacing: .15em; line-height: 1.5; }
.home-gateway-list { display: flex; margin-top: 2rem; border-block: 1px solid #c9c9c0; }
.home-gateway { flex: 1 1 0; min-width: 0; padding: 2rem clamp(1rem, 2.5vw, 3rem); color: #242420; display: flex; flex-direction: column; min-height: 380px; cursor: default; transition: flex-grow 400ms ease, background-color 250ms ease; }
.home-gateway[href] { cursor: pointer; }
.home-gateway + .home-gateway { border-left: 1px solid #c9c9c0; }
.home-gateway h3 { min-height: 2.5em; font-size: clamp(1.05rem, 2vw, 2rem); line-height: 1.22; letter-spacing: -.04em; font-weight: normal; overflow-wrap: anywhere; }
.home-gateway ul { list-style: none; padding: 0; margin: 2rem 0 3rem; font: 1.2rem/1.65 Georgia, serif; }
.home-gateway-explore { margin-top: auto; font-size: .65rem; letter-spacing: .12em; }
.home-gateway-explore > span { margin-left: .8rem; }
.home-gateway-explore small { display: block; margin-top: .5rem; font-size: .65rem; letter-spacing: normal; color: #62625d; }
.home-gateway:focus-visible { outline: 2px solid #20201e; outline-offset: -5px; background: #f1f1eb; }
@media (min-width: 64rem) {
  .home-gateway:focus-visible { flex-grow: 1.16; }
}
@media (min-width: 64rem) and (hover: hover) and (pointer: fine) {
  .home-gateway:hover { flex-grow: 1.16; background: #f1f1eb; }
}
@media (max-width: 48rem) {
  .hero.hero-cinema { min-height: 640px; padding-block: 4rem; }
  .hero.hero-cinema h1 { font-size: clamp(2.7rem, 8.5vw, 4.5rem); }
  .home-gateway-list { flex-direction: column; margin-top: 2rem; }
  .home-gateway { min-height: auto; padding: 2rem .5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .home-gateway + .home-gateway { border-left: 0; border-top: 1px solid #c9c9c0; }
  .home-gateway h3 { font-size: clamp(1.05rem, 3.8vw, 1.8rem); }
  .home-gateway ul { margin: 0; font-size: 1.05rem; }
  .home-gateway-explore { grid-column: 1 / -1; margin-top: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .home-gateway { transition: none; }
  .home-gateway:hover, .home-gateway:focus-visible { flex-grow: 1; }
}

/* El texto completo reserva el ancho y conserva el título accesible. */
.hero-cinema .hero-typing { display: inline-block; position: relative; white-space: nowrap; }
.hero-cinema .hero-typing.is-typing .hero-typing-reserve { opacity: 0; }
.hero-cinema .hero-typing-display { position: absolute; inset: 0; text-align: left; }
.hero-cinema .hero-typing-display::after { content: ''; display: inline-block; height: .72em; border-left: 1px solid currentColor; margin-left: .07em; opacity: .55; }
@media (prefers-reduced-motion: reduce) {
  .hero-cinema .hero-typing.is-typing .hero-typing-reserve { opacity: 1; }
  .hero-cinema .hero-typing-display { display: none; }
}

/* Abstracciones decorativas: confinadas a cada puerta, sin afectar su layout. */
.home-gateway { position: relative; isolation: isolate; }
.home-gateway .gateway-art {
  position: absolute; right: .8rem; bottom: 1.5rem;
  width: 42%; max-width: 180px; height: 135px;
  overflow: hidden; pointer-events: none; z-index: -1;
  color: #55584f; opacity: .015; transform: translateY(5px);
  transition: opacity 550ms ease, transform 550ms ease;
}
.gateway-art > span { position: absolute; display: block; border: 1px solid currentColor; }
/* Composición abierta: navegación, contenido y silueta de producto. */
.gateway-art--web::before { content: ''; position: absolute; inset: 12px 0 auto; border-top: 1px solid currentColor; }
.gateway-art--web > span:nth-child(1) { left: 0; top: 25px; width: 35%; height: 2px; border: 0; background: currentColor; }
.gateway-art--web > span:nth-child(2) { left: 0; top: 36px; width: 23%; height: 2px; border: 0; background: currentColor; }
.gateway-art--web > span:nth-child(3) { right: 10%; top: 32px; width: 32%; height: 57px; border-radius: 45% 45% 3px 3px; }
.gateway-art--web > span:nth-child(4) { left: 0; right: 0; bottom: 12px; height: 20px; border-inline: 0; }
/* Módulos y líneas de tabla, sin marco exterior ni datos ficticios. */
.gateway-art--software::before { content: ''; position: absolute; left: 16%; top: 10px; bottom: 10px; border-left: 1px solid currentColor; }
.gateway-art--software > span:nth-child(1) { left: 24%; top: 10px; width: 32%; height: 26px; }
.gateway-art--software > span:nth-child(2) { right: 0; top: 10px; width: 32%; height: 26px; }
.gateway-art--software > span:nth-child(3) { left: 24%; right: 0; top: 52px; height: 24px; border-inline: 0; }
.gateway-art--software > span:nth-child(4) { left: 24%; right: 0; top: 88px; height: 24px; border-inline: 0; }
/* Una entrada, un proceso y dos salidas conectadas. */
.gateway-art--workflow::before { content: ''; position: absolute; left: 10%; right: 10%; top: 40px; border-top: 1px solid currentColor; }
.gateway-art--workflow::after { content: ''; position: absolute; left: 50%; right: 10%; top: 40px; height: 62px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.gateway-art--workflow > span { width: 17px; height: 17px; background: #f7f7f2; top: 32px; z-index: 1; }
.gateway-art--workflow > span:nth-child(1) { left: 4%; }
.gateway-art--workflow > span:nth-child(2) { left: calc(50% - 8px); }
.gateway-art--workflow > span:nth-child(3) { right: 4%; }
.gateway-art--workflow > span:nth-child(4) { right: 4%; top: 94px; }
.home-gateway:focus-visible .gateway-art { opacity: .2; transform: none; }
.home-gateway:focus-visible .gateway-art--web,
.home-gateway:focus-visible .gateway-art--software { opacity: .26; }
@media (hover: hover) and (pointer: fine) {
  .home-gateway:hover .gateway-art { opacity: .2; transform: none; }
  .home-gateway:hover .gateway-art--web,
  .home-gateway:hover .gateway-art--software { opacity: .26; }
}
@media (hover: none), (pointer: coarse) {
  .home-gateway .gateway-art { opacity: .09; transform: none; transition: none; }
  .gateway-art > span:nth-child(4) { display: none; }
  .gateway-art--workflow::after { display: none; }
}
@media (max-width: 48rem) {
  .home-gateway .gateway-art { width: 34%; max-width: 135px; height: 70px; bottom: .8rem; }
  .gateway-art > span:nth-child(4), .gateway-art--workflow::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home-gateway .gateway-art { transition: none; transform: none; }
}

/* Filosofía: pausa editorial después de las tres puertas. */
.home-philosophy {
  background: #111210;
  color: #f5f4ee;
  padding: clamp(5rem, 10vw, 10rem) var(--page-gutter);
}
.home-philosophy-inner { max-width: 1320px; margin-inline: auto; }
.home-philosophy-eyebrow {
  margin: 0 0 clamp(3rem, 6vw, 6rem);
  font-size: .7rem; line-height: 1.6; letter-spacing: .16em;
  color: #c4c4b9;
}
.home-philosophy h2 {
  margin: 0;
  font-size: clamp(2.15rem, 5.8vw, 6rem);
  font-weight: 400; line-height: 1.08; letter-spacing: -.055em;
  text-transform: uppercase;
}
.home-philosophy-statement { display: block; }
.home-philosophy-statement + .home-philosophy-statement { margin-top: clamp(2.5rem, 5vw, 5rem); }
.home-philosophy-secondary { display: block; color: #91938a; }
.home-philosophy strong { display: block; font-weight: 700; color: #faf9f3; }
.home-philosophy-copy {
  max-width: 35ch;
  margin: clamp(3rem, 5vw, 5rem) 0 0 auto;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.8; color: #c9c9bf;
}
@media (max-width: 48rem) {
  .home-philosophy { padding-block: 4.5rem; }
  .home-philosophy h2 { font-size: clamp(1.6rem, 6.4vw, 3rem); letter-spacing: -.045em; }
  .home-philosophy-copy { margin-left: 0; margin-top: 3rem; }
}

/* Header en flujo normal; el mismo fondo del Hero se extiende detrás de él. */
.site-header { position: relative; z-index: 1; background: transparent; color: #f5f4ee; }
.site-header a:focus-visible, .site-header button:focus-visible { outline-color: #f5f4ee; }
.hero.hero-cinema { --header-backdrop-height: 7rem; }
.hero.hero-cinema::before {
  content: ''; position: absolute; z-index: -3;
  inset: calc(-1 * var(--header-backdrop-height)) 0 0;
  background: #101110; pointer-events: none;
}
.hero-cinema .hero-code, .hero-cinema .hero-shade {
  top: calc(-1 * var(--header-backdrop-height));
  height: calc(100% + var(--header-backdrop-height));
}
@media (max-width: 56rem) {
  .hero.hero-cinema { --header-backdrop-height: 5.75rem; }
}
