/*
 * Landing de KiN (kin.company). El mismo lenguaje que la app de visitas: fondo crema, paneles
 * arena, títulos en Young Serif y textos en Nunito. Los cinco primeros tokens son la paleta
 * oficial del manual "The KiN Movement".
 */
@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fuentes/young-serif-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('fuentes/nunito-latin-wght-normal.woff2') format('woff2-variations'),
    url('fuentes/nunito-latin-wght-normal.woff2') format('woff2');
}

:root {
  --forest: #4c5f3d;
  --leaf: #7d973a;
  --earth: #8c6a4e;
  --sand: #d4c4a1;
  --coffee: #5a4a33;

  --fondo: #f2ebe0;
  --panel: #e8dcc9;
  --tarjeta: #f4eee4;
  --circulo: #dcd5c6;
  --tinta: #2f2819;
  --seleccion: #e4e6cf;
  --linea: #d6c8b1;
  --etiqueta: #7a5b41;
  --pista: #d5c8b3;
  --crema-texto: #f5f0e6;
  --error: #9b3b2a;

  --fuente-titulo: 'Young Serif', Georgia, serif;
  --fuente-texto: 'Nunito Variable', system-ui, -apple-system, sans-serif;

  --radio-panel: 28px;
  --radio-medio: 22px;
  --radio-opcion: 18px;
  --ancho: 1200px;
  --margen: 44px;
  --alto-barra: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--alto-barra) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--fondo) url('/texturas/grano-fondo.svg');
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Papel y pulpa moldeada, como en la app de visitas: grano en el crema, motitas y fibras en los
   paneles y ramitas de línea en dos esquinas, fijas y detrás de todo. Las texturas son copias de
   app/src/estilos/texturas (una prueba revisa que sigan iguales). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url('/texturas/rama.svg') left -150px bottom -170px / 420px no-repeat,
    url('/texturas/rama-arriba.svg') right -150px top -80px / 420px no-repeat;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

/* Las imágenes y los videos se ven enteros y con su proporción: se achican, nunca se recortan. */
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

.medio {
  border-radius: var(--radio-medio);
  background: var(--pista);
}

a {
  color: inherit;
}

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

/* Barra */
.barra {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--alto-barra);
  padding: 0 max(var(--margen), calc((100% - var(--ancho)) / 2));
  background: color-mix(in srgb, var(--fondo) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* El logo con el slogan, como en la app: se acerca un poco con el mouse o al tocarlo. */
.barra__logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.barra__logo img {
  width: auto;
  height: 34px;
}

.barra__lema {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--forest);
}

@media (prefers-reduced-motion: no-preference) {
  .barra__logo:active {
    transform: scale(1.06);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .barra__logo:hover {
    transform: scale(1.06);
  }
}

.barra__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.barra__links a {
  font-weight: 600;
  font-size: 16px;
  color: var(--coffee);
  text-decoration: none;
}

@media (hover: hover) {
  .barra__links a:hover {
    color: var(--forest);
  }
}

/* Botones, como en la app */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 99px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.boton:active:not(:disabled) {
  transform: scale(0.97);
}

.boton--principal {
  background: var(--forest);
  color: var(--crema-texto);
}

.boton--principal:disabled {
  opacity: 0.55;
  cursor: default;
}

.boton--borde {
  background: transparent;
  border: 1.5px solid var(--forest);
  color: var(--forest);
}

.boton--claro {
  background: var(--crema-texto);
  color: var(--forest);
}

/* Al pasar el mouse, otro color de la marca: el verde pasa a tierra (la oscura, para que la letra se
   lea bien) y el de contorno se llena de verde. Solo con mouse: en el celular no quedan pegados al tocar. */
@media (hover: hover) {
  .boton--principal:hover:not(:disabled) {
    background: var(--etiqueta);
  }

  .boton--borde:hover {
    background: var(--forest);
    color: var(--crema-texto);
  }

  .boton--claro:hover {
    background: #fff;
  }
}

.boton--grande {
  min-height: 58px;
  padding: 0 30px;
  font-size: 18px;
}

.barra > .boton {
  flex-shrink: 0;
}

.barra__links + .boton {
  margin-left: 8px;
}

/* Paneles: una sección por panel arena */
main {
  padding-top: 8px;
}

.panel {
  width: min(var(--ancho), calc(100% - 2 * var(--margen)));
  margin: 0 auto 24px;
  padding: clamp(28px, 5.5vw, 64px);
  border-radius: var(--radio-panel);
  background: var(--panel);
  background-image: url('/texturas/pulpa.svg'), url('/texturas/grano-panel.svg');
}

.etiqueta {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--etiqueta);
}

