:root{
  /* Colores editables del sistema visual */
  --page-bg: #f5ead4;

  --col-fondo: var(--page-bg);
  --col-texto: #163b63;
  --col-acento: #d56a1f;
  --col-tinta: #6d8d82;
  --col-lima: #8f9a4b;
  --col-negro: #1d1915;
  --col-petrol: #0f4c5b;
  --col-borde: rgba(22, 59, 99, 0.18);

  --ff-base: "mozaic-geo-variable", sans-serif;
  --ff-display: "gridlite-pe-variable", sans-serif;

  --maxw: 84rem;
  --sp-1: 0.6rem;
  --sp-2: 1rem;
  --sp-3: 1.55rem;
  --sp-4: 2.35rem;
  --sp-5: 3.6rem;

  --radius: 0.35rem;
  --radius-pill: 0.15rem;
  --bdr: 0.1rem solid var(--col-borde);
  --bdr-strong: 0.14rem solid rgba(22, 59, 99, 0.42);
}

*{
  box-sizing: border-box;
}

html,
body{
  margin: 0;
  padding: 0;
}

html{
  scroll-behavior: smooth;
  font-size: 100%;
}

body{
  min-height: 100vh;
  color: var(--col-texto);
  font-family: var(--ff-base);
  line-height: 1.55;
  text-rendering: geometricPrecision;
  background: var(--col-fondo);
}

a{
  color: inherit;
  text-decoration: none;
}

a:hover{
  opacity: 0.82;
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kph__wrap{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HERO ===== */
.hero{
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1rem, 2vw, 2rem);
  background-color: var(--col-petrol);
  background-image: url("../img/hero.png");
  background-repeat: no-repeat;
  background-size: max(132vw, 96rem);
  background-position: center -30rem;
  border-bottom: 0.1rem solid rgba(238, 226, 208, 0.2);
  overflow: hidden;
}

.hero::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  height: 0.18rem;
  background: var(--col-acento);
}

.hero-module-field{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-module{
  position: absolute;
  left: var(--module-x, 50%);
  top: var(--module-y, 50%);
  width: var(--module-size, 0.82rem);
  height: var(--module-size, 0.82rem);
  background: rgba(245, 234, 212, 0.76);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.65);
  animation: hero-bg-module-glow var(--module-duration, 5s) ease-in-out var(--module-delay, 0s) infinite;
  mix-blend-mode: screen;
}

.hero-center{
  position: relative;
  z-index: 1;
  width: min(100%, var(--maxw));
  min-height: calc(100vh - (clamp(1rem, 2vw, 2rem) * 2));
  min-height: calc(100svh - (clamp(1rem, 2vw, 2rem) * 2));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: end;
  gap: var(--sp-4);
  padding-bottom: clamp(2.4rem, 7vh, 5rem);
}

.hero-title-box{
  align-self: end;
}

.hero-title-box h1{
  margin: 0;
  width: min(100%, 60rem);
  max-width: none;
  font-family: var(--ff-display);
  font-size: clamp(3.4rem, 10vw, 9rem);
  line-height: 0.86;
  letter-spacing: 0;
  color: var(--col-fondo);
  font-variation-settings: "BACK" 1, "ELSH" 3, "RECT" 1, "wght" 900;
  text-transform: uppercase;
}

.hero-pixel-word{
  display: block;
  width: min(100%, 55rem);
  height: auto;
  overflow: visible;
}

.hero-logo-tile{
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: hero-logo-build 950ms cubic-bezier(.2, .75, .15, 1) var(--build-delay, 0ms) forwards;
}

.hero-logo-tile.is-alive{
  animation: hero-logo-breathe 1600ms ease-in-out 1;
}

.hero-logo-tile.is-built{
  opacity: 1;
  transform: scale(1);
  animation: none;
}

.hero-logo-tile.is-built.is-alive{
  animation: hero-logo-breathe 1600ms ease-in-out 1;
}

@keyframes hero-logo-build{
  0%{
    opacity: 0;
    transform: translateY(0.65rem) scale(0.2) rotate(8deg);
  }
  70%{
    opacity: 1;
    transform: translateY(-0.08rem) scale(1.06);
  }
  100%{
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

.hero-sub{
  display: block;
  margin-top: 1rem;
  max-width: 24ch;
  font-family: var(--ff-base);
  font-size: clamp(1.35rem, 2.7vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: var(--col-lima);
  text-transform: none;
  font-variation-settings: "wght" 760;
}

.hero-text-box{
  max-width: 33rem;
  margin-top: 1rem;
  padding-left: 1.15rem;
  border-left: 0.18rem solid rgba(238, 226, 208, 0.42);
}

.pregunta{
  margin: 0;
  max-width: 26ch;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.4;
  color: var(--col-fondo);
  font-variation-settings: "wght" 520;
}

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1.4rem;
}

.hero-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1rem;
  border: 0.1rem solid rgba(238, 226, 208, 0.32);
  border-radius: var(--radius-pill);
  background: rgba(238, 226, 208, 0.1);
  color: var(--col-fondo);
  font-variation-settings: "wght" 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.hero-btn:hover{
  transform: translateY(-0.08rem);
  background: rgba(238, 226, 208, 0.18);
  border-color: rgba(238, 226, 208, 0.42);
}

.hero-btn:focus-visible{
  outline: 0.35rem solid rgba(143, 154, 75, 0.55);
  outline-offset: 0.16rem;
}

/* ===== FOOTER ===== */
.site-footer{
  position: relative;
  border-top: 0;
  background: var(--col-fondo);
  color: var(--col-texto);
}

.site-footer__inner{
  width: min(100%, var(--maxw));
  margin: 0 auto;
  padding: 1.1rem clamp(1rem, 2vw, 2rem) 1.4rem;
}

.site-footer p{
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.82;
}

.chips a{
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 42rem){
  html{ font-size: 95%; }

  .hero{
    background-size: 210vw;
    background-position: center -7rem;
  }

  .hero-title-box h1{
    width: 100%;
  }

  .hero-text-box{
    padding-left: 0.9rem;
  }

  .hero-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .hero-btn{
    width: 100%;
  }
}

@keyframes hero-logo-breathe{
  0%,
  100%{
    opacity: 1;
    transform: scale(1);
  }
  12%,
  88%{
    opacity: 1;
    transform: scale(1);
  }
  50%{
    opacity: 0.78;
    transform: scale(var(--alive-scale, 1.14));
  }
}

@keyframes hero-bg-module-glow{
  0%,
  18%,
  100%{
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65);
  }

  35%{
    opacity: var(--module-opacity, 0.16);
    transform: translate(-50%, -50%) scale(1);
  }

  52%{
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
  }
}

@media (prefers-reduced-motion: reduce){
  .hero-logo-tile{
    opacity: 1;
    animation: none;
  }

  .hero-bg-module{
    display: none;
  }
}
