/* YokingFactory, editorial look (2026-11-14): cream paper and navy ink, soft lime only as a highlight, Lexend for
   text and JetBrains Mono for labels; follows the phone's dark mode. Colours from canal-youtube/marca/paleta.json. */
@font-face {
  font-family: Lexend;
  src: url("/fuentes/lexend.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fuentes/jetbrains-mono.ttf") format("truetype");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --fondo: #f3eee4;
  --fondo-2: #ebe4d6;
  --tinta: #1e2b45;
  --tenue: rgba(30, 43, 69, 0.66);
  --linea: rgba(30, 43, 69, 0.16);
  --lima: #c8e46a;
  --sobre-lima: #1e2b45;
  --acento-texto: #1e2b45;
  --boton: #1e2b45;
  --sobre-boton: #f3eee4;
  --patron: rgba(30, 43, 69, 0.09);
  --ancho: 1200px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #1e2b45;
    --fondo-2: #18233a;
    --tinta: #f3eee4;
    --tenue: rgba(243, 238, 228, 0.66);
    --linea: rgba(243, 238, 228, 0.14);
    --acento-texto: #c8e46a;
    --boton: #c8e46a;
    --sobre-boton: #1e2b45;
    --patron: rgba(243, 238, 228, 0.07);
    color-scheme: dark;
  }

}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font: 400 1.0625rem/1.65 Lexend, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--lima);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.contenedor {
  max-width: var(--ancho);
  margin: 0 auto;
  padding-inline: 24px;
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Header: a row of cells split by hairlines, the main action as a solid block. */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: stretch;
  height: 56px;
  border-bottom: 1px solid var(--linea);
  background: var(--fondo);
}

.cabecera > * {
  display: flex;
  align-items: center;
  padding-inline: 18px;
  border-right: 1px solid var(--linea);
  text-decoration: none;
  color: var(--tenue);
}

.cabecera .marca {
  color: var(--tinta);
}

.cabecera .marca svg {
  width: 30px;
  height: 30px;
}

.cabecera .marca svg * {
  fill: var(--tinta);
}

.cabecera a:hover,
.cabecera a[aria-current="page"] {
  color: var(--tinta);
}

.cabecera a[aria-current="page"] span {
  background: var(--tinta);
  color: var(--fondo);
  padding: 3px 7px;
}

.cabecera .hueco {
  flex: 1;
  border-right: 0;
  border-left: 0;
}

.cabecera .hueco + * {
  border-left: 1px solid var(--linea);
}

.cabecera > :last-child {
  border-right: 0;
}

/* Hero: the wordmark large and centred over thin saw-tooth roof lines. */
.portada {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: min(78vh, 760px);
  padding: 80px 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--linea);
}

.portada .patron {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  color: var(--patron);
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
  pointer-events: none;
}

.portada .dentro {
  position: relative;
  max-width: 900px;
}

.marca-grande {
  font-size: clamp(3rem, 10.5vw, 9.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 22px 0 26px;
}

.marca-grande b {
  font-weight: inherit;
  background: linear-gradient(transparent 62%, var(--lima) 62% 90%, transparent 90%);
}

/* Cream letters on the lime bar lose contrast: on navy the word itself turns lime. */
@media (prefers-color-scheme: dark) {
  .marca-grande b {
    background: none;
    color: var(--lima);
  }
}

.lema {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--tenue);
  max-width: 44ch;
  margin: 0 auto 34px;
}

.botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.boton {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--tinta);
  color: var(--tinta);
}

.boton.principal {
  background: var(--boton);
  border-color: var(--boton);
  color: var(--sobre-boton);
}

.boton:hover {
  background: var(--lima);
  border-color: var(--lima);
  color: var(--sobre-lima);
}

/* Numbered sections. */
.seccion {
  padding-block: 96px;
  border-bottom: 1px solid var(--linea);
}

.seccion > .contenedor > header {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: baseline;
  margin-bottom: 48px;
}

.seccion header .mono {
  color: var(--tenue);
}

h1,
h2 {
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
}

h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

/* App cards. */
.apps {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.app {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--linea);
  color: inherit;
  text-decoration: none;
}

.app .escaparate {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  padding: 40px 32px 0;
  background: var(--fondo-2);
  border-bottom: 1px solid var(--linea);
  overflow: hidden;
  height: 360px;
}

.app .escaparate img {
  width: 42%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 9 / 20;
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--linea);
  border-bottom: 0;
}

.app .ficha {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 26px 28px 30px;
}

.app .ficha img {
  width: 64px;
  height: 64px;
}

.app p {
  color: var(--tenue);
  margin: 0 0 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--linea);
}

.chip.vivo {
  background: var(--lima);
  border-color: var(--lima);
  color: var(--sobre-lima);
}

.app.proxima {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 32px;
  border-style: dashed;
  color: var(--tenue);
}