.titulo {
  margin-bottom: 20px;
  font-family: var(--fuente-titulo);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* La palabra destacada va en Earth Brown, sin itálica, como los acentos del manual. */
.titulo em,
.despedida__lema em {
  font-style: normal;
  color: var(--earth);
}

.titulo--portada {
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 1.06;
}

.bajada {
  max-width: 640px;
  font-size: clamp(18px, 1.7vw, 21px);
  color: var(--coffee);
  text-wrap: pretty;
}

.dos-columnas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.tarjeta {
  border-radius: var(--radio-medio);
  background: var(--tarjeta);
}

/* Inicio */
.inicio {
  text-align: center;
}

.inicio .titulo,
.inicio .bajada {
  margin-inline: auto;
}

.inicio .titulo {
  max-width: 900px;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 32px 0 clamp(32px, 5vw, 52px);
}

.inicio__video {
  width: 100%;
  border-radius: var(--radio-medio);
  background: var(--pista);
}

/* Play. Bury. Grow. */
.ciclo {
  text-align: center;
}

.pasos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.paso {
  padding: 36px 28px 32px;
  counter-increment: paso;
}

.paso__icono {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--circulo);
}

.paso__icono svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: var(--forest);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paso h3 {
  margin-bottom: 6px;
  font-family: var(--fuente-titulo);
  font-weight: 400;
  font-size: 28px;
}

.paso h3::before {
  content: '0' counter(paso) ' ';
  font-family: var(--fuente-texto);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  vertical-align: middle;
  color: var(--etiqueta);
}

.paso p {
  color: var(--coffee);
}

.ciclo__cierre {
  margin-top: 32px;
  font-family: var(--fuente-titulo);
  font-size: clamp(21px, 2.4vw, 27px);
  color: var(--forest);
}

/* The paradigm shift */
.tabla {
  width: 100%;
  margin-top: 12px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 18px;
}

.tabla th,
.tabla td {
  padding: 20px 24px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--linea);
}

.tabla thead th {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--etiqueta);
}

.tabla thead td,
.tabla thead th {
  border-bottom: 0;
}

.tabla tbody th {
  width: 26%;
  font-weight: 700;
  color: var(--coffee);
}

.tabla tbody td {
  width: 37%;
  color: var(--coffee);
}

.tabla .tabla__kin {
  background: var(--tarjeta);
  color: var(--forest);
}

.tabla thead .tabla__kin {
  border-radius: var(--radio-opcion) var(--radio-opcion) 0 0;
  color: var(--forest);
}

.tabla tbody td.tabla__kin {
  font-family: var(--fuente-titulo);
  font-size: 20px;
}

.tabla tbody tr:last-child > * {
  border-bottom: 0;
}

.tabla tbody tr:last-child .tabla__kin {
  border-radius: 0 0 var(--radio-opcion) var(--radio-opcion);
}

/* The product */
.producto video {
  width: 100%;
}

.puntos {
  display: grid;
  gap: 18px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.puntos li {
  position: relative;
  padding-left: 40px;
  color: var(--coffee);
}

.puntos li::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--forest)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f0e6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9'/%3E%3C/svg%3E")
    center / 24px no-repeat;
}

.puntos strong {
  display: block;
  font-size: 19px;
  color: var(--tinta);
}

.producto__envase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: center;
  margin-top: clamp(32px, 5vw, 52px);
}

.producto__envase img {
  width: 100%;
}

.producto__nota {
  padding: 32px 28px;
  font-family: var(--fuente-titulo);
  font-size: clamp(21px, 2.2vw, 26px);
  line-height: 1.3;
  color: var(--forest);
}

/* For retailers */
.retailers__foto {
  justify-self: center;
  width: auto;
  max-height: 640px;
}

.razones {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.razones li {
  padding: 22px 26px;
}

.razones h3 {
  margin-bottom: 4px;
  font-size: 19px;
  font-weight: 700;
}

.razones p {
  color: var(--coffee);
}

.piloto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  margin-top: clamp(32px, 5vw, 52px);
  padding: 32px 40px;
  border-radius: var(--radio-medio);
  background: var(--forest);
  color: var(--crema-texto);
}

.piloto p {
  max-width: 640px;
  font-family: var(--fuente-titulo);
  font-size: clamp(21px, 2.3vw, 27px);
  line-height: 1.3;
}

/* Contacto */
.contacto .dos-columnas {
  align-items: start;
}

.contacto__foto {
  width: 100%;
  max-width: 460px;
  margin-top: 32px;
}

.formulario {
  padding: clamp(24px, 3.5vw, 36px);
}

.campos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.campo {
  display: grid;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--coffee);
}

.campo--ancho {
  grid-column: 1 / -1;
}

.campo input,
.campo textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1.5px solid var(--linea);
  border-radius: 14px;
  background: #fbf8f2;
  color: var(--tinta);
  font: inherit;
  font-size: 17px;
  font-weight: 400;
}

.campo textarea {
  min-height: 130px;
  line-height: 1.45;
  resize: vertical;
}

.campo input::placeholder {
  color: #9a8a76;
}

.campo input:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--seleccion);
}

/* Campo trampa: fuera de la vista y del lector de pantalla; solo un bot lo llena. */
.trampa {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.formulario__pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 24px;
}

.formulario__estado {
  font-weight: 700;
  color: var(--coffee);
}

.formulario__estado[data-tipo='ok'] {
  color: var(--forest);
}

.formulario__estado[data-tipo='error'] {
  color: var(--error);
}

.despedida {
  margin-top: clamp(40px, 6vw, 64px);
  text-align: center;
  font-size: 18px;
  color: var(--coffee);
}

.despedida__lema {
  margin-bottom: 6px;
  font-family: var(--fuente-titulo);
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
  color: var(--tinta);
}

/* Pie */
/* El pie: el slogan y, a su lado, la huellita. */
.pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  width: min(var(--ancho), calc(100% - 2 * var(--margen)));
  margin: 0 auto;
  padding: 16px 8px calc(36px + env(safe-area-inset-bottom));
  font-size: 15px;
  color: var(--coffee);
}

/* La huellita: la entrada del equipo a la app. Al pasar el mouse crece y dice "Team access". */
.pie__equipo {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -10px 0;
  border-radius: 50%;
  color: var(--forest);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.pie__equipo svg {
  width: 24px;
  height: 24px;
}

.pie__equipo::after {
  content: 'Team access';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--tinta);
  color: var(--crema-texto);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.pie__equipo:focus-visible {
  background: var(--seleccion);
}

.pie__equipo:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (hover: hover) {
  .pie__equipo:hover {
    background: var(--seleccion);
  }

  .pie__equipo:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pie__equipo:active {
    transform: scale(1.12);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pie__equipo:hover {
    transform: scale(1.12);
  }
}

/* iPad parado y compus angostas: todo en una columna. */
@media (max-width: 900px) {
  :root {
    --margen: 20px;
  }

  .barra__links {
    display: none;
  }

  .barra > .boton {
    margin-left: auto;
  }

  .dos-columnas {
    grid-template-columns: minmax(0, 1fr);
  }

  .retailers .dos-columnas > img {
    order: 1;
  }

  .retailers__foto {
    max-height: 520px;
  }

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

  .producto__nota {
    grid-column: 1 / -1;
    text-align: center;
  }

  .pasos {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    margin-inline: auto;
  }

  .paso {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 20px;
    align-items: center;
    padding: 22px;
    text-align: left;
  }

  .paso__icono {
    grid-row: span 2;
    width: 76px;
    height: 76px;
    margin: 0;
  }

  .paso__icono svg {
    width: 44px;
    height: 44px;
  }

  .paso h3 {
    margin: 0;
    align-self: end;
  }

  .paso p {
    align-self: start;
  }

  .piloto {
    flex-direction: column;
    align-items: flex-start;
  }

  .contacto__foto {
    display: none;
  }
}

/* Celular: la tabla pasa a tarjetas, una por fila, y los campos van de a uno. */
@media (max-width: 600px) {
  :root {
    --margen: 12px;
    --alto-barra: 64px;
  }

  body {
    font-size: 16px;
  }

  .barra__logo img {
    height: 28px;
  }

  .barra__lema {
    font-size: 10.5px;
  }

  .barra .boton {
    min-height: 42px;
    padding: 0 16px;
    font-size: 15px;
  }

  .acciones .boton {
    width: 100%;
  }

  .tabla,
  .tabla tbody,
  .tabla tr,
  .tabla th,
  .tabla td {
    display: block;
    width: auto;
  }

  .tabla thead {
    display: none;
  }

  .tabla tbody {
    display: grid;
    gap: 14px;
  }

  .tabla tr {
    overflow: hidden;
    border-radius: var(--radio-opcion);
    background: var(--tarjeta);
  }

  .tabla tbody th,
  .tabla tbody td {
    width: auto;
    padding: 12px 18px;
    border-bottom: 0;
  }

  .tabla tbody th {
    padding-top: 16px;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--etiqueta);
  }

  .tabla tbody td::before {
    content: attr(data-titulo);
    display: block;
    font-family: var(--fuente-texto);
    font-size: 13px;
    font-weight: 700;
    color: var(--etiqueta);
  }

  .tabla .tabla__kin,
  .tabla tbody tr:last-child .tabla__kin {
    border-radius: 0;
    background: var(--seleccion);
  }

  .tabla tbody td.tabla__kin {
    padding-bottom: 16px;
  }

  .campos {
    grid-template-columns: minmax(0, 1fr);
  }

  .formulario__pie .boton {
    width: 100%;
  }

  .piloto {
    padding: 26px 22px;
  }

  .piloto .boton {
    width: 100%;
  }
}