.app.proxima svg {
  width: 120px;
  height: 120px;
  color: var(--linea);
}

/* Catalogue page. */
.cabeza {
  padding-block: 72px 40px;
}

.titular {
  font-size: clamp(3rem, 9vw, 7rem);
  letter-spacing: -0.05em;
}

.lema.izquierda {
  margin: 0;
  text-align: left;
}

.botones.izquierda {
  justify-content: flex-start;
  margin-top: 22px;
}

.botones.mas {
  margin-top: 28px;
}

.app .ficha .botones .boton {
  padding: 12px 18px;
}

/* Principles / features: a table of numbered cells. */
.rejilla {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--linea);
  border-left: 1px solid var(--linea);
}

.rejilla > div {
  padding: 30px 28px 34px;
  border-right: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
}

.rejilla .mono {
  display: block;
  color: var(--tenue);
  margin-bottom: 26px;
}

.rejilla p {
  color: var(--tenue);
  margin: 0;
}

/* Wide call-to-action band. */
.banda {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.banda p {
  color: var(--tenue);
  max-width: 52ch;
  margin: 18px 0 0;
}

/* Product page. */
.capturas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.capturas img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 20;
  border-radius: 20px;
  border: 1px solid var(--linea);
}

details {
  border-bottom: 1px solid var(--linea);
  padding: 20px 0;
}

details:first-of-type {
  border-top: 1px solid var(--linea);
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
}

details p {
  color: var(--tenue);
  margin: 12px 0 0;
  max-width: 70ch;
}

.nota {
  font-size: 0.9rem;
  color: var(--tenue);
  margin-top: 20px;
}

/* Long text (privacy). */
.texto {
  max-width: 72ch;
  padding-block: 72px 96px;
}

.texto h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 14px;
}

.texto h2 {
  font-size: 1.4rem;
  margin: 40px 0 10px;
}

.texto li {
  margin-bottom: 8px;
}

/* Footer: the wordmark again, big and quiet. */
.pie {
  padding-block: 64px 40px;
  overflow: hidden;
}

.pie .gigante {
  font-size: clamp(2.6rem, 11vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--linea);
  margin: 0 0 36px;
  user-select: none;
}

.pie .fila {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  color: var(--tenue);
}

.pie .fila a {
  text-decoration: none;
  margin-left: 22px;
}

.pie .fila a:hover {
  color: var(--tinta);
}

/* Motion. Everything here is decoration: without it the page reads the same, and none of it runs for people
   who ask their system for less motion. */
@media (prefers-reduced-motion: no-preference) {
  /* The roof lines drift like a conveyor, one tile every 6 s. */
  .portada .patron {
    animation: cinta 6s linear infinite;
  }

  @keyframes cinta {
    to {
      transform: translateX(96px);
    }
  }

  /* The lime bar under the brand word draws itself in. */
  .marca-grande b {
    background-size: 0% 100%;
    background-repeat: no-repeat;
    animation: subraya 0.9s 0.45s cubic-bezier(0.6, 0, 0.2, 1) forwards;
  }

  @keyframes subraya {
    to {
      background-size: 100% 100%;
    }
  }

  /* Cards lift a little and their phones slide up. */
  .app {
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s;
  }

  .app .escaparate img {
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .app:hover {
    transform: translateY(-4px);
    border-color: var(--tinta);
  }

  .app:hover .escaparate img {
    transform: translateY(-10px);
  }

  .app:hover .escaparate img + img {
    transform: translateY(-18px);
  }

  .boton {
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  }

  /* Blocks rise into place as they scroll into view, where the browser supports scroll-driven animations;
     elsewhere they are simply there. */
  @supports (animation-timeline: view()) {
    .app,
    .rejilla > div,
    .capturas img,
    .banda,
    details,
    .seccion > .contenedor > header {
      animation: aparece linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }

    @keyframes aparece {
      from {
        opacity: 0;
        transform: translateY(28px);
      }
    }
  }

  .sube {
    animation: sube 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .sube.d1 {
    animation-delay: 0.08s;
  }

  .sube.d2 {
    animation-delay: 0.16s;
  }

  .sube.d3 {
    animation-delay: 0.24s;
  }

  @keyframes sube {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
  }
}

@media (max-width: 860px) {
  .apps,
  .rejilla {
    grid-template-columns: 1fr;
  }

  .seccion {
    padding-block: 64px;
  }

  .seccion > .contenedor > header {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 32px;
  }

  .capturas {
    grid-template-columns: repeat(2, 1fr);
  }

  .app .escaparate {
    height: 280px;
  }

  .cabecera .ocultable {
    display: none;
  }
}

@media (max-width: 420px) {
  .cabecera > * {
    padding-inline: 12px;
  }

}

:focus-visible {
  outline: 3px solid var(--lima);
  outline-offset: 3px;
}
